Allow configuration of the blank.mp4 URL

This is useful for people behind firewalls who need to host a blank mp4 themselves.
This commit is contained in:
Samuel Hodge 2017-02-11 23:50:49 -05:00 committed by GitHub
parent bc139f16a7
commit 7d5c507f16

View File

@ -44,6 +44,7 @@
loadSprite: true, loadSprite: true,
iconPrefix: 'plyr', iconPrefix: 'plyr',
iconUrl: 'https://cdn.plyr.io/2.0.11/plyr.svg', iconUrl: 'https://cdn.plyr.io/2.0.11/plyr.svg',
blankUrl: 'https://cdn.selz.com/plyr/blank.mp4',
clickToPlay: true, clickToPlay: true,
hideControls: true, hideControls: true,
showPosterOnEnd: false, showPosterOnEnd: false,
@ -3217,7 +3218,7 @@
// Set blank video src attribute // Set blank video src attribute
// This is to prevent a MEDIA_ERR_SRC_NOT_SUPPORTED error // This is to prevent a MEDIA_ERR_SRC_NOT_SUPPORTED error
// Info: http://stackoverflow.com/questions/32231579/how-to-properly-dispose-of-an-html5-video-and-close-socket-or-connection // Info: http://stackoverflow.com/questions/32231579/how-to-properly-dispose-of-an-html5-video-and-close-socket-or-connection
plyr.media.setAttribute('src', 'https://cdn.selz.com/plyr/blank.mp4'); plyr.media.setAttribute('src', config.blankUrl);
// Load the new empty source // Load the new empty source
// This will cancel existing requests // This will cancel existing requests