From 4d483bf66c8985ce21b22107653ae0b1a65636c3 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Wed, 4 Mar 2015 08:08:38 +1100 Subject: Bug fixes and improvements --- src/js/plyr.js | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 6 deletions(-) (limited to 'src/js') diff --git a/src/js/plyr.js b/src/js/plyr.js index 67d77e20..e8d852e8 100644 --- a/src/js/plyr.js +++ b/src/js/plyr.js @@ -1,7 +1,8 @@ // ========================================================================== // Plyr -// plyr.js v1.0.19 +// plyr.js v1.0.20 // https://github.com/sampotts/plyr +// License: The MIT License (MIT) // ========================================================================== // Credits: http://paypal.github.io/accessible-html5-video-player/ // ========================================================================== @@ -67,7 +68,65 @@ }, storage: { enabled: true - } + }, + html: (function() { + return ["
", + "
", + "", + "0% played", + "", + "", + "0% buffered", + "", + "
", + "", + "", + "", + "", + "", + "", + "", + "Time", + "00:00", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "
"].join("\n"); + })() }; // Debugging @@ -489,11 +548,11 @@ // Setup aria attributes function _setupAria() { - var label = player.buttons.play.innerText; + var label = player.buttons.play.innerText || "Play"; // If there's a media title set, use that for the label if (typeof(config.title) !== "undefined" && config.title.length) { - label = player.buttons.play.innerText + ", " + config.title; + label += ", " + config.title; } player.buttons.play.setAttribute("aria-label", label); @@ -974,8 +1033,9 @@ // Fast forward _on(player.buttons.forward, "click", _forward); - // Get the HTML5 range input element and append audio volume adjustment on change - _on(player.volume, "change", function() { + // Get the HTML5 range input element and append audio volume adjustment on change/input + // IE10 doesn't support the "input" event so they have to wait for change + _on(player.volume, "change input", function() { _setVolume(this.value); }); -- cgit v1.2.3