Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mediaelement-plugins

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mediaelement-plugins - npm Package Compare versions

Comparing version 2.5.0 to 2.5.1

demo/a11y.html

77

changelog.md

@@ -1,3 +0,78 @@

### Version History
## Version History
2.5.1 (2020/03/16)*
NEW PLUGINS
* Added snapshot plugin
* Added Markers Rolls plugin (#155)
* Added frame by frame navigation plugin (#130)
This plugin allows for forward and backward navigation in videos that support it in 30fps and 60fps
TRANSLATIONS
* Added Turkish translations (#154)
* Added Malay translation (#113)
* Added German translation to a11y/README.md
* Fix ru and uk translations (#162)
* Fix translations for Playlist
* Accessibility plugin translations
DOCUMENTATION
* README.md: Fix link to the real Rafael Miranda :)
* README.md: Fix outgoing links to use HTTPS, and fixed broken redirects (#165)
* README.md: Added link to a11y plugin
PIP PLUGIN
* Added support for WICG PiP mode
* Added picture-in-picture indenting / docs fix
* Added full support for PiP in chrome 70
* Added PiP plugin description
* Added setting properties PiP plugin
* Added basic picture-in-picture plugin
* Pathfix in picture-in-picture.css
* Improve picture-in-picture.md overview
POSTROLL PLUGIN
* Close postroll, when replaing video (#158)
ADS PLUGIN
* Added 'mejsprerollfinished' Event to detect end of last Ad-Preroll, Ads.js (#136)
ACCESSIBILITY PLUGIN (#142)
* Added support for sign language and audio description and stylings
(tested on multiple devices e.g. IE11, Edge, Chrome, Firefox, Safari + iOS 10, iOS 11 + Android Chrome)
* Added to plugin overview page
* Ajust Gruntfile.js + task fixes
QUALITY PLUGIN
* Added callback on change quality (#140)
* Fix focusout event triggered earlier than click and there is no visible clickable element
* Implement automatic source creation from .m3u8 & .mpd playback (#114)
* Select Quality From Single .mpd (Feature request #92)
* Update to make auto generate quality source optional
* Removed obsolete code.
* Fix tabs and spaces
* Fix css issue from grunt build
* Fixed issue with the quality chooser being mis-aligned (css)
* Fixed bug where if the first quality in the quality group is unsupported by the browser the video errors out...
(will now cycle through the quality source until a playable source is found)
PLAYLIST PLUGIN
* Fix playlist error in Safari (#129, #164)
* Fix currentMessage null issue (#132)
* Change incorrect comment of 'data-thumbnail' to 'data-playlist-thumbnail'
SPEED KEYS PLUGIN
* Implement keyboard controls for changing playback speed using < and > keys like on YouTube.
* Remove minified files from source
*2.5.0 (2017/11/17)*

@@ -4,0 +79,0 @@

2

dist/ads-vast-vpaid/ads-vast-vpaid.js

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function t(e,a,i){function n(s,o){if(!a[s]){if(!e[s]){var d="function"==typeof require&&require;if(!o&&d)return d(s,!0);if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var g=a[s]={exports:{}};e[s][0].call(g.exports,function(t){var a=e[s][1][t];return n(a||t)},g,g.exports,t,e,a,i)}return a[s].exports}for(var r="function"==typeof require&&require,s=0;s<i.length;s++)n(i[s]);return n}({1:[function(t,e,a){"use strict";Object.assign(mejs.MepDefaults,{vastAdTagUrl:"",vastAdsType:"vast"}),Object.assign(MediaElementPlayer.prototype,{vastAdTagIsLoading:!1,vastAdTagIsLoaded:!1,vastStartedPlaying:!1,vastAdTags:[],buildvast:function(t,e,a,i){var n=this;n.isVideo&&(""!==n.options.vastAdTagUrl&&n.vastLoadAdTagInfo(),n.buildads(t,e,a,i),n.vastSetupEvents())},vastSetupEvents:function(){var t=this,e=!1,a=!1,i=!1;t.container.addEventListener("mejsprerollinitialized",function(){if(t.vastAdTags.length>0){var e=t.vastAdTags[0];if(e.trackingEvents.initialization)for(var a=0,i=e.trackingEvents.initialization.length;a<i;a++)t.adsLoadUrl(e.trackingEvents.initialization[a])}}),t.container.addEventListener("mejsprerollstarted",function(){if(t.vastAdTags.length>0){var e=t.vastAdTags[0];if(e.trackingEvents.start)for(var a=0,i=e.trackingEvents.start.length;a<i;a++)t.adsLoadUrl(e.trackingEvents.start[a]);if(!e.shown&&e.impressions.length>0)for(var n=0,r=e.impressions.length;n<r;n++)t.adsLoadUrl(e.impressions[n]);e.shown=!0}}),t.container.addEventListener("mejsprerollvolumechanged",function(){if(t.vastAdTags.length>0&&t.options.indexPreroll<t.vastAdTags.length){var e=t.vastAdTags[t.options.indexPreroll];if(e.trackingEvents.mute&&!t.media.volume)for(var a=0,i=e.trackingEvents.mute.length;a<i;a++)t.adsLoadUrl(e.trackingEvents.mute[a]);if(e.trackingEvents.unmute&&t.media.volume)for(var n=0,r=e.trackingEvents.unmute.length;n<r;n++)t.adsLoadUrl(e.trackingEvents.unmute[n])}}),t.container.addEventListener("mejsprerolltimeupdate",function(n){if(t.vastAdTags.length>0&&t.options.indexPreroll<t.vastAdTags.length){var r=n.detail.duration,s=n.detail.currentTime,o=100*Math.min(1,Math.max(0,s/r)),d=t.vastAdTags[t.options.indexPreroll],l=o>=25&&o<50,g=o>=50&&o<75,v=o>=75&&o<100;if(d.trackingEvents.firstQuartile&&!e&&l){for(var c=0,m=d.trackingEvents.firstQuartile.length;c<m;c++)t.adsLoadUrl(d.trackingEvents.firstQuartile[c]);e=!0}else if(d.trackingEvents.midpoint&&!a&&g){for(var p=0,u=d.trackingEvents.midpoint.length;p<u;p++)t.adsLoadUrl(d.trackingEvents.midpoint[p]);a=!0}else if(d.trackingEvents.thirdQuartile&&!i&&v){for(var h=0,f=d.trackingEvents.thirdQuartile.length;h<f;h++)t.adsLoadUrl(d.trackingEvents.thirdQuartile[h]);i=!0}}}),t.container.addEventListener("mejsprerollended",function(){var n=t.vastAdTags[t.options.indexPreroll];if(t.vastAdTags.length>0&&t.options.indexPreroll<t.vastAdTags.length&&n.trackingEvents.complete)for(var r=0,s=n.trackingEvents.complete.length;r<s;r++)t.adsLoadUrl(n.trackingEvents.complete[r]);e=!1,a=!1,i=!1}),t.container.addEventListener("mejsprerolladsclicked",function(){var e=t.vastAdTags[t.options.indexPreroll];t.vastAdTags.length>0&&t.options.indexPreroll<t.vastAdTags.length&&e.clickThrough&&e.clickTracking&&t.adsLoadUrl(e.clickTracking)}),t.container.addEventListener("mejsprerollskipclicked",function(){var e=t.vastAdTags[t.options.indexPreroll];if(t.vastAdTags.length>0&&t.options.indexPreroll<t.vastAdTags.length&&e.trackingEvents.skip)for(var a=0,i=e.trackingEvents.skip.length;a<i;a++)t.adsLoadUrl(e.trackingEvents.skip[a])})},vastSetAdTagUrl:function(t){var e=this;e.options.vastAdTagUrl=t,e.options.indexPreroll=0,e.vastAdTagIsLoaded=!1,e.vastAdTags=[]},vastLoadAdTagInfo:function(){var t=this;t.adsDataIsLoading=!0,t.vastAdTagIsLoading=!0,t.loadAdTagInfoDirect()},loadAdTagInfoDirect:function(){var t=this;mejs.Utils.ajax(t.options.vastAdTagUrl,"xml",function(e){"vpaid"===t.options.vastAdsType?t.vpaidParseVpaidData(e):t.vastParseVastData(e)},function(e){console.error("vast3:direct:error",e),t.loadAdTagInfoProxy()})},loadAdTagInfoProxy:function(){var t=this,e=location.protocol,a='select * from xml where url="'+encodeURI(t.options.vastAdTagUrl)+'"',i="http"+(/^https/.test(e)?"s":"")+"://query.yahooapis.com/v1/public/yql?format=xml&q="+a;mejs.Utils.ajax(i,"xml",function(e){"vpaid"===t.options.vastAdsType?t.vpaidParseVpaidData(e):t.vastParseVastData(e)},function(t){console.error("vast:proxy:yahoo:error",t)})},vastParseVastData:function(t){var e=this,a=t.getElementsByTagName("Ad");if(a.length){e.vastAdTags=[],e.options.indexPreroll=0;for(var i=0,n=a.length;i<n;i++){var r=a[i],s=r.getElementsByTagName("AdTitle").length?r.getElementsByTagName("AdTitle")[0].textContent.trim():"",o=r.getElementsByTagName("Description").length?r.getElementsByTagName("Description")[0].textContent.trim():"",d=r.getElementsByTagName("ClickThrough").length?r.getElementsByTagName("ClickThrough")[0].textContent.trim():"",l=r.getElementsByTagName("ClickTracking").length?r.getElementsByTagName("ClickTracking")[0].textContent.trim():"",g={id:r.getAttribute("id"),title:s,description:o,impressions:[],clickThrough:d,clickTracking:l,mediaFiles:[],trackingEvents:{},shown:!1},v=r.getElementsByTagName("Impression"),c=r.getElementsByTagName("MediaFile"),m=r.getElementsByTagName("Tracking");e.vastAdTags.push(g);for(var p=0,u=v.length;p<u;p++)g.impressions.push(v[p].textContent.trim());for(var h=0,f=m.length;h<f;h++){var T=m[h],A=T.getAttribute("event");void 0===g.trackingEvents[A]&&(g.trackingEvents[A]=[]),g.trackingEvents[A].push(T.textContent.trim())}for(var k=0,E=c.length;k<E;k++){var y=c[k],x=y.getAttribute("type");if(""!==e.media.canPlayType(x)||/(no|false)/i.test(e.media.canPlayType(x)))if("application/javascript"===x){var P=document.createElement("script"),L=document.getElementsByTagName("script")[0];P.src=y.textContent.trim(),L.parentNode.insertBefore(P,L)}else"application/x-shockwave-flash"!==x&&g.mediaFiles.push({id:y.getAttribute("id"),delivery:y.getAttribute("delivery"),type:x,bitrate:y.getAttribute("bitrate"),width:y.getAttribute("width"),height:y.getAttribute("height"),url:y.textContent.trim()})}}e.vastLoaded()}},vpaidParseVpaidData:function(t){var e=this,a=t.getElementsByTagName("AdParameters");if(e.vpaidAdTags=[],e.options.indexPreroll=0,void 0!==a[0]){var i=JSON.parse(a[0].textContent.trim()),n=t.getElementsByTagName("Duration"),r={id:i.ad_id.trim(),title:i.title.trim(),clickThrough:i.page_url,impressions:[],mediaFiles:[],trackingEvents:{},shown:!1};if(void 0!==i.media.tracking.beacon)for(var s=["initialization","start","firstQuartile","midpoint","thirdQuartile","complete"],o=0,d=i.media.tracking.beacon.length;o<d;o++){var l=i.media.tracking.beacon[o];~s.indexOf(l.type)?(void 0===r.trackingEvents[l.type]&&(r.trackingEvents[l.type]=[]),r.trackingEvents[l.type].push(l.beacon_url.trim())):"impression"===l.type&&r.impressions.push(l.beacon_url.trim())}for(var g in i.media.video)if(i.media.video.hasOwnProperty(g)){var v=i.media.video[g],c=v.mime_type.trim();(""!==e.media.canPlayType(c)||/(no|false)/i.test(e.media.canPlayType(c)))&&r.mediaFiles.push({id:v.media_id,format:v.format,type:c,transcoding:v.transcoding,width:v.width,height:v.height,duration:n,url:v.media_url})}e.vastAdTags.push(r),e.vastLoaded()}},vastLoaded:function(){var t=this;t.vastAdTagIsLoaded=!0,t.vastAdTagIsLoading=!1,t.adsDataIsLoading=!1,t.vastStartPreroll()},vastStartPreroll:function(){for(var t=this,e=0;e<t.vastAdTags.length;)void 0!==t.vastAdTags[e].mediaFiles&&t.vastAdTags[e].mediaFiles.length&&(t.options.adsPrerollMediaUrl[e]=t.vastAdTags[e].mediaFiles[0].url),void 0!==t.vastAdTags[e].clickThrough&&(t.options.adsPrerollAdUrl[e]=t.vastAdTags[e].clickThrough),e++;t.adsStartPreroll()}})},{}]},{},[1]);
!function r(s,o,d){function l(e,t){if(!o[e]){if(!s[e]){var a="function"==typeof require&&require;if(!t&&a)return a(e,!0);if(g)return g(e,!0);var i=new Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}var n=o[e]={exports:{}};s[e][0].call(n.exports,function(t){return l(s[e][1][t]||t)},n,n.exports,r,s,o,d)}return o[e].exports}for(var g="function"==typeof require&&require,t=0;t<d.length;t++)l(d[t]);return l}({1:[function(t,e,a){"use strict";Object.assign(mejs.MepDefaults,{vastAdTagUrl:"",vastAdsType:"vast"}),Object.assign(MediaElementPlayer.prototype,{vastAdTagIsLoading:!1,vastAdTagIsLoaded:!1,vastStartedPlaying:!1,vastAdTags:[],buildvast:function(t,e,a,i){var n=this;n.isVideo&&(""!==n.options.vastAdTagUrl&&n.vastLoadAdTagInfo(),n.buildads(t,e,a,i),n.vastSetupEvents())},vastSetupEvents:function(){var p=this,h=!1,u=!1,f=!1;p.container.addEventListener("mejsprerollinitialized",function(){if(0<p.vastAdTags.length){var t=p.vastAdTags[0];if(t.trackingEvents.initialization)for(var e=0,a=t.trackingEvents.initialization.length;e<a;e++)p.adsLoadUrl(t.trackingEvents.initialization[e])}}),p.container.addEventListener("mejsprerollstarted",function(){if(0<p.vastAdTags.length){var t=p.vastAdTags[0];if(t.trackingEvents.start)for(var e=0,a=t.trackingEvents.start.length;e<a;e++)p.adsLoadUrl(t.trackingEvents.start[e]);if(!t.shown&&0<t.impressions.length)for(var i=0,n=t.impressions.length;i<n;i++)p.adsLoadUrl(t.impressions[i]);t.shown=!0}}),p.container.addEventListener("mejsprerollvolumechanged",function(){if(0<p.vastAdTags.length&&p.options.indexPreroll<p.vastAdTags.length){var t=p.vastAdTags[p.options.indexPreroll];if(t.trackingEvents.mute&&!p.media.volume)for(var e=0,a=t.trackingEvents.mute.length;e<a;e++)p.adsLoadUrl(t.trackingEvents.mute[e]);if(t.trackingEvents.unmute&&p.media.volume)for(var i=0,n=t.trackingEvents.unmute.length;i<n;i++)p.adsLoadUrl(t.trackingEvents.unmute[i])}}),p.container.addEventListener("mejsprerolltimeupdate",function(t){if(0<p.vastAdTags.length&&p.options.indexPreroll<p.vastAdTags.length){var e=t.detail.duration,a=t.detail.currentTime,i=100*Math.min(1,Math.max(0,a/e)),n=p.vastAdTags[p.options.indexPreroll],r=25<=i&&i<50,s=50<=i&&i<75,o=75<=i&&i<100;if(n.trackingEvents.firstQuartile&&!h&&r){for(var d=0,l=n.trackingEvents.firstQuartile.length;d<l;d++)p.adsLoadUrl(n.trackingEvents.firstQuartile[d]);h=!0}else if(n.trackingEvents.midpoint&&!u&&s){for(var g=0,v=n.trackingEvents.midpoint.length;g<v;g++)p.adsLoadUrl(n.trackingEvents.midpoint[g]);u=!0}else if(n.trackingEvents.thirdQuartile&&!f&&o){for(var c=0,m=n.trackingEvents.thirdQuartile.length;c<m;c++)p.adsLoadUrl(n.trackingEvents.thirdQuartile[c]);f=!0}}}),p.container.addEventListener("mejsprerollended",function(){var t=p.vastAdTags[p.options.indexPreroll];if(0<p.vastAdTags.length&&p.options.indexPreroll<p.vastAdTags.length&&t.trackingEvents.complete)for(var e=0,a=t.trackingEvents.complete.length;e<a;e++)p.adsLoadUrl(t.trackingEvents.complete[e]);f=u=h=!1}),p.container.addEventListener("mejsprerolladsclicked",function(){var t=p.vastAdTags[p.options.indexPreroll];0<p.vastAdTags.length&&p.options.indexPreroll<p.vastAdTags.length&&t.clickThrough&&t.clickTracking&&p.adsLoadUrl(t.clickTracking)}),p.container.addEventListener("mejsprerollskipclicked",function(){var t=p.vastAdTags[p.options.indexPreroll];if(0<p.vastAdTags.length&&p.options.indexPreroll<p.vastAdTags.length&&t.trackingEvents.skip)for(var e=0,a=t.trackingEvents.skip.length;e<a;e++)p.adsLoadUrl(t.trackingEvents.skip[e])})},vastSetAdTagUrl:function(t){this.options.vastAdTagUrl=t,this.options.indexPreroll=0,this.vastAdTagIsLoaded=!1,this.vastAdTags=[]},vastLoadAdTagInfo:function(){this.adsDataIsLoading=!0,this.vastAdTagIsLoading=!0,this.loadAdTagInfoDirect()},loadAdTagInfoDirect:function(){var e=this;mejs.Utils.ajax(e.options.vastAdTagUrl,"xml",function(t){"vpaid"===e.options.vastAdsType?e.vpaidParseVpaidData(t):e.vastParseVastData(t)},function(t){console.error("vast3:direct:error",t),e.loadAdTagInfoProxy()})},loadAdTagInfoProxy:function(){var e=this,t=location.protocol,a='select * from xml where url="'+encodeURI(e.options.vastAdTagUrl)+'"',i="http"+(/^https/.test(t)?"s":"")+"://query.yahooapis.com/v1/public/yql?format=xml&q="+a;mejs.Utils.ajax(i,"xml",function(t){"vpaid"===e.options.vastAdsType?e.vpaidParseVpaidData(t):e.vastParseVastData(t)},function(t){console.error("vast:proxy:yahoo:error",t)})},vastParseVastData:function(t){var e=this,a=t.getElementsByTagName("Ad");if(a.length){e.vastAdTags=[];for(var i=e.options.indexPreroll=0,n=a.length;i<n;i++){var r=a[i],s=r.getElementsByTagName("AdTitle").length?r.getElementsByTagName("AdTitle")[0].textContent.trim():"",o=r.getElementsByTagName("Description").length?r.getElementsByTagName("Description")[0].textContent.trim():"",d=r.getElementsByTagName("ClickThrough").length?r.getElementsByTagName("ClickThrough")[0].textContent.trim():"",l=r.getElementsByTagName("ClickTracking").length?r.getElementsByTagName("ClickTracking")[0].textContent.trim():"",g={id:r.getAttribute("id"),title:s,description:o,impressions:[],clickThrough:d,clickTracking:l,mediaFiles:[],trackingEvents:{},shown:!1},v=r.getElementsByTagName("Impression"),c=r.getElementsByTagName("MediaFile"),m=r.getElementsByTagName("Tracking");e.vastAdTags.push(g);for(var p=0,h=v.length;p<h;p++)g.impressions.push(v[p].textContent.trim());for(var u=0,f=m.length;u<f;u++){var T=m[u],A=T.getAttribute("event");void 0===g.trackingEvents[A]&&(g.trackingEvents[A]=[]),g.trackingEvents[A].push(T.textContent.trim())}for(var k=0,E=c.length;k<E;k++){var y=c[k],x=y.getAttribute("type");if(""!==e.media.canPlayType(x)||/(no|false)/i.test(e.media.canPlayType(x)))if("application/javascript"===x){var P=document.createElement("script"),L=document.getElementsByTagName("script")[0];P.src=y.textContent.trim(),L.parentNode.insertBefore(P,L)}else"application/x-shockwave-flash"!==x&&g.mediaFiles.push({id:y.getAttribute("id"),delivery:y.getAttribute("delivery"),type:x,bitrate:y.getAttribute("bitrate"),width:y.getAttribute("width"),height:y.getAttribute("height"),url:y.textContent.trim()})}}e.vastLoaded()}},vpaidParseVpaidData:function(t){var e=this,a=t.getElementsByTagName("AdParameters");if(e.vpaidAdTags=[],void(e.options.indexPreroll=0)!==a[0]){var i=JSON.parse(a[0].textContent.trim()),n=t.getElementsByTagName("Duration"),r={id:i.ad_id.trim(),title:i.title.trim(),clickThrough:i.page_url,impressions:[],mediaFiles:[],trackingEvents:{},shown:!1};if(void 0!==i.media.tracking.beacon)for(var s=["initialization","start","firstQuartile","midpoint","thirdQuartile","complete"],o=0,d=i.media.tracking.beacon.length;o<d;o++){var l=i.media.tracking.beacon[o];~s.indexOf(l.type)?(void 0===r.trackingEvents[l.type]&&(r.trackingEvents[l.type]=[]),r.trackingEvents[l.type].push(l.beacon_url.trim())):"impression"===l.type&&r.impressions.push(l.beacon_url.trim())}for(var g in i.media.video)if(i.media.video.hasOwnProperty(g)){var v=i.media.video[g],c=v.mime_type.trim();(""!==e.media.canPlayType(c)||/(no|false)/i.test(e.media.canPlayType(c)))&&r.mediaFiles.push({id:v.media_id,format:v.format,type:c,transcoding:v.transcoding,width:v.width,height:v.height,duration:n,url:v.media_url})}e.vastAdTags.push(r),e.vastLoaded()}},vastLoaded:function(){this.vastAdTagIsLoaded=!0,this.vastAdTagIsLoading=!1,this.adsDataIsLoading=!1,this.vastStartPreroll()},vastStartPreroll:function(){for(var t=this,e=0;e<t.vastAdTags.length;)void 0!==t.vastAdTags[e].mediaFiles&&t.vastAdTags[e].mediaFiles.length&&(t.options.adsPrerollMediaUrl[e]=t.vastAdTags[e].mediaFiles[0].url),void 0!==t.vastAdTags[e].clickThrough&&(t.options.adsPrerollAdUrl[e]=t.vastAdTags[e].clickThrough),e++;t.adsStartPreroll()}})},{}]},{},[1]);

@@ -47,2 +47,6 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.ad-skip'] = 'Langkau Iklan';
mejs.i18n.ms['mejs.ad-skip-info'] = 'Langkau iklan dalam %1 saat';
}
if (mejs.i18n.nl !== undefined) {

@@ -76,2 +80,6 @@ mejs.i18n.nl['mejs.ad-skip'] = 'Ad overslaan';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.ad-skip'] = 'Reklamı atla';
mejs.i18n.tr['mejs.ad-skip-info'] = ['1 saniye sonra atla', '%1 saniye sonra atla'];
}
if (mejs.i18n.uk !== undefined) {

@@ -88,2 +96,2 @@ mejs.i18n.uk['mejs.ad-skip'] = 'Пропустити рекламу';

mejs.i18n['zh-CN']['mejs.ad-skip-info'] = '跳过%1秒';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -220,2 +220,4 @@

} else {
var _event = mejs.Utils.createEvent('mejsprerollfinished', t.container);
t.container.dispatchEvent(_event);
t.adRestoreMainMedia();

@@ -294,2 +296,6 @@ }

} else {
event = mejs.Utils.createEvent('mejsprerollfinished', t.container);
t.container.dispatchEvent(event);
t.adRestoreMainMedia();

@@ -296,0 +302,0 @@ }

@@ -12,2 +12,2 @@ /*!

*/
!function e(r,a,s){function t(i,n){if(!a[i]){if(!r[i]){var d="function"==typeof require&&require;if(!n&&d)return d(i,!0);if(o)return o(i,!0);var l=new Error("Cannot find module '"+i+"'");throw l.code="MODULE_NOT_FOUND",l}var p=a[i]={exports:{}};r[i][0].call(p.exports,function(e){var a=r[i][1][e];return t(a||e)},p,p.exports,e,r,a,s)}return a[i].exports}for(var o="function"==typeof require&&require,i=0;i<s.length;i++)t(s[i]);return t}({1:[function(e,r,a){"use strict";mejs.i18n.en["mejs.ad-skip"]="Skip ad",mejs.i18n.en["mejs.ad-skip-info"]=["Skip in 1 second","Skip in %1 seconds"],Object.assign(mejs.MepDefaults,{adsPrerollMediaUrl:[],adsPrerollAdUrl:[],adsPrerollAdEnableSkip:!1,adsPrerollAdSkipSeconds:-1,indexPreroll:0}),Object.assign(MediaElementPlayer.prototype,{adsLoaded:!1,adsDataIsLoading:!1,adsCurrentMediaUrl:"",adsCurrentMediaDuration:0,adsPlayerHasStarted:!1,buildads:function(e,r,a){var s=this;s.adsLoaded||(s.adsLoaded=!0,e.adsLayer=document.createElement("div"),e.adsLayer.className=s.options.classPrefix+"layer "+s.options.classPrefix+"overlay "+s.options.classPrefix+"ads",e.adsLayer.innerHTML='<a href="#" target="_blank"></a><div class="'+s.options.classPrefix+'ads-skip-block"><span class="'+s.options.classPrefix+'ads-skip-message"></span><span class="'+s.options.classPrefix+'ads-skip-button">'+mejs.i18n.t("mejs.ad-skip")+"</span></div>",e.adsLayer.style.display="none",a.insertBefore(e.adsLayer,a.querySelector("."+s.options.classPrefix+"overlay-play")),e.adsLayer.querySelector("a").addEventListener("click",s.adsAdClick.bind(s)),e.adsSkipBlock=e.adsLayer.querySelector("."+s.options.classPrefix+"ads-skip-block"),e.adsSkipBlock.style.display="none",e.adsSkipMessage=e.adsLayer.querySelector("."+s.options.classPrefix+"ads-skip-message"),e.adsSkipMessage.style.display="none",e.adsSkipButton=e.adsLayer.querySelector("."+s.options.classPrefix+"ads-skip-button"),e.adsSkipButton.addEventListener("click",s.adsSkipClick.bind(s)),s.adsMediaTryingToStartProxy=s.adsMediaTryingToStart.bind(s),s.adsPrerollStartedProxy=s.adsPrerollStarted.bind(s),s.adsPrerollMetaProxy=s.adsPrerollMeta.bind(s),s.adsPrerollUpdateProxy=s.adsPrerollUpdate.bind(s),s.adsPrerollVolumeProxy=s.adsPrerollVolume.bind(s),s.adsPrerollEndedProxy=s.adsPrerollEnded.bind(s),s.media.addEventListener("rendererready",function(){var e=s.media.querySelector("iframe");e&&(e.style.display="none")}),s.media.addEventListener("play",s.adsMediaTryingToStartProxy),s.media.addEventListener("playing",s.adsMediaTryingToStartProxy),s.media.addEventListener("canplay",s.adsMediaTryingToStartProxy),s.media.addEventListener("loadedmetadata",s.adsMediaTryingToStartProxy),s.options.indexPreroll<s.options.adsPrerollMediaUrl.length&&s.adsStartPreroll())},adsMediaTryingToStart:function(){var e=this;e.adsDataIsLoading&&!e.paused&&e.options.indexPreroll<e.options.adsPrerollMediaUrl.length&&e.pause(),e.adsPlayerHasStarted=!0},adsStartPreroll:function(){var e=this;e.media.addEventListener("loadedmetadata",e.adsPrerollMetaProxy),e.media.addEventListener("playing",e.adsPrerollStartedProxy),e.media.addEventListener("ended",e.adsPrerollEndedProxy),e.media.addEventListener("timeupdate",e.adsPrerollUpdateProxy),e.media.addEventListener("volumechange",e.adsPrerollVolumeProxy),0===e.options.indexPreroll&&(e.adsCurrentMediaUrl=e.media.originalNode.src,e.adsCurrentMediaDuration=e.duration),e.setSrc(e.options.adsPrerollMediaUrl[e.options.indexPreroll]),e.load();for(var r=e.container.querySelector("."+e.options.classPrefix+"controls").children,a=0,s=r.length;a<s;a++){var t=r[a],o=t.querySelector("button");!o||mejs.Utils.hasClass(t,e.options.classPrefix+"playpause-button")||mejs.Utils.hasClass(t,e.options.classPrefix+"chromecast-button")?t.querySelector("."+e.options.classPrefix+"time-slider")&&(t.querySelector("."+e.options.classPrefix+"time-slider").style.pointerEvents="none"):(o.disabled=!0,t.style.pointerEvents="none")}e.adsPlayerHasStarted&&setTimeout(function(){e.play()},100)},adsPrerollMeta:function(){var e=this,r=0;e.options.duration>0?r=e.options.duration:isNaN(e.adsCurrentMediaDuration)||(r=e.adsCurrentMediaDuration),e.controls.querySelector("."+e.options.classPrefix+"duration")&&setTimeout(function(){e.controls.querySelector("."+e.options.classPrefix+"duration").innerHTML=mejs.Utils.secondsToTimeCode(r,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength)},250);var a=mejs.Utils.createEvent("mejsprerollinitialized",e.container);e.container.dispatchEvent(a)},adsPrerollStarted:function(){var e=this;e.media.removeEventListener("playing",e.adsPrerollStartedProxy),e.adsLayer.style.display="block",e.options.adsPrerollAdUrl[e.options.indexPreroll]?e.adsLayer.querySelector("a").href=e.options.adsPrerollAdUrl[e.options.indexPreroll]:(e.adsLayer.querySelector("a").href="#",e.adsLayer.querySelector("a").setAttribute("target","")),e.options.adsPrerollAdEnableSkip?(e.adsSkipBlock.style.display="block",e.options.adsPrerollAdSkipSeconds>0?(e.adsSkipMessage.innerHTML=mejs.i18n.t("mejs.ad-skip-info",e.options.adsPrerollAdSkipSeconds),e.adsSkipMessage.style.display="block",e.adsSkipButton.style.display="none"):(e.adsSkipMessage.style.display="none",e.adsSkipButton.style.display="block")):e.adsSkipBlock.style.display="none";var r=mejs.Utils.createEvent("mejsprerollstarted",e.container);e.container.dispatchEvent(r)},adsPrerollUpdate:function(){var e=this;e.options.adsPrerollAdEnableSkip&&e.options.adsPrerollAdSkipSeconds>0&&(e.currentTime>e.options.adsPrerollAdSkipSeconds?(e.adsSkipButton.style.display="block",e.adsSkipMessage.style.display="none"):e.adsSkipMessage.innerHTML=mejs.i18n.t("mejs.ad-skip-info",Math.round(e.options.adsPrerollAdSkipSeconds-e.currentTime)));var r=mejs.Utils.createEvent("mejsprerolltimeupdate",e.container);r.detail.duration=e.duration,r.detail.currentTime=e.currentTime,e.container.dispatchEvent(r)},adsPrerollVolume:function(){var e=this,r=mejs.Utils.createEvent("mejsprerollvolumechanged",e.container);e.container.dispatchEvent(r)},adsPrerollEnded:function(){var e=this;e.media.removeEventListener("ended",e.adsPrerollEndedProxy),setTimeout(function(){++e.options.indexPreroll<e.options.adsPrerollMediaUrl.length?e.adsStartPreroll():e.adRestoreMainMedia();var r=mejs.Utils.createEvent("mejsprerollended",e.container);e.container.dispatchEvent(r)},0)},adRestoreMainMedia:function(){var e=this,r=e.media.querySelector("iframe");r&&(r.style.display=""),e.setSrc(e.adsCurrentMediaUrl),setTimeout(function(){e.load(),e.play()},10);for(var a=e.container.querySelector("."+e.options.classPrefix+"controls").children,s=0,t=a.length;s<t;s++){var o=a[s],i=o.querySelector("button");i&&!mejs.Utils.hasClass(o,e.options.classPrefix+"playpause-button")?(o.style.pointerEvents="auto",i.disabled=!1):o.querySelector("."+e.options.classPrefix+"time-slider")&&(o.querySelector("."+e.options.classPrefix+"time-slider").style.pointerEvents="auto")}e.adsSkipBlock&&e.adsSkipBlock.remove(),e.adsLayer.style.display="none",e.media.removeEventListener("ended",e.adsPrerollEndedProxy),e.media.removeEventListener("loadedmetadata",e.adsPrerollMetaProxy),e.media.removeEventListener("timeupdate",e.adsPrerollUpdateProxy);var n=mejs.Utils.createEvent("mejsprerollmainstarted",e.container);e.container.dispatchEvent(n)},adsAdClick:function(){var e=this;e.paused?e.play():e.pause();var r=mejs.Utils.createEvent("mejsprerolladsclicked",e.container);e.container.dispatchEvent(r)},adsSkipClick:function(e){var r=this;r.media.removeEventListener("ended",r.adsPrerollEndedProxy);var a=mejs.Utils.createEvent("mejsprerollskipclicked",r.container);r.container.dispatchEvent(a),a=mejs.Utils.createEvent("mejsprerollended",r.container),r.container.dispatchEvent(a),++r.options.indexPreroll<r.options.adsPrerollMediaUrl.length?r.adsStartPreroll():r.adRestoreMainMedia(),e.preventDefault(),e.stopPropagation()},prerollAdsFinished:function(){var e=this;return e.options.indexPreroll===e.options.adsPrerollMediaUrl.length},adsLoadUrl:function(e){var r=new Image,a=Math.round(1e5*Math.random());r.src=e+(~e.indexOf("?")?"&":"?")+"random"+a+"="+a,r.loaded=function(){r=null}}})},{}]},{},[1]);
!function i(o,n,d){function l(r,e){if(!n[r]){if(!o[r]){var a="function"==typeof require&&require;if(!e&&a)return a(r,!0);if(c)return c(r,!0);var s=new Error("Cannot find module '"+r+"'");throw s.code="MODULE_NOT_FOUND",s}var t=n[r]={exports:{}};o[r][0].call(t.exports,function(e){return l(o[r][1][e]||e)},t,t.exports,i,o,n,d)}return n[r].exports}for(var c="function"==typeof require&&require,e=0;e<d.length;e++)l(d[e]);return l}({1:[function(e,r,a){"use strict";mejs.i18n.en["mejs.ad-skip"]="Skip ad",mejs.i18n.en["mejs.ad-skip-info"]=["Skip in 1 second","Skip in %1 seconds"],Object.assign(mejs.MepDefaults,{adsPrerollMediaUrl:[],adsPrerollAdUrl:[],adsPrerollAdEnableSkip:!1,adsPrerollAdSkipSeconds:-1,indexPreroll:0}),Object.assign(MediaElementPlayer.prototype,{adsLoaded:!1,adsDataIsLoading:!1,adsCurrentMediaUrl:"",adsCurrentMediaDuration:0,adsPlayerHasStarted:!1,buildads:function(e,r,a){var s=this;s.adsLoaded||(s.adsLoaded=!0,e.adsLayer=document.createElement("div"),e.adsLayer.className=s.options.classPrefix+"layer "+s.options.classPrefix+"overlay "+s.options.classPrefix+"ads",e.adsLayer.innerHTML='<a href="#" target="_blank"></a><div class="'+s.options.classPrefix+'ads-skip-block"><span class="'+s.options.classPrefix+'ads-skip-message"></span><span class="'+s.options.classPrefix+'ads-skip-button">'+mejs.i18n.t("mejs.ad-skip")+"</span></div>",e.adsLayer.style.display="none",a.insertBefore(e.adsLayer,a.querySelector("."+s.options.classPrefix+"overlay-play")),e.adsLayer.querySelector("a").addEventListener("click",s.adsAdClick.bind(s)),e.adsSkipBlock=e.adsLayer.querySelector("."+s.options.classPrefix+"ads-skip-block"),e.adsSkipBlock.style.display="none",e.adsSkipMessage=e.adsLayer.querySelector("."+s.options.classPrefix+"ads-skip-message"),e.adsSkipMessage.style.display="none",e.adsSkipButton=e.adsLayer.querySelector("."+s.options.classPrefix+"ads-skip-button"),e.adsSkipButton.addEventListener("click",s.adsSkipClick.bind(s)),s.adsMediaTryingToStartProxy=s.adsMediaTryingToStart.bind(s),s.adsPrerollStartedProxy=s.adsPrerollStarted.bind(s),s.adsPrerollMetaProxy=s.adsPrerollMeta.bind(s),s.adsPrerollUpdateProxy=s.adsPrerollUpdate.bind(s),s.adsPrerollVolumeProxy=s.adsPrerollVolume.bind(s),s.adsPrerollEndedProxy=s.adsPrerollEnded.bind(s),s.media.addEventListener("rendererready",function(){var e=s.media.querySelector("iframe");e&&(e.style.display="none")}),s.media.addEventListener("play",s.adsMediaTryingToStartProxy),s.media.addEventListener("playing",s.adsMediaTryingToStartProxy),s.media.addEventListener("canplay",s.adsMediaTryingToStartProxy),s.media.addEventListener("loadedmetadata",s.adsMediaTryingToStartProxy),s.options.indexPreroll<s.options.adsPrerollMediaUrl.length&&s.adsStartPreroll())},adsMediaTryingToStart:function(){var e=this;e.adsDataIsLoading&&!e.paused&&e.options.indexPreroll<e.options.adsPrerollMediaUrl.length&&e.pause(),e.adsPlayerHasStarted=!0},adsStartPreroll:function(){var e=this;e.media.addEventListener("loadedmetadata",e.adsPrerollMetaProxy),e.media.addEventListener("playing",e.adsPrerollStartedProxy),e.media.addEventListener("ended",e.adsPrerollEndedProxy),e.media.addEventListener("timeupdate",e.adsPrerollUpdateProxy),e.media.addEventListener("volumechange",e.adsPrerollVolumeProxy),0===e.options.indexPreroll&&(e.adsCurrentMediaUrl=e.media.originalNode.src,e.adsCurrentMediaDuration=e.duration),e.setSrc(e.options.adsPrerollMediaUrl[e.options.indexPreroll]),e.load();for(var r=e.container.querySelector("."+e.options.classPrefix+"controls").children,a=0,s=r.length;a<s;a++){var t=r[a],i=t.querySelector("button");!i||mejs.Utils.hasClass(t,e.options.classPrefix+"playpause-button")||mejs.Utils.hasClass(t,e.options.classPrefix+"chromecast-button")?t.querySelector("."+e.options.classPrefix+"time-slider")&&(t.querySelector("."+e.options.classPrefix+"time-slider").style.pointerEvents="none"):(i.disabled=!0,t.style.pointerEvents="none")}e.adsPlayerHasStarted&&setTimeout(function(){e.play()},100)},adsPrerollMeta:function(){var e=this,r=0;0<e.options.duration?r=e.options.duration:isNaN(e.adsCurrentMediaDuration)||(r=e.adsCurrentMediaDuration),e.controls.querySelector("."+e.options.classPrefix+"duration")&&setTimeout(function(){e.controls.querySelector("."+e.options.classPrefix+"duration").innerHTML=mejs.Utils.secondsToTimeCode(r,e.options.alwaysShowHours,e.options.showTimecodeFrameCount,e.options.framesPerSecond,e.options.secondsDecimalLength)},250);var a=mejs.Utils.createEvent("mejsprerollinitialized",e.container);e.container.dispatchEvent(a)},adsPrerollStarted:function(){var e=this;e.media.removeEventListener("playing",e.adsPrerollStartedProxy),e.adsLayer.style.display="block",e.options.adsPrerollAdUrl[e.options.indexPreroll]?e.adsLayer.querySelector("a").href=e.options.adsPrerollAdUrl[e.options.indexPreroll]:(e.adsLayer.querySelector("a").href="#",e.adsLayer.querySelector("a").setAttribute("target","")),e.options.adsPrerollAdEnableSkip?(e.adsSkipBlock.style.display="block",0<e.options.adsPrerollAdSkipSeconds?(e.adsSkipMessage.innerHTML=mejs.i18n.t("mejs.ad-skip-info",e.options.adsPrerollAdSkipSeconds),e.adsSkipMessage.style.display="block",e.adsSkipButton.style.display="none"):(e.adsSkipMessage.style.display="none",e.adsSkipButton.style.display="block")):e.adsSkipBlock.style.display="none";var r=mejs.Utils.createEvent("mejsprerollstarted",e.container);e.container.dispatchEvent(r)},adsPrerollUpdate:function(){var e=this;e.options.adsPrerollAdEnableSkip&&0<e.options.adsPrerollAdSkipSeconds&&(e.currentTime>e.options.adsPrerollAdSkipSeconds?(e.adsSkipButton.style.display="block",e.adsSkipMessage.style.display="none"):e.adsSkipMessage.innerHTML=mejs.i18n.t("mejs.ad-skip-info",Math.round(e.options.adsPrerollAdSkipSeconds-e.currentTime)));var r=mejs.Utils.createEvent("mejsprerolltimeupdate",e.container);r.detail.duration=e.duration,r.detail.currentTime=e.currentTime,e.container.dispatchEvent(r)},adsPrerollVolume:function(){var e=mejs.Utils.createEvent("mejsprerollvolumechanged",this.container);this.container.dispatchEvent(e)},adsPrerollEnded:function(){var a=this;a.media.removeEventListener("ended",a.adsPrerollEndedProxy),setTimeout(function(){if(a.options.indexPreroll++,a.options.indexPreroll<a.options.adsPrerollMediaUrl.length)a.adsStartPreroll();else{var e=mejs.Utils.createEvent("mejsprerollfinished",a.container);a.container.dispatchEvent(e),a.adRestoreMainMedia()}var r=mejs.Utils.createEvent("mejsprerollended",a.container);a.container.dispatchEvent(r)},0)},adRestoreMainMedia:function(){var e=this,r=e.media.querySelector("iframe");r&&(r.style.display=""),e.setSrc(e.adsCurrentMediaUrl),setTimeout(function(){e.load(),e.play()},10);for(var a=e.container.querySelector("."+e.options.classPrefix+"controls").children,s=0,t=a.length;s<t;s++){var i=a[s],o=i.querySelector("button");o&&!mejs.Utils.hasClass(i,e.options.classPrefix+"playpause-button")?(i.style.pointerEvents="auto",o.disabled=!1):i.querySelector("."+e.options.classPrefix+"time-slider")&&(i.querySelector("."+e.options.classPrefix+"time-slider").style.pointerEvents="auto")}e.adsSkipBlock&&e.adsSkipBlock.remove(),e.adsLayer.style.display="none",e.media.removeEventListener("ended",e.adsPrerollEndedProxy),e.media.removeEventListener("loadedmetadata",e.adsPrerollMetaProxy),e.media.removeEventListener("timeupdate",e.adsPrerollUpdateProxy);var n=mejs.Utils.createEvent("mejsprerollmainstarted",e.container);e.container.dispatchEvent(n)},adsAdClick:function(){var e=this;e.paused?e.play():e.pause();var r=mejs.Utils.createEvent("mejsprerolladsclicked",e.container);e.container.dispatchEvent(r)},adsSkipClick:function(e){var r=this;r.media.removeEventListener("ended",r.adsPrerollEndedProxy);var a=mejs.Utils.createEvent("mejsprerollskipclicked",r.container);r.container.dispatchEvent(a),a=mejs.Utils.createEvent("mejsprerollended",r.container),r.container.dispatchEvent(a),r.options.indexPreroll++,r.options.indexPreroll<r.options.adsPrerollMediaUrl.length?r.adsStartPreroll():(a=mejs.Utils.createEvent("mejsprerollfinished",r.container),r.container.dispatchEvent(a),r.adRestoreMainMedia()),e.preventDefault(),e.stopPropagation()},prerollAdsFinished:function(){return this.options.indexPreroll===this.options.adsPrerollMediaUrl.length},adsLoadUrl:function(e){var r=new Image,a=Math.round(1e5*Math.random());r.src=e+(~e.indexOf("?")?"&":"?")+"random"+a+"="+a,r.loaded=function(){r=null}}})},{}]},{},[1]);

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function e(t,i,a){function r(l,o){if(!i[l]){if(!t[l]){var s="function"==typeof require&&require;if(!o&&s)return s(l,!0);if(n)return n(l,!0);var d=new Error("Cannot find module '"+l+"'");throw d.code="MODULE_NOT_FOUND",d}var c=i[l]={exports:{}};t[l][0].call(c.exports,function(e){var i=t[l][1][e];return r(i||e)},c,c.exports,e,t,i,a)}return i[l].exports}for(var n="function"==typeof require&&require,l=0;l<a.length;l++)r(a[l]);return r}({1:[function(e,t,i){"use strict";Object.assign(mejs.MepDefaults,{airPlayText:null}),Object.assign(MediaElementPlayer.prototype,{buildairplay:function(){if(window.WebKitPlaybackTargetAvailabilityEvent){var e=this,t=mejs.Utils.isString(e.options.airPlayText)?e.options.airPlayText:"AirPlay",i=document.createElement("div");i.className=e.options.classPrefix+"button "+e.options.classPrefix+"airplay-button",i.innerHTML='<button type="button" aria-controls="'+e.id+'" title="'+t+'" aria-label="'+t+'" tabindex="0"></button>',i.addEventListener("click",function(){e.media.originalNode.webkitShowPlaybackTargetPicker()});var a=e.media.originalNode.getAttribute("x-webkit-airplay");a&&"allow"===a||e.media.originalNode.setAttribute("x-webkit-airplay","allow"),e.media.originalNode.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",function(){var t=e.media.originalNode.webkitCurrentPlaybackTargetIsWireless?"Started":"Stopped",a=e.media.originalNode.webkitCurrentPlaybackTargetIsWireless?"active":"",r=i.querySelector("button"),n=mejs.Utils.createEvent("airplay"+t,e.media);e.media.dispatchEvent(n),"active"===a?mejs.Utils.addClass(r,"active"):mejs.Utils.removeClass(r,"active")}),e.media.originalNode.addEventListener("webkitplaybacktargetavailabilitychanged",function(t){"available"===t.availability&&e.addControlElement(i,"airplay")})}}})},{}]},{},[1]);
!function n(l,o,s){function d(t,e){if(!o[t]){if(!l[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(c)return c(t,!0);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}var r=o[t]={exports:{}};l[t][0].call(r.exports,function(e){return d(l[t][1][e]||e)},r,r.exports,n,l,o,s)}return o[t].exports}for(var c="function"==typeof require&&require,e=0;e<s.length;e++)d(s[e]);return d}({1:[function(e,t,i){"use strict";Object.assign(mejs.MepDefaults,{airPlayText:null}),Object.assign(MediaElementPlayer.prototype,{buildairplay:function(){if(window.WebKitPlaybackTargetAvailabilityEvent){var r=this,e=mejs.Utils.isString(r.options.airPlayText)?r.options.airPlayText:"AirPlay",n=document.createElement("div");n.className=r.options.classPrefix+"button "+r.options.classPrefix+"airplay-button",n.innerHTML='<button type="button" aria-controls="'+r.id+'" title="'+e+'" aria-label="'+e+'" tabindex="0"></button>',n.addEventListener("click",function(){r.media.originalNode.webkitShowPlaybackTargetPicker()});var t=r.media.originalNode.getAttribute("x-webkit-airplay");t&&"allow"===t||r.media.originalNode.setAttribute("x-webkit-airplay","allow"),r.media.originalNode.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",function(){var e=r.media.originalNode.webkitCurrentPlaybackTargetIsWireless?"Started":"Stopped",t=r.media.originalNode.webkitCurrentPlaybackTargetIsWireless?"active":"",i=n.querySelector("button"),a=mejs.Utils.createEvent("airplay"+e,r.media);r.media.dispatchEvent(a),"active"===t?mejs.Utils.addClass(i,"active"):mejs.Utils.removeClass(i,"active")}),r.media.originalNode.addEventListener("webkitplaybacktargetavailabilitychanged",function(e){"available"===e.availability&&r.addControlElement(n,"airplay")})}}})},{}]},{},[1]);

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function e(t,a,r){function i(o,n){if(!a[o]){if(!t[o]){var c="function"==typeof require&&require;if(!n&&c)return c(o,!0);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=a[o]={exports:{}};t[o][0].call(u.exports,function(e){var a=t[o][1][e];return i(a||e)},u,u.exports,e,t,a,r)}return a[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,a){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e(2));mejs.i18n.en["mejs.chromecast-legend"]="Casting to:",Object.assign(mejs.MepDefaults,{castTitle:null,castAppID:null,castPolicy:"origin",castEnableTracks:!1,castIsLive:!1}),Object.assign(MediaElementPlayer.prototype,{buildchromecast:function(e,t,a,r){var i=this,s=document.createElement("div"),o=mejs.Utils.isString(i.options.castTitle)?i.options.castTitle:"Chromecast";if(e.chromecastLayer=document.createElement("div"),e.chromecastLayer.className=i.options.classPrefix+"chromecast-layer "+i.options.classPrefix+"layer",e.chromecastLayer.innerHTML='<div class="'+i.options.classPrefix+'chromecast-info"></div>',e.chromecastLayer.style.display="none",a.insertBefore(e.chromecastLayer,a.firstChild),s.className=i.options.classPrefix+"button "+i.options.classPrefix+"chromecast-button",s.innerHTML='<button type="button" is="google-cast-button" aria-controls="'+i.id+'" title="'+o+'" aria-label="'+o+'" tabindex="0"></button>',s.style.display="none",i.addControlElement(s,"chromecast"),i.castButton=s,e.chromecastLayer.innerHTML='<div class="'+i.options.classPrefix+'chromecast-container"><span class="'+i.options.classPrefix+'chromecast-icon"></span><span class="'+i.options.classPrefix+'chromecast-info">'+mejs.i18n.t("mejs.chromecast-legend")+' <span class="device"></span></span></div>',r.originalNode.getAttribute("poster")&&(e.chromecastLayer.innerHTML+='<img src="'+r.originalNode.getAttribute("poster")+'" width="100%" height="100%">',e.chromecastLayer.querySelector("img").addEventListener("click",function(){if(e.options.clickToPlayPause){var t=i.container.querySelector("."+i.options.classPrefix+"overlay-button"),a=t.getAttribute("aria-pressed");e.paused?e.play():e.pause(),t.setAttribute("aria-pressed",!!a),e.container.focus()}})),window.__onGCastApiAvailable=function(e){var t=mejs.Utils.getTypeFromFile(r.originalNode.src).toLowerCase(),a=t&&["application/x-mpegurl","application/vnd.apple.mpegurl","application/dash+xml","video/mp4","audio/mp3","audio/mp4"].indexOf(t)>-1;e&&a&&i._initializeCastPlayer()},window.cast){var n=i.controls.querySelector("."+i.options.classPrefix+"chromecast-button>button");return n&&"none"!==n.style.display&&(i.controls.querySelector("."+i.options.classPrefix+"chromecast-button").style.display=""),void i._initializeCastPlayer()}mejs.Utils.loadScript("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1")},cleanchromecast:function(e){if(window.cast){var t=cast.framework.CastContext.getInstance().getCurrentSession();t&&t.endSession(!0)}e.castButton&&e.castButton.remove(),e.chromecastLayer&&e.chromecastLayer.remove()},_initializeCastPlayer:function(){var e=this,t=void 0;switch(this.options.castPolicy){case"tab":t="TAB_AND_ORIGIN_SCOPED";break;case"page":t="PAGE_SCOPED";break;default:t="ORIGIN_SCOPED"}var a=cast.framework.CastContext.getInstance(),r=a.getCurrentSession();if(a.setOptions({receiverApplicationId:e.options.castAppID||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy[t]}),a.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,e._checkCastButtonStatus.bind(e)),e.remotePlayer=new cast.framework.RemotePlayer,e.remotePlayerController=new cast.framework.RemotePlayerController(e.remotePlayer),e.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,e._switchToCastPlayer.bind(this)),r){var i=a.getCastState(),s=e.controls.querySelector("."+e.options.classPrefix+"chromecast-button");s&&i===cast.framework.CastState.NO_DEVICES_AVAILABLE?s.style.display="none":s&&(e.chromecastLayer&&(e.chromecastLayer.style.display=i===cast.framework.CastState.CONNECTED?"":"none"),s.style.display=""),e._switchToCastPlayer()}},_checkCastButtonStatus:function(e){var t=this,a=t.controls.querySelector("."+t.options.classPrefix+"chromecast-button");a&&e.castState===cast.framework.CastState.NO_DEVICES_AVAILABLE?a.style.display="none":a&&(t.chromecastLayer&&(t.chromecastLayer.style.display=e.castState===cast.framework.CastState.CONNECTED?"":"none"),a.style.display=""),setTimeout(function(){t.setPlayerSize(t.width,t.height),t.setControlsSize()},0)},_switchToCastPlayer:function(){var e=this;e.proxy&&e.proxy.pause(),cast&&cast.framework&&(cast.framework.CastContext.getInstance().addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,e._checkCastButtonStatus.bind(e)),e.remotePlayer.isConnected)?e._setupCastPlayer():e._setDefaultPlayer()},_setupCastPlayer:function(){var e=this,t=cast.framework.CastContext.getInstance().getCurrentSession(),a=e.layers.querySelector("."+e.options.classPrefix+"chromecast-info");!0!==e.loadedChromecast&&(e.loadedChromecast=!0,e.proxy=new r.default(e.remotePlayer,e.remotePlayerController,e.media,e.options),a&&(a.querySelector(".device").innerText=t.getCastDevice().friendlyName),e.chromecastLayer&&(e.chromecastLayer.style.display=""),!0===e.options.castEnableTracks&&function(){var a=void 0!==e.captionsButton?e.captionsButton.querySelectorAll("input[type=radio]"):null;if(null!==a)for(var r=0,i=a.length;r<i;r++)!function(e,r){a[e].addEventListener("click",function(){var r=parseInt(a[e].id.replace(/^.*?track_(\d+)_.*$/,"$1")),i="none"===a[e].value?[]:[r],s=new chrome.cast.media.EditTracksInfoRequest(i);t.getMediaSession().editTracksInfo(s,function(){},function(e){console.error(e)})})}(r)}(),e.media.addEventListener("loadedmetadata",function(){-1===["SESSION_ENDING","SESSION_ENDED","NO_SESSION"].indexOf(t.getSessionState())&&e.proxy instanceof DefaultPlayer&&(e.proxy.pause(),e.proxy=new r.default(e.remotePlayer,e.remotePlayerController,e.media,e.options))}),e.media.addEventListener("timeupdate",function(){e.currentMediaTime=e.getCurrentTime()}))}})},{2:2}],2:[function(e,t,a){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(a,"__esModule",{value:!0});var i=function(){function e(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),s=function(){function e(t,a,i,s){r(this,e);var o=this;return o.player=t,o.controller=a,o.media=i,o.endedMedia=!1,o.enableTracks=s.castEnableTracks,o.isLive=s.castIsLive,o.controller.addEventListener(cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED,function(){o.paused?o.pause():o.play(),o.endedMedia=!1}),o.controller.addEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,function(){o.setMuted(o.player.isMuted),o.volume=0}),o.controller.addEventListener(cast.framework.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED,function(){var e=mejs.Utils.createEvent("loadedmetadata",o.media);o.media.dispatchEvent(e)}),o.controller.addEventListener(cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,function(){o.volume=o.player.volumeLevel;var e=mejs.Utils.createEvent("volumechange",o.media);o.media.dispatchEvent(e)}),o.controller.addEventListener(cast.framework.RemotePlayerEventType.DURATION_CHANGED,function(){var e=mejs.Utils.createEvent("timeupdate",o.media);o.media.dispatchEvent(e)}),o.controller.addEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,function(){var e=mejs.Utils.createEvent("timeupdate",o.media);o.media.dispatchEvent(e),!o.isLive&&o.getCurrentTime()>=o.getDuration()&&(o.endedMedia=!0,setTimeout(function(){var e=mejs.Utils.createEvent("ended",o.media);o.media.dispatchEvent(e)},50))}),o.controller.addEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,function(){o.setMuted(o.player.isMuted)}),o.load(),o}return i(e,[{key:"getSrc",value:function(){return this.media.originalNode.src}},{key:"setSrc",value:function(e){this.media.originalNode.src="string"==typeof e?e:e[0].src,this.load()}},{key:"setCurrentTime",value:function(e){this.player.currentTime=e,this.controller.seek();var t=mejs.Utils.createEvent("timeupdate",this.media);this.media.dispatchEvent(t)}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getDuration",value:function(){return this.player.duration}},{key:"setVolume",value:function(e){this.player.volumeLevel=e,this.controller.setVolumeLevel();var t=mejs.Utils.createEvent("volumechange",this.media);this.media.dispatchEvent(t)}},{key:"getVolume",value:function(){return this.player.volumeLevel}},{key:"play",value:function(){if(this.player.isPaused){this.controller.playOrPause();var e=mejs.Utils.createEvent("play",this.media);this.media.dispatchEvent(e)}}},{key:"pause",value:function(){if(!this.player.isPaused){this.controller.playOrPause();var e=mejs.Utils.createEvent("pause",this.media);this.media.dispatchEvent(e)}}},{key:"load",value:function(){var e=this,t=this.media.originalNode.src,a=mejs.Utils.getTypeFromFile(t),r=new chrome.cast.media.MediaInfo(t,a),i=cast.framework.CastContext.getInstance().getCurrentSession();if(t!==window.location.href&&i){if(!0===e.enableTracks){for(var s=[],o=e.media.originalNode.children,n=1,c=0,l=o.length;c<l;c++){var u=o[c];if("track"===u.tagName.toLowerCase()&&("subtitles"===u.getAttribute("kind")||"captions"===u.getAttribute("kind"))){var d=new chrome.cast.media.Track(n,chrome.cast.media.TrackType.TEXT);d.trackContentId=mejs.Utils.absolutizeUrl(u.getAttribute("src")),d.trackContentType="text/vtt",d.subtype=chrome.cast.media.TextTrackType.SUBTITLES,d.name=u.getAttribute("label"),d.language=u.getAttribute("srclang"),d.customData=null,s.push(d),n++}}r.textTrackStyle=new chrome.cast.media.TextTrackStyle,r.tracks=s}if(r.metadata=new chrome.cast.media.GenericMediaMetadata,r.streamType=e.isLive?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,r.customData=null,r.duration=null,r.currentTime=e.isLive?1/0:0,e.media.originalNode.getAttribute("data-cast-title")&&(r.metadata.title=e.media.originalNode.getAttribute("data-cast-title")),e.media.originalNode.getAttribute("data-cast-description")&&(r.metadata.subtitle=e.media.originalNode.getAttribute("data-cast-description")),e.media.originalNode.getAttribute("poster")||e.media.originalNode.getAttribute("data-cast-poster")){var m=e.media.originalNode.getAttribute("poster")||e.media.originalNode.getAttribute("data-cast-poster");r.metadata.images=[{url:mejs.Utils.absolutizeUrl(m)}]}var p=new chrome.cast.media.LoadRequest(r);i.loadMedia(p).then(function(){var t=e.media.originalNode.currentTime;e.setCurrentTime(t),e.play();var a=mejs.Utils.createEvent("play",e.media);e.media.dispatchEvent(a)},function(t){e._getErrorMessage(t)})}}},{key:"setMuted",value:function(e){var t=this;!0!==e||this.player.isMuted?!1===e&&this.player.isMuted&&this.controller.muteOrUnmute():this.controller.muteOrUnmute(),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",t.media);t.media.dispatchEvent(e)},50)}},{key:"canPlayType",value:function(e){return~["application/x-mpegurl","vnd.apple.mpegurl","application/dash+xml","video/mp4"].indexOf(e)}},{key:"_getErrorMessage",value:function(e){var t=e.description?" : "+e.description:".",a=void 0;switch(e.code){case chrome.cast.ErrorCode.API_NOT_INITIALIZED:a="The API is not initialized"+t;break;case chrome.cast.ErrorCode.CANCEL:a="The operation was canceled by the user"+t;break;case chrome.cast.ErrorCode.CHANNEL_ERROR:a="A channel to the receiver is not available"+t;break;case chrome.cast.ErrorCode.EXTENSION_MISSING:a="The Cast extension is not available"+t;break;case chrome.cast.ErrorCode.INVALID_PARAMETER:a="The parameters to the operation were not valid"+t;break;case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:a="No receiver was compatible with the session request"+t;break;case chrome.cast.ErrorCode.SESSION_ERROR:a="A session could not be created, or a session was invalid"+t;break;case chrome.cast.ErrorCode.TIMEOUT:a="The operation timed out"+t;break;default:a="Unknown error: "+e}console.error(a)}},{key:"paused",get:function(){return this.player.isPaused}},{key:"muted",set:function(e){this.setMuted(e)},get:function(){return this.player.isMuted}},{key:"ended",get:function(){return this.endedMedia}},{key:"readyState",get:function(){return this.media.originalNode.readyState}},{key:"currentTime",set:function(e){this.setCurrentTime(e)},get:function(){return this.getCurrentTime()}},{key:"duration",get:function(){return this.getDuration()}},{key:"volume",set:function(e){this.setVolume(e)},get:function(){return this.getVolume()}},{key:"src",set:function(e){this.setSrc(e)},get:function(){return this.getSrc()}}]),e}();a.default=s,window.ChromecastPlayer=s},{}]},{},[1,2]);
!function s(o,n,c){function l(t,e){if(!n[t]){if(!o[t]){var a="function"==typeof require&&require;if(!e&&a)return a(t,!0);if(d)return d(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=n[t]={exports:{}};o[t][0].call(i.exports,function(e){return l(o[t][1][e]||e)},i,i.exports,s,o,n,c)}return n[t].exports}for(var d="function"==typeof require&&require,e=0;e<c.length;e++)l(c[e]);return l}({1:[function(e,t,a){"use strict";var r,i=e(2),o=(r=i)&&r.__esModule?r:{default:r};mejs.i18n.en["mejs.chromecast-legend"]="Casting to:",Object.assign(mejs.MepDefaults,{castTitle:null,castAppID:null,castPolicy:"origin",castEnableTracks:!1,castIsLive:!1}),Object.assign(MediaElementPlayer.prototype,{buildchromecast:function(a,e,t,r){var i=this,s=document.createElement("div"),o=mejs.Utils.isString(i.options.castTitle)?i.options.castTitle:"Chromecast";if(a.chromecastLayer=document.createElement("div"),a.chromecastLayer.className=i.options.classPrefix+"chromecast-layer "+i.options.classPrefix+"layer",a.chromecastLayer.innerHTML='<div class="'+i.options.classPrefix+'chromecast-info"></div>',a.chromecastLayer.style.display="none",t.insertBefore(a.chromecastLayer,t.firstChild),s.className=i.options.classPrefix+"button "+i.options.classPrefix+"chromecast-button",s.innerHTML='<button type="button" is="google-cast-button" aria-controls="'+i.id+'" title="'+o+'" aria-label="'+o+'" tabindex="0"></button>',s.style.display="none",i.addControlElement(s,"chromecast"),i.castButton=s,a.chromecastLayer.innerHTML='<div class="'+i.options.classPrefix+'chromecast-container"><span class="'+i.options.classPrefix+'chromecast-icon"></span><span class="'+i.options.classPrefix+'chromecast-info">'+mejs.i18n.t("mejs.chromecast-legend")+' <span class="device"></span></span></div>',r.originalNode.getAttribute("poster")&&(a.chromecastLayer.innerHTML+='<img src="'+r.originalNode.getAttribute("poster")+'" width="100%" height="100%">',a.chromecastLayer.querySelector("img").addEventListener("click",function(){if(a.options.clickToPlayPause){var e=i.container.querySelector("."+i.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");a.paused?a.play():a.pause(),e.setAttribute("aria-pressed",!!t),a.container.focus()}})),window.__onGCastApiAvailable=function(e){var t=mejs.Utils.getTypeFromFile(r.originalNode.src).toLowerCase(),a=t&&-1<["application/x-mpegurl","application/vnd.apple.mpegurl","application/dash+xml","video/mp4","audio/mp3","audio/mp4"].indexOf(t);e&&a&&i._initializeCastPlayer()},window.cast){var n=i.controls.querySelector("."+i.options.classPrefix+"chromecast-button>button");return n&&"none"!==n.style.display&&(i.controls.querySelector("."+i.options.classPrefix+"chromecast-button").style.display=""),void i._initializeCastPlayer()}mejs.Utils.loadScript("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1")},cleanchromecast:function(e){if(window.cast){var t=cast.framework.CastContext.getInstance().getCurrentSession();t&&t.endSession(!0)}e.castButton&&e.castButton.remove(),e.chromecastLayer&&e.chromecastLayer.remove()},_initializeCastPlayer:function(){var e=this,t=void 0;switch(this.options.castPolicy){case"tab":t="TAB_AND_ORIGIN_SCOPED";break;case"page":t="PAGE_SCOPED";break;default:t="ORIGIN_SCOPED"}var a=cast.framework.CastContext.getInstance(),r=a.getCurrentSession();if(a.setOptions({receiverApplicationId:e.options.castAppID||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy[t]}),a.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,e._checkCastButtonStatus.bind(e)),e.remotePlayer=new cast.framework.RemotePlayer,e.remotePlayerController=new cast.framework.RemotePlayerController(e.remotePlayer),e.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,e._switchToCastPlayer.bind(this)),r){var i=a.getCastState(),s=e.controls.querySelector("."+e.options.classPrefix+"chromecast-button");s&&i===cast.framework.CastState.NO_DEVICES_AVAILABLE?s.style.display="none":s&&(e.chromecastLayer&&(e.chromecastLayer.style.display=i===cast.framework.CastState.CONNECTED?"":"none"),s.style.display=""),e._switchToCastPlayer()}},_checkCastButtonStatus:function(e){var t=this,a=t.controls.querySelector("."+t.options.classPrefix+"chromecast-button");a&&e.castState===cast.framework.CastState.NO_DEVICES_AVAILABLE?a.style.display="none":a&&(t.chromecastLayer&&(t.chromecastLayer.style.display=e.castState===cast.framework.CastState.CONNECTED?"":"none"),a.style.display=""),setTimeout(function(){t.setPlayerSize(t.width,t.height),t.setControlsSize()},0)},_switchToCastPlayer:function(){var e=this;if((e.proxy&&e.proxy.pause(),cast&&cast.framework)&&(cast.framework.CastContext.getInstance().addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,e._checkCastButtonStatus.bind(e)),e.remotePlayer.isConnected))return void e._setupCastPlayer();e._setDefaultPlayer()},_setupCastPlayer:function(){var r=this,s=cast.framework.CastContext.getInstance().getCurrentSession(),e=r.layers.querySelector("."+r.options.classPrefix+"chromecast-info");!0!==r.loadedChromecast&&(r.loadedChromecast=!0,r.proxy=new o.default(r.remotePlayer,r.remotePlayerController,r.media,r.options),e&&(e.querySelector(".device").innerText=s.getCastDevice().friendlyName),r.chromecastLayer&&(r.chromecastLayer.style.display=""),!0===r.options.castEnableTracks&&function(){var i=void 0!==r.captionsButton?r.captionsButton.querySelectorAll("input[type=radio]"):null;if(null!==i)for(var e=function(r,e){i[r].addEventListener("click",function(){var e=parseInt(i[r].id.replace(/^.*?track_(\d+)_.*$/,"$1")),t="none"===i[r].value?[]:[e],a=new chrome.cast.media.EditTracksInfoRequest(t);s.getMediaSession().editTracksInfo(a,function(){},function(e){console.error(e)})})},t=0,a=i.length;t<a;t++)e(t)}(),r.media.addEventListener("loadedmetadata",function(){-1===["SESSION_ENDING","SESSION_ENDED","NO_SESSION"].indexOf(s.getSessionState())&&r.proxy instanceof DefaultPlayer&&(r.proxy.pause(),r.proxy=new o.default(r.remotePlayer,r.remotePlayerController,r.media,r.options))}),r.media.addEventListener("timeupdate",function(){r.currentMediaTime=r.getCurrentTime()}))}})},{2:2}],2:[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=function(){function r(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,a){return t&&r(e.prototype,t),a&&r(e,a),e}}();var i=function(){function s(e,t,a,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var i=this;return i.player=e,i.controller=t,i.media=a,i.endedMedia=!1,i.enableTracks=r.castEnableTracks,i.isLive=r.castIsLive,i.controller.addEventListener(cast.framework.RemotePlayerEventType.IS_PAUSED_CHANGED,function(){i.paused?i.pause():i.play(),i.endedMedia=!1}),i.controller.addEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,function(){i.setMuted(i.player.isMuted),i.volume=0}),i.controller.addEventListener(cast.framework.RemotePlayerEventType.IS_MEDIA_LOADED_CHANGED,function(){var e=mejs.Utils.createEvent("loadedmetadata",i.media);i.media.dispatchEvent(e)}),i.controller.addEventListener(cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,function(){i.volume=i.player.volumeLevel;var e=mejs.Utils.createEvent("volumechange",i.media);i.media.dispatchEvent(e)}),i.controller.addEventListener(cast.framework.RemotePlayerEventType.DURATION_CHANGED,function(){var e=mejs.Utils.createEvent("timeupdate",i.media);i.media.dispatchEvent(e)}),i.controller.addEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,function(){var e=mejs.Utils.createEvent("timeupdate",i.media);i.media.dispatchEvent(e),!i.isLive&&i.getCurrentTime()>=i.getDuration()&&(i.endedMedia=!0,setTimeout(function(){var e=mejs.Utils.createEvent("ended",i.media);i.media.dispatchEvent(e)},50))}),i.controller.addEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,function(){i.setMuted(i.player.isMuted)}),i.load(),i}return r(s,[{key:"getSrc",value:function(){return this.media.originalNode.src}},{key:"setSrc",value:function(e){this.media.originalNode.src="string"==typeof e?e:e[0].src,this.load()}},{key:"setCurrentTime",value:function(e){this.player.currentTime=e,this.controller.seek();var t=mejs.Utils.createEvent("timeupdate",this.media);this.media.dispatchEvent(t)}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getDuration",value:function(){return this.player.duration}},{key:"setVolume",value:function(e){this.player.volumeLevel=e,this.controller.setVolumeLevel();var t=mejs.Utils.createEvent("volumechange",this.media);this.media.dispatchEvent(t)}},{key:"getVolume",value:function(){return this.player.volumeLevel}},{key:"play",value:function(){if(this.player.isPaused){this.controller.playOrPause();var e=mejs.Utils.createEvent("play",this.media);this.media.dispatchEvent(e)}}},{key:"pause",value:function(){if(!this.player.isPaused){this.controller.playOrPause();var e=mejs.Utils.createEvent("pause",this.media);this.media.dispatchEvent(e)}}},{key:"load",value:function(){var a=this,e=this.media.originalNode.src,t=mejs.Utils.getTypeFromFile(e),r=new chrome.cast.media.MediaInfo(e,t),i=cast.framework.CastContext.getInstance().getCurrentSession();if(e!==window.location.href&&i){if(!0===a.enableTracks){for(var s=[],o=a.media.originalNode.children,n=1,c=0,l=o.length;c<l;c++){var d=o[c];if("track"===d.tagName.toLowerCase()&&("subtitles"===d.getAttribute("kind")||"captions"===d.getAttribute("kind"))){var u=new chrome.cast.media.Track(n,chrome.cast.media.TrackType.TEXT);u.trackContentId=mejs.Utils.absolutizeUrl(d.getAttribute("src")),u.trackContentType="text/vtt",u.subtype=chrome.cast.media.TextTrackType.SUBTITLES,u.name=d.getAttribute("label"),u.language=d.getAttribute("srclang"),u.customData=null,s.push(u),n++}}r.textTrackStyle=new chrome.cast.media.TextTrackStyle,r.tracks=s}if(r.metadata=new chrome.cast.media.GenericMediaMetadata,r.streamType=a.isLive?chrome.cast.media.StreamType.LIVE:chrome.cast.media.StreamType.BUFFERED,r.customData=null,r.duration=null,r.currentTime=a.isLive?1/0:0,a.media.originalNode.getAttribute("data-cast-title")&&(r.metadata.title=a.media.originalNode.getAttribute("data-cast-title")),a.media.originalNode.getAttribute("data-cast-description")&&(r.metadata.subtitle=a.media.originalNode.getAttribute("data-cast-description")),a.media.originalNode.getAttribute("poster")||a.media.originalNode.getAttribute("data-cast-poster")){var m=a.media.originalNode.getAttribute("poster")||a.media.originalNode.getAttribute("data-cast-poster");r.metadata.images=[{url:mejs.Utils.absolutizeUrl(m)}]}var p=new chrome.cast.media.LoadRequest(r);i.loadMedia(p).then(function(){var e=a.media.originalNode.currentTime;a.setCurrentTime(e),a.play();var t=mejs.Utils.createEvent("play",a.media);a.media.dispatchEvent(t)},function(e){a._getErrorMessage(e)})}}},{key:"setMuted",value:function(e){var t=this;!0!==e||this.player.isMuted?!1===e&&this.player.isMuted&&this.controller.muteOrUnmute():this.controller.muteOrUnmute(),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",t.media);t.media.dispatchEvent(e)},50)}},{key:"canPlayType",value:function(e){return~["application/x-mpegurl","vnd.apple.mpegurl","application/dash+xml","video/mp4"].indexOf(e)}},{key:"_getErrorMessage",value:function(e){var t=e.description?" : "+e.description:".",a=void 0;switch(e.code){case chrome.cast.ErrorCode.API_NOT_INITIALIZED:a="The API is not initialized"+t;break;case chrome.cast.ErrorCode.CANCEL:a="The operation was canceled by the user"+t;break;case chrome.cast.ErrorCode.CHANNEL_ERROR:a="A channel to the receiver is not available"+t;break;case chrome.cast.ErrorCode.EXTENSION_MISSING:a="The Cast extension is not available"+t;break;case chrome.cast.ErrorCode.INVALID_PARAMETER:a="The parameters to the operation were not valid"+t;break;case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:a="No receiver was compatible with the session request"+t;break;case chrome.cast.ErrorCode.SESSION_ERROR:a="A session could not be created, or a session was invalid"+t;break;case chrome.cast.ErrorCode.TIMEOUT:a="The operation timed out"+t;break;default:a="Unknown error: "+e}console.error(a)}},{key:"paused",get:function(){return this.player.isPaused}},{key:"muted",set:function(e){this.setMuted(e)},get:function(){return this.player.isMuted}},{key:"ended",get:function(){return this.endedMedia}},{key:"readyState",get:function(){return this.media.originalNode.readyState}},{key:"currentTime",set:function(e){this.setCurrentTime(e)},get:function(){return this.getCurrentTime()}},{key:"duration",get:function(){return this.getDuration()}},{key:"volume",set:function(e){this.setVolume(e)},get:function(){return this.getVolume()}},{key:"src",set:function(e){this.setSrc(e)},get:function(){return this.getSrc()}}]),s}();a.default=i,window.ChromecastPlayer=i},{}]},{},[1,2]);

@@ -58,2 +58,7 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.fullscreen-off'] = 'Keluar dari mod skrin penuh';
mejs.i18n.ms['mejs.fullscreen-on'] = 'Masuk ke mod skrin penuh';
mejs.i18n.ms['mejs.download-video'] = 'Muat turun video';
}
if (mejs.i18n.nl !== undefined) {

@@ -94,2 +99,7 @@ mejs.i18n.nl['mejs.fullscreen-off'] = 'Volledig scherm uitschakelen';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.fullscreen-off'] = 'Tam ekran modundan çık';
mejs.i18n.tr['mejs.fullscreen-on'] = 'Tam ekran moduna geç';
mejs.i18n.tr['mejs.download-video'] = 'Videoyu indir';
}
if (mejs.i18n.uk !== undefined) {

@@ -109,2 +119,2 @@ mejs.i18n.uk['mejs.fullscreen-off'] = 'Вимкнути повноекранний режим';

mejs.i18n['zh-CN']['mejs.download-video'] = '下载视频';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function e(n,t,o){function i(r,c){if(!t[r]){if(!n[r]){var s="function"==typeof require&&require;if(!c&&s)return s(r,!0);if(u)return u(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var a=t[r]={exports:{}};n[r][0].call(a.exports,function(e){var t=n[r][1][e];return i(t||e)},a,a.exports,e,n,t,o)}return t[r].exports}for(var u="function"==typeof require&&require,r=0;r<o.length;r++)i(o[r]);return i}({1:[function(e,n,t){"use strict";mejs.i18n.en["mejs.fullscreen-off"]="Turn off Fullscreen",mejs.i18n.en["mejs.fullscreen-on"]="Go Fullscreen",mejs.i18n.en["mejs.download-video"]="Download Video",Object.assign(mejs.MepDefaults,{contextMenuItems:[{render:function(e){return void 0===e.enterFullScreen?null:e.isFullScreen?mejs.i18n.t("mejs.fullscreen-off"):mejs.i18n.t("mejs.fullscreen-on")},click:function(e){e.isFullScreen?e.exitFullScreen():e.enterFullScreen()}},{render:function(e){return e.media.muted?mejs.i18n.t("mejs.unmute"):mejs.i18n.t("mejs.mute")},click:function(e){e.media.muted?e.setMuted(!1):e.setMuted(!0)}},{isSeparator:!0},{render:function(){return mejs.i18n.t("mejs.download-video")},click:function(e){window.location.href=e.media.currentSrc}}]}),Object.assign(MediaElementPlayer.prototype,{isContextMenuEnabled:!0,contextMenuTimeout:null,buildcontextmenu:function(e){e.isVideo&&(document.querySelector("."+e.options.classPrefix+"contextmenu")||(e.contextMenu=document.createElement("div"),e.contextMenu.className=e.options.classPrefix+"contextmenu",e.contextMenu.style.display="none",document.body.appendChild(e.contextMenu)),e.container.addEventListener("contextmenu",function(n){!e.isContextMenuEnabled||3!==n.keyCode&&3!==n.which||(e.renderContextMenu(n),n.preventDefault(),n.stopPropagation())}),e.container.addEventListener("click",function(){e.contextMenu.style.display="none"}),e.contextMenu.addEventListener("mouseleave",function(){e.startContextMenuTimer()}))},cleancontextmenu:function(e){e.contextMenu.remove()},enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},startContextMenuTimer:function(){var e=this;e.killContextMenuTimer(),e.contextMenuTimer=setTimeout(function(){e.hideContextMenu(),e.killContextMenuTimer()},750)},killContextMenuTimer:function(){var e=this.contextMenuTimer;null!==e&&void 0!==e&&(clearTimeout(e),e=null)},hideContextMenu:function(){this.contextMenu.style.display="none"},renderContextMenu:function(e){for(var n=this,t="",o=n.options.contextMenuItems,i=0,u=o.length;i<u;i++){var r=o[i];if(r.isSeparator)t+='<div class="'+n.options.classPrefix+'contextmenu-separator"></div>';else{var c=r.render(n);null!==c&&void 0!==c&&(t+='<div class="'+n.options.classPrefix+'contextmenu-item" data-itemindex="'+i+'" id="element-'+1e6*Math.random()+'">'+c+"</div>")}}n.contextMenu.innerHTML=t;var s=n.contextMenu.offsetWidth,l=n.contextMenu.offsetHeight,a=e.pageX,d=e.pageY,f=document.documentElement,m=(window.pageXOffset||f.scrollLeft)-(f.clientLeft||0),x=(window.pageYOffset||f.scrollTop)-(f.clientTop||0),M=a+s>window.innerWidth+m?a-s:a,p=d+l>window.innerHeight+x?d-l:d;n.contextMenu.style.display="",n.contextMenu.style.left=M+"px",n.contextMenu.style.top=p+"px";for(var v=n.contextMenu.querySelectorAll("."+n.options.classPrefix+"contextmenu-item"),h=0,y=v.length;h<y;h++)!function(e,t){var o=v[e],i=parseInt(o.getAttribute("data-itemindex"),10),u=n.options.contextMenuItems[i];void 0!==u.show&&u.show(o,n),o.addEventListener("click",function(){void 0!==u.click&&u.click(n),n.contextMenu.style.display="none"})}(h);setTimeout(function(){n.killControlsTimer()},100)}})},{}]},{},[1]);
!function u(r,c,s){function l(n,e){if(!c[n]){if(!r[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(a)return a(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var i=c[n]={exports:{}};r[n][0].call(i.exports,function(e){return l(r[n][1][e]||e)},i,i.exports,u,r,c,s)}return c[n].exports}for(var a="function"==typeof require&&require,e=0;e<s.length;e++)l(s[e]);return l}({1:[function(e,n,t){"use strict";mejs.i18n.en["mejs.fullscreen-off"]="Turn off Fullscreen",mejs.i18n.en["mejs.fullscreen-on"]="Go Fullscreen",mejs.i18n.en["mejs.download-video"]="Download Video",Object.assign(mejs.MepDefaults,{contextMenuItems:[{render:function(e){return void 0===e.enterFullScreen?null:e.isFullScreen?mejs.i18n.t("mejs.fullscreen-off"):mejs.i18n.t("mejs.fullscreen-on")},click:function(e){e.isFullScreen?e.exitFullScreen():e.enterFullScreen()}},{render:function(e){return e.media.muted?mejs.i18n.t("mejs.unmute"):mejs.i18n.t("mejs.mute")},click:function(e){e.media.muted?e.setMuted(!1):e.setMuted(!0)}},{isSeparator:!0},{render:function(){return mejs.i18n.t("mejs.download-video")},click:function(e){window.location.href=e.media.currentSrc}}]}),Object.assign(MediaElementPlayer.prototype,{isContextMenuEnabled:!0,contextMenuTimeout:null,buildcontextmenu:function(n){n.isVideo&&(document.querySelector("."+n.options.classPrefix+"contextmenu")||(n.contextMenu=document.createElement("div"),n.contextMenu.className=n.options.classPrefix+"contextmenu",n.contextMenu.style.display="none",document.body.appendChild(n.contextMenu)),n.container.addEventListener("contextmenu",function(e){!n.isContextMenuEnabled||3!==e.keyCode&&3!==e.which||(n.renderContextMenu(e),e.preventDefault(),e.stopPropagation())}),n.container.addEventListener("click",function(){n.contextMenu.style.display="none"}),n.contextMenu.addEventListener("mouseleave",function(){n.startContextMenuTimer()}))},cleancontextmenu:function(e){e.contextMenu.remove()},enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},startContextMenuTimer:function(){var e=this;e.killContextMenuTimer(),e.contextMenuTimer=setTimeout(function(){e.hideContextMenu(),e.killContextMenuTimer()},750)},killContextMenuTimer:function(){var e=this.contextMenuTimer;null!=e&&(clearTimeout(e),e=null)},hideContextMenu:function(){this.contextMenu.style.display="none"},renderContextMenu:function(e){for(var u=this,n="",t=u.options.contextMenuItems,o=0,i=t.length;o<i;o++){var r=t[o];if(r.isSeparator)n+='<div class="'+u.options.classPrefix+'contextmenu-separator"></div>';else{var c=r.render(u);null!=c&&(n+='<div class="'+u.options.classPrefix+'contextmenu-item" data-itemindex="'+o+'" id="element-'+1e6*Math.random()+'">'+c+"</div>")}}u.contextMenu.innerHTML=n;var s=u.contextMenu.offsetWidth,l=u.contextMenu.offsetHeight,a=e.pageX,d=e.pageY,f=document.documentElement,m=(window.pageXOffset||f.scrollLeft)-(f.clientLeft||0),x=(window.pageYOffset||f.scrollTop)-(f.clientTop||0),M=a+s>window.innerWidth+m?a-s:a,p=d+l>window.innerHeight+x?d-l:d;u.contextMenu.style.display="",u.contextMenu.style.left=M+"px",u.contextMenu.style.top=p+"px";for(var v=u.contextMenu.querySelectorAll("."+u.options.classPrefix+"contextmenu-item"),h=function(e,n){var t=v[e],o=parseInt(t.getAttribute("data-itemindex"),10),i=u.options.contextMenuItems[o];void 0!==i.show&&i.show(t,u),t.addEventListener("click",function(){void 0!==i.click&&i.click(u),u.contextMenu.style.display="none"})},y=0,j=v.length;y<j;y++)h(y);setTimeout(function(){u.killControlsTimer()},100)}})},{}]},{},[1]);

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function e(o,t,i){function n(f,a){if(!t[f]){if(!o[f]){var l="function"==typeof require&&require;if(!a&&l)return l(f,!0);if(r)return r(f,!0);var c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c}var u=t[f]={exports:{}};o[f][0].call(u.exports,function(e){var t=o[f][1][e];return n(t||e)},u,u.exports,e,o,t,i)}return t[f].exports}for(var r="function"==typeof require&&require,f=0;f<i.length;f++)n(i[f]);return n}({1:[function(e,o,t){"use strict";Object.assign(mejs.MepDefaults,{facebookPixelTitle:"",facebookPixelCategory:"Videos"}),Object.assign(MediaElementPlayer.prototype,{buildfacebookpixel:function(e,o,t,i){e.fbPixelPlay=function(){"undefined"!=typeof fbq&&fbq("trackCustom",e.options.facebookPixelCategory,{Event:"Play",Title:""===e.options.facebookPixelTitle?e.media.currentSrc:e.options.facebookPixelTitle})},e.fbPixelPause=function(){"undefined"!=typeof fbq&&fbq("trackCustom",e.options.facebookPixelCategory,{Event:"Pause",Title:""===e.options.facebookPixelTitle?e.media.currentSrc:e.options.facebookPixelTitle})},e.fbPixelEnded=function(){"undefined"!=typeof fbq&&fbq("trackCustom",e.options.facebookPixelCategory,{Event:"Ended",Title:""===e.options.facebookPixelTitle?e.media.currentSrc:e.options.facebookPixelTitle})},i.addEventListener("play",e.fbPixelPlay),i.addEventListener("pause",e.fbPixelPause),i.addEventListener("ended",e.fbPixelEnded)},cleanfacebookpixel:function(e,o,t,i){i.removeEventListener("play",e.fbPixelPlay),i.removeEventListener("pause",e.fbPixelPause),i.removeEventListener("ended",e.fbPixelEnded)}})},{}]},{},[1]);
!function r(f,a,l){function c(o,e){if(!a[o]){if(!f[o]){var t="function"==typeof require&&require;if(!e&&t)return t(o,!0);if(u)return u(o,!0);var i=new Error("Cannot find module '"+o+"'");throw i.code="MODULE_NOT_FOUND",i}var n=a[o]={exports:{}};f[o][0].call(n.exports,function(e){return c(f[o][1][e]||e)},n,n.exports,r,f,a,l)}return a[o].exports}for(var u="function"==typeof require&&require,e=0;e<l.length;e++)c(l[e]);return c}({1:[function(e,o,t){"use strict";Object.assign(mejs.MepDefaults,{facebookPixelTitle:"",facebookPixelCategory:"Videos"}),Object.assign(MediaElementPlayer.prototype,{buildfacebookpixel:function(e,o,t,i){e.fbPixelPlay=function(){"undefined"!=typeof fbq&&fbq("trackCustom",e.options.facebookPixelCategory,{Event:"Play",Title:""===e.options.facebookPixelTitle?e.media.currentSrc:e.options.facebookPixelTitle})},e.fbPixelPause=function(){"undefined"!=typeof fbq&&fbq("trackCustom",e.options.facebookPixelCategory,{Event:"Pause",Title:""===e.options.facebookPixelTitle?e.media.currentSrc:e.options.facebookPixelTitle})},e.fbPixelEnded=function(){"undefined"!=typeof fbq&&fbq("trackCustom",e.options.facebookPixelCategory,{Event:"Ended",Title:""===e.options.facebookPixelTitle?e.media.currentSrc:e.options.facebookPixelTitle})},i.addEventListener("play",e.fbPixelPlay),i.addEventListener("pause",e.fbPixelPause),i.addEventListener("ended",e.fbPixelEnded)},cleanfacebookpixel:function(e,o,t,i){i.removeEventListener("play",e.fbPixelPlay),i.removeEventListener("pause",e.fbPixelPause),i.removeEventListener("ended",e.fbPixelEnded)}})},{}]},{},[1]);

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function e(n,t,o){function i(a,s){if(!t[a]){if(!n[a]){var g="function"==typeof require&&require;if(!s&&g)return g(a,!0);if(l)return l(a,!0);var r=new Error("Cannot find module '"+a+"'");throw r.code="MODULE_NOT_FOUND",r}var c=t[a]={exports:{}};n[a][0].call(c.exports,function(e){var t=n[a][1][e];return i(t||e)},c,c.exports,e,n,t,o)}return t[a].exports}for(var l="function"==typeof require&&require,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(e,n,t){"use strict";Object.assign(mejs.MepDefaults,{googleAnalyticsTitle:"",googleAnalyticsCategory:"Videos",googleAnalyticsEventPlay:"Play",googleAnalyticsEventPause:"Pause",googleAnalyticsEventEnded:"Ended",googleAnalyticsEventTime:"Time"}),Object.assign(MediaElementPlayer.prototype,{buildgoogleanalytics:function(e,n,t,o){o.addEventListener("play",function(){"undefined"!=typeof ga&&ga("send","event",e.options.googleAnalyticsCategory,e.options.googleAnalyticsEventPlay,""===e.options.googleAnalyticsTitle?e.media.currentSrc:e.options.googleAnalyticsTitle)},!1),o.addEventListener("pause",function(){"undefined"!=typeof ga&&ga("send","event",e.options.googleAnalyticsCategory,e.options.googleAnalyticsEventPause,""===e.options.googleAnalyticsTitle?e.media.currentSrc:e.options.googleAnalyticsTitle)},!1),o.addEventListener("ended",function(){"undefined"!=typeof ga&&ga("send","event",e.options.googleAnalyticsCategory,e.options.googleAnalyticsEventEnded,""===e.options.googleAnalyticsTitle?e.media.currentSrc:e.options.googleAnalyticsTitle)},!1)}})},{}]},{},[1]);
!function l(a,s,g){function r(n,e){if(!s[n]){if(!a[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(c)return c(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var i=s[n]={exports:{}};a[n][0].call(i.exports,function(e){return r(a[n][1][e]||e)},i,i.exports,l,a,s,g)}return s[n].exports}for(var c="function"==typeof require&&require,e=0;e<g.length;e++)r(g[e]);return r}({1:[function(e,n,t){"use strict";Object.assign(mejs.MepDefaults,{googleAnalyticsTitle:"",googleAnalyticsCategory:"Videos",googleAnalyticsEventPlay:"Play",googleAnalyticsEventPause:"Pause",googleAnalyticsEventEnded:"Ended",googleAnalyticsEventTime:"Time"}),Object.assign(MediaElementPlayer.prototype,{buildgoogleanalytics:function(e,n,t,o){o.addEventListener("play",function(){"undefined"!=typeof ga&&ga("send","event",e.options.googleAnalyticsCategory,e.options.googleAnalyticsEventPlay,""===e.options.googleAnalyticsTitle?e.media.currentSrc:e.options.googleAnalyticsTitle)},!1),o.addEventListener("pause",function(){"undefined"!=typeof ga&&ga("send","event",e.options.googleAnalyticsCategory,e.options.googleAnalyticsEventPause,""===e.options.googleAnalyticsTitle?e.media.currentSrc:e.options.googleAnalyticsTitle)},!1),o.addEventListener("ended",function(){"undefined"!=typeof ga&&ga("send","event",e.options.googleAnalyticsCategory,e.options.googleAnalyticsEventEnded,""===e.options.googleAnalyticsTitle?e.media.currentSrc:e.options.googleAnalyticsTitle)},!1)}})},{}]},{},[1]);

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.time-jump-forward'] = 'Lompat masa %1 saat';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.time-jump-forward'] = '%1 seconden vooruit springen';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.time-jump-forward'] = ['1 saniye ileri atla', '%1 saniye ileri atla'];
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.time-jump-forward'] = ['Перейти вперед на %1 секунду', 'Перейти вперед на %1 секунди', 'Перейти вперед на %1 секунд'];

mejs.i18n['zh-CN']['mejs.time-jump-forward'] = '向前跳%1秒';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function r(t,e,n){function o(a,u){if(!e[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var p=new Error("Cannot find module '"+a+"'");throw p.code="MODULE_NOT_FOUND",p}var m=e[a]={exports:{}};t[a][0].call(m.exports,function(r){var e=t[a][1][r];return o(e||r)},m,m.exports,r,t,e,n)}return e[a].exports}for(var i="function"==typeof require&&require,a=0;a<n.length;a++)o(n[a]);return o}({1:[function(r,t,e){"use strict";mejs.i18n.en["mejs.time-jump-forward"]=["Jump forward 1 second","Jump forward %1 seconds"],Object.assign(mejs.MepDefaults,{jumpForwardInterval:30,jumpForwardText:null}),Object.assign(MediaElementPlayer.prototype,{buildjumpforward:function(r,t,e,n){var o=this,i=mejs.i18n.t("mejs.time-jump-forward",o.options.jumpForwardInterval),a=mejs.Utils.isString(o.options.jumpForwardText)?o.options.jumpForwardText.replace("%1",o.options.jumpForwardInterval):i,u=document.createElement("div");u.className=o.options.classPrefix+"button "+o.options.classPrefix+"jump-forward-button",u.innerHTML='<button type="button" aria-controls="'+o.id+'" title="'+a+'" aria-label="'+a+'" tabindex="0">'+o.options.jumpForwardInterval+"</button>",o.addControlElement(u,"jumpforward"),u.addEventListener("click",function(){var r=isNaN(n.duration)?o.options.jumpForwardInterval:n.duration;if(r){var t=n.currentTime===1/0?0:n.currentTime;n.setCurrentTime(Math.min(t+o.options.jumpForwardInterval,r)),this.querySelector("button").blur()}})}})},{}]},{},[1]);
!function i(a,u,s){function p(t,r){if(!u[t]){if(!a[t]){var e="function"==typeof require&&require;if(!r&&e)return e(t,!0);if(m)return m(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=u[t]={exports:{}};a[t][0].call(o.exports,function(r){return p(a[t][1][r]||r)},o,o.exports,i,a,u,s)}return u[t].exports}for(var m="function"==typeof require&&require,r=0;r<s.length;r++)p(s[r]);return p}({1:[function(r,t,e){"use strict";mejs.i18n.en["mejs.time-jump-forward"]=["Jump forward 1 second","Jump forward %1 seconds"],Object.assign(mejs.MepDefaults,{jumpForwardInterval:30,jumpForwardText:null}),Object.assign(MediaElementPlayer.prototype,{buildjumpforward:function(r,t,e,n){var o=this,i=mejs.i18n.t("mejs.time-jump-forward",o.options.jumpForwardInterval),a=mejs.Utils.isString(o.options.jumpForwardText)?o.options.jumpForwardText.replace("%1",o.options.jumpForwardInterval):i,u=document.createElement("div");u.className=o.options.classPrefix+"button "+o.options.classPrefix+"jump-forward-button",u.innerHTML='<button type="button" aria-controls="'+o.id+'" title="'+a+'" aria-label="'+a+'" tabindex="0">'+o.options.jumpForwardInterval+"</button>",o.addControlElement(u,"jumpforward"),u.addEventListener("click",function(){var r=isNaN(n.duration)?o.options.jumpForwardInterval:n.duration;if(r){var t=n.currentTime===1/0?0:n.currentTime;n.setCurrentTime(Math.min(t+o.options.jumpForwardInterval,r)),this.querySelector("button").blur()}})}})},{}]},{},[1]);

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.loop'] = 'Togol ulangan';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.loop'] = 'Schakellus';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.loop'] = 'Döngü';
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.loop'] = 'Повторювати';

mejs.i18n['zh-CN']['mejs.loop'] = '切换循环';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function o(t,e,s){function n(l,r){if(!e[l]){if(!t[l]){var p="function"==typeof require&&require;if(!r&&p)return p(l,!0);if(i)return i(l,!0);var a=new Error("Cannot find module '"+l+"'");throw a.code="MODULE_NOT_FOUND",a}var f=e[l]={exports:{}};t[l][0].call(f.exports,function(o){var e=t[l][1][o];return n(e||o)},f,f.exports,o,t,e,s)}return e[l].exports}for(var i="function"==typeof require&&require,l=0;l<s.length;l++)n(s[l]);return n}({1:[function(o,t,e){"use strict";mejs.i18n.en["mejs.loop"]="Toggle Loop",Object.assign(mejs.MepDefaults,{loopText:null}),Object.assign(MediaElementPlayer.prototype,{buildloop:function(o){var t=this,e=mejs.Utils.isString(t.options.loopText)?t.options.loopText:mejs.i18n.t("mejs.loop"),s=document.createElement("div");s.className=t.options.classPrefix+"button "+t.options.classPrefix+"loop-button "+(o.options.loop?t.options.classPrefix+"loop-on":t.options.classPrefix+"loop-off"),s.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+e+'" aria-label="'+e+'" tabindex="0"></button>',t.addControlElement(s,"loop"),s.addEventListener("click",function(){o.options.loop=!o.options.loop,o.options.loop?(mejs.Utils.removeClass(s,t.options.classPrefix+"loop-off"),mejs.Utils.addClass(s,t.options.classPrefix+"loop-on")):(mejs.Utils.removeClass(s,t.options.classPrefix+"loop-on"),mejs.Utils.addClass(s,t.options.classPrefix+"loop-off"))})}})},{}]},{},[1]);
!function i(l,r,p){function a(t,o){if(!r[t]){if(!l[t]){var e="function"==typeof require&&require;if(!o&&e)return e(t,!0);if(f)return f(t,!0);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}var n=r[t]={exports:{}};l[t][0].call(n.exports,function(o){return a(l[t][1][o]||o)},n,n.exports,i,l,r,p)}return r[t].exports}for(var f="function"==typeof require&&require,o=0;o<p.length;o++)a(p[o]);return a}({1:[function(o,t,e){"use strict";mejs.i18n.en["mejs.loop"]="Toggle Loop",Object.assign(mejs.MepDefaults,{loopText:null}),Object.assign(MediaElementPlayer.prototype,{buildloop:function(o){var t=this,e=mejs.Utils.isString(t.options.loopText)?t.options.loopText:mejs.i18n.t("mejs.loop"),s=document.createElement("div");s.className=t.options.classPrefix+"button "+t.options.classPrefix+"loop-button "+(o.options.loop?t.options.classPrefix+"loop-on":t.options.classPrefix+"loop-off"),s.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+e+'" aria-label="'+e+'" tabindex="0"></button>',t.addControlElement(s,"loop"),s.addEventListener("click",function(){o.options.loop=!o.options.loop,o.options.loop?(mejs.Utils.removeClass(s,t.options.classPrefix+"loop-off"),mejs.Utils.addClass(s,t.options.classPrefix+"loop-on")):(mejs.Utils.removeClass(s,t.options.classPrefix+"loop-on"),mejs.Utils.addClass(s,t.options.classPrefix+"loop-off"))})}})},{}]},{},[1]);

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function r(e,t,o){function n(i,s){if(!t[i]){if(!e[i]){var l="function"==typeof require&&require;if(!s&&l)return l(i,!0);if(a)return a(i,!0);var f=new Error("Cannot find module '"+i+"'");throw f.code="MODULE_NOT_FOUND",f}var m=t[i]={exports:{}};e[i][0].call(m.exports,function(r){var t=e[i][1][r];return n(t||r)},m,m.exports,r,e,t,o)}return t[i].exports}for(var a="function"==typeof require&&require,i=0;i<o.length;i++)n(o[i]);return n}({1:[function(r,e,t){"use strict";Object.assign(mejs.MepDefaults,{markerColor:"#E9BC3D",markerWidth:1,markers:[],markerCallback:function(){}}),Object.assign(MediaElementPlayer.prototype,{buildmarkers:function(r,e,t,o){if(r.options.markers.length){for(var n=this,a=-1,i=-1,s=-1,l=-1,f=0,m=r.options.markers.length;f<m;++f){var u=document.createElement("span");u.className=n.options.classPrefix+"time-marker",e.querySelector("."+n.options.classPrefix+"time-total").appendChild(u)}o.addEventListener("durationchange",function(){r.setmarkers(e)}),o.addEventListener("timeupdate",function(){if(a=Math.floor(o.currentTime),s>a?l>a&&(l=-1):s=a,r.options.markers.length)for(var e=0,t=r.options.markers.length;e<t;++e)i=Math.floor(r.options.markers[e]),a===i&&i!==l&&(r.options.markerCallback(o,o.currentTime),l=i)},!1)}},setmarkers:function(r){for(var e=this,t=r.querySelectorAll("."+e.options.classPrefix+"time-marker"),o=0,n=e.options.markers.length;o<n;++o)if(Math.floor(e.options.markers[o])<=e.media.duration&&Math.floor(e.options.markers[o])>=0){var a=100*Math.floor(e.options.markers[o])/e.media.duration,i=t[o];i.style.width=e.options.markerWidth+"px",i.style.left=a+"%",i.style.background=e.options.markerColor}}})},{}]},{},[1]);
!function i(a,s,l){function f(e,r){if(!s[e]){if(!a[e]){var t="function"==typeof require&&require;if(!r&&t)return t(e,!0);if(m)return m(e,!0);var o=new Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}var n=s[e]={exports:{}};a[e][0].call(n.exports,function(r){return f(a[e][1][r]||r)},n,n.exports,i,a,s,l)}return s[e].exports}for(var m="function"==typeof require&&require,r=0;r<l.length;r++)f(l[r]);return f}({1:[function(r,e,t){"use strict";Object.assign(mejs.MepDefaults,{markerColor:"#E9BC3D",markerWidth:1,markers:[],markerCallback:function(){}}),Object.assign(MediaElementPlayer.prototype,{buildmarkers:function(t,r,e,o){if(t.options.markers.length){for(var n=-1,i=-1,a=-1,s=-1,l=0,f=t.options.markers.length;l<f;++l){var m=document.createElement("span");m.className=this.options.classPrefix+"time-marker",r.querySelector("."+this.options.classPrefix+"time-total").appendChild(m)}o.addEventListener("durationchange",function(){t.setmarkers(r)}),o.addEventListener("timeupdate",function(){if((n=Math.floor(o.currentTime))<a?n<s&&(s=-1):a=n,t.options.markers.length)for(var r=0,e=t.options.markers.length;r<e;++r)i=Math.floor(t.options.markers[r]),n===i&&i!==s&&(t.options.markerCallback(o,o.currentTime),s=i)},!1)}},setmarkers:function(r){for(var e=this,t=r.querySelectorAll("."+e.options.classPrefix+"time-marker"),o=0,n=e.options.markers.length;o<n;++o)if(Math.floor(e.options.markers[o])<=e.media.duration&&0<=Math.floor(e.options.markers[o])){var i=100*Math.floor(e.options.markers[o])/e.media.duration,a=t[o];a.style.width=e.options.markerWidth+"px",a.style.left=i+"%",a.style.background=e.options.markerColor}}})},{}]},{},[1]);

@@ -80,2 +80,9 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.playlist'] = 'Senarai main';
mejs.i18n.ms['mejs.playlist-prev'] = 'Sebelum';
mejs.i18n.ms['mejs.playlist-next'] = 'Selepas';
mejs.i18n.ms['mejs.playlist-loop'] = 'Ulang senarai';
mejs.i18n.ms['mejs.playlist-shuffle'] = 'Kocok senarai';
}
if (mejs.i18n.nl !== undefined) {

@@ -113,4 +120,4 @@ mejs.i18n.nl['mejs.playlist'] = 'Afspeellijst';

mejs.i18n.ru['mejs.playlist-next'] = 'следующий';
mejs.i18n.ru['mejs.playlist-loop'] = 'петля';
mejs.i18n.ru['mejs.playlist-shuffle'] = 'шарканье';
mejs.i18n.ru['mejs.playlist-loop'] = 'зациклить';
mejs.i18n.ru['mejs.playlist-shuffle'] = 'перемешать';
}

@@ -131,2 +138,9 @@ if (mejs.i18n.sk !== undefined) {

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.playlist'] = 'Oynatma Listesi';
mejs.i18n.tr['mejs.playlist-prev'] = 'Önceki';
mejs.i18n.tr['mejs.playlist-next'] = 'Sonraki';
mejs.i18n.tr['mejs.playlist-loop'] = 'Döngü';
mejs.i18n.tr['mejs.playlist-shuffle'] = 'Karıştır';
}
if (mejs.i18n.uk !== undefined) {

@@ -152,2 +166,2 @@ mejs.i18n.uk['mejs.playlist'] = 'Плейлист';

mejs.i18n['zh-CN']['mejs.playlist-shuffle'] = '拖曳';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -75,3 +75,3 @@

currentItem.innerHTML += '<p>' + player.options.currentMessage + ' <span class="' + player.options.classPrefix + 'playlist-current-title">' + player.playlist[player.currentPlaylistItem].title + '</span>';
currentItem.innerHTML += '<p>' + (player.options.currentMessage || '') + ' <span class="' + player.options.classPrefix + 'playlist-current-title">' + player.playlist[player.currentPlaylistItem].title + '</span>';
if (typeof player.playlist[player.currentPlaylistItem].description !== 'undefined') {

@@ -306,6 +306,6 @@ currentItem.innerHTML += ' - <span class="' + player.options.classPrefix + 'playlist-current-description">' + player.playlist[player.currentPlaylistItem].description + '</span>';

t.playlist = t.options.playlist.length ? t.options.playlist : [];
t.playlist = t.options.playlist.length ? t.options.playlist : t.mediaFiles && t.mediaFiles.length ? t.mediaFiles : [];
if (!t.playlist.length) {
var children = t.mediaFiles || t.media.originalNode.children;
var children = t.media.originalNode.children;

@@ -312,0 +312,0 @@ for (var i = 0, total = children.length; i < total; i++) {

@@ -12,2 +12,2 @@ /*!

*/
!function t(e,l,s){function i(a,o){if(!l[a]){if(!e[a]){var r="function"==typeof require&&require;if(!o&&r)return r(a,!0);if(n)return n(a,!0);var p=new Error("Cannot find module '"+a+"'");throw p.code="MODULE_NOT_FOUND",p}var c=l[a]={exports:{}};e[a][0].call(c.exports,function(t){var l=e[a][1][t];return i(l||t)},c,c.exports,t,e,l,s)}return l[a].exports}for(var n="function"==typeof require&&require,a=0;a<s.length;a++)i(s[a]);return i}({1:[function(t,e,l){"use strict";mejs.i18n.en["mejs.playlist"]="Toggle Playlist",mejs.i18n.en["mejs.playlist-prev"]="Previous",mejs.i18n.en["mejs.playlist-next"]="Next",mejs.i18n.en["mejs.playlist-loop"]="Loop",mejs.i18n.en["mejs.playlist-shuffle"]="Shuffle",Object.assign(mejs.MepDefaults,{playlist:[],showPlaylist:!0,autoClosePlaylist:!1,prevText:null,nextText:null,loopText:null,shuffleText:null,playlistTitle:null,currentMessage:null}),Object.assign(MediaElementPlayer.prototype,{buildplaylist:function(t,e,l,s){var i=mejs.i18n.t("mejs.playlist"),n=mejs.Utils.isString(t.options.playlistTitle)?t.options.playlistTitle:i;if(!t.createPlayList_()){if(t.currentPlaylistItem=0,t.originalControlsIndex=e.style.zIndex,e.style.zIndex=5,t.endedCallback=function(){t.currentPlaylistItem<t.listItems.length&&(t.setSrc(t.playlist[++t.currentPlaylistItem]),t.load(),setTimeout(function(){t.play()},200))},s.addEventListener("ended",t.endedCallback),!t.isVideo){var a=document.createElement("div"),o=function(){a.innerHTML="",void 0!==t.playlist[t.currentPlaylistItem]["data-playlist-thumbnail"]&&(a.innerHTML+='<img tabindex="-1" src="'+t.playlist[t.currentPlaylistItem]["data-playlist-thumbnail"]+'">'),a.innerHTML+="<p>"+t.options.currentMessage+' <span class="'+t.options.classPrefix+'playlist-current-title">'+t.playlist[t.currentPlaylistItem].title+"</span>",void 0!==t.playlist[t.currentPlaylistItem].description&&(a.innerHTML+=' - <span class="'+t.options.classPrefix+'playlist-current-description">'+t.playlist[t.currentPlaylistItem].description+"</span>"),a.innerHTML+="</p>",t.resetSize()};a.className=t.options.classPrefix+"playlist-current "+t.options.classPrefix+"layer",o(),l.insertBefore(a,l.firstChild),s.addEventListener("play",o)}if(t.options.showPlaylist){t.playlistLayer=document.createElement("div"),t.playlistLayer.className=t.options.classPrefix+"playlist-layer "+t.options.classPrefix+"layer "+(t.isVideo?t.options.classPrefix+"playlist-hidden":"")+" "+t.options.classPrefix+"playlist-selector",t.playlistLayer.innerHTML='<ul class="'+t.options.classPrefix+'playlist-selector-list"></ul>',l.insertBefore(t.playlistLayer,l.firstChild);for(var r=0,p=t.listItems.length;r<p;r++)t.playlistLayer.querySelector("ul").innerHTML+=t.listItems[r];if(t.isVideo)t.playlistButton=document.createElement("div"),t.playlistButton.className=t.options.classPrefix+"button "+t.options.classPrefix+"playlist-button",t.playlistButton.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+n+'" aria-label="'+n+'" tabindex="0"></button>',t.playlistButton.addEventListener("click",function(){mejs.Utils.toggleClass(t.playlistLayer,t.options.classPrefix+"playlist-hidden")}),t.addControlElement(t.playlistButton,"playlist");else{var c=t.playlistLayer.querySelectorAll("li");if(c.length<=10){for(var u=0,f=0,y=c.length;f<y;f++)u+=c[f].offsetHeight;t.container.style.height=u+"px"}}for(var d=t.playlistLayer.querySelectorAll("."+t.options.classPrefix+"playlist-selector-list-item"),m=t.playlistLayer.querySelectorAll("input[type=radio]"),v=0,x=m.length;v<x;v++)m[v].disabled=!1,m[v].addEventListener("click",function(){for(var e=t.playlistLayer.querySelectorAll('input[type="radio"]'),l=t.playlistLayer.querySelectorAll("."+t.options.classPrefix+"playlist-selected"),s=0,i=e.length;s<i;s++)e[s].checked=!1;for(var n=0,a=l.length;n<a;n++)mejs.Utils.removeClass(l[n],t.options.classPrefix+"playlist-selected"),l[n].querySelector("label").querySelector("span").remove();this.checked=!0,this.closest("."+t.options.classPrefix+"playlist-selector-list-item").querySelector("label").innerHTML="<span>▶</span> "+this.closest("."+t.options.classPrefix+"playlist-selector-list-item").querySelector("label").innerHTML,mejs.Utils.addClass(this.closest("."+t.options.classPrefix+"playlist-selector-list-item"),t.options.classPrefix+"playlist-selected"),t.currentPlaylistItem=this.getAttribute("data-playlist-index"),t.setSrc(this.value),t.load(),t.play(),t.isVideo&&!0===t.options.autoClosePlaylist&&mejs.Utils.toggleClass(t.playlistLayer,t.options.classPrefix+"playlist-hidden")});for(var h=0,P=d.length;h<P;h++)d[h].addEventListener("click",function(){var e=mejs.Utils.siblings(this.querySelector("."+t.options.classPrefix+"playlist-selector-label"),function(t){return"INPUT"===t.tagName})[0],l=mejs.Utils.createEvent("click",e);e.dispatchEvent(l)});t.keydownCallback=function(t){var e=mejs.Utils.createEvent("click",t.target);return t.target.dispatchEvent(e),!1},t.playlistLayer.addEventListener("keydown",function(e){var l=e.which||e.keyCode||0;~[13,32,38,40].indexOf(l)&&t.keydownCallback(e)})}else mejs.Utils.addClass(t.container,t.options.classPrefix+"no-playlist")}},cleanplaylist:function(t,e,l,s){s.removeEventListener("ended",t.endedCallback)},buildprevtrack:function(t){var e=mejs.i18n.t("mejs.playlist-prev"),l=mejs.Utils.isString(t.options.prevText)?t.options.prevText:e;t.prevButton=document.createElement("div"),t.prevButton.className=t.options.classPrefix+"button "+t.options.classPrefix+"prev-button",t.prevButton.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+l+'" aria-label="'+l+'" tabindex="0"></button>',t.prevPlaylistCallback=function(){t.playlist[--t.currentPlaylistItem]?(t.setSrc(t.playlist[t.currentPlaylistItem].src),t.load(),t.play()):++t.currentPlaylistItem},t.prevButton.addEventListener("click",t.prevPlaylistCallback),t.addControlElement(t.prevButton,"prevtrack")},cleanprevtrack:function(t){t.prevButton.removeEventListener("click",t.prevPlaylistCallback)},buildnexttrack:function(t){var e=mejs.i18n.t("mejs.playlist-next"),l=mejs.Utils.isString(t.options.nextText)?t.options.nextText:e;t.nextButton=document.createElement("div"),t.nextButton.className=t.options.classPrefix+"button "+t.options.classPrefix+"next-button",t.nextButton.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+l+'" aria-label="'+l+'" tabindex="0"></button>',t.nextPlaylistCallback=function(){t.playlist[++t.currentPlaylistItem]?(t.setSrc(t.playlist[t.currentPlaylistItem].src),t.load(),t.play()):--t.currentPlaylistItem},t.nextButton.addEventListener("click",t.nextPlaylistCallback),t.addControlElement(t.nextButton,"nexttrack")},cleannexttrack:function(t){t.nextButton.removeEventListener("click",t.nextPlaylistCallback)},buildloop:function(t){var e=mejs.i18n.t("mejs.playlist-loop"),l=mejs.Utils.isString(t.options.loopText)?t.options.loopText:e;t.loopButton=document.createElement("div"),t.loopButton.className=t.options.classPrefix+"button "+t.options.classPrefix+"loop-button "+(t.options.loop?t.options.classPrefix+"loop-on":t.options.classPrefix+"loop-off"),t.loopButton.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+l+'" aria-label="'+l+'" tabindex="0"></button>',t.loopCallback=function(){t.options.loop=!t.options.loop,t.options.loop?(mejs.Utils.removeClass(t.loopButton,t.options.classPrefix+"loop-off"),mejs.Utils.addClass(t.loopButton,t.options.classPrefix+"loop-on")):(mejs.Utils.removeClass(t.loopButton,t.options.classPrefix+"loop-on"),mejs.Utils.addClass(t.loopButton,t.options.classPrefix+"loop-off"))},t.loopButton.addEventListener("click",t.loopCallback),t.addControlElement(t.loopButton,"loop")},cleanloop:function(t){t.loopButton.removeEventListener("click",t.loopCallback)},buildshuffle:function(t){var e=mejs.i18n.t("mejs.playlist-shuffle"),l=mejs.Utils.isString(t.options.shuffleText)?t.options.shuffleText:e;t.shuffleButton=document.createElement("div"),t.shuffleButton.className=t.options.classPrefix+"button "+t.options.classPrefix+"shuffle-button "+t.options.classPrefix+"shuffle-off",t.shuffleButton.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+l+'" aria-label="'+l+'" tabindex="0"></button>',t.shuffleButton.style.display="none",t.media.addEventListener("play",function(){t.shuffleButton.style.display="",t.resetSize()});var s=!1,i=[],n=function(){if(!t.options.loop){var e=Math.floor(Math.random()*t.playlist.length);-1===i.indexOf(e)?(t.setSrc(t.playlist[e].src),t.load(),t.play(),t.currentPlaylistItem=e,i.push(e)):i.length<t.playlist.length?t.shuffleCallback():i.length<t.playlist.length&&(i=[],t.currentPlaylistItem=e,i.push(e))}};t.shuffleCallback=function(){s?(mejs.Utils.removeClass(t.shuffleButton,t.options.classPrefix+"shuffle-on"),mejs.Utils.addClass(t.shuffleButton,t.options.classPrefix+"shuffle-off"),s=!1,t.media.removeEventListener("ended",n)):(mejs.Utils.removeClass(t.shuffleButton,t.options.classPrefix+"shuffle-off"),mejs.Utils.addClass(t.shuffleButton,t.options.classPrefix+"shuffle-on"),s=!0,t.media.addEventListener("ended",n))},t.shuffleButton.addEventListener("click",t.shuffleCallback),t.addControlElement(t.shuffleButton,"shuffle")},cleanshuffle:function(t){t.shuffleButton.removeEventListener("click",t.shuffleCallback)},createPlayList_:function(){var t=this;if(t.playlist=t.options.playlist.length?t.options.playlist:[],!t.playlist.length)for(var e=t.mediaFiles||t.media.originalNode.children,l=0,s=e.length;l<s;l++){var i=e[l];"source"===i.tagName.toLowerCase()&&function(){var e={};Array.prototype.slice.call(i.attributes).forEach(function(t){e[t.name]=t.value}),e.src&&e.type&&e.title&&(e.type=mejs.Utils.formatType(e.src,e.type),t.playlist.push(e))}()}if(!(t.playlist.length<2)){t.listItems=[];for(var n=0,a=t.playlist.length;n<a;n++){var o=t.playlist[n],r=document.createElement("li"),p=t.id+"_playlist_item_"+n,c=o["data-playlist-thumbnail"]?'<div class="'+t.options.classPrefix+'playlist-item-thumbnail"><img tabindex="-1" src="'+o["data-playlist-thumbnail"]+'"></div>':"",u=o["data-playlist-description"]?'<div class="'+t.options.classPrefix+'playlist-item-description">'+o["data-playlist-description"]+"</div>":"";r.tabIndex=0,r.className=t.options.classPrefix+"playlist-selector-list-item"+(0===n?" "+t.options.classPrefix+"playlist-selected":""),r.innerHTML='<div class="'+t.options.classPrefix+'playlist-item-inner">'+c+'<div class="'+t.options.classPrefix+'playlist-item-content"><div><input type="radio" class="'+t.options.classPrefix+'playlist-selector-input" name="'+t.id+'_playlist" id="'+p+'" data-playlist-index="'+n+'" value="'+o.src+'" disabled><label class="'+t.options.classPrefix+'playlist-selector-label" for="'+p+'">'+(0===n?"<span>▶</span> ":"")+(o.title||n)+"</label></div>"+u+"</div></div>",t.listItems.push(r.outerHTML)}}}})},{}]},{},[1]);
!function n(a,o,r){function p(e,t){if(!o[e]){if(!a[e]){var l="function"==typeof require&&require;if(!t&&l)return l(e,!0);if(c)return c(e,!0);var s=new Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}var i=o[e]={exports:{}};a[e][0].call(i.exports,function(t){return p(a[e][1][t]||t)},i,i.exports,n,a,o,r)}return o[e].exports}for(var c="function"==typeof require&&require,t=0;t<r.length;t++)p(r[t]);return p}({1:[function(t,e,l){"use strict";mejs.i18n.en["mejs.playlist"]="Toggle Playlist",mejs.i18n.en["mejs.playlist-prev"]="Previous",mejs.i18n.en["mejs.playlist-next"]="Next",mejs.i18n.en["mejs.playlist-loop"]="Loop",mejs.i18n.en["mejs.playlist-shuffle"]="Shuffle",Object.assign(mejs.MepDefaults,{playlist:[],showPlaylist:!0,autoClosePlaylist:!1,prevText:null,nextText:null,loopText:null,shuffleText:null,playlistTitle:null,currentMessage:null}),Object.assign(MediaElementPlayer.prototype,{buildplaylist:function(a,t,e,l){var s=mejs.i18n.t("mejs.playlist"),i=mejs.Utils.isString(a.options.playlistTitle)?a.options.playlistTitle:s;if(!a.createPlayList_()){if(a.currentPlaylistItem=0,a.originalControlsIndex=t.style.zIndex,t.style.zIndex=5,a.endedCallback=function(){a.currentPlaylistItem<a.listItems.length&&(a.setSrc(a.playlist[++a.currentPlaylistItem]),a.load(),setTimeout(function(){a.play()},200))},l.addEventListener("ended",a.endedCallback),!a.isVideo){var n=document.createElement("div"),o=function(){n.innerHTML="",void 0!==a.playlist[a.currentPlaylistItem]["data-playlist-thumbnail"]&&(n.innerHTML+='<img tabindex="-1" src="'+a.playlist[a.currentPlaylistItem]["data-playlist-thumbnail"]+'">'),n.innerHTML+="<p>"+(a.options.currentMessage||"")+' <span class="'+a.options.classPrefix+'playlist-current-title">'+a.playlist[a.currentPlaylistItem].title+"</span>",void 0!==a.playlist[a.currentPlaylistItem].description&&(n.innerHTML+=' - <span class="'+a.options.classPrefix+'playlist-current-description">'+a.playlist[a.currentPlaylistItem].description+"</span>"),n.innerHTML+="</p>",a.resetSize()};n.className=a.options.classPrefix+"playlist-current "+a.options.classPrefix+"layer",o(),e.insertBefore(n,e.firstChild),l.addEventListener("play",o)}if(a.options.showPlaylist){a.playlistLayer=document.createElement("div"),a.playlistLayer.className=a.options.classPrefix+"playlist-layer "+a.options.classPrefix+"layer "+(a.isVideo?a.options.classPrefix+"playlist-hidden":"")+" "+a.options.classPrefix+"playlist-selector",a.playlistLayer.innerHTML='<ul class="'+a.options.classPrefix+'playlist-selector-list"></ul>',e.insertBefore(a.playlistLayer,e.firstChild);for(var r=0,p=a.listItems.length;r<p;r++)a.playlistLayer.querySelector("ul").innerHTML+=a.listItems[r];if(a.isVideo)a.playlistButton=document.createElement("div"),a.playlistButton.className=a.options.classPrefix+"button "+a.options.classPrefix+"playlist-button",a.playlistButton.innerHTML='<button type="button" aria-controls="'+a.id+'" title="'+i+'" aria-label="'+i+'" tabindex="0"></button>',a.playlistButton.addEventListener("click",function(){mejs.Utils.toggleClass(a.playlistLayer,a.options.classPrefix+"playlist-hidden")}),a.addControlElement(a.playlistButton,"playlist");else{var c=a.playlistLayer.querySelectorAll("li");if(c.length<=10){for(var u=0,f=0,y=c.length;f<y;f++)u+=c[f].offsetHeight;a.container.style.height=u+"px"}}for(var d=a.playlistLayer.querySelectorAll("."+a.options.classPrefix+"playlist-selector-list-item"),m=a.playlistLayer.querySelectorAll("input[type=radio]"),v=0,x=m.length;v<x;v++)m[v].disabled=!1,m[v].addEventListener("click",function(){for(var t=a.playlistLayer.querySelectorAll('input[type="radio"]'),e=a.playlistLayer.querySelectorAll("."+a.options.classPrefix+"playlist-selected"),l=0,s=t.length;l<s;l++)t[l].checked=!1;for(var i=0,n=e.length;i<n;i++)mejs.Utils.removeClass(e[i],a.options.classPrefix+"playlist-selected"),e[i].querySelector("label").querySelector("span").remove();this.checked=!0,this.closest("."+a.options.classPrefix+"playlist-selector-list-item").querySelector("label").innerHTML="<span>▶</span> "+this.closest("."+a.options.classPrefix+"playlist-selector-list-item").querySelector("label").innerHTML,mejs.Utils.addClass(this.closest("."+a.options.classPrefix+"playlist-selector-list-item"),a.options.classPrefix+"playlist-selected"),a.currentPlaylistItem=this.getAttribute("data-playlist-index"),a.setSrc(this.value),a.load(),a.play(),a.isVideo&&!0===a.options.autoClosePlaylist&&mejs.Utils.toggleClass(a.playlistLayer,a.options.classPrefix+"playlist-hidden")});for(var h=0,P=d.length;h<P;h++)d[h].addEventListener("click",function(){var t=mejs.Utils.siblings(this.querySelector("."+a.options.classPrefix+"playlist-selector-label"),function(t){return"INPUT"===t.tagName})[0],e=mejs.Utils.createEvent("click",t);t.dispatchEvent(e)});a.keydownCallback=function(t){var e=mejs.Utils.createEvent("click",t.target);return t.target.dispatchEvent(e),!1},a.playlistLayer.addEventListener("keydown",function(t){var e=t.which||t.keyCode||0;~[13,32,38,40].indexOf(e)&&a.keydownCallback(t)})}else mejs.Utils.addClass(a.container,a.options.classPrefix+"no-playlist")}},cleanplaylist:function(t,e,l,s){s.removeEventListener("ended",t.endedCallback)},buildprevtrack:function(t){var e=mejs.i18n.t("mejs.playlist-prev"),l=mejs.Utils.isString(t.options.prevText)?t.options.prevText:e;t.prevButton=document.createElement("div"),t.prevButton.className=t.options.classPrefix+"button "+t.options.classPrefix+"prev-button",t.prevButton.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+l+'" aria-label="'+l+'" tabindex="0"></button>',t.prevPlaylistCallback=function(){t.playlist[--t.currentPlaylistItem]?(t.setSrc(t.playlist[t.currentPlaylistItem].src),t.load(),t.play()):++t.currentPlaylistItem},t.prevButton.addEventListener("click",t.prevPlaylistCallback),t.addControlElement(t.prevButton,"prevtrack")},cleanprevtrack:function(t){t.prevButton.removeEventListener("click",t.prevPlaylistCallback)},buildnexttrack:function(t){var e=mejs.i18n.t("mejs.playlist-next"),l=mejs.Utils.isString(t.options.nextText)?t.options.nextText:e;t.nextButton=document.createElement("div"),t.nextButton.className=t.options.classPrefix+"button "+t.options.classPrefix+"next-button",t.nextButton.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+l+'" aria-label="'+l+'" tabindex="0"></button>',t.nextPlaylistCallback=function(){t.playlist[++t.currentPlaylistItem]?(t.setSrc(t.playlist[t.currentPlaylistItem].src),t.load(),t.play()):--t.currentPlaylistItem},t.nextButton.addEventListener("click",t.nextPlaylistCallback),t.addControlElement(t.nextButton,"nexttrack")},cleannexttrack:function(t){t.nextButton.removeEventListener("click",t.nextPlaylistCallback)},buildloop:function(t){var e=mejs.i18n.t("mejs.playlist-loop"),l=mejs.Utils.isString(t.options.loopText)?t.options.loopText:e;t.loopButton=document.createElement("div"),t.loopButton.className=t.options.classPrefix+"button "+t.options.classPrefix+"loop-button "+(t.options.loop?t.options.classPrefix+"loop-on":t.options.classPrefix+"loop-off"),t.loopButton.innerHTML='<button type="button" aria-controls="'+t.id+'" title="'+l+'" aria-label="'+l+'" tabindex="0"></button>',t.loopCallback=function(){t.options.loop=!t.options.loop,t.options.loop?(mejs.Utils.removeClass(t.loopButton,t.options.classPrefix+"loop-off"),mejs.Utils.addClass(t.loopButton,t.options.classPrefix+"loop-on")):(mejs.Utils.removeClass(t.loopButton,t.options.classPrefix+"loop-on"),mejs.Utils.addClass(t.loopButton,t.options.classPrefix+"loop-off"))},t.loopButton.addEventListener("click",t.loopCallback),t.addControlElement(t.loopButton,"loop")},cleanloop:function(t){t.loopButton.removeEventListener("click",t.loopCallback)},buildshuffle:function(e){var t=mejs.i18n.t("mejs.playlist-shuffle"),l=mejs.Utils.isString(e.options.shuffleText)?e.options.shuffleText:t;e.shuffleButton=document.createElement("div"),e.shuffleButton.className=e.options.classPrefix+"button "+e.options.classPrefix+"shuffle-button "+e.options.classPrefix+"shuffle-off",e.shuffleButton.innerHTML='<button type="button" aria-controls="'+e.id+'" title="'+l+'" aria-label="'+l+'" tabindex="0"></button>',e.shuffleButton.style.display="none",e.media.addEventListener("play",function(){e.shuffleButton.style.display="",e.resetSize()});var s=!1,i=[],n=function(){if(!e.options.loop){var t=Math.floor(Math.random()*e.playlist.length);-1===i.indexOf(t)?(e.setSrc(e.playlist[t].src),e.load(),e.play(),e.currentPlaylistItem=t,i.push(t)):i.length<e.playlist.length?e.shuffleCallback():i.length<e.playlist.length&&(i=[],e.currentPlaylistItem=t,i.push(t))}};e.shuffleCallback=function(){s?(mejs.Utils.removeClass(e.shuffleButton,e.options.classPrefix+"shuffle-on"),mejs.Utils.addClass(e.shuffleButton,e.options.classPrefix+"shuffle-off"),s=!1,e.media.removeEventListener("ended",n)):(mejs.Utils.removeClass(e.shuffleButton,e.options.classPrefix+"shuffle-off"),mejs.Utils.addClass(e.shuffleButton,e.options.classPrefix+"shuffle-on"),s=!0,e.media.addEventListener("ended",n))},e.shuffleButton.addEventListener("click",e.shuffleCallback),e.addControlElement(e.shuffleButton,"shuffle")},cleanshuffle:function(t){t.shuffleButton.removeEventListener("click",t.shuffleCallback)},createPlayList_:function(){var t=this;if(t.playlist=t.options.playlist.length?t.options.playlist:t.mediaFiles&&t.mediaFiles.length?t.mediaFiles:[],!t.playlist.length)for(var e=t.media.originalNode.children,l=0,s=e.length;l<s;l++){var i=e[l];"source"===i.tagName.toLowerCase()&&function(){var e={};Array.prototype.slice.call(i.attributes).forEach(function(t){e[t.name]=t.value}),e.src&&e.type&&e.title&&(e.type=mejs.Utils.formatType(e.src,e.type),t.playlist.push(e))}()}if(!(t.playlist.length<2)){t.listItems=[];for(var n=0,a=t.playlist.length;n<a;n++){var o=t.playlist[n],r=document.createElement("li"),p=t.id+"_playlist_item_"+n,c=o["data-playlist-thumbnail"]?'<div class="'+t.options.classPrefix+'playlist-item-thumbnail"><img tabindex="-1" src="'+o["data-playlist-thumbnail"]+'"></div>':"",u=o["data-playlist-description"]?'<div class="'+t.options.classPrefix+'playlist-item-description">'+o["data-playlist-description"]+"</div>":"";r.tabIndex=0,r.className=t.options.classPrefix+"playlist-selector-list-item"+(0===n?" "+t.options.classPrefix+"playlist-selected":""),r.innerHTML='<div class="'+t.options.classPrefix+'playlist-item-inner">'+c+'<div class="'+t.options.classPrefix+'playlist-item-content"><div><input type="radio" class="'+t.options.classPrefix+'playlist-selector-input" name="'+t.id+'_playlist" id="'+p+'" data-playlist-index="'+n+'" value="'+o.src+'" disabled><label class="'+t.options.classPrefix+'playlist-selector-label" for="'+p+'">'+(0===n?"<span>▶</span> ":"")+(o.title||n)+"</label></div>"+u+"</div></div>",t.listItems.push(r.outerHTML)}}}})},{}]},{},[1]);

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.close'] = 'Tutup';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.close'] = 'Sluiten';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.close'] = 'Kapat';
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.close'] = 'Закрити';

mejs.i18n['zh-CN']['mejs.close'] = '关闭';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -47,2 +47,10 @@

}, false);
t.media.addEventListener('seeked', function () {
player.postroll.style.display = 'none';
}, false);
t.media.addEventListener('playing', function () {
player.postroll.style.display = 'none';
}, false);
}

@@ -49,0 +57,0 @@ }

@@ -12,2 +12,2 @@ /*!

*/
!function e(o,t,r){function s(n,i){if(!t[n]){if(!o[n]){var a="function"==typeof require&&require;if(!i&&a)return a(n,!0);if(l)return l(n,!0);var p=new Error("Cannot find module '"+n+"'");throw p.code="MODULE_NOT_FOUND",p}var c=t[n]={exports:{}};o[n][0].call(c.exports,function(e){var t=o[n][1][e];return s(t||e)},c,c.exports,e,o,t,r)}return t[n].exports}for(var l="function"==typeof require&&require,n=0;n<r.length;n++)s(r[n]);return s}({1:[function(e,o,t){"use strict";mejs.i18n.en["mejs.close"]="Close",Object.assign(mejs.MepDefaults,{postrollCloseText:null}),Object.assign(MediaElementPlayer.prototype,{buildpostroll:function(e,o,t){var r=this,s=mejs.Utils.isString(r.options.postrollCloseText)?r.options.postrollCloseText:mejs.i18n.t("mejs.close"),l=r.container.querySelector('link[rel="postroll"]');l&&(e.postroll=document.createElement("div"),e.postroll.className=r.options.classPrefix+"postroll-layer "+r.options.classPrefix+"layer",e.postroll.innerHTML='<a class="'+r.options.classPrefix+'postroll-close" href="#">'+s+'</a><div class="'+r.options.classPrefix+'postroll-layer-content"></div>',e.postroll.style.display="none",t.insertBefore(e.postroll,t.firstChild),e.postroll.querySelector("."+r.options.classPrefix+"postroll-close").addEventListener("click",function(e){this.parentNode.style.display="none",e.preventDefault(),e.stopPropagation()}),r.media.addEventListener("ended",function(){mejs.Utils.ajax(l.getAttribute("href"),"html",function(e){t.querySelector("."+r.options.classPrefix+"postroll-layer-content").innerHTML=e}),e.postroll.style.display="block"},!1))}})},{}]},{},[1]);
!function r(n,i,a){function p(t,e){if(!i[t]){if(!n[t]){var o="function"==typeof require&&require;if(!e&&o)return o(t,!0);if(c)return c(t,!0);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}var l=i[t]={exports:{}};n[t][0].call(l.exports,function(e){return p(n[t][1][e]||e)},l,l.exports,r,n,i,a)}return i[t].exports}for(var c="function"==typeof require&&require,e=0;e<a.length;e++)p(a[e]);return p}({1:[function(e,t,o){"use strict";mejs.i18n.en["mejs.close"]="Close",Object.assign(mejs.MepDefaults,{postrollCloseText:null}),Object.assign(MediaElementPlayer.prototype,{buildpostroll:function(e,t,o){var s=this,l=mejs.Utils.isString(s.options.postrollCloseText)?s.options.postrollCloseText:mejs.i18n.t("mejs.close"),r=s.container.querySelector('link[rel="postroll"]');r&&(e.postroll=document.createElement("div"),e.postroll.className=s.options.classPrefix+"postroll-layer "+s.options.classPrefix+"layer",e.postroll.innerHTML='<a class="'+s.options.classPrefix+'postroll-close" href="#">'+l+'</a><div class="'+s.options.classPrefix+'postroll-layer-content"></div>',e.postroll.style.display="none",o.insertBefore(e.postroll,o.firstChild),e.postroll.querySelector("."+s.options.classPrefix+"postroll-close").addEventListener("click",function(e){this.parentNode.style.display="none",e.preventDefault(),e.stopPropagation()}),s.media.addEventListener("ended",function(){mejs.Utils.ajax(r.getAttribute("href"),"html",function(e){o.querySelector("."+s.options.classPrefix+"postroll-layer-content").innerHTML=e}),e.postroll.style.display="block"},!1),s.media.addEventListener("seeked",function(){e.postroll.style.display="none"},!1),s.media.addEventListener("playing",function(){e.postroll.style.display="none"},!1))}})},{}]},{},[1]);

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function e(t,o,n){function i(r,d){if(!o[r]){if(!t[r]){var s="function"==typeof require&&require;if(!d&&s)return s(r,!0);if(a)return a(r,!0);var u=new Error("Cannot find module '"+r+"'");throw u.code="MODULE_NOT_FOUND",u}var l=o[r]={exports:{}};t[r][0].call(l.exports,function(e){var o=t[r][1][e];return i(o||e)},l,l.exports,e,t,o,n)}return o[r].exports}for(var a="function"==typeof require&&require,r=0;r<n.length;r++)i(n[r]);return i}({1:[function(e,t,o){"use strict";Object.assign(mejs.MepDefaults,{previewMode:!1,muteOnPreviewMode:!0,fadeInAudioStart:0,fadeInAudioInterval:0,fadeOutAudioStart:0,fadeOutAudioInterval:0,fadePercent:.02,pauseOnlyOnPreview:!1,delayPreview:0}),Object.assign(MediaElementPlayer.prototype,{buildpreview:function(e){var t=!1,o=!1,n=void 0,i=!1,a=this,r=function(){if(a.options.fadeInAudioInterval&&(Math.floor(a.media.currentTime)<a.options.fadeIntAudioStart&&(a.media.setVolume(0),a.media.setMuted(!0)),Math.floor(a.media.currentTime)===a.options.fadeInAudioStart)){t=!0;var e=0,o=a.options.fadeInAudioInterval,n=setInterval(function(){e<1?((e+=a.options.fadePercent)>1&&(e=1),a.media.setVolume(e.toFixed(2))):(clearInterval(n),n=null,a.media.setMuted(!1),setTimeout(function(){t=!1},300))},o)}},d=function(){if(a.options.fadeOutAudioInterval&&(Math.floor(a.media.currentTime)<a.options.fadeOutAudioStart&&(a.media.setVolume(1),a.media.setMuted(!1)),Math.floor(a.media.currentTime)===a.options.fadeOutAudioStart)){o=!0;var e=1,t=a.options.fadeOutAudioInterval,n=setInterval(function(){e>0?((e-=a.options.fadePercent)<0&&(e=0),a.media.setVolume(e.toFixed(2))):(clearInterval(n),n=null,a.media.setMuted(!1),setTimeout(function(){o=!1},300))},t)}};a.options.muteOnPreviewMode||a.options.fadeInAudioInterval?(a.media.setVolume(0),a.media.setMuted(!0)):a.options.fadeOutAudioInterval&&(a.media.setVolume(1),a.media.setMuted(!1)),a.media.addEventListener("timeupdate",function(){t?a.media.removeEventListener("timeupdate",r):o?a.media.removeEventListener("timeupdate",d):(r(),d())}),e.isVideo&&(document.body.addEventListener("mouseover",function(e){e.target===a.container||e.target.closest("."+a.options.classPrefix+"container")?(i=!0,a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="flex",a.container.querySelector("."+a.options.classPrefix+"overlay-play").style.display="none",a.media.paused?n=setTimeout(function(){i?a.media.play():(clearTimeout(n),n=null),a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="none"},a.options.delayPreview):a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="none"):(i=!1,clearTimeout(n),n=null,a.media.paused||a.media.pause(),a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="none")}),document.body.addEventListener("mouseout",function(e){e.target===a.container||e.target.closest("."+a.options.classPrefix+"container")||(i=!1,a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="none",a.media.paused||(a.media.pause(),a.options.pauseOnlyOnPreview||a.media.setCurrentTime(0)),clearTimeout(n),n=null)}),window.addEventListener("scroll",function(){i=!1,a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="none",a.media.paused||a.media.pause()}))}})},{}]},{},[1]);
!function a(r,d,s){function u(t,e){if(!d[t]){if(!r[t]){var o="function"==typeof require&&require;if(!e&&o)return o(t,!0);if(l)return l(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var i=d[t]={exports:{}};r[t][0].call(i.exports,function(e){return u(r[t][1][e]||e)},i,i.exports,a,r,d,s)}return d[t].exports}for(var l="function"==typeof require&&require,e=0;e<s.length;e++)u(s[e]);return u}({1:[function(e,t,o){"use strict";Object.assign(mejs.MepDefaults,{previewMode:!1,muteOnPreviewMode:!0,fadeInAudioStart:0,fadeInAudioInterval:0,fadeOutAudioStart:0,fadeOutAudioInterval:0,fadePercent:.02,pauseOnlyOnPreview:!1,delayPreview:0}),Object.assign(MediaElementPlayer.prototype,{buildpreview:function(e){var n=!1,i=!1,t=void 0,o=!1,a=this,r=function(){if(a.options.fadeInAudioInterval&&(Math.floor(a.media.currentTime)<a.options.fadeIntAudioStart&&(a.media.setVolume(0),a.media.setMuted(!0)),Math.floor(a.media.currentTime)===a.options.fadeInAudioStart)){n=!0;var e=0,t=a.options.fadeInAudioInterval,o=setInterval(function(){e<1?(1<(e+=a.options.fadePercent)&&(e=1),a.media.setVolume(e.toFixed(2))):(clearInterval(o),o=null,a.media.setMuted(!1),setTimeout(function(){n=!1},300))},t)}},d=function(){if(a.options.fadeOutAudioInterval&&(Math.floor(a.media.currentTime)<a.options.fadeOutAudioStart&&(a.media.setVolume(1),a.media.setMuted(!1)),Math.floor(a.media.currentTime)===a.options.fadeOutAudioStart)){i=!0;var e=1,t=a.options.fadeOutAudioInterval,o=setInterval(function(){0<e?((e-=a.options.fadePercent)<0&&(e=0),a.media.setVolume(e.toFixed(2))):(clearInterval(o),o=null,a.media.setMuted(!1),setTimeout(function(){i=!1},300))},t)}};a.options.muteOnPreviewMode||a.options.fadeInAudioInterval?(a.media.setVolume(0),a.media.setMuted(!0)):a.options.fadeOutAudioInterval&&(a.media.setVolume(1),a.media.setMuted(!1)),a.media.addEventListener("timeupdate",function(){n?a.media.removeEventListener("timeupdate",r):i?a.media.removeEventListener("timeupdate",d):(r(),d())}),e.isVideo&&(document.body.addEventListener("mouseover",function(e){e.target===a.container||e.target.closest("."+a.options.classPrefix+"container")?(o=!0,a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="flex",a.container.querySelector("."+a.options.classPrefix+"overlay-play").style.display="none",a.media.paused?t=setTimeout(function(){o?a.media.play():(clearTimeout(t),t=null),a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="none"},a.options.delayPreview):a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="none"):(o=!1,clearTimeout(t),t=null,a.media.paused||a.media.pause(),a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="none")}),document.body.addEventListener("mouseout",function(e){e.target===a.container||e.target.closest("."+a.options.classPrefix+"container")||(o=!1,a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="none",a.media.paused||(a.media.pause(),a.options.pauseOnlyOnPreview||a.media.setCurrentTime(0)),clearTimeout(t),t=null)}),window.addEventListener("scroll",function(){o=!1,a.container.querySelector("."+a.options.classPrefix+"overlay-loading").parentNode.style.display="none",a.media.paused||a.media.pause()}))}})},{}]},{},[1]);

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.quality-chooser']= 'Pilih kualiti';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,4 +61,7 @@ mejs.i18n.nl['mejs.quality-chooser']= 'Kwaliteit kiezer';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.quality-chooser']= 'Kalite';
}
if (mejs.i18n.uk !== undefined) {
mejs.i18n.uk['mejs.quality-chooser']= 'Якісний вибір';
mejs.i18n.uk['mejs.quality-chooser']= 'Вибір якості';
}

@@ -67,2 +73,2 @@ if (mejs.i18n.zh !== undefined) {

mejs.i18n['zh-CN']['mejs.quality-chooser']= '质量选择';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -20,3 +20,11 @@

qualityText: null
qualityText: null,
autoGenerate: false,
autoDash: false,
autoHLS: false,
qualityChangeCallback: null
});

@@ -34,2 +42,7 @@

if (quality === 'undefined') {
quality = 'Auto';
t.options.autoGenerate = true;
}
if (t.mediaFiles) {

@@ -50,5 +63,46 @@ var source = document.createElement('source');

var currentQuality = '',
sourceIndex = 0;
media.addEventListener('error', function (e) {
if (e.message === 'No renderer found' && qualityMap.get(currentQuality).length > sourceIndex + 1) {
sourceIndex = sourceIndex + 1;
var nextSource = qualityMap.get(currentQuality)[sourceIndex].src;
media.setSrc(nextSource);
media.load();
}
});
media.addEventListener('loadedmetadata', function () {
if (!!media.hlsPlayer) {
var levels = media.hlsPlayer.levels;
if (t.options.autoGenerate && levels.length > 1) {
levels.forEach(function (level) {
var height = level.height;
var quality = t.getQualityFromHeight(height);
t.addValueToKey(qualityMap, quality, '');
});
t.options.autoHLS = true;
t.generateQualityButton(t, player, media, qualityMap, currentQuality);
}
} else if (!!media.dashPlayer) {
var bitrates = media.dashPlayer.getBitrateInfoListFor("video");
if (t.options.autoGenerate && bitrates.length > 1) {
bitrates.forEach(function (level) {
var height = level.height;
var quality = t.getQualityFromHeight(height);
t.addValueToKey(qualityMap, quality, '');
});
t.options.autoDash = true;
t.generateQualityButton(t, player, media, qualityMap, currentQuality);
}
}
});
t.generateQualityButton(t, player, media, qualityMap, currentQuality);
},
generateQualityButton: function generateQualityButton(t, player, media, qualityMap, currentQuality) {
t.cleanquality(player);
var qualityTitle = mejs.Utils.isString(t.options.qualityText) ? t.options.qualityText : mejs.i18n.t('mejs.quality-quality'),
var qualityTitle = mejs.Utils.isString(t.options.qualityText) ? t.options.qualityText : mejs.i18n.t('mejs.quality-chooser'),
getQualityNameFromValue = function getQualityNameFromValue(value) {

@@ -70,2 +124,3 @@ var label = void 0;

defaultValue = getQualityNameFromValue(t.options.defaultQuality);
currentQuality = defaultValue;

@@ -78,11 +133,8 @@ player.qualitiesButton = document.createElement('div');

media.setSrc(qualityMap.get(defaultValue)[0].src);
media.load();
qualityMap.forEach(function (value, key) {
if (key !== 'map_keys_1') {
var src = value[0],
_quality = key,
inputId = t.id + '-qualities-' + _quality;
player.qualitiesButton.querySelector('ul').innerHTML += '<li class="' + t.options.classPrefix + 'qualities-selector-list-item">' + ('<input class="' + t.options.classPrefix + 'qualities-selector-input" type="radio" name="' + t.id + '_qualities"') + ('disabled="disabled" value="' + _quality + '" id="' + inputId + '" ') + ((_quality === defaultValue ? ' checked="checked"' : '') + '/>') + ('<label for="' + inputId + '" class="' + t.options.classPrefix + 'qualities-selector-label') + ((_quality === defaultValue ? ' ' + t.options.classPrefix + 'qualities-selected' : '') + '">') + ((src.title || _quality) + '</label>') + '</li>';
quality = key,
inputId = t.id + '-qualities-' + quality;
player.qualitiesButton.querySelector('ul').innerHTML += '<li class="' + t.options.classPrefix + 'qualities-selector-list-item">' + ('<input class="' + t.options.classPrefix + 'qualities-selector-input" type="radio" name="' + t.id + '_qualities"') + ('disabled="disabled" value="' + quality + '" id="' + inputId + '" ') + ((quality === defaultValue ? ' checked="checked"' : '') + '/>') + ('<label for="' + inputId + '" class="' + t.options.classPrefix + 'qualities-selector-label') + ((quality === defaultValue ? ' ' + t.options.classPrefix + 'qualities-selected' : '') + '">') + ((src.title || quality) + '</label>') + '</li>';
}

@@ -96,4 +148,4 @@ });

for (var _i = 0, _total = inEvents.length; _i < _total; _i++) {
player.qualitiesButton.addEventListener(inEvents[_i], function () {
for (var i = 0, total = inEvents.length; i < total; i++) {
player.qualitiesButton.addEventListener(inEvents[i], function () {
mejs.Utils.removeClass(selector, t.options.classPrefix + 'offscreen');

@@ -105,51 +157,48 @@ selector.style.height = selector.querySelector('ul').offsetHeight + 'px';

for (var _i2 = 0, _total2 = outEvents.length; _i2 < _total2; _i2++) {
player.qualitiesButton.addEventListener(outEvents[_i2], function () {
mejs.Utils.addClass(selector, t.options.classPrefix + 'offscreen');
for (var _i = 0, _total = outEvents.length; _i < _total; _i++) {
player.qualitiesButton.addEventListener(outEvents[_i], function () {
setTimeout(function () {
mejs.Utils.addClass(selector, t.options.classPrefix + 'offscreen');
}, 50);
});
}
for (var _i3 = 0, _total3 = radios.length; _i3 < _total3; _i3++) {
var radio = radios[_i3];
for (var _i2 = 0, _total2 = radios.length; _i2 < _total2; _i2++) {
var radio = radios[_i2];
radio.disabled = false;
radio.addEventListener('change', function () {
var self = this,
newQuality = self.value;
if (t.options.autoDash) {
t.updateQualityButton(this, player, currentQuality);
t.switchDashQuality(player, media);
} else if (t.options.autoHLS) {
t.updateQualityButton(this, player, currentQuality);
t.switchHLSQuality(player, media);
} else {
t.updateQualityButton(this, player, currentQuality);
var selected = player.qualitiesButton.querySelectorAll('.' + t.options.classPrefix + 'qualities-selected');
for (var _i4 = 0, _total4 = selected.length; _i4 < _total4; _i4++) {
mejs.Utils.removeClass(selected[_i4], t.options.classPrefix + 'qualities-selected');
}
var currentTime = media.currentTime;
var paused = media.paused;
self.checked = true;
var siblings = mejs.Utils.siblings(self, function (el) {
return mejs.Utils.hasClass(el, t.options.classPrefix + 'qualities-selector-label');
});
for (var j = 0, _total5 = siblings.length; j < _total5; j++) {
mejs.Utils.addClass(siblings[j], t.options.classPrefix + 'qualities-selected');
if (!paused) {
media.pause();
}
t.updateVideoSource(media, qualityMap, currentQuality);
media.setSrc(qualityMap.get(currentQuality)[0].src);
media.load();
media.dispatchEvent(mejs.Utils.createEvent('seeking', media));
if (!paused) {
media.play();
}
media.addEventListener('canplay', function canPlayAfterSourceSwitchHandler() {
media.setCurrentTime(currentTime);
media.removeEventListener('canplay', canPlayAfterSourceSwitchHandler);
});
}
var currentTime = media.currentTime;
var paused = media.paused;
player.qualitiesButton.querySelector('button').innerHTML = newQuality;
if (!paused) {
media.pause();
if (t.options.qualityChangeCallback) {
t.options.qualityChangeCallback(media, media.originalNode, newQuality);
}
t.updateVideoSource(media, qualityMap, newQuality);
media.setSrc(qualityMap.get(newQuality)[0].src);
media.load();
media.dispatchEvent(mejs.Utils.createEvent('seeking', media));
if (!paused) {
media.play();
}
media.addEventListener('canplay', function canPlayAfterSourceSwitchHandler() {
media.setCurrentTime(currentTime);
media.removeEventListener('canplay', canPlayAfterSourceSwitchHandler);
});
});
}
for (var _i5 = 0, _total6 = labels.length; _i5 < _total6; _i5++) {
labels[_i5].addEventListener('click', function () {
for (var _i3 = 0, _total3 = labels.length; _i3 < _total3; _i3++) {
labels[_i3].addEventListener('click', function () {
var radio = mejs.Utils.siblings(this, function (el) {

@@ -166,3 +215,2 @@ return el.tagName === 'INPUT';

});
media.setSrc(qualityMap.get(defaultValue)[0].src);
},

@@ -178,3 +226,3 @@ cleanquality: function cleanquality(player) {

if (map.has('map_keys_1')) {
map.get('map_keys_1').push(key.toLowerCase());
map.get('map_keys_1').push(key);
} else {

@@ -231,3 +279,63 @@ map.set('map_keys_1', []);

keyExist: function keyExist(map, searchKey) {
return -1 < map.get('map_keys_1').indexOf(searchKey.toLowerCase());
return -1 < map.get('map_keys_1').indexOf(searchKey);
},
switchDashQuality: function switchDashQuality(player, media) {
var radios = player.qualitiesButton.querySelectorAll('input[type="radio"]');
for (var index = 0; index < radios.length; index++) {
if (radios[index].checked) {
if (index === 0) {
media.dashPlayer.setAutoSwitchQuality(true);
} else {
media.dashPlayer.setAutoSwitchQuality(false);
media.dashPlayer.setQualityFor("video", index - 1);
}
}
}
},
switchHLSQuality: function switchHLSQuality(player, media) {
var radios = player.qualitiesButton.querySelectorAll('input[type="radio"]');
for (var index = 0; index < radios.length; index++) {
if (radios[index].checked) {
if (index === 0) {
media.hlsPlayer.currentLevel = -1;
} else {
media.hlsPlayer.currentLevel = index - 1;
}
}
}
},
updateQualityButton: function updateQualityButton(self, player, currentQuality) {
var t = this;
var newQuality = self.value;
currentQuality = newQuality;
var selected = player.qualitiesButton.querySelectorAll('.' + t.options.classPrefix + 'qualities-selected');
for (var i = 0, total = selected.length; i < total; i++) {
mejs.Utils.removeClass(selected[i], t.options.classPrefix + 'qualities-selected');
}
self.checked = true;
var siblings = mejs.Utils.siblings(self, function (el) {
return mejs.Utils.hasClass(el, t.options.classPrefix + 'qualities-selector-label');
});
for (var j = 0, _total4 = siblings.length; j < _total4; j++) {
mejs.Utils.addClass(siblings[j], t.options.classPrefix + 'qualities-selected');
}
player.qualitiesButton.querySelector('button').innerHTML = newQuality;
},
getQualityFromHeight: function getQualityFromHeight(height) {
if (height >= 4320) {
return "8K UHD";
} else if (height >= 2160) {
return "UHD";
} else if (height >= 1440) {
return "QHD";
} else if (height >= 1080) {
return "FHD";
} else if (height >= 720) {
return "HD";
} else {
return "SD";
}
}

@@ -234,0 +342,0 @@ });

@@ -12,2 +12,2 @@ /*!

*/
!function e(t,i,s){function a(n,o){if(!i[n]){if(!t[n]){var r="function"==typeof require&&require;if(!o&&r)return r(n,!0);if(l)return l(n,!0);var u=new Error("Cannot find module '"+n+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[n]={exports:{}};t[n][0].call(c.exports,function(e){var i=t[n][1][e];return a(i||e)},c,c.exports,e,t,i,s)}return i[n].exports}for(var l="function"==typeof require&&require,n=0;n<s.length;n++)a(s[n]);return a}({1:[function(e,t,i){"use strict";mejs.i18n.en["mejs.quality-chooser"]="Quality Chooser",Object.assign(mejs.MepDefaults,{defaultQuality:"auto",qualityText:null}),Object.assign(MediaElementPlayer.prototype,{buildquality:function(e,t,i,s){for(var a=this,l=a.mediaFiles?a.mediaFiles:a.node.children,n=new Map,o=0,r=l.length;o<r;o++){var u=l[o],c=u instanceof HTMLElement?u.getAttribute("data-quality"):u["data-quality"];if(a.mediaFiles){var d=document.createElement("source");d.src=u.src,d.type=u.type,a.addValueToKey(n,c,d)}else"SOURCE"===u.nodeName&&a.addValueToKey(n,c,u)}if(!(n.size<=1)){a.cleanquality(e);var f=mejs.Utils.isString(a.options.qualityText)?a.options.qualityText:mejs.i18n.t("mejs.quality-quality"),p=function(e){return"auto"===e?a.keyExist(n,e)?e:a.getMapIndex(n,0).key:e}(a.options.defaultQuality);e.qualitiesButton=document.createElement("div"),e.qualitiesButton.className=a.options.classPrefix+"button "+a.options.classPrefix+"qualities-button",e.qualitiesButton.innerHTML='<button type="button" aria-controls="'+a.id+'" title="'+f+'" aria-label="'+f+'" tabindex="0">'+p+'</button><div class="'+a.options.classPrefix+"qualities-selector "+a.options.classPrefix+'offscreen"><ul class="'+a.options.classPrefix+'qualities-selector-list"></ul></div>',a.addControlElement(e.qualitiesButton,"qualities"),s.setSrc(n.get(p)[0].src),s.load(),n.forEach(function(t,i){if("map_keys_1"!==i){var s=t[0],l=i,n=a.id+"-qualities-"+l;e.qualitiesButton.querySelector("ul").innerHTML+='<li class="'+a.options.classPrefix+'qualities-selector-list-item"><input class="'+a.options.classPrefix+'qualities-selector-input" type="radio" name="'+a.id+'_qualities"disabled="disabled" value="'+l+'" id="'+n+'" '+(l===p?' checked="checked"':"")+'/><label for="'+n+'" class="'+a.options.classPrefix+"qualities-selector-label"+(l===p?" "+a.options.classPrefix+"qualities-selected":"")+'">'+(s.title||l)+"</label></li>"}});for(var q=["mouseenter","focusin"],y=["mouseleave","focusout"],m=e.qualitiesButton.querySelectorAll('input[type="radio"]'),v=e.qualitiesButton.querySelectorAll("."+a.options.classPrefix+"qualities-selector-label"),h=e.qualitiesButton.querySelector("."+a.options.classPrefix+"qualities-selector"),g=0,x=q.length;g<x;g++)e.qualitiesButton.addEventListener(q[g],function(){mejs.Utils.removeClass(h,a.options.classPrefix+"offscreen"),h.style.height=h.querySelector("ul").offsetHeight+"px",h.style.top=-1*parseFloat(h.offsetHeight)+"px"});for(var E=0,b=y.length;E<b;E++)e.qualitiesButton.addEventListener(y[E],function(){mejs.Utils.addClass(h,a.options.classPrefix+"offscreen")});for(var P=0,j=m.length;P<j;P++){var k=m[P];k.disabled=!1,k.addEventListener("change",function(){for(var t=this,i=t.value,l=e.qualitiesButton.querySelectorAll("."+a.options.classPrefix+"qualities-selected"),o=0,r=l.length;o<r;o++)mejs.Utils.removeClass(l[o],a.options.classPrefix+"qualities-selected");t.checked=!0;for(var u=mejs.Utils.siblings(t,function(e){return mejs.Utils.hasClass(e,a.options.classPrefix+"qualities-selector-label")}),c=0,d=u.length;c<d;c++)mejs.Utils.addClass(u[c],a.options.classPrefix+"qualities-selected");var f=s.currentTime,p=s.paused;e.qualitiesButton.querySelector("button").innerHTML=i,p||s.pause(),a.updateVideoSource(s,n,i),s.setSrc(n.get(i)[0].src),s.load(),s.dispatchEvent(mejs.Utils.createEvent("seeking",s)),p||s.play(),s.addEventListener("canplay",function e(){s.setCurrentTime(f),s.removeEventListener("canplay",e)})})}for(var C=0,S=v.length;C<S;C++)v[C].addEventListener("click",function(){var e=mejs.Utils.siblings(this,function(e){return"INPUT"===e.tagName})[0],t=mejs.Utils.createEvent("click",e);e.dispatchEvent(t)});h.addEventListener("keydown",function(e){e.stopPropagation()}),s.setSrc(n.get(p)[0].src)}},cleanquality:function(e){e&&e.qualitiesButton&&e.qualitiesButton.remove()},addValueToKey:function(e,t,i){e.has("map_keys_1")?e.get("map_keys_1").push(t.toLowerCase()):e.set("map_keys_1",[]),e.has(t)?e.get(t).push(i):(e.set(t,[]),e.get(t).push(i))},updateVideoSource:function(e,t,i){this.cleanMediaSource(e);for(var s=t.get(i),a=0;a<e.children.length;a++)!function(t){var i=e.children[t];"VIDEO"===i.tagName&&s.forEach(function(e){i.appendChild(e)})}(a)},cleanMediaSource:function(e){for(var t=0;t<e.children.length;t++){var i=e.children[t];if("VIDEO"===i.tagName)for(;i.firstChild;)i.removeChild(i.firstChild)}},getMapIndex:function(e,t){var i=-1,s={};return e.forEach(function(e,a){i===t&&(s.key=a,s.value=e),i++}),s},keyExist:function(e,t){return-1<e.get("map_keys_1").indexOf(t.toLowerCase())}})},{}]},{},[1]);
!function n(l,o,r){function u(t,e){if(!o[t]){if(!l[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(c)return c(t,!0);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}var s=o[t]={exports:{}};l[t][0].call(s.exports,function(e){return u(l[t][1][e]||e)},s,s.exports,n,l,o,r)}return o[t].exports}for(var c="function"==typeof require&&require,e=0;e<r.length;e++)u(r[e]);return u}({1:[function(e,t,i){"use strict";mejs.i18n.en["mejs.quality-chooser"]="Quality Chooser",Object.assign(mejs.MepDefaults,{defaultQuality:"auto",qualityText:null,autoGenerate:!1,autoDash:!1,autoHLS:!1,qualityChangeCallback:null}),Object.assign(MediaElementPlayer.prototype,{buildquality:function(i,e,t,a){for(var s=this,n=s.mediaFiles?s.mediaFiles:s.node.children,l=new Map,o=0,r=n.length;o<r;o++){var u=n[o],c=u instanceof HTMLElement?u.getAttribute("data-quality"):u["data-quality"];if("undefined"===c&&(c="Auto",s.options.autoGenerate=!0),s.mediaFiles){var d=document.createElement("source");d.src=u.src,d.type=u.type,s.addValueToKey(l,c,d)}else"SOURCE"===u.nodeName&&s.addValueToKey(l,c,u)}if(!(l.size<=1)){var f=0;a.addEventListener("error",function(e){if("No renderer found"===e.message&&l.get("").length>f+1){f+=1;var t=l.get("")[f].src;a.setSrc(t),a.load()}}),a.addEventListener("loadedmetadata",function(){if(a.hlsPlayer){var e=a.hlsPlayer.levels;s.options.autoGenerate&&1<e.length&&(e.forEach(function(e){var t=e.height,i=s.getQualityFromHeight(t);s.addValueToKey(l,i,"")}),s.options.autoHLS=!0,s.generateQualityButton(s,i,a,l,""))}else if(a.dashPlayer){var t=a.dashPlayer.getBitrateInfoListFor("video");s.options.autoGenerate&&1<t.length&&(t.forEach(function(e){var t=e.height,i=s.getQualityFromHeight(t);s.addValueToKey(l,i,"")}),s.options.autoDash=!0,s.generateQualityButton(s,i,a,l,""))}}),s.generateQualityButton(s,i,a,l,"")}},generateQualityButton:function(n,l,i,a,s){n.cleanquality(l);var e=mejs.Utils.isString(n.options.qualityText)?n.options.qualityText:mejs.i18n.t("mejs.quality-chooser"),o=function(e){var t=void 0;t="auto"===e?n.keyExist(a,e)?e:n.getMapIndex(a,0).key:e;return t}(n.options.defaultQuality);s=o,l.qualitiesButton=document.createElement("div"),l.qualitiesButton.className=n.options.classPrefix+"button "+n.options.classPrefix+"qualities-button",l.qualitiesButton.innerHTML='<button type="button" aria-controls="'+n.id+'" title="'+e+'" aria-label="'+e+'" tabindex="0">'+o+'</button><div class="'+n.options.classPrefix+"qualities-selector "+n.options.classPrefix+'offscreen"><ul class="'+n.options.classPrefix+'qualities-selector-list"></ul></div>',n.addControlElement(l.qualitiesButton,"qualities"),a.forEach(function(e,t){if("map_keys_1"!==t){var i=e[0],a=t,s=n.id+"-qualities-"+a;l.qualitiesButton.querySelector("ul").innerHTML+='<li class="'+n.options.classPrefix+'qualities-selector-list-item"><input class="'+n.options.classPrefix+'qualities-selector-input" type="radio" name="'+n.id+'_qualities"disabled="disabled" value="'+a+'" id="'+s+'" '+(a===o?' checked="checked"':"")+'/><label for="'+s+'" class="'+n.options.classPrefix+"qualities-selector-label"+(a===o?" "+n.options.classPrefix+"qualities-selected":"")+'">'+(i.title||a)+"</label></li>"}});for(var t=["mouseenter","focusin"],r=["mouseleave","focusout"],u=l.qualitiesButton.querySelectorAll('input[type="radio"]'),c=l.qualitiesButton.querySelectorAll("."+n.options.classPrefix+"qualities-selector-label"),d=l.qualitiesButton.querySelector("."+n.options.classPrefix+"qualities-selector"),f=0,h=t.length;f<h;f++)l.qualitiesButton.addEventListener(t[f],function(){mejs.Utils.removeClass(d,n.options.classPrefix+"offscreen"),d.style.height=d.querySelector("ul").offsetHeight+"px",d.style.top=-1*parseFloat(d.offsetHeight)+"px"});for(var y=0,p=r.length;y<p;y++)l.qualitiesButton.addEventListener(r[y],function(){setTimeout(function(){mejs.Utils.addClass(d,n.options.classPrefix+"offscreen")},50)});for(var v=0,q=u.length;v<q;v++){var g=u[v];g.disabled=!1,g.addEventListener("change",function(){if(n.options.autoDash)n.updateQualityButton(this,l,s),n.switchDashQuality(l,i);else if(n.options.autoHLS)n.updateQualityButton(this,l,s),n.switchHLSQuality(l,i);else{n.updateQualityButton(this,l,s);var t=i.currentTime,e=i.paused;e||i.pause(),n.updateVideoSource(i,a,s),i.setSrc(a.get(s)[0].src),i.load(),i.dispatchEvent(mejs.Utils.createEvent("seeking",i)),e||i.play(),i.addEventListener("canplay",function e(){i.setCurrentTime(t),i.removeEventListener("canplay",e)})}n.options.qualityChangeCallback&&n.options.qualityChangeCallback(i,i.originalNode,newQuality)})}for(var m=0,x=c.length;m<x;m++)c[m].addEventListener("click",function(){var e=mejs.Utils.siblings(this,function(e){return"INPUT"===e.tagName})[0],t=mejs.Utils.createEvent("click",e);e.dispatchEvent(t)});d.addEventListener("keydown",function(e){e.stopPropagation()})},cleanquality:function(e){e&&e.qualitiesButton&&e.qualitiesButton.remove()},addValueToKey:function(e,t,i){e.has("map_keys_1")?e.get("map_keys_1").push(t):e.set("map_keys_1",[]),e.has(t)||e.set(t,[]),e.get(t).push(i)},updateVideoSource:function(i,e,t){this.cleanMediaSource(i);for(var a=e.get(t),s=function(e){var t=i.children[e];"VIDEO"===t.tagName&&a.forEach(function(e){t.appendChild(e)})},n=0;n<i.children.length;n++)s(n)},cleanMediaSource:function(e){for(var t=0;t<e.children.length;t++){var i=e.children[t];if("VIDEO"===i.tagName)for(;i.firstChild;)i.removeChild(i.firstChild)}},getMapIndex:function(e,i){var a=-1,s={};return e.forEach(function(e,t){a===i&&(s.key=t,s.value=e),a++}),s},keyExist:function(e,t){return-1<e.get("map_keys_1").indexOf(t)},switchDashQuality:function(e,t){for(var i=e.qualitiesButton.querySelectorAll('input[type="radio"]'),a=0;a<i.length;a++)i[a].checked&&(0===a?t.dashPlayer.setAutoSwitchQuality(!0):(t.dashPlayer.setAutoSwitchQuality(!1),t.dashPlayer.setQualityFor("video",a-1)))},switchHLSQuality:function(e,t){for(var i=e.qualitiesButton.querySelectorAll('input[type="radio"]'),a=0;a<i.length;a++)i[a].checked&&(t.hlsPlayer.currentLevel=0===a?-1:a-1)},updateQualityButton:function(e,t,i){var a=this,s=e.value;for(var n=t.qualitiesButton.querySelectorAll("."+a.options.classPrefix+"qualities-selected"),l=0,o=n.length;l<o;l++)mejs.Utils.removeClass(n[l],a.options.classPrefix+"qualities-selected");e.checked=!0;for(var r=mejs.Utils.siblings(e,function(e){return mejs.Utils.hasClass(e,a.options.classPrefix+"qualities-selector-label")}),u=0,c=r.length;u<c;u++)mejs.Utils.addClass(r[u],a.options.classPrefix+"qualities-selected");t.qualitiesButton.querySelector("button").innerHTML=s},getQualityFromHeight:function(e){return 4320<=e?"8K UHD":2160<=e?"UHD":1440<=e?"QHD":1080<=e?"FHD":720<=e?"HD":"SD"}})},{}]},{},[1]);

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.time-skip-back'] = 'Undur masa %1 saat';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.time-skip-back'] = ['Sla 1 seconde terug', 'Sla %1 seconden terug'];

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.time-skip-back'] = ['1 saniye geri sar', '%1 saniye geri sar'];
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.time-skip-back'] = ['Перейти назад на %1 секунду', 'Перейти назад на %1 секунди', 'Перейти назад на %1 секунд'];

mejs.i18n['zh-CN']['mejs.time-skip-back'] = '后退%1秒';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function t(e,i,n){function r(o,a){if(!i[o]){if(!e[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(s)return s(o,!0);var p=new Error("Cannot find module '"+o+"'");throw p.code="MODULE_NOT_FOUND",p}var u=i[o]={exports:{}};e[o][0].call(u.exports,function(t){var i=e[o][1][t];return r(i||t)},u,u.exports,t,e,i,n)}return i[o].exports}for(var s="function"==typeof require&&require,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,e,i){"use strict";mejs.i18n.en["mejs.time-skip-back"]=["Skip back 1 second","Skip back %1 seconds"],Object.assign(mejs.MepDefaults,{skipBackInterval:30,skipBackText:null}),Object.assign(MediaElementPlayer.prototype,{buildskipback:function(t,e,i,n){var r=this,s=mejs.i18n.t("mejs.time-skip-back",r.options.skipBackInterval),o=mejs.Utils.isString(r.options.skipBackText)?r.options.skipBackText.replace("%1",r.options.skipBackInterval):s,a=document.createElement("div");a.className=r.options.classPrefix+"button "+r.options.classPrefix+"skip-back-button",a.innerHTML='<button type="button" aria-controls="'+r.id+'" title="'+o+'" aria-label="'+o+'" tabindex="0">'+r.options.skipBackInterval+"</button>",r.addControlElement(a,"skipback"),a.addEventListener("click",function(){if(isNaN(n.duration)?r.options.skipBackInterval:n.duration){var t=n.currentTime===1/0?0:n.currentTime;n.setCurrentTime(Math.max(t-r.options.skipBackInterval,0)),this.querySelector("button").blur()}})}})},{}]},{},[1]);
!function s(o,a,c){function p(e,t){if(!a[e]){if(!o[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(u)return u(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var r=a[e]={exports:{}};o[e][0].call(r.exports,function(t){return p(o[e][1][t]||t)},r,r.exports,s,o,a,c)}return a[e].exports}for(var u="function"==typeof require&&require,t=0;t<c.length;t++)p(c[t]);return p}({1:[function(t,e,i){"use strict";mejs.i18n.en["mejs.time-skip-back"]=["Skip back 1 second","Skip back %1 seconds"],Object.assign(mejs.MepDefaults,{skipBackInterval:30,skipBackText:null}),Object.assign(MediaElementPlayer.prototype,{buildskipback:function(t,e,i,n){var r=this,s=mejs.i18n.t("mejs.time-skip-back",r.options.skipBackInterval),o=mejs.Utils.isString(r.options.skipBackText)?r.options.skipBackText.replace("%1",r.options.skipBackInterval):s,a=document.createElement("div");a.className=r.options.classPrefix+"button "+r.options.classPrefix+"skip-back-button",a.innerHTML='<button type="button" aria-controls="'+r.id+'" title="'+o+'" aria-label="'+o+'" tabindex="0">'+r.options.skipBackInterval+"</button>",r.addControlElement(a,"skipback"),a.addEventListener("click",function(){if(isNaN(n.duration)?r.options.skipBackInterval:n.duration){var t=n.currentTime===1/0?0:n.currentTime;n.setCurrentTime(Math.max(t-r.options.skipBackInterval,0)),this.querySelector("button").blur()}})}})},{}]},{},[1]);

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.source-chooser']= 'Pilih sumber';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.source-chooser']= 'Bronkeuze';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.source-chooser']= 'Kaynak Seçici';
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.source-chooser']= 'Вибір джерела';

mejs.i18n['zh-CN']['mejs.source-chooser']= '源选择器';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function e(o,t,r){function s(i,u){if(!t[i]){if(!o[i]){var n="function"==typeof require&&require;if(!u&&n)return n(i,!0);if(c)return c(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var l=t[i]={exports:{}};o[i][0].call(l.exports,function(e){var t=o[i][1][e];return s(t||e)},l,l.exports,e,o,t,r)}return t[i].exports}for(var c="function"==typeof require&&require,i=0;i<r.length;i++)s(r[i]);return s}({1:[function(e,o,t){"use strict";mejs.i18n.en["mejs.source-chooser"]="Source Chooser",Object.assign(mejs.MepDefaults,{sourcechooserText:null}),Object.assign(MediaElementPlayer.prototype,{buildsourcechooser:function(e,o,t,r){for(var s=this,c=mejs.Utils.isString(s.options.sourcechooserText)?s.options.sourcechooserText:mejs.i18n.t("mejs.source-chooser"),i=[],u=s.mediaFiles?s.mediaFiles:s.node.children,n=void 0,a=0,l=u.length;a<l;a++){var h=u[a];s.mediaFiles?i.push(h):"SOURCE"===h.nodeName&&i.push(h)}if(!(i.length<=1)){e.sourcechooserButton=document.createElement("div"),e.sourcechooserButton.className=s.options.classPrefix+"button "+s.options.classPrefix+"sourcechooser-button",e.sourcechooserButton.innerHTML='<button type="button" role="button" aria-haspopup="true" aria-owns="'+s.id+'" title="'+c+'" aria-label="'+c+'" tabindex="0"></button><div class="'+s.options.classPrefix+"sourcechooser-selector "+s.options.classPrefix+'offscreen" role="menu" aria-expanded="false" aria-hidden="true"><ul></ul></div>',s.addControlElement(e.sourcechooserButton,"sourcechooser");for(var d=0,f=i.length;d<f;d++){var p=i[d];void 0!==p.type&&"function"==typeof r.canPlayType&&e.addSourceButton(p.src,p.title,p.type,r.src===p.src)}e.sourcechooserButton.addEventListener("mouseover",function(){clearTimeout(n),e.showSourcechooserSelector()}),e.sourcechooserButton.addEventListener("mouseout",function(){n=setTimeout(function(){e.hideSourcechooserSelector()},0)}),e.sourcechooserButton.addEventListener("keydown",function(o){if(s.options.keyActions.length){switch(o.which||o.keyCode||0){case 32:mejs.MediaFeatures.isFirefox||e.showSourcechooserSelector(),e.sourcechooserButton.querySelector("input[type=radio]:checked").focus();break;case 13:e.showSourcechooserSelector(),e.sourcechooserButton.querySelector("input[type=radio]:checked").focus();break;case 27:e.hideSourcechooserSelector(),e.sourcechooserButton.querySelector("button").focus();break;default:return!0}o.preventDefault(),o.stopPropagation()}}),e.sourcechooserButton.addEventListener("focusout",mejs.Utils.debounce(function(){setTimeout(function(){document.activeElement.closest("."+s.options.classPrefix+"sourcechooser-selector")||e.hideSourcechooserSelector()},0)},100));for(var v=e.sourcechooserButton.querySelectorAll("input[type=radio]"),S=0,y=v.length;S<y;S++)v[S].addEventListener("click",function(){this.setAttribute("aria-selected",!0),this.checked=!0;for(var e=this.closest("."+s.options.classPrefix+"sourcechooser-selector").querySelectorAll("input[type=radio]"),o=0,t=e.length;o<t;o++)e[o]!==this&&(e[o].setAttribute("aria-selected","false"),e[o].removeAttribute("checked"));var c=this.value;if(r.getSrc()!==c){var i=r.currentTime,u=r.paused,n=function e(){u||(r.setCurrentTime(i),r.play()),r.removeEventListener("canplay",e)};r.pause(),r.setSrc(c),r.load(),r.addEventListener("canplay",n)}});e.sourcechooserButton.querySelector("button").addEventListener("click",function(){mejs.Utils.hasClass(mejs.Utils.siblings(this,"."+s.options.classPrefix+"sourcechooser-selector"),s.options.classPrefix+"offscreen")?(e.showSourcechooserSelector(),e.sourcechooserButton.querySelector("input[type=radio]:checked").focus()):e.hideSourcechooserSelector()})}},addSourceButton:function(e,o,t,r){var s=this;""!==o&&void 0!==o||(o=e),t=t.split("/")[1],s.sourcechooserButton.querySelector("ul").innerHTML+='<li><input type="radio" name="'+s.id+'_sourcechooser" id="'+s.id+"_sourcechooser_"+o+t+'" role="menuitemradio" value="'+e+'" '+(r?'checked="checked"':"")+' aria-selected="'+r+'"/><label for="'+s.id+"_sourcechooser_"+o+t+'" aria-hidden="true">'+o+" ("+t+")</label></li>",s.adjustSourcechooserBox()},adjustSourcechooserBox:function(){var e=this;e.sourcechooserButton.querySelector("."+e.options.classPrefix+"sourcechooser-selector").style.height=parseFloat(e.sourcechooserButton.querySelector("."+e.options.classPrefix+"sourcechooser-selector ul").offsetHeight)+"px"},hideSourcechooserSelector:function(){var e=this;if(void 0!==e.sourcechooserButton&&e.sourcechooserButton.querySelector("input[type=radio]")){var o=e.sourcechooserButton.querySelector("."+e.options.classPrefix+"sourcechooser-selector"),t=o.querySelectorAll("input[type=radio]");o.setAttribute("aria-expanded","false"),o.setAttribute("aria-hidden","true"),mejs.Utils.addClass(o,e.options.classPrefix+"offscreen");for(var r=0,s=t.length;r<s;r++)t[r].setAttribute("tabindex","-1")}},showSourcechooserSelector:function(){var e=this;if(void 0!==e.sourcechooserButton&&e.sourcechooserButton.querySelector("input[type=radio]")){var o=e.sourcechooserButton.querySelector("."+e.options.classPrefix+"sourcechooser-selector"),t=o.querySelectorAll("input[type=radio]");o.setAttribute("aria-expanded","true"),o.setAttribute("aria-hidden","false"),mejs.Utils.removeClass(o,e.options.classPrefix+"offscreen");for(var r=0,s=t.length;r<s;r++)t[r].setAttribute("tabindex","0")}}})},{}]},{},[1]);
!function c(i,u,n){function a(o,e){if(!u[o]){if(!i[o]){var t="function"==typeof require&&require;if(!e&&t)return t(o,!0);if(l)return l(o,!0);var r=new Error("Cannot find module '"+o+"'");throw r.code="MODULE_NOT_FOUND",r}var s=u[o]={exports:{}};i[o][0].call(s.exports,function(e){return a(i[o][1][e]||e)},s,s.exports,c,i,u,n)}return u[o].exports}for(var l="function"==typeof require&&require,e=0;e<n.length;e++)a(n[e]);return a}({1:[function(e,o,t){"use strict";mejs.i18n.en["mejs.source-chooser"]="Source Chooser",Object.assign(mejs.MepDefaults,{sourcechooserText:null}),Object.assign(MediaElementPlayer.prototype,{buildsourcechooser:function(o,e,t,i){for(var u=this,r=mejs.Utils.isString(u.options.sourcechooserText)?u.options.sourcechooserText:mejs.i18n.t("mejs.source-chooser"),s=[],c=u.mediaFiles?u.mediaFiles:u.node.children,n=void 0,a=0,l=c.length;a<l;a++){var h=c[a];u.mediaFiles?s.push(h):"SOURCE"===h.nodeName&&s.push(h)}if(!(s.length<=1)){o.sourcechooserButton=document.createElement("div"),o.sourcechooserButton.className=u.options.classPrefix+"button "+u.options.classPrefix+"sourcechooser-button",o.sourcechooserButton.innerHTML='<button type="button" role="button" aria-haspopup="true" aria-owns="'+u.id+'" title="'+r+'" aria-label="'+r+'" tabindex="0"></button><div class="'+u.options.classPrefix+"sourcechooser-selector "+u.options.classPrefix+'offscreen" role="menu" aria-expanded="false" aria-hidden="true"><ul></ul></div>',u.addControlElement(o.sourcechooserButton,"sourcechooser");for(var d=0,f=s.length;d<f;d++){var p=s[d];void 0!==p.type&&"function"==typeof i.canPlayType&&o.addSourceButton(p.src,p.title,p.type,i.src===p.src)}o.sourcechooserButton.addEventListener("mouseover",function(){clearTimeout(n),o.showSourcechooserSelector()}),o.sourcechooserButton.addEventListener("mouseout",function(){n=setTimeout(function(){o.hideSourcechooserSelector()},0)}),o.sourcechooserButton.addEventListener("keydown",function(e){if(u.options.keyActions.length){switch(e.which||e.keyCode||0){case 32:mejs.MediaFeatures.isFirefox||o.showSourcechooserSelector(),o.sourcechooserButton.querySelector("input[type=radio]:checked").focus();break;case 13:o.showSourcechooserSelector(),o.sourcechooserButton.querySelector("input[type=radio]:checked").focus();break;case 27:o.hideSourcechooserSelector(),o.sourcechooserButton.querySelector("button").focus();break;default:return!0}e.preventDefault(),e.stopPropagation()}}),o.sourcechooserButton.addEventListener("focusout",mejs.Utils.debounce(function(){setTimeout(function(){document.activeElement.closest("."+u.options.classPrefix+"sourcechooser-selector")||o.hideSourcechooserSelector()},0)},100));for(var S=o.sourcechooserButton.querySelectorAll("input[type=radio]"),v=0,y=S.length;v<y;v++)S[v].addEventListener("click",function(){this.setAttribute("aria-selected",!0),this.checked=!0;for(var e=this.closest("."+u.options.classPrefix+"sourcechooser-selector").querySelectorAll("input[type=radio]"),o=0,t=e.length;o<t;o++)e[o]!==this&&(e[o].setAttribute("aria-selected","false"),e[o].removeAttribute("checked"));var r=this.value;if(i.getSrc()!==r){var s=i.currentTime,c=i.paused;i.pause(),i.setSrc(r),i.load(),i.addEventListener("canplay",function e(){c||(i.setCurrentTime(s),i.play()),i.removeEventListener("canplay",e)})}});o.sourcechooserButton.querySelector("button").addEventListener("click",function(){mejs.Utils.hasClass(mejs.Utils.siblings(this,"."+u.options.classPrefix+"sourcechooser-selector"),u.options.classPrefix+"offscreen")?(o.showSourcechooserSelector(),o.sourcechooserButton.querySelector("input[type=radio]:checked").focus()):o.hideSourcechooserSelector()})}},addSourceButton:function(e,o,t,r){var s=this;""!==o&&void 0!==o||(o=e),t=t.split("/")[1],s.sourcechooserButton.querySelector("ul").innerHTML+='<li><input type="radio" name="'+s.id+'_sourcechooser" id="'+s.id+"_sourcechooser_"+o+t+'" role="menuitemradio" value="'+e+'" '+(r?'checked="checked"':"")+' aria-selected="'+r+'"/><label for="'+s.id+"_sourcechooser_"+o+t+'" aria-hidden="true">'+o+" ("+t+")</label></li>",s.adjustSourcechooserBox()},adjustSourcechooserBox:function(){this.sourcechooserButton.querySelector("."+this.options.classPrefix+"sourcechooser-selector").style.height=parseFloat(this.sourcechooserButton.querySelector("."+this.options.classPrefix+"sourcechooser-selector ul").offsetHeight)+"px"},hideSourcechooserSelector:function(){var e=this;if(void 0!==e.sourcechooserButton&&e.sourcechooserButton.querySelector("input[type=radio]")){var o=e.sourcechooserButton.querySelector("."+e.options.classPrefix+"sourcechooser-selector"),t=o.querySelectorAll("input[type=radio]");o.setAttribute("aria-expanded","false"),o.setAttribute("aria-hidden","true"),mejs.Utils.addClass(o,e.options.classPrefix+"offscreen");for(var r=0,s=t.length;r<s;r++)t[r].setAttribute("tabindex","-1")}},showSourcechooserSelector:function(){var e=this;if(void 0!==e.sourcechooserButton&&e.sourcechooserButton.querySelector("input[type=radio]")){var o=e.sourcechooserButton.querySelector("."+e.options.classPrefix+"sourcechooser-selector"),t=o.querySelectorAll("input[type=radio]");o.setAttribute("aria-expanded","true"),o.setAttribute("aria-hidden","false"),mejs.Utils.removeClass(o,e.options.classPrefix+"offscreen");for(var r=0,s=t.length;r<s;r++)t[r].setAttribute("tabindex","0")}}})},{}]},{},[1]);

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.speed-rate'] = 'Kelajuan';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.speed-rate'] = 'Snelheidsgraad';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.speed-rate'] = 'Hız oranı';
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.speed-rate'] = 'Швидкість відтворення';

mejs.i18n['zh-CN']['mejs.speed-rate'] = '速度';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -153,2 +153,28 @@

t.options.keyActions.push({
keys: [60, 188],
action: function action(player, media, key, event) {
if (event.key != '<') return;
for (var _i7 = 0; _i7 < radios.length - 1; _i7++) {
if (radios[_i7].checked) {
var nextRadio = radios[_i7 + 1];
nextRadio.dispatchEvent(mejs.Utils.createEvent('click', nextRadio));
}
}
}
}, {
keys: [62, 190],
action: function action(player, media, key, event) {
if (event.key != '>') return;
for (var _i8 = 1; _i8 < radios.length; _i8++) {
if (radios[_i8].checked) {
var prevRadio = radios[_i8 - 1];
prevRadio.dispatchEvent(mejs.Utils.createEvent('click', prevRadio));
}
}
}
});
player.speedSelector.addEventListener('keydown', function (e) {

@@ -155,0 +181,0 @@ e.stopPropagation();

@@ -12,2 +12,2 @@ /*!

*/
!function e(t,s,o){function n(l,i){if(!s[l]){if(!t[l]){var a="function"==typeof require&&require;if(!i&&a)return a(l,!0);if(r)return r(l,!0);var d=new Error("Cannot find module '"+l+"'");throw d.code="MODULE_NOT_FOUND",d}var p=s[l]={exports:{}};t[l][0].call(p.exports,function(e){var s=t[l][1][e];return n(s||e)},p,p.exports,e,t,s,o)}return s[l].exports}for(var r="function"==typeof require&&require,l=0;l<o.length;l++)n(o[l]);return n}({1:[function(e,t,s){"use strict";mejs.i18n.en["mejs.speed-rate"]="Speed Rate",Object.assign(mejs.MepDefaults,{speeds:["2.00","1.50","1.25","1.00","0.75"],defaultSpeed:"1.00",speedChar:"x",speedText:null}),Object.assign(MediaElementPlayer.prototype,{buildspeed:function(e,t,s,o){var n=this;if(null!==n.media.rendererName&&/(native|html5)/i.test(n.media.rendererName)){for(var r=[],l=mejs.Utils.isString(n.options.speedText)?n.options.speedText:mejs.i18n.t("mejs.speed-rate"),i=function(e){for(var t=0,s=r.length;t<s;t++)if(r[t].value===e)return r[t].name},a=void 0,d=!1,p=0,c=n.options.speeds.length;p<c;p++){var u=n.options.speeds[p];"string"==typeof u?(r.push({name:""+u+n.options.speedChar,value:u}),u===n.options.defaultSpeed&&(d=!0)):(r.push(u),u.value===n.options.defaultSpeed&&(d=!0))}d||r.push({name:n.options.defaultSpeed+n.options.speedChar,value:n.options.defaultSpeed}),r.sort(function(e,t){return parseFloat(t.value)-parseFloat(e.value)}),n.cleanspeed(e),e.speedButton=document.createElement("div"),e.speedButton.className=n.options.classPrefix+"button "+n.options.classPrefix+"speed-button",e.speedButton.innerHTML='<button type="button" aria-controls="'+n.id+'" title="'+l+'" aria-label="'+l+'" tabindex="0">'+i(n.options.defaultSpeed)+'</button><div class="'+n.options.classPrefix+"speed-selector "+n.options.classPrefix+'offscreen"><ul class="'+n.options.classPrefix+'speed-selector-list"></ul></div>',n.addControlElement(e.speedButton,"speed");for(var f=0,v=r.length;f<v;f++){var m=n.id+"-speed-"+r[f].value;e.speedButton.querySelector("ul").innerHTML+='<li class="'+n.options.classPrefix+'speed-selector-list-item"><input class="'+n.options.classPrefix+'speed-selector-input" type="radio" name="'+n.id+'_speed"disabled="disabled" value="'+r[f].value+'" id="'+m+'" '+(r[f].value===n.options.defaultSpeed?' checked="checked"':"")+'/><label for="'+m+'" class="'+n.options.classPrefix+"speed-selector-label"+(r[f].value===n.options.defaultSpeed?" "+n.options.classPrefix+"speed-selected":"")+'">'+r[f].name+"</label></li>"}a=n.options.defaultSpeed,e.speedSelector=e.speedButton.querySelector("."+n.options.classPrefix+"speed-selector");for(var h=["mouseenter","focusin"],S=["mouseleave","focusout"],x=e.speedButton.querySelectorAll('input[type="radio"]'),b=e.speedButton.querySelectorAll("."+n.options.classPrefix+"speed-selector-label"),g=0,y=h.length;g<y;g++)e.speedButton.addEventListener(h[g],function(){mejs.Utils.removeClass(e.speedSelector,n.options.classPrefix+"offscreen"),e.speedSelector.style.height=e.speedSelector.querySelector("ul").offsetHeight,e.speedSelector.style.top=-1*parseFloat(e.speedSelector.offsetHeight)+"px"});for(var P=0,j=S.length;P<j;P++)e.speedSelector.addEventListener(S[P],function(){mejs.Utils.addClass(this,n.options.classPrefix+"offscreen")});for(var B=0,E=x.length;B<E;B++){var C=x[B];C.disabled=!1,C.addEventListener("click",function(){var t=this,s=t.value;a=s,o.playbackRate=parseFloat(s),e.speedButton.querySelector("button").innerHTML=i(s);for(var r=e.speedButton.querySelectorAll("."+n.options.classPrefix+"speed-selected"),l=0,d=r.length;l<d;l++)mejs.Utils.removeClass(r[l],n.options.classPrefix+"speed-selected");t.checked=!0;for(var p=mejs.Utils.siblings(t,function(e){return mejs.Utils.hasClass(e,n.options.classPrefix+"speed-selector-label")}),c=0,u=p.length;c<u;c++)mejs.Utils.addClass(p[c],n.options.classPrefix+"speed-selected")})}for(var U=0,q=b.length;U<q;U++)b[U].addEventListener("click",function(){var e=mejs.Utils.siblings(this,function(e){return"INPUT"===e.tagName})[0],t=mejs.Utils.createEvent("click",e);e.dispatchEvent(t)});e.speedSelector.addEventListener("keydown",function(e){e.stopPropagation()}),o.addEventListener("loadedmetadata",function(){a&&(o.playbackRate=parseFloat(a))})}},cleanspeed:function(e){e&&(e.speedButton&&e.speedButton.parentNode.removeChild(e.speedButton),e.speedSelector&&e.speedSelector.parentNode.removeChild(e.speedSelector))}})},{}]},{},[1]);
!function r(i,l,a){function d(t,e){if(!l[t]){if(!i[t]){var s="function"==typeof require&&require;if(!e&&s)return s(t,!0);if(p)return p(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var n=l[t]={exports:{}};i[t][0].call(n.exports,function(e){return d(i[t][1][e]||e)},n,n.exports,r,i,l,a)}return l[t].exports}for(var p="function"==typeof require&&require,e=0;e<a.length;e++)d(a[e]);return d}({1:[function(e,t,s){"use strict";mejs.i18n.en["mejs.speed-rate"]="Speed Rate",Object.assign(mejs.MepDefaults,{speeds:["2.00","1.50","1.25","1.00","0.75"],defaultSpeed:"1.00",speedChar:"x",speedText:null}),Object.assign(MediaElementPlayer.prototype,{buildspeed:function(l,e,t,a){var d=this;if(null!==d.media.rendererName&&/(native|html5)/i.test(d.media.rendererName)){for(var o=[],s=mejs.Utils.isString(d.options.speedText)?d.options.speedText:mejs.i18n.t("mejs.speed-rate"),p=function(e){for(var t=0,s=o.length;t<s;t++)if(o[t].value===e)return o[t].name},c=void 0,n=!1,r=0,i=d.options.speeds.length;r<i;r++){var u=d.options.speeds[r];"string"==typeof u?(o.push({name:""+u+d.options.speedChar,value:u}),u===d.options.defaultSpeed&&(n=!0)):(o.push(u),u.value===d.options.defaultSpeed&&(n=!0))}n||o.push({name:d.options.defaultSpeed+d.options.speedChar,value:d.options.defaultSpeed}),o.sort(function(e,t){return parseFloat(t.value)-parseFloat(e.value)}),d.cleanspeed(l),l.speedButton=document.createElement("div"),l.speedButton.className=d.options.classPrefix+"button "+d.options.classPrefix+"speed-button",l.speedButton.innerHTML='<button type="button" aria-controls="'+d.id+'" title="'+s+'" aria-label="'+s+'" tabindex="0">'+p(d.options.defaultSpeed)+'</button><div class="'+d.options.classPrefix+"speed-selector "+d.options.classPrefix+'offscreen"><ul class="'+d.options.classPrefix+'speed-selector-list"></ul></div>',d.addControlElement(l.speedButton,"speed");for(var f=0,v=o.length;f<v;f++){var h=d.id+"-speed-"+o[f].value;l.speedButton.querySelector("ul").innerHTML+='<li class="'+d.options.classPrefix+'speed-selector-list-item"><input class="'+d.options.classPrefix+'speed-selector-input" type="radio" name="'+d.id+'_speed"disabled="disabled" value="'+o[f].value+'" id="'+h+'" '+(o[f].value===d.options.defaultSpeed?' checked="checked"':"")+'/><label for="'+h+'" class="'+d.options.classPrefix+"speed-selector-label"+(o[f].value===d.options.defaultSpeed?" "+d.options.classPrefix+"speed-selected":"")+'">'+o[f].name+"</label></li>"}c=d.options.defaultSpeed,l.speedSelector=l.speedButton.querySelector("."+d.options.classPrefix+"speed-selector");for(var m=["mouseenter","focusin"],S=["mouseleave","focusout"],x=l.speedButton.querySelectorAll('input[type="radio"]'),y=l.speedButton.querySelectorAll("."+d.options.classPrefix+"speed-selector-label"),b=0,g=m.length;b<g;b++)l.speedButton.addEventListener(m[b],function(){mejs.Utils.removeClass(l.speedSelector,d.options.classPrefix+"offscreen"),l.speedSelector.style.height=l.speedSelector.querySelector("ul").offsetHeight,l.speedSelector.style.top=-1*parseFloat(l.speedSelector.offsetHeight)+"px"});for(var P=0,j=S.length;P<j;P++)l.speedSelector.addEventListener(S[P],function(){mejs.Utils.addClass(this,d.options.classPrefix+"offscreen")});for(var k=0,E=x.length;k<E;k++){var B=x[k];B.disabled=!1,B.addEventListener("click",function(){var e=this.value;c=e,a.playbackRate=parseFloat(e),l.speedButton.querySelector("button").innerHTML=p(e);for(var t=l.speedButton.querySelectorAll("."+d.options.classPrefix+"speed-selected"),s=0,o=t.length;s<o;s++)mejs.Utils.removeClass(t[s],d.options.classPrefix+"speed-selected");this.checked=!0;for(var n=mejs.Utils.siblings(this,function(e){return mejs.Utils.hasClass(e,d.options.classPrefix+"speed-selector-label")}),r=0,i=n.length;r<i;r++)mejs.Utils.addClass(n[r],d.options.classPrefix+"speed-selected")})}for(var U=0,C=y.length;U<C;U++)y[U].addEventListener("click",function(){var e=mejs.Utils.siblings(this,function(e){return"INPUT"===e.tagName})[0],t=mejs.Utils.createEvent("click",e);e.dispatchEvent(t)});d.options.keyActions.push({keys:[60,188],action:function(e,t,s,o){if("<"==o.key)for(var n=0;n<x.length-1;n++)if(x[n].checked){var r=x[n+1];r.dispatchEvent(mejs.Utils.createEvent("click",r))}}},{keys:[62,190],action:function(e,t,s,o){if(">"==o.key)for(var n=1;n<x.length;n++)if(x[n].checked){var r=x[n-1];r.dispatchEvent(mejs.Utils.createEvent("click",r))}}}),l.speedSelector.addEventListener("keydown",function(e){e.stopPropagation()}),a.addEventListener("loadedmetadata",function(){c&&(a.playbackRate=parseFloat(c))})}},cleanspeed:function(e){e&&(e.speedButton&&e.speedButton.parentNode.removeChild(e.speedButton),e.speedSelector&&e.speedSelector.parentNode.removeChild(e.speedSelector))}})},{}]},{},[1]);

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.stop'] = 'Berhenti';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.stop'] = 'Hou op';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.stop'] = 'Durdur';
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.stop'] = 'Зупинити';

mejs.i18n['zh-CN']['mejs.stop'] = '停止';
}
}

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function e(t,o,s){function r(i,a){if(!o[i]){if(!t[i]){var l="function"==typeof require&&require;if(!a&&l)return l(i,!0);if(n)return n(i,!0);var p=new Error("Cannot find module '"+i+"'");throw p.code="MODULE_NOT_FOUND",p}var c=o[i]={exports:{}};t[i][0].call(c.exports,function(e){var o=t[i][1][e];return r(o||e)},c,c.exports,e,t,o,s)}return o[i].exports}for(var n="function"==typeof require&&require,i=0;i<s.length;i++)r(s[i]);return r}({1:[function(e,t,o){"use strict";mejs.i18n.en["mejs.stop"]="Stop",Object.assign(mejs.MepDefaults,{stopText:null}),Object.assign(MediaElementPlayer.prototype,{buildstop:function(e,t,o,s){var r=this,n=mejs.Utils.isString(r.options.stopText)?r.options.stopText:mejs.i18n.t("mejs.stop"),i=document.createElement("div");i.className=r.options.classPrefix+"button "+r.options.classPrefix+"stop-button "+r.options.classPrefix+"stop",i.innerHTML='<button type="button" aria-controls="'+r.id+'" title="'+n+'" aria-label="'+n+'" tabindex="0"></button>',r.addControlElement(i,"stop"),i.addEventListener("click",function(){if("function"==typeof s.stop)s.stop();else if(s.readyState>0){s.paused||s.pause(),s.setSrc(""),s.load();var e=t.querySelector("."+r.options.classPrefix+"playpause-button");mejs.Utils.removeClass(e,r.options.classPrefix+"pause"),mejs.Utils.addClass(e,r.options.classPrefix+"play"),r.container.querySelector("."+r.options.classPrefix+"cannotplay")&&(r.container.querySelector("."+r.options.classPrefix+"cannotplay").remove(),o.querySelector("."+r.options.classPrefix+"overlay-error").parentNode.style.display="none",o.querySelector("."+r.options.classPrefix+"overlay-error").remove())}var n=mejs.Utils.createEvent("timeupdate",s);s.dispatchEvent(n)})}})},{}]},{},[1]);
!function n(i,a,l){function p(t,e){if(!a[t]){if(!i[t]){var o="function"==typeof require&&require;if(!e&&o)return o(t,!0);if(c)return c(t,!0);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}var r=a[t]={exports:{}};i[t][0].call(r.exports,function(e){return p(i[t][1][e]||e)},r,r.exports,n,i,a,l)}return a[t].exports}for(var c="function"==typeof require&&require,e=0;e<l.length;e++)p(l[e]);return p}({1:[function(e,t,o){"use strict";mejs.i18n.en["mejs.stop"]="Stop",Object.assign(mejs.MepDefaults,{stopText:null}),Object.assign(MediaElementPlayer.prototype,{buildstop:function(e,o,s,r){var n=this,t=mejs.Utils.isString(n.options.stopText)?n.options.stopText:mejs.i18n.t("mejs.stop"),i=document.createElement("div");i.className=n.options.classPrefix+"button "+n.options.classPrefix+"stop-button "+n.options.classPrefix+"stop",i.innerHTML='<button type="button" aria-controls="'+n.id+'" title="'+t+'" aria-label="'+t+'" tabindex="0"></button>',n.addControlElement(i,"stop"),i.addEventListener("click",function(){if("function"==typeof r.stop)r.stop();else if(0<r.readyState){r.paused||r.pause(),r.setSrc(""),r.load();var e=o.querySelector("."+n.options.classPrefix+"playpause-button");mejs.Utils.removeClass(e,n.options.classPrefix+"pause"),mejs.Utils.addClass(e,n.options.classPrefix+"play"),n.container.querySelector("."+n.options.classPrefix+"cannotplay")&&(n.container.querySelector("."+n.options.classPrefix+"cannotplay").remove(),s.querySelector("."+n.options.classPrefix+"overlay-error").parentNode.style.display="none",s.querySelector("."+n.options.classPrefix+"overlay-error").remove())}var t=mejs.Utils.createEvent("timeupdate",r);r.dispatchEvent(t)})}})},{}]},{},[1]);

@@ -11,3 +11,3 @@ /*!

*
*/(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
'use strict';

@@ -14,0 +14,0 @@

@@ -12,2 +12,2 @@ /*!

*/
!function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[s]={exports:{}};t[s][0].call(c.exports,function(e){var r=t[s][1][e];return a(r||e)},c,c.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(e,t,r){"use strict";var n={isMediaStarted:!1,isMediaLoaded:!1,creationQueue:[],prepareSettings:function(e){n.isLoaded?n.createInstance(e):(n.loadScript(e),n.creationQueue.push(e))},loadScript:function(e){if(!n.isMediaStarted){if("undefined"!=typeof VRView)n.createInstance(e);else{var t=document.createElement("script"),r=document.getElementsByTagName("script")[0],a=!1;e.options.path="string"==typeof e.options.path?e.options.path:"https://googlevr.github.io/vrview/build/vrview.min.js",t.src=e.options.path,t.onload=t.onreadystatechange=function(){a||this.readyState&&void 0!==this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(a=!0,n.mediaReady(),t.onload=t.onreadystatechange=null)},r.parentNode.insertBefore(t,r)}n.isMediaStarted=!0}},mediaReady:function(){for(n.isLoaded=!0,n.isMediaLoaded=!0;n.creationQueue.length>0;){var e=n.creationQueue.pop();n.createInstance(e)}},createInstance:function(e){var t=new VRView.Player("#"+e.id,e.options);window["__ready__"+e.id](t)}},a={name:"vrview",options:{prefix:"vrview"},canPlayType:function(e){return~["video/mp4","application/x-mpegurl","vnd.apple.mpegurl","application/dash+xml"].indexOf(e.toLowerCase())},create:function(e,t,r){var a=[],i={},s=null,o=!0,u=1,l=u;i.options=t,i.id=e.id+"_"+t.prefix,i.mediaElement=e;for(var c=mejs.html5media.properties,d=0,p=c.length;d<p;d++)!function(t){var r=t.substring(0,1).toUpperCase()+t.substring(1);i["get"+r]=function(){if(null!==s){switch(t){case"currentTime":return s.getCurrentTime();case"duration":return s.getDuration();case"volume":return u=s.getVolume();case"muted":return 0===u;case"paused":return o=s.isPaused;case"ended":return!1;case"src":return"";case"buffered":return{start:function(){return 0},end:function(){return 0},length:1};case"readyState":return 4}return null}return null},i["set"+r]=function(r){if(null!==s)switch(t){case"src":var n="string"==typeof r?r:r[0].src;s.setContentInfo({video:n});break;case"currentTime":s.setCurrentTime(r),setTimeout(function(){var t=mejs.Utils.createEvent("timeupdate",i);e.dispatchEvent(t)},50);break;case"volume":s.setVolume(r),setTimeout(function(){var t=mejs.Utils.createEvent("volumechange",i);e.dispatchEvent(t)},50);break;case"muted":u=r?0:l,s.setVolume(u),setTimeout(function(){var t=mejs.Utils.createEvent("volumechange",i);e.dispatchEvent(t)},50);break;case"readyState":var o=mejs.Utils.createEvent("canplay",i);e.dispatchEvent(o);break;default:console.log("VRView "+i.id,t,"UNSUPPORTED property")}else a.push({type:"set",propName:t,value:r})}}(c[d]);for(var v=mejs.html5media.methods,f=0,m=v.length;f<m;f++)!function(e){i[e]=function(){if(null!==s)switch(e){case"play":return s.play();case"pause":return s.pause();case"load":return null}else a.push({type:"call",methodName:e})}}(v[f]);var h=document.createElement("div");h.setAttribute("id",i.id),h.style.width="100%",h.style.height="100%",window["__ready__"+i.id]=function(t){e.vrPlayer=s=t;var r=h.querySelector("iframe");if(r.style.width="100%",r.style.height="100%",a.length)for(var n=0,o=a.length;n<o;n++){var u=a[n];if("set"===u.type){var l=u.propName,c=""+l.substring(0,1).toUpperCase()+l.substring(1);i["set"+c](u.value)}else"call"===u.type&&i[u.methodName]()}s.on("ready",function(){for(var t=mejs.html5media.events.concat(["mouseover","mouseout"]),r=0,n=t.length;r<n;r++)!function(r,n){s.on(t[r],function(){var n=mejs.Utils.createEvent(t[r],i);e.dispatchEvent(n)})}(r)})},e.originalNode.parentNode.insertBefore(h,e.originalNode),e.originalNode.style.display="none";var y={path:t.vrPath,is_stereo:t.vrIsStereo,is_autopan_off:t.vrIsAutopanOff,is_debug:t.vrDebug,default_yaw:t.vrDefaultYaw,is_yaw_only:t.vrIsYawOnly,loop:t.loop};if(r&&r.length>0)for(var g=0,w=r.length;g<w;g++)if(mejs.Renderers.renderers[t.prefix].canPlayType(r[g].type)){y.video=r[g].src,y.width="100%",y.height="100%";break}return n.prepareSettings({options:y,id:i.id}),i.hide=function(){i.pause(),s&&(h.style.display="none")},i.setSize=function(){},i.show=function(){s&&(h.style.display="")},i}};mejs.Renderers.add(a),Object.assign(mejs.MepDefaults,{vrPath:null,vrIsStereo:!0,vrIsAutopanOff:!0,vrDebug:!1,vrDefaultYaw:0,vrIsYawOnly:!1}),Object.assign(MediaElementPlayer.prototype,{buildvrview:function(e,t,r,n){var a=this;if(a.isVideo&&(!a.isVideo||null===a.media.rendererName||a.media.rendererName.match(/(native\_(dash|hls)|html5)/))){var i=document.createElement("div");e.detectFullscreenMode(),i.className=a.options.classPrefix+"button "+a.options.classPrefix+"vrview-button",i.innerHTML='<button type="button" aria-controls="'+a.id+'" title="VR" aria-label="VR" tabindex="0"></button>',i.addEventListener("click",function(){mejs.Features.HAS_TRUE_NATIVE_FULLSCREEN&&mejs.Features.IS_FULLSCREEN||e.isFullScreen?e.exitFullScreen():e.enterFullScreen()}),a.globalBind("keydown",function(t){27===(t.which||t.keyCode||0)&&(mejs.Features.HAS_TRUE_NATIVE_FULLSCREEN&&mejs.Features.IS_FULLSCREEN||e.isFullScreen)&&e.exitFullScreen()}),a.addControlElement(i,"vrview");var s=n.getSrc(),o=[{src:s,type:mejs.Utils.getTypeFromFile(s)}],u=mejs.Renderers.select(o,["vrview"]);n.changeRenderer(u.rendererName,o)}}})},{}]},{},[1]);
!function i(s,o,u){function l(t,e){if(!o[t]){if(!s[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(c)return c(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var a=o[t]={exports:{}};s[t][0].call(a.exports,function(e){return l(s[t][1][e]||e)},a,a.exports,i,s,o,u)}return o[t].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)l(u[e]);return l}({1:[function(e,t,r){"use strict";var E={isMediaStarted:!1,isMediaLoaded:!1,creationQueue:[],prepareSettings:function(e){E.isLoaded?E.createInstance(e):(E.loadScript(e),E.creationQueue.push(e))},loadScript:function(e){if(!E.isMediaStarted){if("undefined"!=typeof VRView)E.createInstance(e);else{var t=document.createElement("script"),r=document.getElementsByTagName("script")[0],n=!1;e.options.path="string"==typeof e.options.path?e.options.path:"https://googlevr.github.io/vrview/build/vrview.min.js",t.src=e.options.path,t.onload=t.onreadystatechange=function(){n||this.readyState&&void 0!==this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(n=!0,E.mediaReady(),t.onload=t.onreadystatechange=null)},r.parentNode.insertBefore(t,r)}E.isMediaStarted=!0}},mediaReady:function(){for(E.isLoaded=!0,E.isMediaLoaded=!0;0<E.creationQueue.length;){var e=E.creationQueue.pop();E.createInstance(e)}},createInstance:function(e){var t=new VRView.Player("#"+e.id,e.options);window["__ready__"+e.id](t)}},n={name:"vrview",options:{prefix:"vrview"},canPlayType:function(e){return~["video/mp4","application/x-mpegurl","vnd.apple.mpegurl","application/dash+xml"].indexOf(e.toLowerCase())},create:function(o,e,t){var u=[],l={},c=null,a=1,i=a;l.options=e,l.id=o.id+"_"+e.prefix,l.mediaElement=o;for(var r=mejs.html5media.properties,n=function(n){var e=n.substring(0,1).toUpperCase()+n.substring(1);l["get"+e]=function(){if(null===c)return null;switch(n){case"currentTime":return c.getCurrentTime();case"duration":return c.getDuration();case"volume":return a=c.getVolume();case"muted":return 0===a;case"paused":return c.isPaused;case"ended":return!1;case"src":return"";case"buffered":return{start:function(){return 0},end:function(){return 0},length:1};case"readyState":return 4}return null},l["set"+e]=function(e){if(null!==c)switch(n){case"src":var t="string"==typeof e?e:e[0].src;c.setContentInfo({video:t});break;case"currentTime":c.setCurrentTime(e),setTimeout(function(){var e=mejs.Utils.createEvent("timeupdate",l);o.dispatchEvent(e)},50);break;case"volume":c.setVolume(e),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",l);o.dispatchEvent(e)},50);break;case"muted":a=e?0:i,c.setVolume(a),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",l);o.dispatchEvent(e)},50);break;case"readyState":var r=mejs.Utils.createEvent("canplay",l);o.dispatchEvent(r);break;default:console.log("VRView "+l.id,n,"UNSUPPORTED property")}else u.push({type:"set",propName:n,value:e})}},s=0,d=r.length;s<d;s++)n(r[s]);for(var p=mejs.html5media.methods,v=function(e){l[e]=function(){if(null!==c)switch(e){case"play":return c.play();case"pause":return c.pause();case"load":return null}else u.push({type:"call",methodName:e})}},f=0,m=p.length;f<m;f++)v(p[f]);var h=document.createElement("div");h.setAttribute("id",l.id),h.style.width="100%",h.style.height="100%",window["__ready__"+l.id]=function(e){o.vrPlayer=c=e;var t=h.querySelector("iframe");if(t.style.width="100%",t.style.height="100%",u.length)for(var r=0,n=u.length;r<n;r++){var a=u[r];if("set"===a.type){var i=a.propName,s=""+i.substring(0,1).toUpperCase()+i.substring(1);l["set"+s](a.value)}else"call"===a.type&&l[a.methodName]()}c.on("ready",function(){for(var r=mejs.html5media.events.concat(["mouseover","mouseout"]),e=function(t,e){c.on(r[t],function(){var e=mejs.Utils.createEvent(r[t],l);o.dispatchEvent(e)})},t=0,n=r.length;t<n;t++)e(t)})},o.originalNode.parentNode.insertBefore(h,o.originalNode),o.originalNode.style.display="none";var y={path:e.vrPath,is_stereo:e.vrIsStereo,is_autopan_off:e.vrIsAutopanOff,is_debug:e.vrDebug,default_yaw:e.vrDefaultYaw,is_yaw_only:e.vrIsYawOnly,loop:e.loop};if(t&&0<t.length)for(var g=0,w=t.length;g<w;g++)if(mejs.Renderers.renderers[e.prefix].canPlayType(t[g].type)){y.video=t[g].src,y.width="100%",y.height="100%";break}return E.prepareSettings({options:y,id:l.id}),l.hide=function(){l.pause(),c&&(h.style.display="none")},l.setSize=function(){},l.show=function(){c&&(h.style.display="")},l}};mejs.Renderers.add(n),Object.assign(mejs.MepDefaults,{vrPath:null,vrIsStereo:!0,vrIsAutopanOff:!0,vrDebug:!1,vrDefaultYaw:0,vrIsYawOnly:!1}),Object.assign(MediaElementPlayer.prototype,{buildvrview:function(t,e,r,n){var a=this;if(a.isVideo&&(!a.isVideo||null===a.media.rendererName||a.media.rendererName.match(/(native\_(dash|hls)|html5)/))){var i=document.createElement("div");t.detectFullscreenMode(),i.className=a.options.classPrefix+"button "+a.options.classPrefix+"vrview-button",i.innerHTML='<button type="button" aria-controls="'+a.id+'" title="VR" aria-label="VR" tabindex="0"></button>',i.addEventListener("click",function(){mejs.Features.HAS_TRUE_NATIVE_FULLSCREEN&&mejs.Features.IS_FULLSCREEN||t.isFullScreen?t.exitFullScreen():t.enterFullScreen()}),a.globalBind("keydown",function(e){27===(e.which||e.keyCode||0)&&(mejs.Features.HAS_TRUE_NATIVE_FULLSCREEN&&mejs.Features.IS_FULLSCREEN||t.isFullScreen)&&t.exitFullScreen()}),a.addControlElement(i,"vrview");var s=n.getSrc(),o=[{src:s,type:mejs.Utils.getTypeFromFile(s)}],u=mejs.Renderers.select(o,["vrview"]);n.changeRenderer(u.rendererName,o)}}})},{}]},{},[1]);

@@ -28,3 +28,3 @@ # Playlist

------ | --------- | ------- | --------
playlist | array | `[]` | List to be played; the array consists in a series of objects that MUST include the `src` and `title` attributes; other possible items: `data-thumbnail`, `type`, `description`. **If its empty, it will search for all the `source` elements within the video/audio tags**
playlist | array | `[]` | List to be played; the array consists in a series of objects that MUST include the `src` and `title` attributes; other possible items: `data-playlist-thumbnail`, `type`, `description`. **If its empty, it will search for all the `source` elements within the video/audio tags**
showPlaylist | boolean | `true` | Whether or not to display the playlist; if so, a button to toggle the playlist will be displayed

@@ -37,2 +37,2 @@ autoClosePlaylist | boolean | `false` | If set to `true`, the playlist container will hide once user selects an item

playlistTitle | string | `null` | Title for Playlist button for WARIA purposes
currentMessage | string | `null` | Message ONLY for audio, prepended to the `title` of media (i.e., _Now playing_)
currentMessage | string | `null` | Message ONLY for audio, prepended to the `title` of media (i.e., _Now playing_)

@@ -18,2 +18,3 @@ # Quality

defaultQuality | string | `null` | Initial media quality; if `null`, it will take the first available source
qualityText | string | `null` | Title for Quality button for WARIA purposes
qualityText | string | `null` | Title for Quality button for WARIA purposes
qualityChangeCallback | callback | | Action that will be executed as soon as the user change video quality; passes 3 arguments: media (the wrapper that mimics all the native events/properties/methods for all renderers), node (the original HTML video, audio or iframe tag where the media was loaded originally and string newQuality

@@ -22,7 +22,7 @@ module.exports = function (grunt) {

files: ['src/**/*.js', 'test/core/*.js'],
tasks: ['eslint', 'browserify', 'concat', 'uglify', 'copy:translation']
tasks: ['eslint', 'browserify', 'concat', 'uglify', 'copy']
},
stylesheet: {
files: ['src/**/*.css', 'src/css/**/*.png', 'src/css/**/*.svg'],
tasks: ['postcss', 'copy:build']
tasks: ['postcss', 'copy']
}

@@ -44,2 +44,3 @@ },

files: {
'dist/a11y/a11y.js': 'src/a11y/a11y.js',
'dist/ads/ads.js': 'src/ads/ads.js',

@@ -64,2 +65,3 @@ 'dist/ads-vast-vpaid/ads-vast-vpaid.js': 'src/ads-vast-vpaid/ads-vast-vpaid.js',

'dist/vrview/vrview.js': 'src/vrview/vrview.js',
'dist/markersrolls/markersrolls.js': 'src/markersrolls/markersrolls.js',
},

@@ -116,2 +118,3 @@ options: {

files: {
'dist/a11y/a11y.css': 'src/a11y/a11y.css',
'dist/ads/ads.css': 'src/ads/ads.css',

@@ -145,2 +148,3 @@ 'dist/airplay/airplay.css': 'src/airplay/airplay.css',

files: {
'dist/a11y/a11y.min.css': 'dist/a11y/a11y.css',
'dist/ads/ads.min.css': 'dist/ads/ads.css',

@@ -162,3 +166,2 @@ 'dist/airplay/airplay.min.css': 'dist/airplay/airplay.css',

},
},

@@ -165,0 +168,0 @@ copy: {

{
"name": "mediaelement-plugins",
"version": "2.5.0",
"version": "2.5.1",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

@@ -9,5 +9,5 @@ # ![MediaElementJS](https://cloud.githubusercontent.com/assets/910829/22357262/e6cf32b4-e404-11e6-876b-59afa009f65c.png)

* Author(s): John Dyer [http://j.hn/](http://j.hn/) and Rafael Miranda [https://github.com/ron666](https://github.com/ron666)
* Website: [http://mediaelementjs.com/](http://mediaelementjs.com/)
* License: [MIT](http://johndyer.mit-license.org/)
* Author(s): John Dyer [https://j.hn/](https://j.hn/) and Rafael Miranda [https://github.com/rafa8626](https://github.com/rafa8626)
* Website: [https://www.mediaelementjs.com](https://www.mediaelementjs.com)
* License: [MIT](https://johndyer.mit-license.org/)
* Contributors: [all contributors](https://github.com/johndyer/mediaelement-plugins/graphs/contributors)

@@ -28,3 +28,3 @@

As part of the continuous improvements the player, we have decided to drop completely support for IE9 and IE10, since market share of those browsers together is 0.4%, according to http://caniuse.com/usage-table.
As part of the continuous improvements the player, we have decided to drop completely support for IE9 and IE10, since market share of those browsers together is 0.4%, according to https://caniuse.com/usage-table.

@@ -49,4 +49,4 @@ This change is for `MediaElement` and `MediaElement Plugins` repositories.

var player = new MediaElementPlayer('playerId', {
defaultSpeed: 0.75,
// other configuration elements
defaultSpeed: 0.75,
// other configuration elements
});

@@ -77,3 +77,3 @@ </script>

* **ALWAYS** make changes to the files in the `/src/` directory, and **NEVER** in `/dist/` directory. This is with the sole purpose of facilitating the merging (and further, the compiling) operation, and help people to see changes more easily.
* Use [JSDoc](http://usejsdoc.org/) conventions to document code. This facilitates the contributions of other developers and ensures more quality in the product.
* Use [JSDoc](https://jsdoc.app/) conventions to document code. This facilitates the contributions of other developers and ensures more quality in the product.
* **BEFORE PUSHING** any changes, run `npm run eslint` to ensure code quality.

@@ -186,2 +186,3 @@ * The file for the feature must be placed inside a folder matching its name, as well as any SVG/CSS elements needed (i.e, `loop/loop.js`).

* [A11y](docs/a11y.md)
* [Ads](docs/ads.md)

@@ -197,2 +198,3 @@ * [AirPlay](docs/airplay.md)

* [Markers](docs/markers.md)
* [Markers Rolls](docs/markersrolls.md)
* [Playlist](docs/playlist.md)

@@ -206,2 +208,3 @@ * [Postroll](docs/postroll.md)

* [Stop](docs/stop.md)
* [Snapshot](docs/snapshot.md)
* [VAST/VPAID](docs/ads-vast.md)

@@ -208,0 +211,0 @@ * [VRView](docs/vrview.md)

@@ -47,2 +47,6 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.ad-skip'] = 'Langkau Iklan';
mejs.i18n.ms['mejs.ad-skip-info'] = 'Langkau iklan dalam %1 saat';
}
if (mejs.i18n.nl !== undefined) {

@@ -76,2 +80,6 @@ mejs.i18n.nl['mejs.ad-skip'] = 'Ad overslaan';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.ad-skip'] = 'Reklamı atla';
mejs.i18n.tr['mejs.ad-skip-info'] = ['1 saniye sonra atla', '%1 saniye sonra atla'];
}
if (mejs.i18n.uk !== undefined) {

@@ -88,2 +96,2 @@ mejs.i18n.uk['mejs.ad-skip'] = 'Пропустити рекламу';

mejs.i18n['zh-CN']['mejs.ad-skip-info'] = '跳过%1秒';
}
}

@@ -282,2 +282,4 @@ 'use strict';

} else {
const event = mejs.Utils.createEvent('mejsprerollfinished', t.container);
t.container.dispatchEvent(event);
t.adRestoreMainMedia();

@@ -364,2 +366,6 @@ }

} else {
event = mejs.Utils.createEvent('mejsprerollfinished', t.container);
t.container.dispatchEvent(event);
t.adRestoreMainMedia();

@@ -366,0 +372,0 @@ }

@@ -58,2 +58,7 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.fullscreen-off'] = 'Keluar dari mod skrin penuh';
mejs.i18n.ms['mejs.fullscreen-on'] = 'Masuk ke mod skrin penuh';
mejs.i18n.ms['mejs.download-video'] = 'Muat turun video';
}
if (mejs.i18n.nl !== undefined) {

@@ -94,2 +99,7 @@ mejs.i18n.nl['mejs.fullscreen-off'] = 'Volledig scherm uitschakelen';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.fullscreen-off'] = 'Tam ekran modundan çık';
mejs.i18n.tr['mejs.fullscreen-on'] = 'Tam ekran moduna geç';
mejs.i18n.tr['mejs.download-video'] = 'Videoyu indir';
}
if (mejs.i18n.uk !== undefined) {

@@ -109,2 +119,2 @@ mejs.i18n.uk['mejs.fullscreen-off'] = 'Вимкнути повноекранний режим';

mejs.i18n['zh-CN']['mejs.download-video'] = '下载视频';
}
}

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.time-jump-forward'] = 'Lompat masa %1 saat';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.time-jump-forward'] = '%1 seconden vooruit springen';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.time-jump-forward'] = ['1 saniye ileri atla', '%1 saniye ileri atla'];
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.time-jump-forward'] = ['Перейти вперед на %1 секунду', 'Перейти вперед на %1 секунди', 'Перейти вперед на %1 секунд'];

mejs.i18n['zh-CN']['mejs.time-jump-forward'] = '向前跳%1秒';
}
}

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.loop'] = 'Togol ulangan';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.loop'] = 'Schakellus';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.loop'] = 'Döngü';
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.loop'] = 'Повторювати';

mejs.i18n['zh-CN']['mejs.loop'] = '切换循环';
}
}

@@ -80,2 +80,9 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.playlist'] = 'Senarai main';
mejs.i18n.ms['mejs.playlist-prev'] = 'Sebelum';
mejs.i18n.ms['mejs.playlist-next'] = 'Selepas';
mejs.i18n.ms['mejs.playlist-loop'] = 'Ulang senarai';
mejs.i18n.ms['mejs.playlist-shuffle'] = 'Kocok senarai';
}
if (mejs.i18n.nl !== undefined) {

@@ -113,4 +120,4 @@ mejs.i18n.nl['mejs.playlist'] = 'Afspeellijst';

mejs.i18n.ru['mejs.playlist-next'] = 'следующий';
mejs.i18n.ru['mejs.playlist-loop'] = 'петля';
mejs.i18n.ru['mejs.playlist-shuffle'] = 'шарканье';
mejs.i18n.ru['mejs.playlist-loop'] = 'зациклить';
mejs.i18n.ru['mejs.playlist-shuffle'] = 'перемешать';
}

@@ -131,2 +138,9 @@ if (mejs.i18n.sk !== undefined) {

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.playlist'] = 'Oynatma Listesi';
mejs.i18n.tr['mejs.playlist-prev'] = 'Önceki';
mejs.i18n.tr['mejs.playlist-next'] = 'Sonraki';
mejs.i18n.tr['mejs.playlist-loop'] = 'Döngü';
mejs.i18n.tr['mejs.playlist-shuffle'] = 'Karıştır';
}
if (mejs.i18n.uk !== undefined) {

@@ -152,2 +166,2 @@ mejs.i18n.uk['mejs.playlist'] = 'Плейлист';

mejs.i18n['zh-CN']['mejs.playlist-shuffle'] = '拖曳';
}
}

@@ -19,3 +19,3 @@ 'use strict';

/**
* List to be played; each object MUST have `src` and `title`; other items: `data-thumbnail`, `type`, `description`
* List to be played; each object MUST have `src` and `title`; other items: `data-playlist-thumbnail`, `type`, `description`
* @type {Object[]}

@@ -105,3 +105,3 @@ */

currentItem.innerHTML += `<p>${player.options.currentMessage} <span class="${player.options.classPrefix}playlist-current-title">${player.playlist[player.currentPlaylistItem].title}</span>`;
currentItem.innerHTML += `<p>${player.options.currentMessage || ''} <span class="${player.options.classPrefix}playlist-current-title">${player.playlist[player.currentPlaylistItem].title}</span>`;
if (typeof player.playlist[player.currentPlaylistItem].description !== 'undefined') {

@@ -353,8 +353,9 @@ currentItem.innerHTML += ` - <span class="${player.options.classPrefix}playlist-current-description">${player.playlist[player.currentPlaylistItem].description}</span>`;

createPlayList_ () {
const t = this;
const t = this;
t.playlist = t.options.playlist.length ? t.options.playlist : [];
t.playlist = t.options.playlist.length ? t.options.playlist :
t.mediaFiles && t.mediaFiles.length ? t.mediaFiles : [];
if (!t.playlist.length) {
const children = t.mediaFiles || t.media.originalNode.children;
const children = t.media.originalNode.children;

@@ -405,2 +406,2 @@ for (let i = 0, total = children.length; i < total; i++) {

}
});
});

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.close'] = 'Tutup';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.close'] = 'Sluiten';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.close'] = 'Kapat';
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.close'] = 'Закрити';

mejs.i18n['zh-CN']['mejs.close'] = '关闭';
}
}

@@ -60,4 +60,12 @@ 'use strict';

}, false);
t.media.addEventListener('seeked', () => {
player.postroll.style.display = 'none';
}, false);
t.media.addEventListener('playing', () => {
player.postroll.style.display = 'none';
}, false);
}
}
});

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.quality-chooser']= 'Pilih kualiti';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,4 +61,7 @@ mejs.i18n.nl['mejs.quality-chooser']= 'Kwaliteit kiezer';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.quality-chooser']= 'Kalite';
}
if (mejs.i18n.uk !== undefined) {
mejs.i18n.uk['mejs.quality-chooser']= 'Якісний вибір';
mejs.i18n.uk['mejs.quality-chooser']= 'Вибір якості';
}

@@ -67,2 +73,2 @@ if (mejs.i18n.zh !== undefined) {

mejs.i18n['zh-CN']['mejs.quality-chooser']= '质量选择';
}
}

@@ -22,3 +22,19 @@ 'use strict';

*/
qualityText: null
qualityText: null,
/**
* @type {boolean}
*/
autoGenerate: false,
/**
* @type {boolean}
*/
autoDash: false,
/**
* @type {boolean}
*/
autoHLS: false,
/**
* @type Function
*/
qualityChangeCallback: null
});

@@ -46,4 +62,9 @@

const mediaNode = children[i];
const quality = mediaNode instanceof HTMLElement ? mediaNode.getAttribute('data-quality') : mediaNode['data-quality'];
let quality = mediaNode instanceof HTMLElement ? mediaNode.getAttribute('data-quality') : mediaNode['data-quality'];
if (quality === 'undefined') {
quality = 'Auto';
t.options.autoGenerate = true;
}
if (t.mediaFiles) {

@@ -64,6 +85,50 @@ const source = document.createElement('source');

let
currentQuality = '',
sourceIndex = 0
;
media.addEventListener('error', function(e) {
if (e.message === 'No renderer found' &&
qualityMap.get(currentQuality).length > sourceIndex + 1 ) {
sourceIndex = sourceIndex + 1;
const nextSource = qualityMap.get(currentQuality)[sourceIndex].src;
media.setSrc(nextSource); // ensure the default sources to set to play
media.load();
}
});
media.addEventListener('loadedmetadata', function () {
if (!!media.hlsPlayer) {
const levels = media.hlsPlayer.levels;
if (t.options.autoGenerate && levels.length > 1) {
levels.forEach(function (level) {
const height = level.height;
const quality = t.getQualityFromHeight(height);
t.addValueToKey(qualityMap, quality, '');
});
t.options.autoHLS = true;
t.generateQualityButton(t, player, media, qualityMap, currentQuality);
}
} else if (!!media.dashPlayer) {
const bitrates = media.dashPlayer.getBitrateInfoListFor("video");
if (t.options.autoGenerate && bitrates.length > 1) {
bitrates.forEach(function (level) {
const height = level.height;
const quality = t.getQualityFromHeight(height);
t.addValueToKey(qualityMap, quality, '');
});
t.options.autoDash = true;
t.generateQualityButton(t, player, media, qualityMap, currentQuality);
}
}
});
t.generateQualityButton(t, player, media, qualityMap, currentQuality);
},
generateQualityButton (t, player, media, qualityMap, currentQuality) {
t.cleanquality(player);
const
qualityTitle = mejs.Utils.isString(t.options.qualityText) ? t.options.qualityText : mejs.i18n.t('mejs.quality-quality'),
qualityTitle = mejs.Utils.isString(t.options.qualityText) ? t.options.qualityText : mejs.i18n.t('mejs.quality-chooser'),
getQualityNameFromValue = (value) => {

@@ -86,2 +151,3 @@ let label;

;
currentQuality = defaultValue;

@@ -100,5 +166,2 @@ // Get initial quality

media.setSrc(qualityMap.get(defaultValue)[0].src); // ensure the default sources to set to play
media.load();
qualityMap.forEach(function (value, key) {

@@ -141,3 +204,5 @@ if (key !== 'map_keys_1') {

player.qualitiesButton.addEventListener(outEvents[i], () => {
mejs.Utils.addClass(selector, `${t.options.classPrefix}offscreen`);
setTimeout(() => {
mejs.Utils.addClass(selector, `${t.options.classPrefix}offscreen`);
}, 50);
});

@@ -150,37 +215,32 @@ }

radio.addEventListener('change', function () {
const
self = this,
newQuality = self.value
;
if (t.options.autoDash) {
t.updateQualityButton(this, player, currentQuality);
t.switchDashQuality(player, media);
} else if (t.options.autoHLS) {
t.updateQualityButton(this, player, currentQuality);
t.switchHLSQuality(player, media);
} else {
t.updateQualityButton(this, player, currentQuality);
const selected = player.qualitiesButton.querySelectorAll(`.${t.options.classPrefix}qualities-selected`);
for (let i = 0, total = selected.length; i < total; i++) {
mejs.Utils.removeClass(selected[i], `${t.options.classPrefix}qualities-selected`);
}
let currentTime = media.currentTime;
const paused = media.paused;
self.checked = true;
const siblings = mejs.Utils.siblings(self, (el) => mejs.Utils.hasClass(el, `${t.options.classPrefix}qualities-selector-label`));
for (let j = 0, total = siblings.length; j < total; j++) {
mejs.Utils.addClass(siblings[j], `${t.options.classPrefix}qualities-selected`);
if (!paused) {
media.pause();
}
t.updateVideoSource(media, qualityMap, currentQuality);
media.setSrc(qualityMap.get(currentQuality)[0].src);
media.load();
media.dispatchEvent(mejs.Utils.createEvent('seeking', media));
if (!paused) {
media.play();
}
media.addEventListener('canplay', function canPlayAfterSourceSwitchHandler () {
media.setCurrentTime(currentTime);
media.removeEventListener('canplay', canPlayAfterSourceSwitchHandler);
});
}
let currentTime = media.currentTime;
const paused = media.paused;
player.qualitiesButton.querySelector('button').innerHTML = newQuality;
if (!paused) {
media.pause();
if (t.options.qualityChangeCallback) {
t.options.qualityChangeCallback(media, media.originalNode, newQuality)
}
t.updateVideoSource(media, qualityMap, newQuality);
media.setSrc(qualityMap.get(newQuality)[0].src);
media.load();
media.dispatchEvent(mejs.Utils.createEvent('seeking', media));
if (!paused) {
media.play();
}
media.addEventListener('canplay', function canPlayAfterSourceSwitchHandler () {
media.setCurrentTime(currentTime);
media.removeEventListener('canplay', canPlayAfterSourceSwitchHandler);
});
});

@@ -202,3 +262,2 @@ }

});
media.setSrc(qualityMap.get(defaultValue)[0].src);
},

@@ -228,3 +287,3 @@

if (map.has('map_keys_1')) {
map.get('map_keys_1').push(key.toLowerCase());
map.get('map_keys_1').push(key);
} else {

@@ -302,4 +361,88 @@ map.set('map_keys_1', []);

keyExist (map, searchKey) {
return -1 < map.get('map_keys_1').indexOf(searchKey.toLowerCase());
return -1 < map.get('map_keys_1').indexOf(searchKey);
},
/**
* Responsible for switching the video source when quality source was auto created from dash manifest
* @param {MediaElementPlayer} player
* @param {MediaElement} media
*/
switchDashQuality (player, media) {
const radios = player.qualitiesButton.querySelectorAll('input[type="radio"]');
for (let index = 0; index < radios.length; index++) {
if (radios[index].checked) {
if (index === 0 ) {
media.dashPlayer.setAutoSwitchQuality(true);
} else {
media.dashPlayer.setAutoSwitchQuality(false);
media.dashPlayer.setQualityFor("video", index - 1);
}
}
}
},
/**
* Responsible for switching the video source when quality source was auto created from hls manifest
* @param {MediaElementPlayer} player
* @param {MediaElement} media
*/
switchHLSQuality (player, media) {
const radios = player.qualitiesButton.querySelectorAll('input[type="radio"]');
for (let index = 0; index < radios.length; index++) {
if (radios[index].checked) {
if (index === 0 ) {
media.hlsPlayer.currentLevel = -1;
} else {
media.hlsPlayer.currentLevel = index - 1;
}
}
}
},
/**
* Responsible for switching the video source when quality source was auto created from dash manifest
* @param {Element} self the check quality radio button
* @param {MediaElementPlayer} player
* @param {String} currentQuality the label for the current quality selection
*/
updateQualityButton (self, player, currentQuality) {
const t = this;
const
newQuality = self.value
;
currentQuality = newQuality;
const selected = player.qualitiesButton.querySelectorAll(`.${t.options.classPrefix}qualities-selected`);
for (let i = 0, total = selected.length; i < total; i++) {
mejs.Utils.removeClass(selected[i], `${t.options.classPrefix}qualities-selected`);
}
self.checked = true;
const siblings = mejs.Utils.siblings(self, (el) => mejs.Utils.hasClass(el, `${t.options.classPrefix}qualities-selector-label`));
for (let j = 0, total = siblings.length; j < total; j++) {
mejs.Utils.addClass(siblings[j], `${t.options.classPrefix}qualities-selected`);
}
player.qualitiesButton.querySelector('button').innerHTML = newQuality;
},
/**
* Returns the quality represnetaion base on the height of the loaded video
* @param {Number} height the pixel height of the video
**/
getQualityFromHeight (height) {
if (height >= 4320) {
return "8K UHD";
} else if (height >= 2160) {
return "UHD";
} else if (height >= 1440) {
return "QHD";
} else if (height >= 1080) {
return "FHD";
} else if (height >= 720) {
return "HD";
} else {
return "SD";
}
}
});

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.time-skip-back'] = 'Undur masa %1 saat';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.time-skip-back'] = ['Sla 1 seconde terug', 'Sla %1 seconden terug'];

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.time-skip-back'] = ['1 saniye geri sar', '%1 saniye geri sar'];
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.time-skip-back'] = ['Перейти назад на %1 секунду', 'Перейти назад на %1 секунди', 'Перейти назад на %1 секунд'];

mejs.i18n['zh-CN']['mejs.time-skip-back'] = '后退%1秒';
}
}

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.source-chooser']= 'Pilih sumber';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.source-chooser']= 'Bronkeuze';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.source-chooser']= 'Kaynak Seçici';
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.source-chooser']= 'Вибір джерела';

mejs.i18n['zh-CN']['mejs.source-chooser']= '源选择器';
}
}

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.speed-rate'] = 'Kelajuan';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.speed-rate'] = 'Snelheidsgraad';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.speed-rate'] = 'Hız oranı';
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.speed-rate'] = 'Швидкість відтворення';

mejs.i18n['zh-CN']['mejs.speed-rate'] = '速度';
}
}

@@ -194,2 +194,35 @@ 'use strict';

t.options.keyActions.push({
/*
* Need to listen for both because keyActions dispatches
* based on e.which || e.keyCode instead of e.key, so we
* get the same value for comma as for less than.
*/
keys: [60, 188], // "<" & ","
action: (player, media, key, event) => {
if (event.key != '<')
return;
for (let i = 0; i < radios.length - 1; i++) {
if (radios[i].checked) {
const nextRadio = radios[i+1];
nextRadio.dispatchEvent(mejs.Utils.createEvent('click', nextRadio));
}
}
}
}, {
keys: [62, 190], // ">" & "."
action: (player, media, key, event) => {
if (event.key != '>')
return;
for (let i = 1; i < radios.length; i++) {
if (radios[i].checked) {
const prevRadio = radios[i-1];
prevRadio.dispatchEvent(mejs.Utils.createEvent('click', prevRadio));
}
}
}
});
//Allow up/down arrow to change the selected radio without changing the volume.

@@ -196,0 +229,0 @@ player.speedSelector.addEventListener('keydown', (e) => {

@@ -36,2 +36,5 @@ 'use strict';

}
if (mejs.i18n.ms !== undefined) {
mejs.i18n.ms['mejs.stop'] = 'Berhenti';
}
if (mejs.i18n.nl !== undefined) {

@@ -58,2 +61,5 @@ mejs.i18n.nl['mejs.stop'] = 'Hou op';

}
if (mejs.i18n.tr !== undefined) {
mejs.i18n.tr['mejs.stop'] = 'Durdur';
}
if (mejs.i18n.uk !== undefined) {

@@ -67,2 +73,2 @@ mejs.i18n.uk['mejs.stop'] = 'Зупинити';

mejs.i18n['zh-CN']['mejs.stop'] = '停止';
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc