From 7d5c507f16733a1789e540dcab612226e5bf1d32 Mon Sep 17 00:00:00 2001 From: Samuel Hodge Date: Sat, 11 Feb 2017 23:50:49 -0500 Subject: [PATCH] Allow configuration of the blank.mp4 URL This is useful for people behind firewalls who need to host a blank mp4 themselves. --- src/js/plyr.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/plyr.js b/src/js/plyr.js index 1119700c..da4230de 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -44,6 +44,7 @@ loadSprite: true, iconPrefix: 'plyr', iconUrl: 'https://cdn.plyr.io/2.0.11/plyr.svg', + blankUrl: 'https://cdn.selz.com/plyr/blank.mp4', clickToPlay: true, hideControls: true, showPosterOnEnd: false, @@ -3217,7 +3218,7 @@ // Set blank video src attribute // 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 - plyr.media.setAttribute('src', 'https://cdn.selz.com/plyr/blank.mp4'); + plyr.media.setAttribute('src', config.blankUrl); // Load the new empty source // This will cancel existing requests