aboutsummaryrefslogtreecommitdiffstats
path: root/dist/js/plyr.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/js/plyr.js')
-rw-r--r--dist/js/plyr.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/js/plyr.js b/dist/js/plyr.js
index c1956f26..bb3b648c 100644
--- a/dist/js/plyr.js
+++ b/dist/js/plyr.js
@@ -1 +1 @@
-!function(e){"use strict";function t(e,t){m.debug&&window.console&&console[t?"error":"log"](e)}function n(){var e,t,n,r=navigator.userAgent,s=navigator.appName,a=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10);return-1!==navigator.appVersion.indexOf("Windows NT")&&-1!==navigator.appVersion.indexOf("rv:11")?(s="IE",a="11;"):-1!==(t=r.indexOf("MSIE"))?(s="IE",a=r.substring(t+5)):-1!==(t=r.indexOf("Chrome"))?(s="Chrome",a=r.substring(t+7)):-1!==(t=r.indexOf("Safari"))?(s="Safari",a=r.substring(t+7),-1!==(t=r.indexOf("Version"))&&(a=r.substring(t+8))):-1!==(t=r.indexOf("Firefox"))?(s="Firefox",a=r.substring(t+8)):(e=r.lastIndexOf(" ")+1)<(t=r.lastIndexOf("/"))&&(s=r.substring(e,t),a=r.substring(t+1),s.toLowerCase()==s.toUpperCase()&&(s=navigator.appName)),-1!==(n=a.indexOf(";"))&&(a=a.substring(0,n)),-1!==(n=a.indexOf(" "))&&(a=a.substring(0,n)),o=parseInt(""+a,10),isNaN(o)&&(a=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10)),[s,o]}function r(e,t,n){return e.replace(new RegExp(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),n)}function s(e,t){e.length||(e=[e]);for(var n=e.length-1;n>=0;n--){var r=n>0?t.cloneNode(!0):t,s=e[n],a=s.parentNode,o=s.nextSibling;r.appendChild(s),o?a.insertBefore(r,o):a.appendChild(r)}}function a(e,t,n){if(e)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(/\s+/g," ").replace(" "+t+" ","");e.className=r+(n?" "+t:"")}}function o(e,t,n){e.addEventListener(t,n,!1)}function i(e,t,n){e.removeEventListener(t,n,!1)}function c(e){var t=d().isFullScreen()?{x:0,y:0}:l(e.currentTarget);return{x:e.clientX-t.x,y:e.clientY-t.y}}function l(e){for(var t=0,n=0;e;)t+=e.offsetLeft-e.scrollLeft+e.clientLeft,n+=e.offsetTop-e.scrollTop+e.clientTop,e=e.offsetParent;return{x:t,y:n}}function u(e,t){for(var n in t)t[n]&&t[n].constructor&&t[n].constructor===Object?(e[n]=e[n]||{},u(e[n],t[n])):e[n]=t[n];return e}function d(){var e={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",element:null,prefix:""},t="webkit moz o ms khtml".split(" ");if("undefined"!=typeof document.cancelFullScreen)e.supportsFullScreen=!0;else for(var n=0,r=t.length;r>n;n++){if(e.prefix=t[n],"undefined"!=typeof document[e.prefix+"CancelFullScreen"]){e.supportsFullScreen=!0;break}if("undefined"!=typeof document.msExitFullscreen&&document.msFullscreenEnabled){e.prefix="ms",e.supportsFullScreen=!0;break}}return"webkit"===e.prefix&&navigator.userAgent.match(/Version\/[\d\.]+.*Safari/)&&(e.supportsFullScreen=!1),e.supportsFullScreen&&(e.fullScreenEventName="ms"==e.prefix?"MSFullscreenChange":e.prefix+"fullscreenchange",e.isFullScreen=function(){switch(this.prefix){case"":return document.fullScreen;case"webkit":return document.webkitIsFullScreen;case"ms":return null!==document.msFullscreenElement;default:return document[this.prefix+"FullScreen"]}},e.requestFullScreen=function(e){return""===this.prefix?e.requestFullScreen():e[this.prefix+("ms"==this.prefix?"RequestFullscreen":"RequestFullScreen")]("webkit"===this.prefix?e.ALLOW_KEYBOARD_INPUT:null)},e.cancelFullScreen=function(){return""===this.prefix?document.cancelFullScreen():document[this.prefix+("ms"==this.prefix?"ExitFullscreen":"CancelFullScreen")]()},e.element=function(){return""===this.prefix?document.fullscreenElement:document[this.prefix+"FullscreenElement"]}),e}function p(e){function l(){for(B.subcount=0;b(B.captions[B.subcount][0])<B.media.currentTime.toFixed(1);)if(B.subcount++,B.subcount>B.captions.length-1){B.subcount=B.captions.length-1;break}}function u(){a(B.container,m.classes.captions.enabled,!0),m.captions.defaultActive&&(a(B.container,m.classes.captions.active,!0),B.buttons.captions.setAttribute("checked","checked"))}function p(e){var t=[];return t=e.split(" --> "),v(t[0])}function b(e){var t=[];return t=e.split(" --> "),v(t[1])}function v(e){if(null===e||void 0===e)return 0;var t,n=[],r=[];return n=e.split(","),r=n[0].split(":"),t=Math.floor(60*r[0]*60)+Math.floor(60*r[1])+Math.floor(r[2])}function g(e){return B.container.querySelectorAll(e)}function y(e){return g(e)[0]}function h(){try{return window.self!==window.top}catch(e){return!0}}function x(){t("Injecting custom controls");var e=m.html;e=r(e,"{aria-label}",m.playAriaLabel),e=r(e,"{id}",B.random),B.container.insertAdjacentHTML("beforeend",e)}function k(){B.controls=y(m.selectors.controls),B.buttons={},B.buttons.play=y(m.selectors.buttons.play),B.buttons.pause=y(m.selectors.buttons.pause),B.buttons.restart=y(m.selectors.buttons.restart),B.buttons.rewind=y(m.selectors.buttons.rewind),B.buttons.forward=y(m.selectors.buttons.forward),B.buttons.mute=y(m.selectors.buttons.mute),B.buttons.captions=y(m.selectors.buttons.captions),B.buttons.fullscreen=y(m.selectors.buttons.fullscreen),B.progress={},B.progress.bar=y(m.selectors.progress),B.progress.text=B.progress.bar.getElementsByTagName("span")[0],B.volume=y(m.selectors.buttons.volume),B.duration=y(m.selectors.duration),B.seekTime=g(m.selectors.seekTime)}function w(){if(B.media=B.container.querySelectorAll("audio, video")[0],!B.media)return t("No audio or video element found!",!0),!1;if(B.media.removeAttribute("controls"),B.type="video"==B.media.tagName.toLowerCase()?"video":"audio",a(B.container,m.classes[B.type],!0),a(B.container,m.classes.stopped,null===B.media.getAttribute("autoplay")),"video"===B.type){var e=document.createElement("div");e.setAttribute("class",m.classes.videoWrapper),s(B.media,e),B.videoContainer=e}}function T(){if("video"===B.type){B.videoContainer.insertAdjacentHTML("afterbegin","<div class='"+m.selectors.captions.replace(".","")+"'></div>"),B.captionsContainer=y(m.selectors.captions),B.isTextTracks=!1,B.media.textTracks&&(B.isTextTracks=!0);for(var e,n="",r=B.media.childNodes,s=0;s<r.length;s++)"track"===r[s].nodeName.toLowerCase()&&(e=r[s].getAttribute("kind"),"captions"===e&&(n=r[s].getAttribute("src")));if(B.captionExists=!0,""===n?(B.captionExists=!1,t("No caption track found.")):t("Caption track found; URI: "+n),B.captionExists){var i,c,l={};if("IE"===B.browserName&&10===B.browserMajorVersion||"IE"===B.browserName&&11===B.browserMajorVersion||"Firefox"===B.browserName&&B.browserMajorVersion>=31||"Safari"===B.browserName&&B.browserMajorVersion>=7)for(t("Detected IE 10/11 or Firefox 31+ or Safari 7+"),B.isTextTracks=!1,l={},i=B.media.textTracks,c=0;c<i.length;c++)l=B.media.textTracks[c],l.mode="hidden";if(B.isTextTracks)for(t("textTracks supported"),u(B),l={},i=B.media.textTracks,c=0;c<i.length;c++)l=B.media.textTracks[c],l.mode="hidden","captions"===l.kind&&o(l,"cuechange",function(){this.activeCues[0]&&this.activeCues[0].hasOwnProperty("text")&&(B.captionsContainer.innerHTML=this.activeCues[0].text)});else if(t("textTracks not supported so rendering captions manually"),u(B),B.currentCaption="",B.subcount=0,B.captions=[],o(B.media,"timeupdate",function(){B.media.currentTime.toFixed(1)>p(B.captions[B.subcount][0])&&B.media.currentTime.toFixed(1)<b(B.captions[B.subcount][0])&&(B.currentCaption=B.captions[B.subcount][1]),B.media.currentTime.toFixed(1)>b(B.captions[B.subcount][0])&&B.subcount<B.captions.length-1&&B.subcount++,B.captionsContainer.innerHTML=B.currentCaption}),""!==n){var d=new XMLHttpRequest;d.onreadystatechange=function(){if(4===d.readyState)if(200===d.status){B.captions=[];var e,n=[],r=d.responseText;n=r.split("\n\n");for(var s=0;s<n.length;s++)e=n[s],B.captions[s]=[],B.captions[s]=e.split("\n");B.captions.shift(),t("Successfully loaded the caption file via ajax.")}else t("There was a problem loading the caption file via ajax.",!0)},d.open("get",n,!0),d.send()}"Safari"===B.browserName&&7===B.browserMajorVersion&&(t("Safari 7 detected; removing track from DOM"),i=B.media.getElementsByTagName("track"),B.media.removeChild(i[0]))}else a(B.container,m.classes.captions.enabled)}}function S(){B.seekTime[0].innerHTML=m.seekInterval,B.seekTime[1].innerHTML=m.seekInterval}function F(){if("video"===B.type&&m.fullscreen.enabled){var e=f.supportsFullScreen;e||m.fullscreen.fallback&&!h()?(t((e?"Native":"Fallback")+" fullscreen enabled"),a(B.container,m.classes.fullscreen.enabled,!0)):t("Fullscreen not supported and fallback disabled.")}}function N(){B.media.play(),a(B.container,m.classes.stopped),a(B.container,m.classes.playing,!0)}function C(){B.media.pause(),a(B.container,m.classes.playing),a(B.container,m.classes.stopped,!0)}function I(){B.media.currentTime=0,B.isTextTracks||(B.subcount=0),N()}function M(e){"undefined"==typeof e&&(e=m.seekInterval);var t=B.media.currentTime-e;B.media.currentTime=0>t?0:t,B.isTextTracks||"video"!==B.type||l(B)}function E(e){"undefined"==typeof e&&(e=m.seekInterval);var t=B.media.currentTime+e;B.media.currentTime=t>B.media.duration?B.media.duration:t,B.isTextTracks||"video"!==B.type||l(B)}function L(){var e=f.supportsFullScreen;event.type===f.fullScreenEventName?m.fullscreen.active=f.isFullScreen():e?(f.isFullScreen()?f.cancelFullScreen():f.requestFullScreen(B.container),m.fullscreen.active=f.isFullScreen()):(m.fullscreen.active=!m.fullscreen.active,m.fullscreen.active?(o(document,"keyup",A),document.body.style.overflow="hidden"):(i(document,"keyup",A),document.body.style.overflow="")),a(B.container,m.classes.fullscreen.active,m.fullscreen.active)}function A(e){27===(e.which||e.charCode||e.keyCode)&&m.fullscreen.active&&L()}function V(e){"undefined"==typeof e&&(e=m.storage.enabled&&m.storage.supported?window.localStorage.plyr_volume||m.volume:m.volume),e>10&&(e=10),B.volume.value=e,B.media.volume=parseFloat(e/10),q(),m.storage.enabled&&m.storage.supported&&(window.localStorage.plyr_volume=e)}function O(e){"undefined"==typeof active&&(e=!B.media.muted,B.buttons.mute.checked=e),B.media.muted=e,q()}function j(e){"undefined"==typeof e&&(e=-1===B.container.className.indexOf(m.classes.captions.active),B.buttons.captions.checked=e),e?a(B.container,m.classes.captions.active,!0):a(B.container,m.classes.captions.active)}function q(){a(B.container,m.classes.muted,0===B.media.volume||B.media.muted)}function H(){o(B.buttons.play,"click",function(){N(),B.buttons.pause.focus()}),o(B.buttons.pause,"click",function(){C(),B.buttons.play.focus()}),o(B.buttons.restart,"click",I),o(B.buttons.rewind,"click",function(){M(m.seekInterval)}),o(B.buttons.forward,"click",function(){E(m.seekInterval)}),o(B.volume,"change",function(){V(this.value)}),o(B.buttons.mute,"change",function(){O(this.checked)}),o(B.buttons.fullscreen,"click",L),o(document,f.fullScreenEventName,L),"video"===B.type&&m.click&&o(B.videoContainer,"click",function(){B.media.paused?N():B.media.ended?I():C()}),o(B.media,"timeupdate",function(){B.secs=parseInt(B.media.currentTime%60),B.mins=parseInt(B.media.currentTime/60%60),B.secs=("0"+B.secs).slice(-2),B.mins=("0"+B.mins).slice(-2),B.duration.innerHTML=B.mins+":"+B.secs}),o(B.media,"timeupdate",function(){B.percent=100/B.media.duration*B.media.currentTime,B.percent>0&&(B.progress.bar.value=B.percent,B.progress.text.innerHTML=B.percent)}),o(B.progress.bar,"click",function(e){B.pos=c(e).x/this.offsetWidth,B.media.currentTime=B.pos*B.media.duration,B.isTextTracks||"video"!==B.type||l(B)}),o(B.buttons.captions,"click",function(){j(this.checked)}),o(B.media,"ended",function(){"video"===B.type&&(B.captionsContainer.innerHTML=""),a(B.container,m.classes.stopped,!0),a(B.container,m.classes.playing)})}function R(){return f=d(),B.browserInfo=n(),B.browserName=B.browserInfo[0],B.browserMajorVersion=B.browserInfo[1],t(B.browserName+" "+B.browserMajorVersion),"IE"!==B.browserName||8!==B.browserMajorVersion&&9!==B.browserMajorVersion?(m.playAriaLabel="undefined"!=typeof m.title&&m.title.length?"Play "+m.title:"Play",w(),B.random=Math.floor(1e4*Math.random()),x(),k(),V(),F(),T(),S(),H(),void 0):(t("Browser not suppported.",!0),!1)}var B=this;return B.container=e,R(),{media:B.media,play:N,pause:C,restart:I,rewind:M,forward:E,setVolume:V,toggleMute:O,toggleCaptions:j}}var f,m,b={enabled:!0,debug:!1,seekInterval:10,volume:5,click:!0,selectors:{container:".player",controls:".player-controls",buttons:{play:"[data-player='play']",pause:"[data-player='pause']",restart:"[data-player='restart']",rewind:"[data-player='rewind']",forward:"[data-player='fast-forward']",mute:"[data-player='mute']",volume:"[data-player='volume']",captions:"[data-player='captions']",fullscreen:"[data-player='fullscreen']"},progress:".player-progress",captions:".player-captions",duration:".player-duration",seekTime:".player-seek-time"},classes:{video:"player-video",videoWrapper:"player-video-wrapper",audio:"player-audio",stopped:"stopped",playing:"playing",muted:"muted",captions:{enabled:"captions-enabled",active:"captions-active"},fullscreen:{enabled:"fullscreen-enabled",active:"fullscreen-active"}},captions:{defaultActive:!1},fullscreen:{enabled:!0,fallback:!0},storage:{enabled:!0,supported:function(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}}}};e.setup=function(e){if(m=u(b,e),!m.enabled)return!1;for(var t=document.querySelectorAll(m.selectors.container),n=[],r=t.length-1;r>=0;r--){var s=t[r];"undefined"==typeof s.plyr&&(s.plyr=new p(s)),n.push(s.plyr)}return n}}(this.plyr=this.plyr||{}); \ No newline at end of file
+!function(e){"use strict";function t(e,t){b.debug&&window.console&&console[t?"error":"log"](e)}function n(){var e,t,n,r=navigator.userAgent,a=navigator.appName,s=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10);return-1!==navigator.appVersion.indexOf("Windows NT")&&-1!==navigator.appVersion.indexOf("rv:11")?(a="IE",s="11;"):-1!==(t=r.indexOf("MSIE"))?(a="IE",s=r.substring(t+5)):-1!==(t=r.indexOf("Chrome"))?(a="Chrome",s=r.substring(t+7)):-1!==(t=r.indexOf("Safari"))?(a="Safari",s=r.substring(t+7),-1!==(t=r.indexOf("Version"))&&(s=r.substring(t+8))):-1!==(t=r.indexOf("Firefox"))?(a="Firefox",s=r.substring(t+8)):(e=r.lastIndexOf(" ")+1)<(t=r.lastIndexOf("/"))&&(a=r.substring(e,t),s=r.substring(t+1),a.toLowerCase()==a.toUpperCase()&&(a=navigator.appName)),-1!==(n=s.indexOf(";"))&&(s=s.substring(0,n)),-1!==(n=s.indexOf(" "))&&(s=s.substring(0,n)),o=parseInt(""+s,10),isNaN(o)&&(s=""+parseFloat(navigator.appVersion),o=parseInt(navigator.appVersion,10)),[a,o]}function r(e,t,n){return e.replace(new RegExp(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),n)}function a(e,t){e.length||(e=[e]);for(var n=e.length-1;n>=0;n--){var r=n>0?t.cloneNode(!0):t,a=e[n],s=a.parentNode,o=a.nextSibling;r.appendChild(a),o?s.insertBefore(r,o):s.appendChild(r)}}function s(e,t,n){if(e)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(/\s+/g," ").replace(" "+t+" ","");e.className=r+(n?" "+t:"")}}function o(e,t,n){e.addEventListener(t,n,!1)}function i(e,t,n){e.removeEventListener(t,n,!1)}function c(e,t){return Math.floor(e/t*100)}function l(e){var t=d().isFullScreen()?{x:0,y:0}:u(e.currentTarget);return{x:e.clientX-t.x,y:e.clientY-t.y}}function u(e){for(var t=0,n=0;e;)t+=e.offsetLeft-e.scrollLeft+e.clientLeft,n+=e.offsetTop-e.scrollTop+e.clientTop,e=e.offsetParent;return{x:t,y:n}}function p(e,t){for(var n in t)t[n]&&t[n].constructor&&t[n].constructor===Object?(e[n]=e[n]||{},p(e[n],t[n])):e[n]=t[n];return e}function d(){var e={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",element:null,prefix:""},t="webkit moz o ms khtml".split(" ");if("undefined"!=typeof document.cancelFullScreen)e.supportsFullScreen=!0;else for(var n=0,r=t.length;r>n;n++){if(e.prefix=t[n],"undefined"!=typeof document[e.prefix+"CancelFullScreen"]){e.supportsFullScreen=!0;break}if("undefined"!=typeof document.msExitFullscreen&&document.msFullscreenEnabled){e.prefix="ms",e.supportsFullScreen=!0;break}}return"webkit"===e.prefix&&navigator.userAgent.match(/Version\/[\d\.]+.*Safari/)&&(e.supportsFullScreen=!1),e.supportsFullScreen&&(e.fullScreenEventName="ms"==e.prefix?"MSFullscreenChange":e.prefix+"fullscreenchange",e.isFullScreen=function(){switch(this.prefix){case"":return document.fullScreen;case"webkit":return document.webkitIsFullScreen;case"ms":return null!==document.msFullscreenElement;default:return document[this.prefix+"FullScreen"]}},e.requestFullScreen=function(e){return""===this.prefix?e.requestFullScreen():e[this.prefix+("ms"==this.prefix?"RequestFullscreen":"RequestFullScreen")]("webkit"===this.prefix?e.ALLOW_KEYBOARD_INPUT:null)},e.cancelFullScreen=function(){return""===this.prefix?document.cancelFullScreen():document[this.prefix+("ms"==this.prefix?"ExitFullscreen":"CancelFullScreen")]()},e.element=function(){return""===this.prefix?document.fullscreenElement:document[this.prefix+"FullscreenElement"]}),e}function f(e){function u(){for(_.subcount=0;v(_.captions[_.subcount][0])<_.media.currentTime.toFixed(1);)if(_.subcount++,_.subcount>_.captions.length-1){_.subcount=_.captions.length-1;break}}function p(){s(_.container,b.classes.captions.enabled,!0),b.captions.defaultActive&&(s(_.container,b.classes.captions.active,!0),_.buttons.captions.setAttribute("checked","checked"))}function f(e){var t=[];return t=e.split(" --> "),g(t[0])}function v(e){var t=[];return t=e.split(" --> "),g(t[1])}function g(e){if(null===e||void 0===e)return 0;var t,n=[],r=[];return n=e.split(","),r=n[0].split(":"),t=Math.floor(60*r[0]*60)+Math.floor(60*r[1])+Math.floor(r[2])}function y(e){return _.container.querySelectorAll(e)}function h(e){return y(e)[0]}function x(){try{return window.self!==window.top}catch(e){return!0}}function k(){t("Injecting custom controls");var e=b.html;e=r(e,"{aria-label}",b.playAriaLabel),e=r(e,"{id}",_.random),_.container.insertAdjacentHTML("beforeend",e)}function w(){try{return _.controls=h(b.selectors.controls),_.buttons={},_.buttons.play=h(b.selectors.buttons.play),_.buttons.pause=h(b.selectors.buttons.pause),_.buttons.restart=h(b.selectors.buttons.restart),_.buttons.rewind=h(b.selectors.buttons.rewind),_.buttons.forward=h(b.selectors.buttons.forward),_.buttons.mute=h(b.selectors.buttons.mute),_.buttons.captions=h(b.selectors.buttons.captions),_.buttons.fullscreen=h(b.selectors.buttons.fullscreen),_.progress={},_.progress.container=h(b.selectors.progress.container),_.progress.buffer={},_.progress.buffer.bar=h(b.selectors.progress.buffer),_.progress.buffer.text=_.progress.buffer.bar.getElementsByTagName("span")[0],_.progress.played={},_.progress.played.bar=h(b.selectors.progress.played),_.progress.played.text=_.progress.played.bar.getElementsByTagName("span")[0],_.volume=h(b.selectors.buttons.volume),_.duration=h(b.selectors.duration),_.seekTime=y(b.selectors.seekTime),!0}catch(e){return t("It looks like there's a problem with your controls html. Bailing.",!0),!1}}function T(){if(_.media=_.container.querySelectorAll("audio, video")[0],!_.media)return t("No audio or video element found!",!0),!1;if(_.media.removeAttribute("controls"),_.type="video"==_.media.tagName.toLowerCase()?"video":"audio",s(_.container,b.classes[_.type],!0),s(_.container,b.classes.stopped,null===_.media.getAttribute("autoplay")),"video"===_.type){var e=document.createElement("div");e.setAttribute("class",b.classes.videoWrapper),a(_.media,e),_.videoContainer=e}}function S(){if("video"===_.type){_.videoContainer.insertAdjacentHTML("afterbegin","<div class='"+b.selectors.captions.replace(".","")+"'></div>"),_.captionsContainer=h(b.selectors.captions),_.isTextTracks=!1,_.media.textTracks&&(_.isTextTracks=!0);for(var e,n="",r=_.media.childNodes,a=0;a<r.length;a++)"track"===r[a].nodeName.toLowerCase()&&(e=r[a].getAttribute("kind"),"captions"===e&&(n=r[a].getAttribute("src")));if(_.captionExists=!0,""===n?(_.captionExists=!1,t("No caption track found.")):t("Caption track found; URI: "+n),_.captionExists){for(var i=_.media.textTracks,c=0;c<i.length;c++)i[c].mode="hidden";if(p(_),("IE"===_.browserName&&10===_.browserMajorVersion||"IE"===_.browserName&&11===_.browserMajorVersion||"Firefox"===_.browserName&&_.browserMajorVersion>=31||"Safari"===_.browserName&&_.browserMajorVersion>=7)&&(t("Detected IE 10/11 or Firefox 31+ or Safari 7+"),_.isTextTracks=!1),_.isTextTracks){t("textTracks supported");for(var l=0;l<i.length;l++){var u=i[l];"captions"===u.kind&&o(u,"cuechange",function(){this.activeCues[0]&&this.activeCues[0].hasOwnProperty("text")&&(_.captionsContainer.innerHTML=this.activeCues[0].text)})}}else if(t("textTracks not supported so rendering captions manually"),_.currentCaption="",_.subcount=0,_.captions=[],o(_.media,"timeupdate",function(){_.media.currentTime.toFixed(1)>f(_.captions[_.subcount][0])&&_.media.currentTime.toFixed(1)<v(_.captions[_.subcount][0])&&(_.currentCaption=_.captions[_.subcount][1]),_.media.currentTime.toFixed(1)>v(_.captions[_.subcount][0])&&_.subcount<_.captions.length-1&&_.subcount++,_.captionsContainer.innerHTML=_.currentCaption}),""!==n){var d=new XMLHttpRequest;d.onreadystatechange=function(){if(4===d.readyState)if(200===d.status){var e,n=[],r=d.responseText;n=r.split("\n\n");for(var a=0;a<n.length;a++)e=n[a],_.captions[a]=[],_.captions[a]=e.split("\n");_.captions.shift(),t("Successfully loaded the caption file via ajax.")}else t("There was a problem loading the caption file via ajax.",!0)},d.open("get",n,!0),d.send()}if("Safari"===_.browserName&&_.browserMajorVersion>=7){t("Safari 7+ detected; removing track from DOM"),i=_.media.getElementsByTagName("track");for(var m=0;m<i.length;m++)_.media.removeChild(i[m])}}else s(_.container,b.classes.captions.enabled)}}function F(){_.seekTime[0].innerHTML=b.seekInterval,_.seekTime[1].innerHTML=b.seekInterval}function N(){if("video"===_.type&&b.fullscreen.enabled){var e=m.supportsFullScreen;e||b.fullscreen.fallback&&!x()?(t((e?"Native":"Fallback")+" fullscreen enabled"),s(_.container,b.classes.fullscreen.enabled,!0)):t("Fullscreen not supported and fallback disabled.")}}function C(){_.media.play(),s(_.container,b.classes.stopped),s(_.container,b.classes.playing,!0)}function I(){_.media.pause(),s(_.container,b.classes.playing),s(_.container,b.classes.stopped,!0)}function M(){_.media.currentTime=0,_.isTextTracks||(_.subcount=0),C()}function E(e){"undefined"==typeof e&&(e=b.seekInterval);var t=_.media.currentTime-e;_.media.currentTime=0>t?0:t,_.isTextTracks||"video"!==_.type||u(_)}function L(e){"undefined"==typeof e&&(e=b.seekInterval);var t=_.media.currentTime+e;_.media.currentTime=t>_.media.duration?_.media.duration:t,_.isTextTracks||"video"!==_.type||u(_)}function A(){var e=m.supportsFullScreen;event.type===m.fullScreenEventName?b.fullscreen.active=m.isFullScreen():e?(m.isFullScreen()?m.cancelFullScreen():m.requestFullScreen(_.container),b.fullscreen.active=m.isFullScreen()):(b.fullscreen.active=!b.fullscreen.active,b.fullscreen.active?(o(document,"keyup",V),document.body.style.overflow="hidden"):(i(document,"keyup",V),document.body.style.overflow="")),s(_.container,b.classes.fullscreen.active,b.fullscreen.active)}function V(e){27===(e.which||e.charCode||e.keyCode)&&b.fullscreen.active&&A()}function O(e){"undefined"==typeof e&&(e=b.storage.enabled&&b.storage.supported?window.localStorage.plyr_volume||b.volume:b.volume),e>10&&(e=10),_.volume.value=e,_.media.volume=parseFloat(e/10),H(),b.storage.enabled&&b.storage.supported&&(window.localStorage.plyr_volume=e)}function j(e){"undefined"==typeof active&&(e=!_.media.muted,_.buttons.mute.checked=e),_.media.muted=e,H()}function q(e){"undefined"==typeof e&&(e=-1===_.container.className.indexOf(b.classes.captions.active),_.buttons.captions.checked=e),e?s(_.container,b.classes.captions.active,!0):s(_.container,b.classes.captions.active)}function H(){s(_.container,b.classes.muted,0===_.media.volume||_.media.muted)}function B(e){var t,n,r=0;switch(e.type){case"timeupdate":t=_.progress.played.bar,n=_.progress.played.text,r=c(_.media.currentTime,_.media.duration);break;case"playing":case"progress":t=_.progress.buffer.bar,n=_.progress.buffer.text,r=function(){var e=_.media.buffered;return e.length?c(e.end(0),_.media.duration):0}()}t&&r>0&&(t.value=r,n.innerHTML=r)}function R(){_.secs=parseInt(_.media.currentTime%60),_.mins=parseInt(_.media.currentTime/60%60),_.secs=("0"+_.secs).slice(-2),_.mins=("0"+_.mins).slice(-2),_.duration.innerHTML=_.mins+":"+_.secs}function P(){o(_.buttons.play,"click",function(){C(),_.buttons.pause.focus()}),o(_.buttons.pause,"click",function(){I(),_.buttons.play.focus()}),o(_.buttons.restart,"click",M),o(_.buttons.rewind,"click",function(){E(b.seekInterval)}),o(_.buttons.forward,"click",function(){L(b.seekInterval)}),o(_.volume,"change",function(){O(this.value)}),o(_.buttons.mute,"change",function(){j(this.checked)}),o(_.buttons.fullscreen,"click",A),o(document,m.fullScreenEventName,A),"video"===_.type&&b.click&&o(_.videoContainer,"click",function(){_.media.paused?C():_.media.ended?M():I()}),o(_.media,"timeupdate",R),o(_.media,"timeupdate",B),o(_.progress.played.bar,"click",function(e){_.pos=l(e).x/this.offsetWidth,_.media.currentTime=_.pos*_.media.duration,_.isTextTracks||"video"!==_.type||u(_)}),o(_.buttons.captions,"click",function(){q(this.checked)}),o(_.media,"ended",function(){"video"===_.type&&(_.captionsContainer.innerHTML=""),s(_.container,b.classes.stopped,!0),s(_.container,b.classes.playing)}),o(_.media,"loadstart",function(){t("loadstart")}),o(_.media,"progress",B),o(_.media,"playing",B)}function W(){return m=d(),_.browserInfo=n(),_.browserName=_.browserInfo[0],_.browserMajorVersion=_.browserInfo[1],t(_.browserName+" "+_.browserMajorVersion),"IE"!==_.browserName||8!==_.browserMajorVersion&&9!==_.browserMajorVersion?(b.playAriaLabel="undefined"!=typeof b.title&&b.title.length?"Play "+b.title:"Play",T(),_.random=Math.floor(1e4*Math.random()),k(),w()?(S(),O(),N(),F(),P(),void 0):!1):(t("Browser not suppported.",!0),!1)}var _=this;return _.container=e,W(),{media:_.media,play:C,pause:I,restart:M,rewind:E,forward:L,setVolume:O,toggleMute:j,toggleCaptions:q}}var m,b,v={enabled:!0,debug:!1,seekInterval:10,volume:5,click:!0,selectors:{container:".player",controls:".player-controls",buttons:{play:"[data-player='play']",pause:"[data-player='pause']",restart:"[data-player='restart']",rewind:"[data-player='rewind']",forward:"[data-player='fast-forward']",mute:"[data-player='mute']",volume:"[data-player='volume']",captions:"[data-player='captions']",fullscreen:"[data-player='fullscreen']"},progress:{container:".player-progress",buffer:".player-progress-buffer",played:".player-progress-played"},captions:".player-captions",duration:".player-duration",seekTime:".player-seek-time"},classes:{video:"player-video",videoWrapper:"player-video-wrapper",audio:"player-audio",stopped:"stopped",playing:"playing",muted:"muted",captions:{enabled:"captions-enabled",active:"captions-active"},fullscreen:{enabled:"fullscreen-enabled",active:"fullscreen-active"}},captions:{defaultActive:!1},fullscreen:{enabled:!0,fallback:!0},storage:{enabled:!0,supported:function(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}}}};e.setup=function(e){if(b=p(v,e),!b.enabled)return!1;for(var t=document.querySelectorAll(b.selectors.container),n=[],r=t.length-1;r>=0;r--){var a=t[r];"undefined"==typeof a.plyr&&(a.plyr=new f(a)),n.push(a.plyr)}return n}}(this.plyr=this.plyr||{}); \ No newline at end of file