4 lines
42 KiB
JavaScript
4 lines
42 KiB
JavaScript
(function(u,p){"use strict";typeof module=="object"&&typeof module.exports=="object"?module.exports=p(u,document):typeof define=="function"&&define.amd?define([],function(){return p(u,document)}):u.plyr=p(u,document)})(typeof window!="undefined"?window:this,function(u,p){"use strict";function D(){var r,t,s,l=navigator.userAgent,d=navigator.appName,m=""+parseFloat(navigator.appVersion),x=parseInt(navigator.appVersion,10),k=!1,T=!1,R=!1,q=!1;return navigator.appVersion.indexOf("Windows NT")!==-1&&navigator.appVersion.indexOf("rv:11")!==-1?(k=!0,d="IE",m="11"):(t=l.indexOf("MSIE"))!==-1?(k=!0,d="IE",m=l.substring(t+5)):(t=l.indexOf("Chrome"))!==-1?(R=!0,d="Chrome",m=l.substring(t+7)):(t=l.indexOf("Safari"))!==-1?(q=!0,d="Safari",m=l.substring(t+7),(t=l.indexOf("Version"))!==-1&&(m=l.substring(t+8))):(t=l.indexOf("Firefox"))!==-1?(T=!0,d="Firefox",m=l.substring(t+8)):(r=l.lastIndexOf(" ")+1)<(t=l.lastIndexOf("/"))&&(d=l.substring(r,t),m=l.substring(t+1),d.toLowerCase()===d.toUpperCase()&&(d=navigator.appName)),(s=m.indexOf(";"))!==-1&&(m=m.substring(0,s)),(s=m.indexOf(" "))!==-1&&(m=m.substring(0,s)),x=parseInt(""+m,10),isNaN(x)&&(m=""+parseFloat(navigator.appVersion),x=parseInt(navigator.appVersion,10)),{name:d,version:x,isIE:k,isFirefox:T,isChrome:R,isSafari:q,isIos:/(iPad|iPhone|iPod)/g.test(navigator.platform),isIphone:/(iPhone|iPod)/g.test(navigator.userAgent),isTouch:"ontouchstart"in p.documentElement}}function re(r,t){var s=r.media;if(r.type==="video")switch(t){case"video/webm":return!(!s.canPlayType||!s.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/no/,""));case"video/mp4":return!(!s.canPlayType||!s.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/,""));case"video/ogg":return!(!s.canPlayType||!s.canPlayType('video/ogg; codecs="theora"').replace(/no/,""))}else if(r.type==="audio")switch(t){case"audio/mpeg":return!(!s.canPlayType||!s.canPlayType("audio/mpeg;").replace(/no/,""));case"audio/ogg":return!(!s.canPlayType||!s.canPlayType('audio/ogg; codecs="vorbis"').replace(/no/,""));case"audio/wav":return!(!s.canPlayType||!s.canPlayType('audio/wav; codecs="1"').replace(/no/,""))}return!1}function de(r){if(!p.querySelectorAll('script[src="'+r+'"]').length){var t=p.createElement("script");t.src=r;var s=p.getElementsByTagName("script")[0];s.parentNode.insertBefore(t,s)}}function v(r,t){return Array.prototype.indexOf&&r.indexOf(t)!==-1}function Fe(r,t,s){return r.replace(new RegExp(t.replace(/([.*+?\^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),s)}function Ae(r,t){r.length||(r=[r]);for(var s=r.length-1;s>=0;s--){var l=s>0?t.cloneNode(!0):t,d=r[s],m=d.parentNode,x=d.nextSibling;return l.appendChild(d),x?m.insertBefore(l,x):m.appendChild(l),l}}function X(r){r&&r.parentNode.removeChild(r)}function Ie(r,t){r.insertBefore(t,r.firstChild)}function Ne(r,t){for(var s in t)r.setAttribute(s,i.boolean(t[s])&&t[s]?"":t[s])}function Pe(r,t,s){var l=p.createElement(r);Ne(l,s),Ie(t,l)}function Ge(r){return r.replace(".","")}function g(r,t,s){if(r)if(r.classList)r.classList[s?"add":"remove"](t);else{var l=(" "+r.className+" ").replace(/\s+/g," ").replace(" "+t+" ","");r.className=l+(s?" "+t:"")}}function W(r,t){return!!r&&(r.classList?r.classList.contains(t):new RegExp("(\\s|^)"+t+"(\\s|$)").test(r.className))}function Me(r,t){var s=Element.prototype,l=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.msMatchesSelector||function(d){return[].indexOf.call(p.querySelectorAll(d),this)!==-1};return l.call(r,t)}function V(r,t,s,l,d){h(r,t,function(m){s&&s.apply(r,[m]),l.apply(r,[m])},d)}function Oe(r,t,s,l,d){var m=t.split(" ");if(i.boolean(d)||(d=!1),r instanceof NodeList)for(var x=0;x<r.length;x++)r[x]instanceof Node&&Oe(r[x],arguments[1],arguments[2],arguments[3]);else for(var k=0;k<m.length;k++)r[l?"addEventListener":"removeEventListener"](m[k],s,d)}function h(r,t,s,l){r&&Oe(r,t,s,!0,l)}function Le(r,t,s,l){if(r&&t){i.boolean(s)||(s=!1);var d=new CustomEvent(t,{bubbles:s,detail:l});r.dispatchEvent(d)}}function $(r,t){if(r)return t=i.boolean(t)?t:!r.getAttribute("aria-pressed"),r.setAttribute("aria-pressed",t),t}function pe(r,t){return r===0||t===0||isNaN(r)||isNaN(t)?0:(r/t*100).toFixed(2)}function ae(){var r=arguments;if(r.length){if(r.length===1)return r[0];for(var t=Array.prototype.shift.call(r),s=r.length,l=0;l<s;l++){var d=r[l];for(var m in d)d[m]&&d[m].constructor&&d[m].constructor===Object?(t[m]=t[m]||{},ae(t[m],d[m])):t[m]=d[m]}return t}}function Ke(r){var t=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;return r.match(t)?RegExp.$2:r}function Qe(r){var t=/^.*(vimeo.com\/|video\/)(\d+).*/;return r.match(t)?RegExp.$2:r}function Ze(){var r={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",element:null,prefix:""},t="webkit o moz ms khtml".split(" ");if(i.undefined(p.cancelFullScreen))for(var s=0,l=t.length;s<l;s++){if(r.prefix=t[s],!i.undefined(p[r.prefix+"CancelFullScreen"])){r.supportsFullScreen=!0;break}if(!i.undefined(p.msExitFullscreen)&&p.msFullscreenEnabled){r.prefix="ms",r.supportsFullScreen=!0;break}}else r.supportsFullScreen=!0;return r.supportsFullScreen&&(r.fullScreenEventName=r.prefix==="ms"?"MSFullscreenChange":r.prefix+"fullscreenchange",r.isFullScreen=function(d){switch(i.undefined(d)&&(d=p.body),this.prefix){case"":return p.fullscreenElement===d;case"moz":return p.mozFullScreenElement===d;default:return p[this.prefix+"FullscreenElement"]===d}},r.requestFullScreen=function(d){return i.undefined(d)&&(d=p.body),this.prefix===""?d.requestFullScreen():d[this.prefix+(this.prefix==="ms"?"RequestFullscreen":"RequestFullScreen")]()},r.cancelFullScreen=function(){return this.prefix===""?p.cancelFullScreen():p[this.prefix+(this.prefix==="ms"?"ExitFullscreen":"CancelFullScreen")]()},r.element=function(){return this.prefix===""?p.fullscreenElement:p[this.prefix+"FullscreenElement"]}),r}function Ee(r,t){function s(n,a,o,c){Le(n,a,o,ae({},c,{plyr:ue}))}function l(n,a){t.debug&&u.console&&(a=Array.prototype.slice.call(a),i.string(t.logPrefix)&&t.logPrefix.length&&a.unshift(t.logPrefix),console[n].apply(console,a))}function d(){return{url:t.iconUrl,absolute:t.iconUrl.indexOf("http")===0||e.browser.isIE}}function m(){var n=[],a=d(),o=(a.absolute?"":a.url)+"#"+t.iconPrefix;return v(t.controls,"play-large")&&n.push('<button type="button" data-plyr="play" class="plyr__play-large">','<svg><use xlink:href="'+o+'-play" /></svg>','<span class="plyr__sr-only">'+t.i18n.play+"</span>","</button>"),n.push('<div class="plyr__controls">'),v(t.controls,"restart")&&n.push('<button type="button" data-plyr="restart">','<svg><use xlink:href="'+o+'-restart" /></svg>','<span class="plyr__sr-only">'+t.i18n.restart+"</span>","</button>"),v(t.controls,"rewind")&&n.push('<button type="button" data-plyr="rewind">','<svg><use xlink:href="'+o+'-rewind" /></svg>','<span class="plyr__sr-only">'+t.i18n.rewind+"</span>","</button>"),v(t.controls,"play")&&n.push('<button type="button" data-plyr="play">','<svg><use xlink:href="'+o+'-play" /></svg>','<span class="plyr__sr-only">'+t.i18n.play+"</span>","</button>",'<button type="button" data-plyr="pause">','<svg><use xlink:href="'+o+'-pause" /></svg>','<span class="plyr__sr-only">'+t.i18n.pause+"</span>","</button>"),v(t.controls,"fast-forward")&&n.push('<button type="button" data-plyr="fast-forward">','<svg><use xlink:href="'+o+'-fast-forward" /></svg>','<span class="plyr__sr-only">'+t.i18n.forward+"</span>","</button>"),v(t.controls,"progress")&&(n.push('<span class="plyr__progress">','<label for="seek{id}" class="plyr__sr-only">Seek</label>','<input id="seek{id}" class="plyr__progress--seek" type="range" min="0" max="100" step="0.1" value="0" data-plyr="seek">','<progress class="plyr__progress--played" max="100" value="0" role="presentation"></progress>','<progress class="plyr__progress--buffer" max="100" value="0">',"<span>0</span>% "+t.i18n.buffered,"</progress>"),t.tooltips.seek&&n.push('<span class="plyr__tooltip">00:00</span>'),n.push("</span>")),v(t.controls,"current-time")&&n.push('<span class="plyr__time">','<span class="plyr__sr-only">'+t.i18n.currentTime+"</span>",'<span class="plyr__time--current">00:00</span>',"</span>"),v(t.controls,"duration")&&n.push('<span class="plyr__time">','<span class="plyr__sr-only">'+t.i18n.duration+"</span>",'<span class="plyr__time--duration">00:00</span>',"</span>"),v(t.controls,"mute")&&n.push('<button type="button" data-plyr="mute">','<svg class="icon--muted"><use xlink:href="'+o+'-muted" /></svg>','<svg><use xlink:href="'+o+'-volume" /></svg>','<span class="plyr__sr-only">'+t.i18n.toggleMute+"</span>","</button>"),v(t.controls,"volume")&&n.push('<span class="plyr__volume">','<label for="volume{id}" class="plyr__sr-only">'+t.i18n.volume+"</label>",'<input id="volume{id}" class="plyr__volume--input" type="range" min="'+t.volumeMin+'" max="'+t.volumeMax+'" value="'+t.volume+'" data-plyr="volume">','<progress class="plyr__volume--display" max="'+t.volumeMax+'" value="'+t.volumeMin+'" role="presentation"></progress>',"</span>"),v(t.controls,"captions")&&n.push('<button type="button" data-plyr="captions">','<svg class="icon--captions-on"><use xlink:href="'+o+'-captions-on" /></svg>','<svg><use xlink:href="'+o+'-captions-off" /></svg>','<span class="plyr__sr-only">'+t.i18n.toggleCaptions+"</span>","</button>"),v(t.controls,"fullscreen")&&n.push('<button type="button" data-plyr="fullscreen">','<svg class="icon--exit-fullscreen"><use xlink:href="'+o+'-exit-fullscreen" /></svg>','<svg><use xlink:href="'+o+'-enter-fullscreen" /></svg>','<span class="plyr__sr-only">'+t.i18n.toggleFullscreen+"</span>","</button>"),n.push("</div>"),n.join("")}function x(){if(e.supported.full&&(e.type!=="audio"||t.fullscreen.allowAudio)&&t.fullscreen.enabled){var n=O.supportsFullScreen;n||t.fullscreen.fallback&&!fe()?(N((n?"Native":"Fallback")+" fullscreen enabled"),g(e.container,t.classes.fullscreen.enabled,!0)):N("Fullscreen not supported and fallback disabled"),e.buttons&&e.buttons.fullscreen&&$(e.buttons.fullscreen,!1),Q()}}function k(){if(e.type==="video"){w(t.selectors.captions)||e.videoContainer.insertAdjacentHTML("afterbegin",'<div class="'+Ge(t.selectors.captions)+'"></div>'),e.usingTextTracks=!1,e.media.textTracks&&(e.usingTextTracks=!0);for(var n,a="",o=e.media.childNodes,c=0;c<o.length;c++)o[c].nodeName.toLowerCase()==="track"&&(n=o[c].kind,n!=="captions"&&n!=="subtitles"||(a=o[c].getAttribute("src")));if(e.captionExists=!0,a===""?(e.captionExists=!1,N("No caption track found")):N("Caption track found; URI: "+a),e.captionExists){for(var f=e.media.textTracks,S=0;S<f.length;S++)f[S].mode="hidden";if(q(e),(e.browser.isIE&&e.browser.version>=10||e.browser.isFirefox&&e.browser.version>=31)&&(N("Detected browser with known TextTrack issues - using manual fallback"),e.usingTextTracks=!1),e.usingTextTracks){N("TextTracks supported");for(var C=0;C<f.length;C++){var I=f[C];I.kind!=="captions"&&I.kind!=="subtitles"||h(I,"cuechange",function(){this.activeCues[0]&&"text"in this.activeCues[0]?T(this.activeCues[0].getCueAsHTML()):T()})}}else if(N("TextTracks not supported so rendering captions manually"),e.currentCaption="",e.captions=[],a!==""){var _=new XMLHttpRequest;_.onreadystatechange=function(){if(_.readyState===4)if(_.status===200){var y,A=[],b=_.responseText,F=`\r
|
|
`;b.indexOf(F+F)===-1&&(F=b.indexOf("\r\r")!==-1?"\r":`
|
|
`),A=b.split(F+F);for(var L=0;L<A.length;L++){y=A[L],e.captions[L]=[];var ne=y.split(F),U=0;ne[U].indexOf(":")===-1&&(U=1),e.captions[L]=[ne[U],ne[U+1]]}e.captions.shift(),N("Successfully loaded the caption file via AJAX")}else te(t.logPrefix+"There was a problem loading the caption file via AJAX")},_.open("get",a,!0),_.send()}}else g(e.container,t.classes.captions.enabled)}}function T(n){var a=w(t.selectors.captions),o=p.createElement("span");a.innerHTML="",i.undefined(n)&&(n=""),i.string(n)?o.innerHTML=n.trim():o.appendChild(n),a.appendChild(o),a.offsetHeight}function R(n){function a(S,C){var I=[];I=S.split(" --> ");for(var _=0;_<I.length;_++)I[_]=I[_].replace(/(\d+:\d+:\d+\.\d+).*/,"$1");return f(I[C])}function o(S){return a(S,0)}function c(S){return a(S,1)}function f(S){if(S==null)return 0;var C,I=[],_=[];return I=S.split(","),_=I[0].split(":"),C=Math.floor(60*_[0]*60)+Math.floor(60*_[1])+Math.floor(_[2])}if(!e.usingTextTracks&&e.type==="video"&&e.supported.full&&(e.subcount=0,n=i.number(n)?n:e.media.currentTime,e.captions[e.subcount])){for(;c(e.captions[e.subcount][0])<n.toFixed(1);)if(e.subcount++,e.subcount>e.captions.length-1){e.subcount=e.captions.length-1;break}e.media.currentTime.toFixed(1)>=o(e.captions[e.subcount][0])&&e.media.currentTime.toFixed(1)<=c(e.captions[e.subcount][0])?(e.currentCaption=e.captions[e.subcount][1],T(e.currentCaption)):T()}}function q(){if(e.buttons.captions){g(e.container,t.classes.captions.enabled,!0);var n=e.storage.captionsEnabled;i.boolean(n)||(n=t.captions.defaultActive),n&&(g(e.container,t.classes.captions.active,!0),$(e.buttons.captions,!0))}}function P(n){return e.container.querySelectorAll(n)}function w(n){return P(n)[0]}function fe(){try{return u.self!==u.top}catch(n){return!0}}function Q(){function n(f){f.which===9&&e.isFullscreen&&(f.target!==c||f.shiftKey?f.target===o&&f.shiftKey&&(f.preventDefault(),c.focus()):(f.preventDefault(),o.focus()))}var a=P("input:not([disabled]), button:not([disabled])"),o=a[0],c=a[a.length-1];h(e.container,"keydown",n)}function H(n,a){if(i.string(a))Pe(n,e.media,{src:a});else if(a.constructor===Array)for(var o=a.length-1;o>=0;o--)Pe(n,e.media,a[o])}function Y(){if(t.loadSprite){var n=d();n.absolute?(N("AJAX loading absolute SVG sprite"+(e.browser.isIE?" (due to IE)":"")),je(n.url,"sprite-plyr")):N("Sprite will be used as external resource directly")}var a=t.html;N("Injecting custom controls"),a||(a=m()),a=Fe(a,"{seektime}",t.seekTime),a=Fe(a,"{id}",Math.floor(1e4*Math.random()));var o;if(i.string(t.selectors.controls.container)&&(o=p.querySelector(t.selectors.controls.container)),i.htmlElement(o)||(o=e.container),o.insertAdjacentHTML("beforeend",a),t.tooltips.controls)for(var c=P([t.selectors.controls.wrapper," ",t.selectors.labels," .",t.classes.hidden].join("")),f=c.length-1;f>=0;f--){var S=c[f];g(S,t.classes.hidden,!1),g(S,t.classes.tooltip,!0)}}function ye(){try{return e.controls=w(t.selectors.controls.wrapper),e.buttons={},e.buttons.seek=w(t.selectors.buttons.seek),e.buttons.play=P(t.selectors.buttons.play),e.buttons.pause=w(t.selectors.buttons.pause),e.buttons.restart=w(t.selectors.buttons.restart),e.buttons.rewind=w(t.selectors.buttons.rewind),e.buttons.forward=w(t.selectors.buttons.forward),e.buttons.fullscreen=w(t.selectors.buttons.fullscreen),e.buttons.mute=w(t.selectors.buttons.mute),e.buttons.captions=w(t.selectors.buttons.captions),e.progress={},e.progress.container=w(t.selectors.progress.container),e.progress.buffer={},e.progress.buffer.bar=w(t.selectors.progress.buffer),e.progress.buffer.text=e.progress.buffer.bar&&e.progress.buffer.bar.getElementsByTagName("span")[0],e.progress.played=w(t.selectors.progress.played),e.progress.tooltip=e.progress.container&&e.progress.container.querySelector("."+t.classes.tooltip),e.volume={},e.volume.input=w(t.selectors.volume.input),e.volume.display=w(t.selectors.volume.display),e.duration=w(t.selectors.duration),e.currentTime=w(t.selectors.currentTime),e.seekTime=P(t.selectors.seekTime),!0}catch(n){return te("It looks like there is a problem with your controls HTML"),oe(!0),!1}}function z(){g(e.container,t.selectors.container.replace(".",""),e.supported.full)}function oe(n){n&&v(t.types.html5,e.type)?e.media.setAttribute("controls",""):e.media.removeAttribute("controls")}function be(n){var a=t.i18n.play;if(i.string(t.title)&&t.title.length&&(a+=", "+t.title,e.container.setAttribute("aria-label",t.title)),e.supported.full&&e.buttons.play)for(var o=e.buttons.play.length-1;o>=0;o--)e.buttons.play[o].setAttribute("aria-label",a);i.htmlElement(n)&&n.setAttribute("title",t.i18n.frameTitle.replace("{title}",t.title))}function tt(){var n=null;e.storage={},Re.supported&&t.storage.enabled&&(u.localStorage.removeItem("plyr-volume"),n=u.localStorage.getItem(t.storage.key),n&&(/^\d+(\.\d+)?$/.test(n)?ve({volume:parseFloat(n)}):e.storage=JSON.parse(n)))}function ve(n){Re.supported&&t.storage.enabled&&(ae(e.storage,n),u.localStorage.setItem(t.storage.key,JSON.stringify(e.storage)))}function qe(){if(!e.media)return void te("No media element found!");if(e.supported.full&&(g(e.container,t.classes.type.replace("{0}",e.type),!0),v(t.types.embed,e.type)&&g(e.container,t.classes.type.replace("{0}","video"),!0),g(e.container,t.classes.stopped,t.autoplay),g(e.ontainer,t.classes.isIos,e.browser.isIos),g(e.container,t.classes.isTouch,e.browser.isTouch),e.type==="video")){var n=p.createElement("div");n.setAttribute("class",t.classes.videoWrapper),Ae(e.media,n),e.videoContainer=n}v(t.types.embed,e.type)&&nt()}function nt(){var n,a=p.createElement("div"),o=e.type+"-"+Math.floor(1e4*Math.random());switch(e.type){case"youtube":n=Ke(e.embedId);break;case"vimeo":n=Qe(e.embedId);break;default:n=e.embedId}for(var c=P('[id^="'+e.type+'-"]'),f=c.length-1;f>=0;f--)X(c[f]);if(g(e.media,t.classes.videoWrapper,!0),g(e.media,t.classes.embedWrapper,!0),e.type==="youtube")e.media.appendChild(a),a.setAttribute("id",o),i.object(u.YT)?De(n,a):(de(t.urls.youtube.api),u.onYouTubeReadyCallbacks=u.onYouTubeReadyCallbacks||[],u.onYouTubeReadyCallbacks.push(function(){De(n,a)}),u.onYouTubeIframeAPIReady=function(){u.onYouTubeReadyCallbacks.forEach(function(_){_()})});else if(e.type==="vimeo")if(e.supported.full?e.media.appendChild(a):a=e.media,a.setAttribute("id",o),i.object(u.Vimeo))He(n,a);else{de(t.urls.vimeo.api);var S=u.setInterval(function(){i.object(u.Vimeo)&&(u.clearInterval(S),He(n,a))},50)}else if(e.type==="soundcloud"){var C=p.createElement("iframe");C.loaded=!1,h(C,"load",function(){C.loaded=!0}),Ne(C,{src:"https://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/"+n,id:o}),a.appendChild(C),e.media.appendChild(a),u.SC||de(t.urls.soundcloud.api);var I=u.setInterval(function(){u.SC&&C.loaded&&(u.clearInterval(I),rt.call(C))},50)}}function ge(){e.supported.full&&(_e(),Ce()),be(w("iframe"))}function De(n,a){e.embed=new u.YT.Player(a.id,{videoId:n,playerVars:{autoplay:t.autoplay?1:0,controls:e.supported.full?0:1,rel:0,showinfo:0,iv_load_policy:3,cc_load_policy:t.captions.defaultActive?1:0,cc_lang_pref:"en",wmode:"transparent",modestbranding:1,disablekb:1,origin:"*"},events:{onError:function(o){s(e.container,"error",!0,{code:o.data,embed:o.target})},onReady:function(o){var c=o.target;e.media.play=function(){c.playVideo(),e.media.paused=!1},e.media.pause=function(){c.pauseVideo(),e.media.paused=!0},e.media.stop=function(){c.stopVideo(),e.media.paused=!0},e.media.duration=c.getDuration(),e.media.paused=!0,e.media.currentTime=0,e.media.muted=c.isMuted(),t.title=c.getVideoData().title,e.supported.full&&e.media.querySelector("iframe").setAttribute("tabindex","-1"),ge(),s(e.media,"timeupdate"),s(e.media,"durationchange"),u.clearInterval(M.buffering),M.buffering=u.setInterval(function(){e.media.buffered=c.getVideoLoadedFraction(),(e.media.lastBuffered===null||e.media.lastBuffered<e.media.buffered)&&s(e.media,"progress"),e.media.lastBuffered=e.media.buffered,e.media.buffered===1&&(u.clearInterval(M.buffering),s(e.media,"canplaythrough"))},200)},onStateChange:function(o){var c=o.target;switch(u.clearInterval(M.playing),o.data){case 0:e.media.paused=!0,s(e.media,"ended");break;case 1:e.media.paused=!1,e.media.seeking&&s(e.media,"seeked"),e.media.seeking=!1,s(e.media,"play"),s(e.media,"playing"),M.playing=u.setInterval(function(){e.media.currentTime=c.getCurrentTime(),s(e.media,"timeupdate")},100),e.media.duration!==c.getDuration()&&(e.media.duration=c.getDuration(),s(e.media,"durationchange"));break;case 2:e.media.paused=!0,s(e.media,"pause")}s(e.container,"statechange",!1,{code:o.data})}}})}function He(n,a){e.embed=new u.Vimeo.Player(a,{id:parseInt(n),loop:t.loop,autoplay:t.autoplay,byline:!1,portrait:!1,title:!1}),e.media.play=function(){e.embed.play(),e.media.paused=!1},e.media.pause=function(){e.embed.pause(),e.media.paused=!0},e.media.stop=function(){e.embed.stop(),e.media.paused=!0},e.media.paused=!0,e.media.currentTime=0,ge(),e.embed.getCurrentTime().then(function(o){e.media.currentTime=o,s(e.media,"timeupdate")}),e.embed.getDuration().then(function(o){e.media.duration=o,s(e.media,"durationchange")}),e.embed.on("loaded",function(){i.htmlElement(e.embed.element)&&e.supported.full&&e.embed.element.setAttribute("tabindex","-1")}),e.embed.on("play",function(){e.media.paused=!1,s(e.media,"play"),s(e.media,"playing")}),e.embed.on("pause",function(){e.media.paused=!0,s(e.media,"pause")}),e.embed.on("timeupdate",function(o){e.media.seeking=!1,e.media.currentTime=o.seconds,s(e.media,"timeupdate")}),e.embed.on("progress",function(o){e.media.buffered=o.percent,s(e.media,"progress"),parseInt(o.percent)===1&&s(e.media,"canplaythrough")}),e.embed.on("seeked",function(){e.media.seeking=!1,s(e.media,"seeked"),s(e.media,"play")}),e.embed.on("ended",function(){e.media.paused=!0,s(e.media,"ended")})}function rt(){e.embed=u.SC.Widget(this),e.embed.bind(u.SC.Widget.Events.READY,function(){e.media.play=function(){e.embed.play(),e.media.paused=!1},e.media.pause=function(){e.embed.pause(),e.media.paused=!0},e.media.stop=function(){e.embed.seekTo(0),e.embed.pause(),e.media.paused=!0},e.media.paused=!0,e.media.currentTime=0,e.embed.getDuration(function(n){e.media.duration=n/1e3,ge()}),e.embed.getPosition(function(n){e.media.currentTime=n,s(e.media,"timeupdate")}),e.embed.bind(u.SC.Widget.Events.PLAY,function(){e.media.paused=!1,s(e.media,"play"),s(e.media,"playing")}),e.embed.bind(u.SC.Widget.Events.PAUSE,function(){e.media.paused=!0,s(e.media,"pause")}),e.embed.bind(u.SC.Widget.Events.PLAY_PROGRESS,function(n){e.media.seeking=!1,e.media.currentTime=n.currentPosition/1e3,s(e.media,"timeupdate")}),e.embed.bind(u.SC.Widget.Events.LOAD_PROGRESS,function(n){e.media.buffered=n.loadProgress,s(e.media,"progress"),parseInt(n.loadProgress)===1&&s(e.media,"canplaythrough")}),e.embed.bind(u.SC.Widget.Events.FINISH,function(){e.media.paused=!0,s(e.media,"ended")})})}function Z(){"play"in e.media&&e.media.play()}function G(){"pause"in e.media&&e.media.pause()}function he(n){return i.boolean(n)||(n=e.media.paused),n?Z():G(),n}function ke(n){i.number(n)||(n=t.seekTime),j(e.media.currentTime-n)}function we(n){i.number(n)||(n=t.seekTime),j(e.media.currentTime+n)}function j(n){var a=0,o=e.media.paused,c=B();i.number(n)?a=n:i.object(n)&&v(["input","change"],n.type)&&(a=n.target.value/n.target.max*c),a<0?a=0:a>c&&(a=c),$e(a);try{e.media.currentTime=a.toFixed(4)}catch(f){}if(v(t.types.embed,e.type)){switch(e.type){case"youtube":e.embed.seekTo(a);break;case"vimeo":e.embed.setCurrentTime(a.toFixed(0));break;case"soundcloud":e.embed.seekTo(1e3*a)}o&&G(),s(e.media,"timeupdate"),e.media.seeking=!0,s(e.media,"seeking")}N("Seeking to "+e.media.currentTime+" seconds"),R(a)}function B(){var n=parseInt(t.duration),a=0;return e.media.duration===null||isNaN(e.media.duration)||(a=e.media.duration),isNaN(n)?a:n}function We(){g(e.container,t.classes.playing,!e.media.paused),g(e.container,t.classes.stopped,e.media.paused),ee(e.media.paused)}function at(){me={x:u.pageXOffset||0,y:u.pageYOffset||0}}function st(){u.scrollTo(me.x,me.y)}function E(n){var a=O.supportsFullScreen;if(a){if(!n||n.type!==O.fullScreenEventName)return O.isFullScreen(e.container)?O.cancelFullScreen():(at(),O.requestFullScreen(e.container)),void(e.isFullscreen=O.isFullScreen(e.container));e.isFullscreen=O.isFullScreen(e.container)}else e.isFullscreen=!e.isFullscreen,p.body.style.overflow=e.isFullscreen?"hidden":"";g(e.container,t.classes.fullscreen.active,e.isFullscreen),Q(e.isFullscreen),e.buttons&&e.buttons.fullscreen&&$(e.buttons.fullscreen,e.isFullscreen),s(e.container,e.isFullscreen?"enterfullscreen":"exitfullscreen",!0),!e.isFullscreen&&a&&st()}function ie(n){if(i.boolean(n)||(n=!e.media.muted),$(e.buttons.mute,n),e.media.muted=n,e.media.volume===0&&K(t.volume),v(t.types.embed,e.type)){switch(e.type){case"youtube":e.embed[e.media.muted?"mute":"unMute"]();break;case"vimeo":case"soundcloud":e.embed.setVolume(e.media.muted?0:parseFloat(t.volume/t.volumeMax))}s(e.media,"volumechange")}}function K(n){var a=t.volumeMax,o=t.volumeMin;if(i.undefined(n)&&(n=e.storage.volume),(n===null||isNaN(n))&&(n=t.volume),n>a&&(n=a),n<o&&(n=o),e.media.volume=parseFloat(n/a),e.volume.display&&(e.volume.display.value=n),v(t.types.embed,e.type)){switch(e.type){case"youtube":e.embed.setVolume(100*e.media.volume);break;case"vimeo":case"soundcloud":e.embed.setVolume(e.media.volume)}s(e.media,"volumechange")}n===0?e.media.muted=!0:e.media.muted&&n>0&&ie()}function xe(n){var a=e.media.muted?0:e.media.volume*t.volumeMax;i.number(n)||(n=t.volumeStep),K(a+n)}function Te(n){var a=e.media.muted?0:e.media.volume*t.volumeMax;i.number(n)||(n=t.volumeStep),K(a-n)}function Ye(){var n=e.media.muted?0:e.media.volume*t.volumeMax;e.supported.full&&(e.volume.input&&(e.volume.input.value=n),e.volume.display&&(e.volume.display.value=n)),ve({volume:n}),g(e.container,t.classes.muted,n===0),e.supported.full&&e.buttons.mute&&$(e.buttons.mute,n===0)}function Se(n){e.supported.full&&e.buttons.captions&&(i.boolean(n)||(n=e.container.className.indexOf(t.classes.captions.active)===-1),e.captionsEnabled=n,$(e.buttons.captions,e.captionsEnabled),g(e.container,t.classes.captions.active,e.captionsEnabled),s(e.container,e.captionsEnabled?"captionsenabled":"captionsdisabled",!0),ve({captionsEnabled:e.captionsEnabled}))}function ot(n){var a=n.type==="waiting";clearTimeout(M.loading),M.loading=setTimeout(function(){g(e.container,t.classes.loading,a),ee(a)},a?250:0)}function Be(n){if(e.supported.full){var a=e.progress.played,o=0,c=B();if(n)switch(n.type){case"timeupdate":case"seeking":if(e.controls.pressed)return;o=pe(e.media.currentTime,c),n.type==="timeupdate"&&e.buttons.seek&&(e.buttons.seek.value=o);break;case"playing":case"progress":a=e.progress.buffer,o=function(){var f=e.media.buffered;return f&&f.length?pe(f.end(0),c):i.number(f)?100*f:0}()}Ue(a,o)}}function Ue(n,a){if(e.supported.full){if(i.undefined(a)&&(a=0),i.undefined(n)){if(!e.progress||!e.progress.buffer)return;n=e.progress.buffer}i.htmlElement(n)?n.value=a:n&&(n.bar&&(n.bar.value=a),n.text&&(n.text.innerHTML=a))}}function le(n,a){if(a){isNaN(n)&&(n=0),e.secs=parseInt(n%60),e.mins=parseInt(n/60%60),e.hours=parseInt(n/60/60%60);var o=parseInt(B()/60/60%60)>0;e.secs=("0"+e.secs).slice(-2),e.mins=("0"+e.mins).slice(-2),a.innerHTML=(o?e.hours+":":"")+e.mins+":"+e.secs}}function it(){if(e.supported.full){var n=B()||0;!e.duration&&t.displayDuration&&e.media.paused&&le(n,e.currentTime),e.duration&&le(n,e.duration),Je()}}function Xe(n){le(e.media.currentTime,e.currentTime),n&&n.type==="timeupdate"&&e.media.seeking||Be(n)}function $e(n){i.number(n)||(n=0);var a=B(),o=pe(n,a);e.progress&&e.progress.played&&(e.progress.played.value=o),e.buttons&&e.buttons.seek&&(e.buttons.seek.value=o)}function Je(n){var a=B();if(t.tooltips.seek&&e.progress.container&&a!==0){var o=e.progress.container.getBoundingClientRect(),c=0,f=t.classes.tooltip+"--visible";if(n)c=100/o.width*(n.pageX-o.left);else{if(!W(e.progress.tooltip,f))return;c=e.progress.tooltip.style.left.replace("%","")}c<0?c=0:c>100&&(c=100),le(a/100*c,e.progress.tooltip),e.progress.tooltip.style.left=c+"%",n&&v(["mouseenter","mouseleave"],n.type)&&g(e.progress.tooltip,f,n.type==="mouseenter")}}function ee(n){if(t.hideControls&&e.type!=="audio"){var a=0,o=!1,c=n,f=W(e.container,t.classes.loading);if(i.boolean(n)||(n&&n.type?(o=n.type==="enterfullscreen",c=v(["mousemove","touchstart","mouseenter","focus"],n.type),v(["mousemove","touchmove"],n.type)&&(a=2e3),n.type==="focus"&&(a=3e3)):c=W(e.container,t.classes.hideControls)),u.clearTimeout(M.hover),c||e.media.paused||f){if(g(e.container,t.classes.hideControls,!1),e.media.paused||f)return;e.browser.isTouch&&(a=3e3)}c&&e.media.paused||(M.hover=u.setTimeout(function(){(!e.controls.pressed&&!e.controls.hover||o)&&g(e.container,t.classes.hideControls,!0)},a))}}function lt(n){if(!i.undefined(n))return void ut(n);var a;switch(e.type){case"youtube":a=e.embed.getVideoUrl();break;case"vimeo":e.embed.getVideoUrl.then(function(o){a=o});break;case"soundcloud":e.embed.getCurrentSound(function(o){a=o.permalink_url});break;default:a=e.media.currentSrc}return a||""}function ut(n){function a(){if(e.embed=null,X(e.media),e.type==="video"&&e.videoContainer&&X(e.videoContainer),e.container&&e.container.removeAttribute("class"),"type"in n&&(e.type=n.type,e.type==="video")){var o=n.sources[0];"type"in o&&v(t.types.embed,o.type)&&(e.type=o.type)}switch(e.supported=se(e.type),e.type){case"video":e.media=p.createElement("video");break;case"audio":e.media=p.createElement("audio");break;case"youtube":case"vimeo":case"soundcloud":e.media=p.createElement("div"),e.embedId=n.sources[0].src}Ie(e.container,e.media),i.boolean(n.autoplay)&&(t.autoplay=n.autoplay),v(t.types.html5,e.type)&&(t.crossorigin&&e.media.setAttribute("crossorigin",""),t.autoplay&&e.media.setAttribute("autoplay",""),"poster"in n&&e.media.setAttribute("poster",n.poster),t.loop&&e.media.setAttribute("loop","")),g(e.container,t.classes.fullscreen.active,e.isFullscreen),g(e.container,t.classes.captions.active,e.captionsEnabled),z(),v(t.types.html5,e.type)&&H("source",n.sources),qe(),v(t.types.html5,e.type)&&("tracks"in n&&H("track",n.tracks),e.media.load()),(v(t.types.html5,e.type)||v(t.types.embed,e.type)&&!e.supported.full)&&(_e(),Ce()),t.title=n.title,be()}return i.object(n)&&"sources"in n&&n.sources.length?(g(e.container,t.classes.ready,!1),G(),$e(),Ue(),mt(),void ze(a,!1)):void te("Invalid source format")}function ct(n){e.type==="video"&&e.media.setAttribute("poster",n)}function dt(){function n(){var y=he(),A=e.buttons[y?"play":"pause"],b=e.buttons[y?"pause":"play"];if(b=b&&b.length>1?b[b.length-1]:b[0]){var F=W(A,t.classes.tabFocus);setTimeout(function(){b.focus(),F&&(g(A,t.classes.tabFocus,!1),g(b,t.classes.tabFocus,!0))},100)}}function a(){var y=p.activeElement;return y=y&&y!==p.body?p.querySelector(":focus"):null}function o(y){return y.keyCode?y.keyCode:y.which}function c(y){for(var A in e.buttons){var b=e.buttons[A];if(i.nodeList(b))for(var F=0;F<b.length;F++)g(b[F],t.classes.tabFocus,b[F]===y);else g(b,t.classes.tabFocus,b===y)}}function f(y){function A(){var U=e.media.duration;i.number(U)&&j(U/10*(b-48))}var b=o(y),F=y.type==="keydown",L=F&&b===C;if(i.number(b))if(F){var ne=[48,49,50,51,52,53,54,56,57,32,75,38,40,77,39,37,70,67];switch(v(ne,b)&&(y.preventDefault(),y.stopPropagation()),b){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:L||A();break;case 32:case 75:L||he();break;case 38:xe();break;case 40:Te();break;case 77:L||ie();break;case 39:we();break;case 37:ke();break;case 70:E();break;case 67:L||Se()}!O.supportsFullScreen&&e.isFullscreen&&b===27&&E(),C=b}else C=null}var S=e.browser.isIE?"change":"input";if(t.keyboardShorcuts.focused){var C=null;t.keyboardShorcuts.global&&h(u,"keydown keyup",function(y){var A=o(y),b=a(),F=[48,49,50,51,52,53,54,56,57,75,77,70,67],L=Ve().length;L!==1||!v(F,A)||i.htmlElement(b)&&Me(b,t.selectors.editable)||f(y)}),h(e.container,"keydown keyup",f)}h(u,"keyup",function(y){var A=o(y),b=a();A===9&&c(b)}),h(p.body,"click",function(){g(w("."+t.classes.tabFocus),t.classes.tabFocus,!1)});for(var I in e.buttons){var _=e.buttons[I];h(_,"blur",function(){g(_,"tab-focus",!1)})}V(e.buttons.play,"click",t.listeners.play,n),V(e.buttons.pause,"click",t.listeners.pause,n),V(e.buttons.restart,"click",t.listeners.restart,j),V(e.buttons.rewind,"click",t.listeners.rewind,ke),V(e.buttons.forward,"click",t.listeners.forward,we),V(e.buttons.seek,S,t.listeners.seek,j),V(e.volume.input,S,t.listeners.volume,function(){K(e.volume.input.value)}),V(e.buttons.mute,"click",t.listeners.mute,ie),V(e.buttons.fullscreen,"click",t.listeners.fullscreen,E),O.supportsFullScreen&&h(p,O.fullScreenEventName,E),h(e.buttons.captions,"click",Se),h(e.progress.container,"mouseenter mouseleave mousemove",Je),t.hideControls&&(h(e.container,"mouseenter mouseleave mousemove touchstart touchend touchcancel touchmove enterfullscreen",ee),h(e.controls,"mouseenter mouseleave",function(y){e.controls.hover=y.type==="mouseenter"}),h(e.controls,"mousedown mouseup touchstart touchend touchcancel",function(y){e.controls.pressed=v(["mousedown","touchstart"],y.type)}),h(e.controls,"focus blur",ee,!0)),h(e.volume.input,"wheel",function(y){y.preventDefault();var A=y.webkitDirectionInvertedFromDevice,b=t.volumeStep/5;(y.deltaY<0||y.deltaX>0)&&(A?Te(b):xe(b)),(y.deltaY>0||y.deltaX<0)&&(A?xe(b):Te(b))})}function pt(){if(h(e.media,"timeupdate seeking",Xe),h(e.media,"timeupdate",R),h(e.media,"durationchange loadedmetadata",it),h(e.media,"ended",function(){e.type==="video"&&t.showPosterOnEnd&&(e.type==="video"&&T(),j(),e.media.load())}),h(e.media,"progress playing",Be),h(e.media,"volumechange",Ye),h(e.media,"play pause ended",We),h(e.media,"waiting canplay seeked",ot),t.clickToPlay&&e.type!=="audio"){var n=w("."+t.classes.videoWrapper);if(!n)return;n.style.cursor="pointer",h(n,"click",function(){t.hideControls&&e.browser.isTouch&&!e.media.paused||(e.media.paused?Z():e.media.ended?(j(),Z()):G())})}t.disableContextMenu&&h(e.media,"contextmenu",function(a){a.preventDefault()}),h(e.media,t.events.concat(["keyup","keydown"]).join(" "),function(a){s(e.container,a.type,!0)})}function mt(){if(v(t.types.html5,e.type)){for(var n=e.media.querySelectorAll("source"),a=0;a<n.length;a++)X(n[a]);e.media.setAttribute("src","https://cdn.selz.com/plyr/blank.mp4"),e.media.load(),N("Cancelled network requests")}}function ze(n,a){function o(){clearTimeout(M.cleanUp),i.boolean(a)||(a=!0),i.function(n)&&n.call(ce),a&&(e.init=!1,e.container.parentNode.replaceChild(ce,e.container),p.body.style.overflow="",s(ce,"destroyed",!0))}if(!e.init)return null;switch(e.type){case"youtube":u.clearInterval(M.buffering),u.clearInterval(M.playing),e.embed.destroy(),o();break;case"vimeo":e.embed.unload().then(o),M.cleanUp=u.setTimeout(o,200);break;case"video":case"audio":oe(!0),o()}}function ft(){if(e.init)return null;if(O=Ze(),e.browser=D(),i.htmlElement(e.media)){tt();var n=r.tagName.toLowerCase();n==="div"?(e.type=r.getAttribute("data-type"),e.embedId=r.getAttribute("data-video-id"),r.removeAttribute("data-type"),r.removeAttribute("data-video-id")):(e.type=n,t.crossorigin=r.getAttribute("crossorigin")!==null,t.autoplay=t.autoplay||r.getAttribute("autoplay")!==null,t.loop=t.loop||r.getAttribute("loop")!==null),e.supported=se(e.type),e.supported.basic&&(e.container=Ae(r,p.createElement("div")),e.container.setAttribute("tabindex",0),z(),N(""+e.browser.name+" "+e.browser.version),qe(),(v(t.types.html5,e.type)||v(t.types.embed,e.type)&&!e.supported.full)&&(_e(),Ce(),be()),e.init=!0)}}function _e(){if(!e.supported.full)return te("Basic support only",e.type),X(w(t.selectors.controls.wrapper)),X(w(t.selectors.buttons.play)),void oe(!0);var n=!P(t.selectors.controls.wrapper).length;n&&Y(),ye()&&(n&&dt(),pt(),oe(),x(),k(),K(),Ye(),Xe(),We())}function Ce(){u.setTimeout(function(){s(e.media,"ready")},0),g(e.media,J.classes.setup,!0),g(e.container,t.classes.ready,!0),e.media.plyr=ue,t.autoplay&&Z()}var ue,e=this,M={};e.media=r;var ce=r.cloneNode(!0),N=function(){l("log",arguments)},te=function(){l("warn",arguments)};return N("Config",t),ue={getOriginal:function(){return ce},getContainer:function(){return e.container},getEmbed:function(){return e.embed},getMedia:function(){return e.media},getType:function(){return e.type},getDuration:B,getCurrentTime:function(){return e.media.currentTime},getVolume:function(){return e.media.volume},isMuted:function(){return e.media.muted},isReady:function(){return W(e.container,t.classes.ready)},isLoading:function(){return W(e.container,t.classes.loading)},isPaused:function(){return e.media.paused},on:function(n,a){return h(e.container,n,a),this},play:Z,pause:G,stop:function(){G(),j()},restart:j,rewind:ke,forward:we,seek:j,source:lt,poster:ct,setVolume:K,togglePlay:he,toggleMute:ie,toggleCaptions:Se,toggleFullscreen:E,toggleControls:ee,isFullscreen:function(){return e.isFullscreen||!1},support:function(n){return re(e,n)},destroy:ze},ft(),e.init?ue:null}function je(r,t){var s=new XMLHttpRequest;if(!i.string(t)||!i.htmlElement(p.querySelector("#"+t))){var l=p.createElement("div");l.setAttribute("hidden",""),i.string(t)&&l.setAttribute("id",t),p.body.insertBefore(l,p.body.childNodes[0]),"withCredentials"in s&&(s.open("GET",r,!0),s.onload=function(){l.innerHTML=s.responseText},s.send())}}function se(r){var t=D(),s=t.isIE&&t.version<=9,l=t.isIos,d=t.isIphone,m=!!p.createElement("audio").canPlayType,x=!!p.createElement("video").canPlayType,k=!1,T=!1;switch(r){case"video":k=x,T=k&&!s&&!d;break;case"audio":k=m,T=k&&!s;break;case"vimeo":k=!0,T=!s&&!l;break;case"youtube":k=!0,T=!s&&!l,l&&!d&&t.version>=10&&(T=!0);break;case"soundcloud":k=!0,T=!s&&!d;break;default:k=m&&x,T=k&&!s}return{basic:k,full:T}}function et(r,t){function s(q,P){W(P,J.classes.hook)||l.push({target:q,media:P})}var l=[],d=[],m=[J.selectors.html5,J.selectors.embed].join(",");if(i.string(r)?r=p.querySelectorAll(r):i.htmlElement(r)?r=[r]:i.nodeList(r)||i.array(r)||i.string(r)||(i.undefined(t)&&i.object(r)&&(t=r),r=p.querySelectorAll(m)),i.nodeList(r)&&(r=Array.prototype.slice.call(r)),!se().basic||!r.length)return!1;for(var x=0;x<r.length;x++){var k=r[x],T=k.querySelectorAll(m);if(T.length)for(var R=0;R<T.length;R++)s(k,T[R]);else Me(k,m)&&s(k,k)}return l.forEach(function(q){var P=q.target,w=q.media,fe=!1;w===P&&(fe=!0);var Q={};try{Q=JSON.parse(P.getAttribute("data-plyr"))}catch(z){}var H=ae({},J,t,Q);if(!H.enabled)return null;var Y=new Ee(w,H);if(i.object(Y)){if(H.debug){var ye=H.events.concat(["setup","statechange","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled"]);h(Y.getContainer(),ye.join(" "),function(z){console.log([H.logPrefix,"event:",z.type].join(" "),z.detail.plyr)})}Le(Y.getContainer(),"setup",!0,{plyr:Y}),d.push(Y)}}),d}function Ve(r){if(i.string(r)?r=p.querySelector(r):i.undefined(r)&&(r=p.body),i.htmlElement(r)){var t=r.querySelectorAll("."+J.classes.setup),s=[];return Array.prototype.slice.call(t).forEach(function(l){i.object(l.plyr)&&s.push(l.plyr)}),s}return[]}var O,me={x:0,y:0},J={enabled:!0,debug:!1,autoplay:!1,loop:!1,seekTime:10,volume:10,volumeMin:0,volumeMax:10,volumeStep:1,duration:null,displayDuration:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/2.0.10/plyr.svg",clickToPlay:!0,hideControls:!0,showPosterOnEnd:!1,disableContextMenu:!0,keyboardShorcuts:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},selectors:{html5:"video, audio",embed:"[data-type]",editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{seek:'[data-plyr="seek"]',play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',forward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',fullscreen:'[data-plyr="fullscreen"]'},volume:{input:'[data-plyr="volume"]',display:".plyr__volume--display"},progress:{container:".plyr__progress",buffer:".plyr__progress--buffer",played:".plyr__progress--played"},captions:".plyr__captions",currentTime:".plyr__time--current",duration:".plyr__time--duration"},classes:{setup:"plyr--setup",ready:"plyr--ready",videoWrapper:"plyr__video-wrapper",embedWrapper:"plyr__video-embed",type:"plyr--{0}",stopped:"plyr--stopped",playing:"plyr--playing",muted:"plyr--muted",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isIos:"plyr--is-ios",isTouch:"plyr--is-touch",captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",active:"plyr--fullscreen-active"},tabFocus:"tab-focus"},captions:{defaultActive:!1},fullscreen:{enabled:!0,fallback:!0,allowAudio:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","fullscreen"],i18n:{restart:"Restart",rewind:"Rewind {seektime} secs",play:"Play",pause:"Pause",forward:"Forward {seektime} secs",played:"played",buffered:"buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",toggleMute:"Toggle Mute",toggleCaptions:"Toggle Captions",toggleFullscreen:"Toggle Fullscreen",frameTitle:"Player for {title}"},types:{embed:["youtube","vimeo","soundcloud"],html5:["video","audio"]},urls:{vimeo:{api:"https://player.vimeo.com/api/player.js"},youtube:{api:"https://www.youtube.com/iframe_api"},soundcloud:{api:"https://w.soundcloud.com/player/api.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,forward:null,mute:null,volume:null,captions:null,fullscreen:null},events:["ready","ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied"],logPrefix:"[Plyr]"},i={object:function(r){return r!==null&&typeof r=="object"},array:function(r){return r!==null&&typeof r=="object"&&r.constructor===Array},number:function(r){return r!==null&&(typeof r=="number"&&!isNaN(r-0)||typeof r=="object"&&r.constructor===Number)},string:function(r){return r!==null&&(typeof r=="string"||typeof r=="object"&&r.constructor===String)},boolean:function(r){return r!==null&&typeof r=="boolean"},nodeList:function(r){return r!==null&&r instanceof NodeList},htmlElement:function(r){return r!==null&&r instanceof HTMLElement},function:function(r){return r!==null&&typeof r=="function"},undefined:function(r){return r!==null&&typeof r=="undefined"}},Re={supported:function(){if(!("localStorage"in u))return!1;try{u.localStorage.setItem("___test","OK");var r=u.localStorage.getItem("___test");return u.localStorage.removeItem("___test"),r==="OK"}catch(t){return!1}return!1}()};return{setup:et,supported:se,loadSprite:je,get:Ve}}),function(){function u(p,D){D=D||{bubbles:!1,cancelable:!1,detail:void 0};var re=document.createEvent("CustomEvent");return re.initCustomEvent(p,D.bubbles,D.cancelable,D.detail),re}typeof window.CustomEvent!="function"&&(u.prototype=window.Event.prototype,window.CustomEvent=u)}();
|