0)for(var w=0,P=n.length;wt[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,i,o){p.plugins[e]=p.detectPlugin(t,n,i,o)},detectPlugin:function(e,t,n,i){var a=[0,0,0],s=void 0,l=void 0;if(null!==c.NAV.plugins&&void 0!==c.NAV.plugins&&"object"===o(c.NAV.plugins[e])){if((s=c.NAV.plugins[e].description)&&(void 0===c.NAV.mimeTypes||!c.NAV.mimeTypes[t]||c.NAV.mimeTypes[t].enabledPlugin))for(var d=0,u=(a=s.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;d
'+l.default.t("mejs.install-flash")+"
"}else A=['id="__'+i.id+'"','name="__'+i.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+i.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+i.options.pluginPath+i.options.filename+'"','flashvars="'+C.join("&")+'"'],k?(A.push('width="'+N+'"'),A.push('height="'+_+'"')):A.push('style="position: fixed; left: -9999em; top: -9999em;"'),i.flashWrapper.innerHTML="";if(i.flashNode=i.flashWrapper.lastChild,i.hide=function(){o=!1,k&&(i.flashNode.style.display="none")},i.show=function(){o=!0,k&&(i.flashNode.style.display="")},i.setSize=function(e,t){i.flashNode.style.width=e+"px",i.flashNode.style.height=t+"px",null!==i.flashApi&&"function"==typeof i.flashApi.fire_setSize&&i.flashApi.fire_setSize(e,t)},i.destroy=function(){i.flashNode.remove()},n&&n.length>0)for(var F=0,j=n.length;F-1},create:function(e,t,n){var i=e.originalNode,d=e.id+"_"+t.prefix,u=null,c=null;u=i.cloneNode(!0),t=Object.assign(t,e.options);for(var p=a.default.html5media.properties,m=a.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),h=function(t){var n=(0,l.createEvent)(t.type,e);e.dispatchEvent(n)},v=function(e){var n=""+e.substring(0,1).toUpperCase()+e.substring(1);u["get"+n]=function(){return null!==c?u[e]:null},u["set"+n]=function(n){if(-1===a.default.html5media.readOnlyProperties.indexOf(e))if("src"===e){if(u[e]="object"===(void 0===n?"undefined":o(n))&&n.src?n.src:n,null!==c){var i={};i.type="flv",i.url=n,i.cors=t.flv.cors,i.debug=t.flv.debug,i.path=t.flv.path;var r=t.flv.configs;c.destroy();for(var s=0,l=m.length;s0)for(var E=0,b=n.length;E-1},create:function(e,t,n){var i=e.originalNode,d=e.id+"_"+t.prefix,u=i.getAttribute("preload"),c=i.autoplay,p=null,m=null,h=0,v=n.length;m=i.cloneNode(!0),(t=Object.assign(t,e.options)).hls.autoStartLoad=u&&"none"!==u||c;for(var g=a.default.html5media.properties,y=a.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),E=function(t){var n=(0,l.createEvent)(t.type,e);e.dispatchEvent(n)},b=function(e){var n=""+e.substring(0,1).toUpperCase()+e.substring(1);m["get"+n]=function(){return null!==p?m[e]:null},m["set"+n]=function(n){if(-1===a.default.html5media.readOnlyProperties.indexOf(e))if("src"===e){if(m[e]="object"===(void 0===n?"undefined":o(n))&&n.src?n.src:n,null!==p){p.destroy();for(var i=0,r=y.length;i3e3)s=(new Date).getTime(),p.recoverMediaError();else if(!d||o-d>3e3)d=(new Date).getTime(),console.warn("Attempting to swap Audio Codec and recover from media error"),p.swapAudioCodec(),p.recoverMediaError();else{var r="Cannot recover, last media error recovery failed";e.generateError(r,m.src),console.error(r)}break;case"networkError":"manifestLoadError"===i.details&&h0)for(;h0)for(;y0;){var e=c.iframeQueue.pop();c.createIframe(e)}},createIframe:function(e){return new YT.Player(e.containerId,e)},getYouTubeId:function(e){var t="";e.indexOf("?")>0?""===(t=c.getYouTubeIdFromParam(e))&&(t=c.getYouTubeIdFromUrl(e)):t=c.getYouTubeIdFromUrl(e);return(t=t.substring(t.lastIndexOf("/")+1).split("?"))[0]},getYouTubeIdFromParam:function(e){if(void 0===e||null===e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),n="",i=0,o=t.length;i-1)&&!k.playerVars.playlist&&-1===e.originalNode.src.indexOf("playlist=")&&(k.playerVars.playlist=c.getYouTubeId(e.originalNode.src)),c.enqueueIframe(k),i.onEvent=function(t,n,i){null!==i&&void 0!==i&&(e.youTubeState=i)},i.setSize=function(e,t){null!==d&&d.setSize(e,t)},i.hide=function(){i.stopInterval(),i.pause(),p&&(p.style.display="none")},i.show=function(){p&&(p.style.display="")},i.destroy=function(){d.destroy()},i.interval=null,i.startInterval=function(){i.interval=setInterval(function(){var t=(0,l.createEvent)("timeupdate",i);e.dispatchEvent(t)},250)},i.stopInterval=function(){i.interval&&clearInterval(i.interval)},i.getPosterUrl=function(){var n=t.youtube.imageQuality,i=c.getYouTubeId(e.originalNode.src);return n&&["default","hqdefault","mqdefault","sddefault","maxresdefault"].indexOf(n)>-1&&i?"https://img.youtube.com/vi/"+i+"/"+n+".jpg":""},i}};o.default.onYouTubePlayerAPIReady=function(){c.iFrameReady()},d.typeChecks.push(function(e){return/\/\/(www\.youtube|youtu\.?be)/i.test(e)?"video/x-youtube":null}),s.renderer.add(f)},{2:2,26:26,27:27,28:28,3:3,7:7,8:8}],25:[function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.cancelFullScreen=n.requestFullScreen=n.isFullScreen=n.FULLSCREEN_EVENT_NAME=n.HAS_NATIVE_FULLSCREEN_ENABLED=n.HAS_TRUE_NATIVE_FULLSCREEN=n.HAS_IOS_FULLSCREEN=n.HAS_MS_NATIVE_FULLSCREEN=n.HAS_MOZ_NATIVE_FULLSCREEN=n.HAS_WEBKIT_NATIVE_FULLSCREEN=n.HAS_NATIVE_FULLSCREEN=n.SUPPORTS_NATIVE_HLS=n.SUPPORT_PASSIVE_EVENT=n.SUPPORT_POINTER_EVENTS=n.HAS_MSE=n.IS_STOCK_ANDROID=n.IS_SAFARI=n.IS_FIREFOX=n.IS_CHROME=n.IS_EDGE=n.IS_IE=n.IS_ANDROID=n.IS_IOS=n.IS_IPOD=n.IS_IPHONE=n.IS_IPAD=n.UA=n.NAV=void 0;for(var o=i(e(3)),r=i(e(2)),a=i(e(7)),s=n.NAV=o.default.navigator,l=n.UA=s.userAgent.toLowerCase(),d=n.IS_IPAD=/ipad/i.test(l)&&!o.default.MSStream,u=n.IS_IPHONE=/iphone/i.test(l)&&!o.default.MSStream,c=n.IS_IPOD=/ipod/i.test(l)&&!o.default.MSStream,f=(n.IS_IOS=/ipad|iphone|ipod/i.test(l)&&!o.default.MSStream,n.IS_ANDROID=/android/i.test(l)),p=n.IS_IE=/(trident|microsoft)/i.test(s.appName),m=(n.IS_EDGE="msLaunchUri"in s&&!("documentMode"in r.default)),h=n.IS_CHROME=/chrome/i.test(l),v=n.IS_FIREFOX=/firefox/i.test(l),g=n.IS_SAFARI=/safari/i.test(l)&&!h,y=n.IS_STOCK_ANDROID=/^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(l),E=(n.HAS_MSE="MediaSource"in o.default),b=n.SUPPORT_POINTER_EVENTS=function(){var e=r.default.createElement("x"),t=r.default.documentElement,n=o.default.getComputedStyle;if(!("pointerEvents"in e.style))return!1;e.style.pointerEvents="auto",e.style.pointerEvents="x",t.appendChild(e);var i=n&&"auto"===n(e,"").pointerEvents;return e.remove(),!!i}(),S=n.SUPPORT_PASSIVE_EVENT=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});o.default.addEventListener("test",null,t)}catch(e){}return e}(),x=["source","track","audio","video"],w=void 0,P=0,T=x.length;P1&&void 0!==arguments[1]?arguments[1]:400,n=arguments[2];e.style.opacity||(e.style.opacity=1);var i=null;f.default.requestAnimationFrame(function o(r){var a=r-(i=i||r),s=parseFloat(1-a/t,2);e.style.opacity=s<0?0:s,a>t?n&&"function"==typeof n&&n():f.default.requestAnimationFrame(o)})}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments[2];e.style.opacity||(e.style.opacity=0);var i=null;f.default.requestAnimationFrame(function o(r){var a=r-(i=i||r),s=parseFloat(a/t,2);e.style.opacity=s>1?1:s,a>t?n&&"function"==typeof n&&n():f.default.requestAnimationFrame(o)})}function d(e,t){var n=[];e=e.parentNode.firstChild;do{t&&!t(e)||n.push(e)}while(e=e.nextSibling);return n}function u(e){return void 0!==e.getClientRects&&"function"===e.getClientRects?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!(!e.offsetWidth&&!e.offsetHeight)}function c(e,t,n,i){var o=f.default.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),r="application/x-www-form-urlencoded; charset=UTF-8",a=!1,s="*/".concat("*");switch(t){case"text":r="text/plain";break;case"json":r="application/json, text/javascript";break;case"html":r="text/html";break;case"xml":r="application/xml, text/xml"}"application/x-www-form-urlencoded"!==r&&(s=r+", */*; q=0.01"),o&&(o.open("GET",e,!0),o.setRequestHeader("Accept",s),o.onreadystatechange=function(){if(!a&&4===o.readyState)if(200===o.status){a=!0;var e=void 0;switch(t){case"json":e=JSON.parse(o.responseText);break;case"xml":e=o.responseXML;break;default:e=o.responseText}n(e)}else"function"==typeof i&&i(o.status)},o.send())}Object.defineProperty(n,"__esModule",{value:!0}),n.removeClass=n.addClass=n.hasClass=void 0,n.loadScript=o,n.offset=r,n.toggleClass=a,n.fadeOut=s,n.fadeIn=l,n.siblings=d,n.visible=u,n.ajax=c;var f=i(e(3)),p=i(e(2)),m=i(e(7)),h=void 0,v=void 0,g=void 0;"classList"in p.default.documentElement?(h=function(e,t){return void 0!==e.classList&&e.classList.contains(t)},v=function(e,t){return e.classList.add(t)},g=function(e,t){return e.classList.remove(t)}):(h=function(e,t){return new RegExp("\\b"+t+"\\b").test(e.className)},v=function(e,t){y(e,t)||(e.className+=" "+t)},g=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","g"),"")});var y=n.hasClass=h,E=n.addClass=v,b=n.removeClass=g;m.default.Utils=m.default.Utils||{},m.default.Utils.offset=r,m.default.Utils.hasClass=y,m.default.Utils.addClass=E,m.default.Utils.removeClass=b,m.default.Utils.toggleClass=a,m.default.Utils.fadeIn=l,m.default.Utils.fadeOut=s,m.default.Utils.siblings=d,m.default.Utils.visible=u,m.default.Utils.ajax=c,m.default.Utils.loadScript=o},{2:2,3:3,7:7}],27:[function(e,t,n){"use strict";function i(e){if("string"!=typeof e)throw new Error("Argument passed must be a string");var t={"&":"&","<":"<",">":">",'"':"""};return e.replace(/[&<>"]/g,function(e){return t[e]})}function o(e,t){var n=this,i=arguments,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("function"!=typeof e)throw new Error("First argument must be a function");if("number"!=typeof t)throw new Error("Second argument must be a numeric value");var r=void 0;return function(){var a=n,s=i,l=o&&!r;clearTimeout(r),r=setTimeout(function(){r=null,o||e.apply(a,s)},t),l&&e.apply(a,s)}}function r(e){return Object.getOwnPropertyNames(e).length<=0}function a(e,t){var n=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/,i={d:[],w:[]};return(e||"").split(" ").forEach(function(e){var o=e+(t?"."+t:"");o.startsWith(".")?(i.d.push(o),i.w.push(o)):i[n.test(e)?"w":"d"].push(o)}),i.d=i.d.join(" "),i.w=i.w.join(" "),i}function s(e,t){if("string"!=typeof e)throw new Error("Event name must be a string");var n=e.match(/([a-z]+\.([a-z]+))/i),i={target:t};return null!==n&&(e=n[1],i.namespace=n[2]),new window.CustomEvent(e,{detail:i})}function l(e,t){return!!(e&&t&&2&e.compareDocumentPosition(t))}function d(e){return"string"==typeof e}Object.defineProperty(n,"__esModule",{value:!0}),n.escapeHTML=i,n.debounce=o,n.isObjectEmpty=r,n.splitEvents=a,n.createEvent=s,n.isNodeAfter=l,n.isString=d;var u=function(e){return e&&e.__esModule?e:{default:e}}(e(7));u.default.Utils=u.default.Utils||{},u.default.Utils.escapeHTML=i,u.default.Utils.debounce=o,u.default.Utils.isObjectEmpty=r,u.default.Utils.splitEvents=a,u.default.Utils.createEvent=s,u.default.Utils.isNodeAfter=l,u.default.Utils.isString=d},{7:7}],28:[function(e,t,n){"use strict";function i(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=document.createElement("div");return t.innerHTML='x ',t.firstChild.href}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e&&!t?a(e):t}function r(e){if("string"!=typeof e)throw new Error("`type` argument must be a string");return e&&e.indexOf(";")>-1?e.substr(0,e.indexOf(";")):e}function a(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");for(var t=0,n=c.length;t=0&&t.item(n)!==this;);return n>-1}),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=(this.document||this.ownerDocument).querySelectorAll(e),n=void 0,i=this;do{for(n=t.length;--n>=0&&t.item(n)!==i;);}while(n<0&&(i=i.parentElement));return i}),function(){for(var e=0,t=["ms","moz","webkit","o"],n=0;n0&&void 0!==arguments[0]?arguments[0]:25)%1==0)}function o(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:25,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"hh:mm:ss";e=!e||"number"!=typeof e||e<0?0:e;var s=Math.round(.066666*o),l=Math.round(o),d=24*Math.round(3600*o),u=Math.round(600*o),c=i(o)?";":":",f=void 0,p=void 0,m=void 0,h=void 0,v=Math.round(e*o);if(i(o)){v<0&&(v=d+v);var g=(v%=d)%u;v+=9*s*Math.floor(v/u),g>s&&(v+=s*Math.floor((g-s)/Math.round(60*l-s)));var y=Math.floor(v/l);f=Math.floor(Math.floor(y/60)/60),p=Math.floor(y/60)%60,m=n?y%60:Math.floor(v/l%60).toFixed(r)}else f=Math.floor(e/3600)%24,p=Math.floor(e/60)%60,m=n?Math.floor(e%60):Math.floor(e%60).toFixed(r);f=f<=0?0:f,p=p<=0?0:p,m=60===(m=m<=0?0:m)?0:m,p=60===p?0:p;for(var E=a.split(":"),b={},S=0,x=E.length;S0?(f<10&&b.h>1?"0"+f:f)+":":"";return C+=(p<10&&b.m>1?"0"+p:p)+":",C+=""+(m<10&&b.s>1?"0"+m:m),n&&(C+=(h=(h=(v%l).toFixed(0))<=0?0:h)<10&&b.f?c+"0"+h:""+c+h),C}function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:25;if("string"!=typeof e)throw new TypeError("Time must be a string");if(e.indexOf(";")>0&&(e=e.replace(";",":")),!/\d{2}(\:\d{2}){0,3}/i.test(e))throw new TypeError("Time code must have the format `00:00:00`");var n=e.split(":"),o=void 0,r=0,a=0,s=0,l=0,d=0,u=Math.round(.066666*t),c=Math.round(t),f=3600*c,p=60*c;switch(n.length){default:case 1:s=parseInt(n[0],10);break;case 2:a=parseInt(n[0],10),s=parseInt(n[1],10);break;case 3:r=parseInt(n[0],10),a=parseInt(n[1],10),s=parseInt(n[2],10);break;case 4:r=parseInt(n[0],10),a=parseInt(n[1],10),s=parseInt(n[2],10),l=parseInt(n[3],10)}return o=i(t)?f*r+p*a+c*s+l-u*((d=60*r+a)-Math.floor(d/10)):(f*r+p*a+t*s+l)/t,parseFloat(o.toFixed(3))}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:25;e=!e||"number"!=typeof e||e<0?0:e;for(var i=Math.floor(e/3600)%24,o=Math.floor(e/60)%60,r=Math.floor(e%60),a=[[Math.floor((e%1*n).toFixed(3)),"f"],[r,"s"],[o,"m"],[i,"h"]],s=t.timeFormat,l=s[1]===s[0],d=l?2:1,u=s.length0){h=!0;break}if(!h)break;l||(s=c+s),s=a[p][1]+u+s,l&&(s=a[p][1]+s),c=a[p][1]}t.timeFormat=s}function s(e){if("string"!=typeof e)throw new TypeError("Argument must be a string value");for(var t=~(e=e.replace(",",".")).indexOf(".")?e.split(".")[1].length:0,n=0,i=1,o=0,r=(e=e.split(":").reverse()).length;o0&&(i=Math.pow(60,o)),n+=Number(e[o])*i;return Number(n.toFixed(t))}Object.defineProperty(n,"__esModule",{value:!0}),n.isDropFrame=i,n.secondsToTimeCode=o,n.timeCodeToSeconds=r,n.calculateTimeFormat=a,n.convertSMPTEtoSeconds=s;var l=function(e){return e&&e.__esModule?e:{default:e}}(e(7));l.default.Utils=l.default.Utils||{},l.default.Utils.secondsToTimeCode=o,l.default.Utils.timeCodeToSeconds=r,l.default.Utils.calculateTimeFormat=a,l.default.Utils.convertSMPTEtoSeconds=s},{7:7}]},{},[29,6,5,15,23,20,19,21,22,24,16,18,17,9,10,11,12,13,14]);
\ No newline at end of file
diff --git a/node_modules/mediaelement/build/mediaelement-flash-audio-ogg.swf b/node_modules/mediaelement/build/mediaelement-flash-audio-ogg.swf
new file mode 100644
index 00000000..688ec467
Binary files /dev/null and b/node_modules/mediaelement/build/mediaelement-flash-audio-ogg.swf differ
diff --git a/node_modules/mediaelement/build/mediaelement-flash-audio.swf b/node_modules/mediaelement/build/mediaelement-flash-audio.swf
new file mode 100644
index 00000000..43c4c836
Binary files /dev/null and b/node_modules/mediaelement/build/mediaelement-flash-audio.swf differ
diff --git a/node_modules/mediaelement/build/mediaelement-flash-video-hls.swf b/node_modules/mediaelement/build/mediaelement-flash-video-hls.swf
new file mode 100644
index 00000000..91fb6bbc
Binary files /dev/null and b/node_modules/mediaelement/build/mediaelement-flash-video-hls.swf differ
diff --git a/node_modules/mediaelement/build/mediaelement-flash-video-mdash.swf b/node_modules/mediaelement/build/mediaelement-flash-video-mdash.swf
new file mode 100644
index 00000000..8b47508b
Binary files /dev/null and b/node_modules/mediaelement/build/mediaelement-flash-video-mdash.swf differ
diff --git a/node_modules/mediaelement/build/mediaelement-flash-video.swf b/node_modules/mediaelement/build/mediaelement-flash-video.swf
new file mode 100644
index 00000000..3be28bec
Binary files /dev/null and b/node_modules/mediaelement/build/mediaelement-flash-video.swf differ
diff --git a/node_modules/mediaelement/build/mediaelement.js b/node_modules/mediaelement/build/mediaelement.js
new file mode 100644
index 00000000..7aa10f70
--- /dev/null
+++ b/node_modules/mediaelement/build/mediaelement.js
@@ -0,0 +1,3974 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */(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 1 && arguments[1] !== undefined ? arguments[1] : null;
+
+
+ if (typeof message === 'string' && message.length) {
+
+ var str = void 0,
+ pluralForm = void 0;
+
+ var language = i18n.language();
+
+ var _plural = function _plural(input, number, form) {
+
+ if ((typeof input === 'undefined' ? 'undefined' : _typeof(input)) !== 'object' || typeof number !== 'number' || typeof form !== 'number') {
+ return input;
+ }
+
+ var _pluralForms = function () {
+ return [function () {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 0) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1 || (arguments.length <= 0 ? undefined : arguments[0]) === 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2 || (arguments.length <= 0 ? undefined : arguments[0]) === 12) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 20) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 0 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return [3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 !== 11) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) <= 4) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 1) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 2) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 === 3 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 === 4) {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ } else {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 2 && (arguments.length <= 0 ? undefined : arguments[0]) < 7) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) > 6 && (arguments.length <= 0 ? undefined : arguments[0]) < 11) {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ } else {
+ return arguments.length <= 5 ? undefined : arguments[5];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 3 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 <= 10) {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 11) {
+ return arguments.length <= 5 ? undefined : arguments[5];
+ } else {
+ return arguments.length <= 6 ? undefined : arguments[6];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 0 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 > 1 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 11) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 100 > 10 && (arguments.length <= 0 ? undefined : arguments[0]) % 100 < 20) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) !== 11 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 === 1 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) % 10 >= 2 && (arguments.length <= 0 ? undefined : arguments[0]) % 10 <= 4 && ((arguments.length <= 0 ? undefined : arguments[0]) % 100 < 10 || (arguments.length <= 0 ? undefined : arguments[0]) % 100 >= 20)) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) !== 8 && (arguments.length <= 0 ? undefined : arguments[0]) !== 11) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ return (arguments.length <= 0 ? undefined : arguments[0]) === 0 ? arguments.length <= 1 ? undefined : arguments[1] : arguments.length <= 2 ? undefined : arguments[2];
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 2) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 3) {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ } else {
+ return arguments.length <= 4 ? undefined : arguments[4];
+ }
+ }, function () {
+ if ((arguments.length <= 0 ? undefined : arguments[0]) === 0) {
+ return arguments.length <= 1 ? undefined : arguments[1];
+ } else if ((arguments.length <= 0 ? undefined : arguments[0]) === 1) {
+ return arguments.length <= 2 ? undefined : arguments[2];
+ } else {
+ return arguments.length <= 3 ? undefined : arguments[3];
+ }
+ }];
+ }();
+
+ return _pluralForms[form].apply(null, [number].concat(input));
+ };
+
+ if (i18n[language] !== undefined) {
+ str = i18n[language][message];
+ if (pluralParam !== null && typeof pluralParam === 'number') {
+ pluralForm = i18n[language]['mejs.plural-form'];
+ str = _plural.apply(null, [str, pluralParam, pluralForm]);
+ }
+ }
+
+ if (!str && i18n.en) {
+ str = i18n.en[message];
+ if (pluralParam !== null && typeof pluralParam === 'number') {
+ pluralForm = i18n.en['mejs.plural-form'];
+ str = _plural.apply(null, [str, pluralParam, pluralForm]);
+ }
+ }
+
+ str = str || message;
+
+ if (pluralParam !== null && typeof pluralParam === 'number') {
+ str = str.replace('%1', pluralParam);
+ }
+
+ return (0, _general.escapeHTML)(str);
+ }
+
+ return message;
+};
+
+_mejs2.default.i18n = i18n;
+
+if (typeof mejsL10n !== 'undefined') {
+ _mejs2.default.i18n.language(mejsL10n.language, mejsL10n.strings);
+}
+
+exports.default = i18n;
+
+},{"18":18,"7":7,"9":9}],6:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _general = _dereq_(18);
+
+var _media2 = _dereq_(19);
+
+var _renderer = _dereq_(8);
+
+var _constants = _dereq_(16);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var MediaElement = function MediaElement(idOrNode, options, sources) {
+ var _this = this;
+
+ _classCallCheck(this, MediaElement);
+
+ var t = this;
+
+ sources = Array.isArray(sources) ? sources : null;
+
+ t.defaults = {
+ renderers: [],
+
+ fakeNodeName: 'mediaelementwrapper',
+
+ pluginPath: 'build/',
+
+ shimScriptAccess: 'sameDomain'
+ };
+
+ options = Object.assign(t.defaults, options);
+
+ t.mediaElement = _document2.default.createElement(options.fakeNodeName);
+
+ var id = idOrNode,
+ error = false;
+
+ if (typeof idOrNode === 'string') {
+ t.mediaElement.originalNode = _document2.default.getElementById(idOrNode);
+ } else {
+ t.mediaElement.originalNode = idOrNode;
+ id = idOrNode.id;
+ }
+
+ if (t.mediaElement.originalNode === undefined || t.mediaElement.originalNode === null) {
+ return null;
+ }
+
+ t.mediaElement.options = options;
+ id = id || 'mejs_' + Math.random().toString().slice(2);
+
+ t.mediaElement.originalNode.setAttribute('id', id + '_from_mejs');
+
+ var tagName = t.mediaElement.originalNode.tagName.toLowerCase();
+ if (['video', 'audio'].indexOf(tagName) > -1 && !t.mediaElement.originalNode.getAttribute('preload')) {
+ t.mediaElement.originalNode.setAttribute('preload', 'none');
+ }
+
+ t.mediaElement.originalNode.parentNode.insertBefore(t.mediaElement, t.mediaElement.originalNode);
+
+ t.mediaElement.appendChild(t.mediaElement.originalNode);
+
+ var processURL = function processURL(url, type) {
+ if (_window2.default.location.protocol === 'https:' && url.indexOf('http:') === 0 && _constants.IS_IOS && _mejs2.default.html5media.mediaTypes.indexOf(type) > -1) {
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function () {
+ if (this.readyState === 4 && this.status === 200) {
+ var _url = _window2.default.URL || _window2.default.webkitURL,
+ blobUrl = _url.createObjectURL(this.response);
+ t.mediaElement.originalNode.setAttribute('src', blobUrl);
+ return blobUrl;
+ }
+ return url;
+ };
+ xhr.open('GET', url);
+ xhr.responseType = 'blob';
+ xhr.send();
+ }
+
+ return url;
+ };
+
+ var mediaFiles = void 0;
+
+ if (sources !== null) {
+ mediaFiles = sources;
+ } else if (t.mediaElement.originalNode !== null) {
+
+ mediaFiles = [];
+
+ switch (t.mediaElement.originalNode.nodeName.toLowerCase()) {
+ case 'iframe':
+ mediaFiles.push({
+ type: '',
+ src: t.mediaElement.originalNode.getAttribute('src')
+ });
+ break;
+ case 'audio':
+ case 'video':
+ var _sources = t.mediaElement.originalNode.children.length,
+ nodeSource = t.mediaElement.originalNode.getAttribute('src');
+
+ if (nodeSource) {
+ var node = t.mediaElement.originalNode,
+ type = (0, _media2.formatType)(nodeSource, node.getAttribute('type'));
+ mediaFiles.push({
+ type: type,
+ src: processURL(nodeSource, type)
+ });
+ }
+
+ for (var i = 0; i < _sources; i++) {
+ var n = t.mediaElement.originalNode.children[i];
+ if (n.tagName.toLowerCase() === 'source') {
+ var src = n.getAttribute('src'),
+ _type = (0, _media2.formatType)(src, n.getAttribute('type'));
+ mediaFiles.push({ type: _type, src: processURL(src, _type) });
+ }
+ }
+ break;
+ }
+ }
+
+ t.mediaElement.id = id;
+ t.mediaElement.renderers = {};
+ t.mediaElement.events = {};
+ t.mediaElement.promises = [];
+ t.mediaElement.renderer = null;
+ t.mediaElement.rendererName = null;
+
+ t.mediaElement.changeRenderer = function (rendererName, mediaFiles) {
+
+ var t = _this,
+ media = Object.keys(mediaFiles[0]).length > 2 ? mediaFiles[0] : mediaFiles[0].src;
+
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && t.mediaElement.renderer.name === rendererName) {
+ t.mediaElement.renderer.pause();
+ if (t.mediaElement.renderer.stop) {
+ t.mediaElement.renderer.stop();
+ }
+ t.mediaElement.renderer.show();
+ t.mediaElement.renderer.setSrc(media);
+ return true;
+ }
+
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
+ t.mediaElement.renderer.pause();
+ if (t.mediaElement.renderer.stop) {
+ t.mediaElement.renderer.stop();
+ }
+ t.mediaElement.renderer.hide();
+ }
+
+ var newRenderer = t.mediaElement.renderers[rendererName],
+ newRendererType = null;
+
+ if (newRenderer !== undefined && newRenderer !== null) {
+ newRenderer.show();
+ newRenderer.setSrc(media);
+ t.mediaElement.renderer = newRenderer;
+ t.mediaElement.rendererName = rendererName;
+ return true;
+ }
+
+ var rendererArray = t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : _renderer.renderer.order;
+
+ for (var _i = 0, total = rendererArray.length; _i < total; _i++) {
+ var index = rendererArray[_i];
+
+ if (index === rendererName) {
+ var rendererList = _renderer.renderer.renderers;
+ newRendererType = rendererList[index];
+
+ var renderOptions = Object.assign(newRendererType.options, t.mediaElement.options);
+ newRenderer = newRendererType.create(t.mediaElement, renderOptions, mediaFiles);
+ newRenderer.name = rendererName;
+
+ t.mediaElement.renderers[newRendererType.name] = newRenderer;
+ t.mediaElement.renderer = newRenderer;
+ t.mediaElement.rendererName = rendererName;
+ newRenderer.show();
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ t.mediaElement.setSize = function (width, height) {
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null) {
+ t.mediaElement.renderer.setSize(width, height);
+ }
+ };
+
+ t.mediaElement.generateError = function (message, urlList) {
+ message = message || '';
+ urlList = Array.isArray(urlList) ? urlList : [];
+ var event = (0, _general.createEvent)('error', t.mediaElement);
+ event.message = message;
+ event.urls = urlList;
+ t.mediaElement.dispatchEvent(event);
+ error = true;
+ };
+
+ var props = _mejs2.default.html5media.properties,
+ methods = _mejs2.default.html5media.methods,
+ addProperty = function addProperty(obj, name, onGet, onSet) {
+ var oldValue = obj[name];
+ var getFn = function getFn() {
+ return onGet.apply(obj, [oldValue]);
+ },
+ setFn = function setFn(newValue) {
+ oldValue = onSet.apply(obj, [newValue]);
+ return oldValue;
+ };
+
+ Object.defineProperty(obj, name, {
+ get: getFn,
+ set: setFn
+ });
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ if (propName !== 'src') {
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1),
+ getFn = function getFn() {
+ return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['get' + capName] === 'function' ? t.mediaElement.renderer['get' + capName]() : null;
+ },
+ setFn = function setFn(value) {
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer['set' + capName] === 'function') {
+ t.mediaElement.renderer['set' + capName](value);
+ }
+ };
+
+ addProperty(t.mediaElement, propName, getFn, setFn);
+ t.mediaElement['get' + capName] = getFn;
+ t.mediaElement['set' + capName] = setFn;
+ }
+ },
+ getSrc = function getSrc() {
+ return t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null ? t.mediaElement.renderer.getSrc() : null;
+ },
+ setSrc = function setSrc(value) {
+ var mediaFiles = [];
+
+ if (typeof value === 'string') {
+ mediaFiles.push({
+ src: value,
+ type: value ? (0, _media2.getTypeFromFile)(value) : ''
+ });
+ } else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src !== undefined) {
+ var _src = (0, _media2.absolutizeUrl)(value.src),
+ _type2 = value.type,
+ media = Object.assign(value, {
+ src: _src,
+ type: (_type2 === '' || _type2 === null || _type2 === undefined) && _src ? (0, _media2.getTypeFromFile)(_src) : _type2
+ });
+ mediaFiles.push(media);
+ } else if (Array.isArray(value)) {
+ for (var _i2 = 0, total = value.length; _i2 < total; _i2++) {
+
+ var _src2 = (0, _media2.absolutizeUrl)(value[_i2].src),
+ _type3 = value[_i2].type,
+ _media = Object.assign(value[_i2], {
+ src: _src2,
+ type: (_type3 === '' || _type3 === null || _type3 === undefined) && _src2 ? (0, _media2.getTypeFromFile)(_src2) : _type3
+ });
+
+ mediaFiles.push(_media);
+ }
+ }
+
+ var renderInfo = _renderer.renderer.select(mediaFiles, t.mediaElement.options.renderers.length ? t.mediaElement.options.renderers : []),
+ event = void 0;
+
+ if (!t.mediaElement.paused) {
+ t.mediaElement.pause();
+ event = (0, _general.createEvent)('pause', t.mediaElement);
+ t.mediaElement.dispatchEvent(event);
+ }
+ t.mediaElement.originalNode.src = mediaFiles[0].src || '';
+
+ if (renderInfo === null && mediaFiles[0].src) {
+ t.mediaElement.generateError('No renderer found', mediaFiles);
+ return;
+ }
+
+ return mediaFiles[0].src ? t.mediaElement.changeRenderer(renderInfo.rendererName, mediaFiles) : null;
+ },
+ triggerAction = function triggerAction(methodName, args) {
+ try {
+ if (methodName === 'play' && t.mediaElement.rendererName === 'native_dash') {
+ var response = t.mediaElement.renderer[methodName](args);
+ if (response && typeof response.then === 'function') {
+ response.catch(function () {
+ if (t.mediaElement.paused) {
+ setTimeout(function () {
+ var tmpResponse = t.mediaElement.renderer.play();
+ if (tmpResponse !== undefined) {
+ tmpResponse.catch(function () {
+ if (!t.mediaElement.renderer.paused) {
+ t.mediaElement.renderer.pause();
+ }
+ });
+ }
+ }, 150);
+ }
+ });
+ }
+ } else {
+ t.mediaElement.renderer[methodName](args);
+ }
+ } catch (e) {
+ t.mediaElement.generateError(e, mediaFiles);
+ }
+ },
+ assignMethods = function assignMethods(methodName) {
+ t.mediaElement[methodName] = function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ if (t.mediaElement.renderer !== undefined && t.mediaElement.renderer !== null && typeof t.mediaElement.renderer[methodName] === 'function') {
+ if (t.mediaElement.promises.length) {
+ Promise.all(t.mediaElement.promises).then(function () {
+ triggerAction(methodName, args);
+ }).catch(function (e) {
+ t.mediaElement.generateError(e, mediaFiles);
+ });
+ } else {
+ triggerAction(methodName, args);
+ }
+ }
+ return null;
+ };
+ };
+
+ addProperty(t.mediaElement, 'src', getSrc, setSrc);
+ t.mediaElement.getSrc = getSrc;
+ t.mediaElement.setSrc = setSrc;
+
+ for (var _i3 = 0, total = props.length; _i3 < total; _i3++) {
+ assignGettersSetters(props[_i3]);
+ }
+
+ for (var _i4 = 0, _total = methods.length; _i4 < _total; _i4++) {
+ assignMethods(methods[_i4]);
+ }
+
+ t.mediaElement.addEventListener = function (eventName, callback) {
+ t.mediaElement.events[eventName] = t.mediaElement.events[eventName] || [];
+
+ t.mediaElement.events[eventName].push(callback);
+ };
+ t.mediaElement.removeEventListener = function (eventName, callback) {
+ if (!eventName) {
+ t.mediaElement.events = {};
+ return true;
+ }
+
+ var callbacks = t.mediaElement.events[eventName];
+
+ if (!callbacks) {
+ return true;
+ }
+
+ if (!callback) {
+ t.mediaElement.events[eventName] = [];
+ return true;
+ }
+
+ for (var _i5 = 0; _i5 < callbacks.length; _i5++) {
+ if (callbacks[_i5] === callback) {
+ t.mediaElement.events[eventName].splice(_i5, 1);
+ return true;
+ }
+ }
+ return false;
+ };
+
+ t.mediaElement.dispatchEvent = function (event) {
+ var callbacks = t.mediaElement.events[event.type];
+ if (callbacks) {
+ for (var _i6 = 0; _i6 < callbacks.length; _i6++) {
+ callbacks[_i6].apply(null, [event]);
+ }
+ }
+ };
+
+ t.mediaElement.destroy = function () {
+ var mediaElement = t.mediaElement.originalNode.cloneNode(true);
+ var wrapper = t.mediaElement.parentElement;
+ mediaElement.removeAttribute('id');
+ mediaElement.remove();
+ t.mediaElement.remove();
+ wrapper.append(mediaElement);
+ };
+
+ if (mediaFiles.length) {
+ t.mediaElement.src = mediaFiles;
+ }
+
+ if (t.mediaElement.promises.length) {
+ Promise.all(t.mediaElement.promises).then(function () {
+ if (t.mediaElement.options.success) {
+ t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
+ }
+ }).catch(function () {
+ if (error && t.mediaElement.options.error) {
+ t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
+ }
+ });
+ } else {
+ if (t.mediaElement.options.success) {
+ t.mediaElement.options.success(t.mediaElement, t.mediaElement.originalNode);
+ }
+
+ if (error && t.mediaElement.options.error) {
+ t.mediaElement.options.error(t.mediaElement, t.mediaElement.originalNode);
+ }
+ }
+
+ return t.mediaElement;
+};
+
+_window2.default.MediaElement = MediaElement;
+_mejs2.default.MediaElement = MediaElement;
+
+exports.default = MediaElement;
+
+},{"16":16,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],7:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var mejs = {};
+
+mejs.version = '4.2.8';
+
+mejs.html5media = {
+ properties: ['volume', 'src', 'currentTime', 'muted', 'duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable', 'currentSrc', 'preload', 'bufferedBytes', 'bufferedTime', 'initialTime', 'startOffsetTime', 'defaultPlaybackRate', 'playbackRate', 'played', 'autoplay', 'loop', 'controls'],
+ readOnlyProperties: ['duration', 'paused', 'ended', 'buffered', 'error', 'networkState', 'readyState', 'seeking', 'seekable'],
+
+ methods: ['load', 'play', 'pause', 'canPlayType'],
+
+ events: ['loadstart', 'durationchange', 'loadedmetadata', 'loadeddata', 'progress', 'canplay', 'canplaythrough', 'suspend', 'abort', 'error', 'emptied', 'stalled', 'play', 'playing', 'pause', 'waiting', 'seeking', 'seeked', 'timeupdate', 'ended', 'ratechange', 'volumechange'],
+
+ mediaTypes: ['audio/mp3', 'audio/ogg', 'audio/oga', 'audio/wav', 'audio/x-wav', 'audio/wave', 'audio/x-pn-wav', 'audio/mpeg', 'audio/mp4', 'video/mp4', 'video/webm', 'video/ogg', 'video/ogv']
+};
+
+_window2.default.mejs = mejs;
+
+exports.default = mejs;
+
+},{"3":3}],8:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.renderer = undefined;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var Renderer = function () {
+ function Renderer() {
+ _classCallCheck(this, Renderer);
+
+ this.renderers = {};
+ this.order = [];
+ }
+
+ _createClass(Renderer, [{
+ key: 'add',
+ value: function add(renderer) {
+ if (renderer.name === undefined) {
+ throw new TypeError('renderer must contain at least `name` property');
+ }
+
+ this.renderers[renderer.name] = renderer;
+ this.order.push(renderer.name);
+ }
+ }, {
+ key: 'select',
+ value: function select(mediaFiles) {
+ var renderers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
+
+ var renderersLength = renderers.length;
+
+ renderers = renderers.length ? renderers : this.order;
+
+ if (!renderersLength) {
+ var rendererIndicator = [/^(html5|native)/i, /^flash/i, /iframe$/i],
+ rendererRanking = function rendererRanking(renderer) {
+ for (var i = 0, total = rendererIndicator.length; i < total; i++) {
+ if (rendererIndicator[i].test(renderer)) {
+ return i;
+ }
+ }
+ return rendererIndicator.length;
+ };
+
+ renderers.sort(function (a, b) {
+ return rendererRanking(a) - rendererRanking(b);
+ });
+ }
+
+ for (var i = 0, total = renderers.length; i < total; i++) {
+ var key = renderers[i],
+ _renderer = this.renderers[key];
+
+ if (_renderer !== null && _renderer !== undefined) {
+ for (var j = 0, jl = mediaFiles.length; j < jl; j++) {
+ if (typeof _renderer.canPlayType === 'function' && typeof mediaFiles[j].type === 'string' && _renderer.canPlayType(mediaFiles[j].type)) {
+ return {
+ rendererName: _renderer.name,
+ src: mediaFiles[j].src
+ };
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+ }, {
+ key: 'order',
+ set: function set(order) {
+ if (!Array.isArray(order)) {
+ throw new TypeError('order must be an array of strings.');
+ }
+
+ this._order = order;
+ },
+ get: function get() {
+ return this._order;
+ }
+ }, {
+ key: 'renderers',
+ set: function set(renderers) {
+ if (renderers !== null && (typeof renderers === 'undefined' ? 'undefined' : _typeof(renderers)) !== 'object') {
+ throw new TypeError('renderers must be an array of objects.');
+ }
+
+ this._renderers = renderers;
+ },
+ get: function get() {
+ return this._renderers;
+ }
+ }]);
+
+ return Renderer;
+}();
+
+var renderer = exports.renderer = new Renderer();
+
+_mejs2.default.Renderers = renderer;
+
+},{"7":7}],9:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var EN = exports.EN = {
+ 'mejs.plural-form': 1,
+
+ 'mejs.download-file': 'Download File',
+
+ 'mejs.install-flash': 'You are using a browser that does not have Flash player enabled or installed. Please turn on your Flash player plugin or download the latest version from https://get.adobe.com/flashplayer/',
+
+ 'mejs.fullscreen': 'Fullscreen',
+
+ 'mejs.play': 'Play',
+ 'mejs.pause': 'Pause',
+
+ 'mejs.time-slider': 'Time Slider',
+ 'mejs.time-help-text': 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.',
+ 'mejs.live-broadcast': 'Live Broadcast',
+
+ 'mejs.volume-help-text': 'Use Up/Down Arrow keys to increase or decrease volume.',
+ 'mejs.unmute': 'Unmute',
+ 'mejs.mute': 'Mute',
+ 'mejs.volume-slider': 'Volume Slider',
+
+ 'mejs.video-player': 'Video Player',
+ 'mejs.audio-player': 'Audio Player',
+
+ 'mejs.captions-subtitles': 'Captions/Subtitles',
+ 'mejs.captions-chapters': 'Chapters',
+ 'mejs.none': 'None',
+ 'mejs.afrikaans': 'Afrikaans',
+ 'mejs.albanian': 'Albanian',
+ 'mejs.arabic': 'Arabic',
+ 'mejs.belarusian': 'Belarusian',
+ 'mejs.bulgarian': 'Bulgarian',
+ 'mejs.catalan': 'Catalan',
+ 'mejs.chinese': 'Chinese',
+ 'mejs.chinese-simplified': 'Chinese (Simplified)',
+ 'mejs.chinese-traditional': 'Chinese (Traditional)',
+ 'mejs.croatian': 'Croatian',
+ 'mejs.czech': 'Czech',
+ 'mejs.danish': 'Danish',
+ 'mejs.dutch': 'Dutch',
+ 'mejs.english': 'English',
+ 'mejs.estonian': 'Estonian',
+ 'mejs.filipino': 'Filipino',
+ 'mejs.finnish': 'Finnish',
+ 'mejs.french': 'French',
+ 'mejs.galician': 'Galician',
+ 'mejs.german': 'German',
+ 'mejs.greek': 'Greek',
+ 'mejs.haitian-creole': 'Haitian Creole',
+ 'mejs.hebrew': 'Hebrew',
+ 'mejs.hindi': 'Hindi',
+ 'mejs.hungarian': 'Hungarian',
+ 'mejs.icelandic': 'Icelandic',
+ 'mejs.indonesian': 'Indonesian',
+ 'mejs.irish': 'Irish',
+ 'mejs.italian': 'Italian',
+ 'mejs.japanese': 'Japanese',
+ 'mejs.korean': 'Korean',
+ 'mejs.latvian': 'Latvian',
+ 'mejs.lithuanian': 'Lithuanian',
+ 'mejs.macedonian': 'Macedonian',
+ 'mejs.malay': 'Malay',
+ 'mejs.maltese': 'Maltese',
+ 'mejs.norwegian': 'Norwegian',
+ 'mejs.persian': 'Persian',
+ 'mejs.polish': 'Polish',
+ 'mejs.portuguese': 'Portuguese',
+ 'mejs.romanian': 'Romanian',
+ 'mejs.russian': 'Russian',
+ 'mejs.serbian': 'Serbian',
+ 'mejs.slovak': 'Slovak',
+ 'mejs.slovenian': 'Slovenian',
+ 'mejs.spanish': 'Spanish',
+ 'mejs.swahili': 'Swahili',
+ 'mejs.swedish': 'Swedish',
+ 'mejs.tagalog': 'Tagalog',
+ 'mejs.thai': 'Thai',
+ 'mejs.turkish': 'Turkish',
+ 'mejs.ukrainian': 'Ukrainian',
+ 'mejs.vietnamese': 'Vietnamese',
+ 'mejs.welsh': 'Welsh',
+ 'mejs.yiddish': 'Yiddish'
+};
+
+},{}],10:[function(_dereq_,module,exports){
+'use strict';
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _media = _dereq_(19);
+
+var _constants = _dereq_(16);
+
+var _dom = _dereq_(17);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NativeDash = {
+
+ promise: null,
+
+ load: function load(settings) {
+ if (typeof dashjs !== 'undefined') {
+ NativeDash.promise = new Promise(function (resolve) {
+ resolve();
+ }).then(function () {
+ NativeDash._createPlayer(settings);
+ });
+ } else {
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.dashjs.org/latest/dash.all.min.js';
+
+ NativeDash.promise = NativeDash.promise || (0, _dom.loadScript)(settings.options.path);
+ NativeDash.promise.then(function () {
+ NativeDash._createPlayer(settings);
+ });
+ }
+
+ return NativeDash.promise;
+ },
+
+ _createPlayer: function _createPlayer(settings) {
+ var player = dashjs.MediaPlayer().create();
+ _window2.default['__ready__' + settings.id](player);
+ return player;
+ }
+};
+
+var DashNativeRenderer = {
+ name: 'native_dash',
+ options: {
+ prefix: 'native_dash',
+ dash: {
+ path: 'https://cdn.dashjs.org/latest/dash.all.min.js',
+ debug: false,
+ drm: {},
+
+ robustnessLevel: ''
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return _constants.HAS_MSE && ['application/dash+xml'].indexOf(type.toLowerCase()) > -1;
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var originalNode = mediaElement.originalNode,
+ id = mediaElement.id + '_' + options.prefix,
+ autoplay = originalNode.autoplay,
+ children = originalNode.children;
+
+ var node = null,
+ dashPlayer = null;
+
+ originalNode.removeAttribute('type');
+ for (var i = 0, total = children.length; i < total; i++) {
+ children[i].removeAttribute('type');
+ }
+
+ node = originalNode.cloneNode(true);
+ options = Object.assign(options, mediaElement.options);
+
+ var props = _mejs2.default.html5media.properties,
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ attachNativeEvents = function attachNativeEvents(e) {
+ var event = (0, _general.createEvent)(e.type, mediaElement);
+ mediaElement.dispatchEvent(event);
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return dashPlayer !== null ? node[propName] : null;
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ if (propName === 'src') {
+ var source = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
+ node[propName] = source;
+ if (dashPlayer !== null) {
+ dashPlayer.reset();
+ for (var _i = 0, _total = events.length; _i < _total; _i++) {
+ node.removeEventListener(events[_i], attachNativeEvents);
+ }
+ dashPlayer = NativeDash._createPlayer({
+ options: options.dash,
+ id: id
+ });
+
+ if (value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(value.drm) === 'object') {
+ dashPlayer.setProtectionData(value.drm);
+ if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
+ dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
+ }
+ }
+ dashPlayer.attachSource(source);
+ if (autoplay) {
+ dashPlayer.play();
+ }
+ }
+ } else {
+ node[propName] = value;
+ }
+ }
+ };
+ };
+
+ for (var _i2 = 0, _total2 = props.length; _i2 < _total2; _i2++) {
+ assignGettersSetters(props[_i2]);
+ }
+
+ _window2.default['__ready__' + id] = function (_dashPlayer) {
+ mediaElement.dashPlayer = dashPlayer = _dashPlayer;
+
+ var dashEvents = dashjs.MediaPlayer.events,
+ assignEvents = function assignEvents(eventName) {
+ if (eventName === 'loadedmetadata') {
+ dashPlayer.getDebug().setLogToBrowserConsole(options.dash.debug);
+ dashPlayer.initialize();
+ dashPlayer.setScheduleWhilePaused(false);
+ dashPlayer.setFastSwitchEnabled(true);
+ dashPlayer.attachView(node);
+ dashPlayer.setAutoPlay(false);
+
+ if (_typeof(options.dash.drm) === 'object' && !_mejs2.default.Utils.isObjectEmpty(options.dash.drm)) {
+ dashPlayer.setProtectionData(options.dash.drm);
+ if ((0, _general.isString)(options.dash.robustnessLevel) && options.dash.robustnessLevel) {
+ dashPlayer.getProtectionController().setRobustnessLevel(options.dash.robustnessLevel);
+ }
+ }
+ dashPlayer.attachSource(node.getSrc());
+ }
+
+ node.addEventListener(eventName, attachNativeEvents);
+ };
+
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
+ assignEvents(events[_i3]);
+ }
+
+ var assignMdashEvents = function assignMdashEvents(e) {
+ if (e.type.toLowerCase() === 'error') {
+ mediaElement.generateError(e.message, node.src);
+ console.error(e);
+ } else {
+ var _event = (0, _general.createEvent)(e.type, mediaElement);
+ _event.data = e;
+ mediaElement.dispatchEvent(_event);
+ }
+ };
+
+ for (var eventType in dashEvents) {
+ if (dashEvents.hasOwnProperty(eventType)) {
+ dashPlayer.on(dashEvents[eventType], function (e) {
+ return assignMdashEvents(e);
+ });
+ }
+ }
+ };
+
+ if (mediaFiles && mediaFiles.length > 0) {
+ for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
+ node.setAttribute('src', mediaFiles[_i4].src);
+ if (typeof mediaFiles[_i4].drm !== 'undefined') {
+ options.dash.drm = mediaFiles[_i4].drm;
+ }
+ break;
+ }
+ }
+ }
+
+ node.setAttribute('id', id);
+
+ originalNode.parentNode.insertBefore(node, originalNode);
+ originalNode.autoplay = false;
+ originalNode.style.display = 'none';
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ node.pause();
+ node.style.display = 'none';
+ return node;
+ };
+
+ node.show = function () {
+ node.style.display = '';
+ return node;
+ };
+
+ node.destroy = function () {
+ if (dashPlayer !== null) {
+ dashPlayer.reset();
+ }
+ };
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ mediaElement.promises.push(NativeDash.load({
+ options: options.dash,
+ id: id
+ }));
+
+ return node;
+ }
+};
+
+_media.typeChecks.push(function (url) {
+ return ~url.toLowerCase().indexOf('.mpd') ? 'application/dash+xml' : null;
+});
+
+_renderer.renderer.add(DashNativeRenderer);
+
+},{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],11:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PluginDetector = undefined;
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _i18n = _dereq_(5);
+
+var _i18n2 = _interopRequireDefault(_i18n);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _constants = _dereq_(16);
+
+var _media = _dereq_(19);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var PluginDetector = exports.PluginDetector = {
+ plugins: [],
+
+ hasPluginVersion: function hasPluginVersion(plugin, v) {
+ var pv = PluginDetector.plugins[plugin];
+ v[1] = v[1] || 0;
+ v[2] = v[2] || 0;
+ return pv[0] > v[0] || pv[0] === v[0] && pv[1] > v[1] || pv[0] === v[0] && pv[1] === v[1] && pv[2] >= v[2];
+ },
+
+ addPlugin: function addPlugin(p, pluginName, mimeType, activeX, axDetect) {
+ PluginDetector.plugins[p] = PluginDetector.detectPlugin(pluginName, mimeType, activeX, axDetect);
+ },
+
+ detectPlugin: function detectPlugin(pluginName, mimeType, activeX, axDetect) {
+
+ var version = [0, 0, 0],
+ description = void 0,
+ ax = void 0;
+
+ if (_constants.NAV.plugins !== null && _constants.NAV.plugins !== undefined && _typeof(_constants.NAV.plugins[pluginName]) === 'object') {
+ description = _constants.NAV.plugins[pluginName].description;
+ if (description && !(typeof _constants.NAV.mimeTypes !== 'undefined' && _constants.NAV.mimeTypes[mimeType] && !_constants.NAV.mimeTypes[mimeType].enabledPlugin)) {
+ version = description.replace(pluginName, '').replace(/^\s+/, '').replace(/\sr/gi, '.').split('.');
+ for (var i = 0, total = version.length; i < total; i++) {
+ version[i] = parseInt(version[i].match(/\d+/), 10);
+ }
+ }
+ } else if (_window2.default.ActiveXObject !== undefined) {
+ try {
+ ax = new ActiveXObject(activeX);
+ if (ax) {
+ version = axDetect(ax);
+ }
+ } catch (e) {
+
+ }
+ }
+ return version;
+ }
+};
+
+PluginDetector.addPlugin('flash', 'Shockwave Flash', 'application/x-shockwave-flash', 'ShockwaveFlash.ShockwaveFlash', function (ax) {
+ var version = [],
+ d = ax.GetVariable("$version");
+
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ version = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ return version;
+});
+
+var FlashMediaElementRenderer = {
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var flash = {};
+ var isActive = false;
+
+ flash.options = options;
+ flash.id = mediaElement.id + '_' + flash.options.prefix;
+ flash.mediaElement = mediaElement;
+ flash.flashState = {};
+ flash.flashApi = null;
+ flash.flashApiStack = [];
+
+ var props = _mejs2.default.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+ flash.flashState[propName] = null;
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ flash['get' + capName] = function () {
+ if (flash.flashApi !== null) {
+ if (typeof flash.flashApi['get_' + propName] === 'function') {
+ var value = flash.flashApi['get_' + propName]();
+
+ if (propName === 'buffered') {
+ return {
+ start: function start() {
+ return 0;
+ },
+ end: function end() {
+ return value;
+ },
+ length: 1
+ };
+ }
+ return value;
+ } else {
+ return null;
+ }
+ } else {
+ return null;
+ }
+ };
+
+ flash['set' + capName] = function (value) {
+ if (propName === 'src') {
+ value = (0, _media.absolutizeUrl)(value);
+ }
+
+ if (flash.flashApi !== null && flash.flashApi['set_' + propName] !== undefined) {
+ try {
+ flash.flashApi['set_' + propName](value);
+ } catch (e) {
+
+ }
+ } else {
+ flash.flashApiStack.push({
+ type: 'set',
+ propName: propName,
+ value: value
+ });
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var methods = _mejs2.default.html5media.methods,
+ assignMethods = function assignMethods(methodName) {
+ flash[methodName] = function () {
+ if (isActive) {
+ if (flash.flashApi !== null) {
+ if (flash.flashApi['fire_' + methodName]) {
+ try {
+ flash.flashApi['fire_' + methodName]();
+ } catch (e) {
+
+ }
+ } else {
+
+ }
+ } else {
+ flash.flashApiStack.push({
+ type: 'call',
+ methodName: methodName
+ });
+ }
+ }
+ };
+ };
+ methods.push('stop');
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
+ assignMethods(methods[_i]);
+ }
+
+ var initEvents = ['rendererready'];
+
+ for (var _i2 = 0, _total2 = initEvents.length; _i2 < _total2; _i2++) {
+ var event = (0, _general.createEvent)(initEvents[_i2], flash);
+ mediaElement.dispatchEvent(event);
+ }
+
+ _window2.default['__ready__' + flash.id] = function () {
+
+ flash.flashReady = true;
+ flash.flashApi = _document2.default.getElementById('__' + flash.id);
+
+ if (flash.flashApiStack.length) {
+ for (var _i3 = 0, _total3 = flash.flashApiStack.length; _i3 < _total3; _i3++) {
+ var stackItem = flash.flashApiStack[_i3];
+
+ if (stackItem.type === 'set') {
+ var propName = stackItem.propName,
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ flash['set' + capName](stackItem.value);
+ } else if (stackItem.type === 'call') {
+ flash[stackItem.methodName]();
+ }
+ }
+ }
+ };
+
+ _window2.default['__event__' + flash.id] = function (eventName, message) {
+ var event = (0, _general.createEvent)(eventName, flash);
+ if (message) {
+ try {
+ event.data = JSON.parse(message);
+ event.details.data = JSON.parse(message);
+ } catch (e) {
+ event.message = message;
+ }
+ }
+
+ flash.mediaElement.dispatchEvent(event);
+ };
+
+ flash.flashWrapper = _document2.default.createElement('div');
+
+ if (['always', 'sameDomain'].indexOf(flash.options.shimScriptAccess) === -1) {
+ flash.options.shimScriptAccess = 'sameDomain';
+ }
+
+ var autoplay = mediaElement.originalNode.autoplay,
+ flashVars = ['uid=' + flash.id, 'autoplay=' + autoplay, 'allowScriptAccess=' + flash.options.shimScriptAccess, 'preload=' + (mediaElement.originalNode.getAttribute('preload') || '')],
+ isVideo = mediaElement.originalNode !== null && mediaElement.originalNode.tagName.toLowerCase() === 'video',
+ flashHeight = isVideo ? mediaElement.originalNode.height : 1,
+ flashWidth = isVideo ? mediaElement.originalNode.width : 1;
+
+ if (mediaElement.originalNode.getAttribute('src')) {
+ flashVars.push('src=' + mediaElement.originalNode.getAttribute('src'));
+ }
+
+ if (flash.options.enablePseudoStreaming === true) {
+ flashVars.push('pseudostreamstart=' + flash.options.pseudoStreamingStartQueryParam);
+ flashVars.push('pseudostreamtype=' + flash.options.pseudoStreamingType);
+ }
+
+ if (flash.options.streamDelimiter) {
+ flashVars.push('streamdelimiter=' + encodeURIComponent(flash.options.streamDelimiter));
+ }
+
+ if (flash.options.proxyType) {
+ flashVars.push('proxytype=' + flash.options.proxyType);
+ }
+
+ mediaElement.appendChild(flash.flashWrapper);
+ mediaElement.originalNode.style.display = 'none';
+
+ var settings = [];
+
+ if (_constants.IS_IE || _constants.IS_EDGE) {
+ var specialIEContainer = _document2.default.createElement('div');
+ flash.flashWrapper.appendChild(specialIEContainer);
+
+ if (_constants.IS_EDGE) {
+ settings = ['type="application/x-shockwave-flash"', 'data="' + flash.options.pluginPath + flash.options.filename + '"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '\'"'];
+ } else {
+ settings = ['classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"', 'codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"', 'id="__' + flash.id + '"', 'width="' + flashWidth + '"', 'height="' + flashHeight + '"'];
+ }
+
+ if (!isVideo) {
+ settings.push('style="clip: rect(0 0 0 0); position: absolute;"');
+ }
+
+ specialIEContainer.outerHTML = '' + (' ') + (' ') + ' ' + ' ' + ' ' + (' ') + ' ' + ('' + _i18n2.default.t('mejs.install-flash') + '
') + ' ';
+ } else {
+
+ settings = ['id="__' + flash.id + '"', 'name="__' + flash.id + '"', 'play="true"', 'loop="false"', 'quality="high"', 'bgcolor="#000000"', 'wmode="transparent"', 'allowScriptAccess="' + flash.options.shimScriptAccess + '"', 'allowFullScreen="true"', 'type="application/x-shockwave-flash"', 'pluginspage="//www.macromedia.com/go/getflashplayer"', 'src="' + flash.options.pluginPath + flash.options.filename + '"', 'flashvars="' + flashVars.join('&') + '"'];
+
+ if (isVideo) {
+ settings.push('width="' + flashWidth + '"');
+ settings.push('height="' + flashHeight + '"');
+ } else {
+ settings.push('style="position: fixed; left: -9999em; top: -9999em;"');
+ }
+
+ flash.flashWrapper.innerHTML = '';
+ }
+
+ flash.flashNode = flash.flashWrapper.lastChild;
+
+ flash.hide = function () {
+ isActive = false;
+ if (isVideo) {
+ flash.flashNode.style.display = 'none';
+ }
+ };
+ flash.show = function () {
+ isActive = true;
+ if (isVideo) {
+ flash.flashNode.style.display = '';
+ }
+ };
+ flash.setSize = function (width, height) {
+ flash.flashNode.style.width = width + 'px';
+ flash.flashNode.style.height = height + 'px';
+
+ if (flash.flashApi !== null && typeof flash.flashApi.fire_setSize === 'function') {
+ flash.flashApi.fire_setSize(width, height);
+ }
+ };
+
+ flash.destroy = function () {
+ flash.flashNode.remove();
+ };
+
+ if (mediaFiles && mediaFiles.length > 0) {
+ for (var _i4 = 0, _total4 = mediaFiles.length; _i4 < _total4; _i4++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i4].type)) {
+ flash.setSrc(mediaFiles[_i4].src);
+ break;
+ }
+ }
+ }
+
+ return flash;
+ }
+};
+
+var hasFlash = PluginDetector.hasPluginVersion('flash', [10, 0, 0]);
+
+if (hasFlash) {
+ _media.typeChecks.push(function (url) {
+ url = url.toLowerCase();
+
+ if (url.startsWith('rtmp')) {
+ if (~url.indexOf('.mp3')) {
+ return 'audio/rtmp';
+ } else {
+ return 'video/rtmp';
+ }
+ } else if (/\.og(a|g)/i.test(url)) {
+ return 'audio/ogg';
+ } else if (~url.indexOf('.m3u8')) {
+ return 'application/x-mpegURL';
+ } else if (~url.indexOf('.mpd')) {
+ return 'application/dash+xml';
+ } else if (~url.indexOf('.flv')) {
+ return 'video/flv';
+ } else {
+ return null;
+ }
+ });
+
+ var FlashMediaElementVideoRenderer = {
+ name: 'flash_video',
+ options: {
+ prefix: 'flash_video',
+ filename: 'mediaelement-flash-video.swf',
+ enablePseudoStreaming: false,
+
+ pseudoStreamingStartQueryParam: 'start',
+
+ pseudoStreamingType: 'byte',
+
+ proxyType: '',
+
+ streamDelimiter: ''
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['video/mp4', 'video/rtmp', 'audio/rtmp', 'rtmp/mp4', 'audio/mp4', 'video/flv', 'video/x-flv'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+
+ };
+ _renderer.renderer.add(FlashMediaElementVideoRenderer);
+
+ var FlashMediaElementHlsVideoRenderer = {
+ name: 'flash_hls',
+ options: {
+ prefix: 'flash_hls',
+ filename: 'mediaelement-flash-video-hls.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementHlsVideoRenderer);
+
+ var FlashMediaElementMdashVideoRenderer = {
+ name: 'flash_dash',
+ options: {
+ prefix: 'flash_dash',
+ filename: 'mediaelement-flash-video-mdash.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['application/dash+xml'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementMdashVideoRenderer);
+
+ var FlashMediaElementAudioRenderer = {
+ name: 'flash_audio',
+ options: {
+ prefix: 'flash_audio',
+ filename: 'mediaelement-flash-audio.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['audio/mp3'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementAudioRenderer);
+
+ var FlashMediaElementAudioOggRenderer = {
+ name: 'flash_audio_ogg',
+ options: {
+ prefix: 'flash_audio_ogg',
+ filename: 'mediaelement-flash-audio-ogg.swf'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['audio/ogg', 'audio/oga', 'audio/ogv'].indexOf(type.toLowerCase());
+ },
+
+ create: FlashMediaElementRenderer.create
+ };
+ _renderer.renderer.add(FlashMediaElementAudioOggRenderer);
+}
+
+},{"16":16,"18":18,"19":19,"2":2,"3":3,"5":5,"7":7,"8":8}],12:[function(_dereq_,module,exports){
+'use strict';
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _constants = _dereq_(16);
+
+var _media = _dereq_(19);
+
+var _dom = _dereq_(17);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NativeFlv = {
+
+ promise: null,
+
+ load: function load(settings) {
+ if (typeof flvjs !== 'undefined') {
+ NativeFlv.promise = new Promise(function (resolve) {
+ resolve();
+ }).then(function () {
+ NativeFlv._createPlayer(settings);
+ });
+ } else {
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/flv.js@latest';
+
+ NativeFlv.promise = NativeFlv.promise || (0, _dom.loadScript)(settings.options.path);
+ NativeFlv.promise.then(function () {
+ NativeFlv._createPlayer(settings);
+ });
+ }
+
+ return NativeFlv.promise;
+ },
+
+ _createPlayer: function _createPlayer(settings) {
+ flvjs.LoggingControl.enableDebug = settings.options.debug;
+ flvjs.LoggingControl.enableVerbose = settings.options.debug;
+ var player = flvjs.createPlayer(settings.options, settings.configs);
+ _window2.default['__ready__' + settings.id](player);
+ return player;
+ }
+};
+
+var FlvNativeRenderer = {
+ name: 'native_flv',
+ options: {
+ prefix: 'native_flv',
+ flv: {
+ path: 'https://cdn.jsdelivr.net/npm/flv.js@latest',
+
+ cors: true,
+ debug: false
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return _constants.HAS_MSE && ['video/x-flv', 'video/flv'].indexOf(type.toLowerCase()) > -1;
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var originalNode = mediaElement.originalNode,
+ id = mediaElement.id + '_' + options.prefix;
+
+ var node = null,
+ flvPlayer = null;
+
+ node = originalNode.cloneNode(true);
+ options = Object.assign(options, mediaElement.options);
+
+ var props = _mejs2.default.html5media.properties,
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ attachNativeEvents = function attachNativeEvents(e) {
+ var event = (0, _general.createEvent)(e.type, mediaElement);
+ mediaElement.dispatchEvent(event);
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return flvPlayer !== null ? node[propName] : null;
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ if (propName === 'src') {
+ node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
+ if (flvPlayer !== null) {
+ var _flvOptions = {};
+ _flvOptions.type = 'flv';
+ _flvOptions.url = value;
+ _flvOptions.cors = options.flv.cors;
+ _flvOptions.debug = options.flv.debug;
+ _flvOptions.path = options.flv.path;
+ var _flvConfigs = options.flv.configs;
+
+ flvPlayer.destroy();
+ for (var i = 0, total = events.length; i < total; i++) {
+ node.removeEventListener(events[i], attachNativeEvents);
+ }
+ flvPlayer = NativeFlv._createPlayer({
+ options: _flvOptions,
+ configs: _flvConfigs,
+ id: id
+ });
+ flvPlayer.attachMediaElement(node);
+ flvPlayer.load();
+ }
+ } else {
+ node[propName] = value;
+ }
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ _window2.default['__ready__' + id] = function (_flvPlayer) {
+ mediaElement.flvPlayer = flvPlayer = _flvPlayer;
+
+ var flvEvents = flvjs.Events,
+ assignEvents = function assignEvents(eventName) {
+ if (eventName === 'loadedmetadata') {
+ flvPlayer.unload();
+ flvPlayer.detachMediaElement();
+ flvPlayer.attachMediaElement(node);
+ flvPlayer.load();
+ }
+
+ node.addEventListener(eventName, attachNativeEvents);
+ };
+
+ for (var _i = 0, _total = events.length; _i < _total; _i++) {
+ assignEvents(events[_i]);
+ }
+
+ var assignFlvEvents = function assignFlvEvents(name, data) {
+ if (name === 'error') {
+ var message = data[0] + ': ' + data[1] + ' ' + data[2].msg;
+ mediaElement.generateError(message, node.src);
+ } else {
+ var _event = (0, _general.createEvent)(name, mediaElement);
+ _event.data = data;
+ mediaElement.dispatchEvent(_event);
+ }
+ };
+
+ var _loop = function _loop(eventType) {
+ if (flvEvents.hasOwnProperty(eventType)) {
+ flvPlayer.on(flvEvents[eventType], function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return assignFlvEvents(flvEvents[eventType], args);
+ });
+ }
+ };
+
+ for (var eventType in flvEvents) {
+ _loop(eventType);
+ }
+ };
+
+ if (mediaFiles && mediaFiles.length > 0) {
+ for (var _i2 = 0, _total2 = mediaFiles.length; _i2 < _total2; _i2++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[_i2].type)) {
+ node.setAttribute('src', mediaFiles[_i2].src);
+ break;
+ }
+ }
+ }
+
+ node.setAttribute('id', id);
+
+ originalNode.parentNode.insertBefore(node, originalNode);
+ originalNode.autoplay = false;
+ originalNode.style.display = 'none';
+
+ var flvOptions = {};
+ flvOptions.type = 'flv';
+ flvOptions.url = node.src;
+ flvOptions.cors = options.flv.cors;
+ flvOptions.debug = options.flv.debug;
+ flvOptions.path = options.flv.path;
+ var flvConfigs = options.flv.configs;
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ if (flvPlayer !== null) {
+ flvPlayer.pause();
+ }
+ node.style.display = 'none';
+ return node;
+ };
+
+ node.show = function () {
+ node.style.display = '';
+ return node;
+ };
+
+ node.destroy = function () {
+ if (flvPlayer !== null) {
+ flvPlayer.destroy();
+ }
+ };
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ mediaElement.promises.push(NativeFlv.load({
+ options: flvOptions,
+ configs: flvConfigs,
+ id: id
+ }));
+
+ return node;
+ }
+};
+
+_media.typeChecks.push(function (url) {
+ return ~url.toLowerCase().indexOf('.flv') ? 'video/flv' : null;
+});
+
+_renderer.renderer.add(FlvNativeRenderer);
+
+},{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],13:[function(_dereq_,module,exports){
+'use strict';
+
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _constants = _dereq_(16);
+
+var _media = _dereq_(19);
+
+var _dom = _dereq_(17);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NativeHls = {
+
+ promise: null,
+
+ load: function load(settings) {
+ if (typeof Hls !== 'undefined') {
+ NativeHls.promise = new Promise(function (resolve) {
+ resolve();
+ }).then(function () {
+ NativeHls._createPlayer(settings);
+ });
+ } else {
+ settings.options.path = typeof settings.options.path === 'string' ? settings.options.path : 'https://cdn.jsdelivr.net/npm/hls.js@latest';
+
+ NativeHls.promise = NativeHls.promise || (0, _dom.loadScript)(settings.options.path);
+ NativeHls.promise.then(function () {
+ NativeHls._createPlayer(settings);
+ });
+ }
+
+ return NativeHls.promise;
+ },
+
+ _createPlayer: function _createPlayer(settings) {
+ var player = new Hls(settings.options);
+ _window2.default['__ready__' + settings.id](player);
+ return player;
+ }
+};
+
+var HlsNativeRenderer = {
+ name: 'native_hls',
+ options: {
+ prefix: 'native_hls',
+ hls: {
+ path: 'https://cdn.jsdelivr.net/npm/hls.js@latest',
+
+ autoStartLoad: false,
+ debug: false
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return _constants.HAS_MSE && ['application/x-mpegurl', 'application/vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) > -1;
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var originalNode = mediaElement.originalNode,
+ id = mediaElement.id + '_' + options.prefix,
+ preload = originalNode.getAttribute('preload'),
+ autoplay = originalNode.autoplay;
+
+ var hlsPlayer = null,
+ node = null,
+ index = 0,
+ total = mediaFiles.length;
+
+ node = originalNode.cloneNode(true);
+ options = Object.assign(options, mediaElement.options);
+ options.hls.autoStartLoad = preload && preload !== 'none' || autoplay;
+
+ var props = _mejs2.default.html5media.properties,
+ events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ attachNativeEvents = function attachNativeEvents(e) {
+ var event = (0, _general.createEvent)(e.type, mediaElement);
+ mediaElement.dispatchEvent(event);
+ },
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return hlsPlayer !== null ? node[propName] : null;
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ if (propName === 'src') {
+ node[propName] = (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && value.src ? value.src : value;
+ if (hlsPlayer !== null) {
+ hlsPlayer.destroy();
+ for (var i = 0, _total = events.length; i < _total; i++) {
+ node.removeEventListener(events[i], attachNativeEvents);
+ }
+ hlsPlayer = NativeHls._createPlayer({
+ options: options.hls,
+ id: id
+ });
+ hlsPlayer.loadSource(value);
+ hlsPlayer.attachMedia(node);
+ }
+ } else {
+ node[propName] = value;
+ }
+ }
+ };
+ };
+
+ for (var i = 0, _total2 = props.length; i < _total2; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ _window2.default['__ready__' + id] = function (_hlsPlayer) {
+ mediaElement.hlsPlayer = hlsPlayer = _hlsPlayer;
+ var hlsEvents = Hls.Events,
+ assignEvents = function assignEvents(eventName) {
+ if (eventName === 'loadedmetadata') {
+ var url = mediaElement.originalNode.src;
+ hlsPlayer.detachMedia();
+ hlsPlayer.loadSource(url);
+ hlsPlayer.attachMedia(node);
+ }
+
+ node.addEventListener(eventName, attachNativeEvents);
+ };
+
+ for (var _i = 0, _total3 = events.length; _i < _total3; _i++) {
+ assignEvents(events[_i]);
+ }
+
+ var recoverDecodingErrorDate = void 0,
+ recoverSwapAudioCodecDate = void 0;
+ var assignHlsEvents = function assignHlsEvents(name, data) {
+ if (name === 'hlsError') {
+ console.warn(data);
+ data = data[1];
+
+ if (data.fatal) {
+ switch (data.type) {
+ case 'mediaError':
+ var now = new Date().getTime();
+ if (!recoverDecodingErrorDate || now - recoverDecodingErrorDate > 3000) {
+ recoverDecodingErrorDate = new Date().getTime();
+ hlsPlayer.recoverMediaError();
+ } else if (!recoverSwapAudioCodecDate || now - recoverSwapAudioCodecDate > 3000) {
+ recoverSwapAudioCodecDate = new Date().getTime();
+ console.warn('Attempting to swap Audio Codec and recover from media error');
+ hlsPlayer.swapAudioCodec();
+ hlsPlayer.recoverMediaError();
+ } else {
+ var message = 'Cannot recover, last media error recovery failed';
+ mediaElement.generateError(message, node.src);
+ console.error(message);
+ }
+ break;
+ case 'networkError':
+ if (data.details === 'manifestLoadError') {
+ if (index < total && mediaFiles[index + 1] !== undefined) {
+ node.setSrc(mediaFiles[index++].src);
+ node.load();
+ node.play();
+ } else {
+ var _message = 'Network error';
+ mediaElement.generateError(_message, mediaFiles);
+ console.error(_message);
+ }
+ } else {
+ var _message2 = 'Network error';
+ mediaElement.generateError(_message2, mediaFiles);
+ console.error(_message2);
+ }
+ break;
+ default:
+ hlsPlayer.destroy();
+ break;
+ }
+ }
+ } else {
+ var _event = (0, _general.createEvent)(name, mediaElement);
+ _event.data = data;
+ mediaElement.dispatchEvent(_event);
+ }
+ };
+
+ var _loop = function _loop(eventType) {
+ if (hlsEvents.hasOwnProperty(eventType)) {
+ hlsPlayer.on(hlsEvents[eventType], function () {
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return assignHlsEvents(hlsEvents[eventType], args);
+ });
+ }
+ };
+
+ for (var eventType in hlsEvents) {
+ _loop(eventType);
+ }
+ };
+
+ if (total > 0) {
+ for (; index < total; index++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
+ node.setAttribute('src', mediaFiles[index].src);
+ break;
+ }
+ }
+ }
+
+ if (preload !== 'auto' && !autoplay) {
+ node.addEventListener('play', function () {
+ if (hlsPlayer !== null) {
+ hlsPlayer.startLoad();
+ }
+ });
+
+ node.addEventListener('pause', function () {
+ if (hlsPlayer !== null) {
+ hlsPlayer.stopLoad();
+ }
+ });
+ }
+
+ node.setAttribute('id', id);
+
+ originalNode.parentNode.insertBefore(node, originalNode);
+ originalNode.autoplay = false;
+ originalNode.style.display = 'none';
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ node.pause();
+ node.style.display = 'none';
+ return node;
+ };
+
+ node.show = function () {
+ node.style.display = '';
+ return node;
+ };
+
+ node.destroy = function () {
+ if (hlsPlayer !== null) {
+ hlsPlayer.stopLoad();
+ hlsPlayer.destroy();
+ }
+ };
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ mediaElement.promises.push(NativeHls.load({
+ options: options.hls,
+ id: id
+ }));
+
+ return node;
+ }
+};
+
+_media.typeChecks.push(function (url) {
+ return ~url.toLowerCase().indexOf('.m3u8') ? 'application/x-mpegURL' : null;
+});
+
+_renderer.renderer.add(HlsNativeRenderer);
+
+},{"16":16,"17":17,"18":18,"19":19,"3":3,"7":7,"8":8}],14:[function(_dereq_,module,exports){
+'use strict';
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _constants = _dereq_(16);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var HtmlMediaElement = {
+ name: 'html5',
+ options: {
+ prefix: 'html5'
+ },
+
+ canPlayType: function canPlayType(type) {
+
+ var mediaElement = _document2.default.createElement('video');
+
+ if (_constants.IS_ANDROID && /\/mp(3|4)$/i.test(type) || ~['application/x-mpegurl', 'vnd.apple.mpegurl', 'audio/mpegurl', 'audio/hls', 'video/hls'].indexOf(type.toLowerCase()) && _constants.SUPPORTS_NATIVE_HLS) {
+ return 'yes';
+ } else if (mediaElement.canPlayType) {
+ return mediaElement.canPlayType(type.toLowerCase()).replace(/no/, '');
+ } else {
+ return '';
+ }
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var id = mediaElement.id + '_' + options.prefix;
+ var isActive = false;
+
+ var node = null;
+
+ if (mediaElement.originalNode === undefined || mediaElement.originalNode === null) {
+ node = _document2.default.createElement('audio');
+ mediaElement.appendChild(node);
+ } else {
+ node = mediaElement.originalNode;
+ }
+
+ node.setAttribute('id', id);
+
+ var props = _mejs2.default.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ node['get' + capName] = function () {
+ return node[propName];
+ };
+
+ node['set' + capName] = function (value) {
+ if (_mejs2.default.html5media.readOnlyProperties.indexOf(propName) === -1) {
+ node[propName] = value;
+ }
+ };
+ };
+
+ for (var i = 0, _total = props.length; i < _total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var events = _mejs2.default.html5media.events.concat(['click', 'mouseover', 'mouseout']).filter(function (e) {
+ return e !== 'error';
+ }),
+ assignEvents = function assignEvents(eventName) {
+ node.addEventListener(eventName, function (e) {
+ if (isActive) {
+ var _event = (0, _general.createEvent)(e.type, e.target);
+ mediaElement.dispatchEvent(_event);
+ }
+ });
+ };
+
+ for (var _i = 0, _total2 = events.length; _i < _total2; _i++) {
+ assignEvents(events[_i]);
+ }
+
+ node.setSize = function (width, height) {
+ node.style.width = width + 'px';
+ node.style.height = height + 'px';
+ return node;
+ };
+
+ node.hide = function () {
+ isActive = false;
+ node.style.display = 'none';
+
+ return node;
+ };
+
+ node.show = function () {
+ isActive = true;
+ node.style.display = '';
+
+ return node;
+ };
+
+ var index = 0,
+ total = mediaFiles.length;
+ if (total > 0) {
+ for (; index < total; index++) {
+ if (_renderer.renderer.renderers[options.prefix].canPlayType(mediaFiles[index].type)) {
+ node.setAttribute('src', mediaFiles[index].src);
+ break;
+ }
+ }
+ }
+
+ node.addEventListener('error', function (e) {
+ if (e.target.error.code === 4 && isActive) {
+ if (index < total && mediaFiles[index + 1] !== undefined) {
+ node.src = mediaFiles[index++].src;
+ node.load();
+ node.play();
+ } else {
+ mediaElement.generateError('Media error: Format(s) not supported or source(s) not found', mediaFiles);
+ }
+ }
+ });
+
+ var event = (0, _general.createEvent)('rendererready', node);
+ mediaElement.dispatchEvent(event);
+
+ return node;
+ }
+};
+
+_window2.default.HtmlMediaElement = _mejs2.default.HtmlMediaElement = HtmlMediaElement;
+
+_renderer.renderer.add(HtmlMediaElement);
+
+},{"16":16,"18":18,"2":2,"3":3,"7":7,"8":8}],15:[function(_dereq_,module,exports){
+'use strict';
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _renderer = _dereq_(8);
+
+var _general = _dereq_(18);
+
+var _media = _dereq_(19);
+
+var _dom = _dereq_(17);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var YouTubeApi = {
+ isIframeStarted: false,
+
+ isIframeLoaded: false,
+
+ iframeQueue: [],
+
+ enqueueIframe: function enqueueIframe(settings) {
+ YouTubeApi.isLoaded = typeof YT !== 'undefined' && YT.loaded;
+
+ if (YouTubeApi.isLoaded) {
+ YouTubeApi.createIframe(settings);
+ } else {
+ YouTubeApi.loadIframeApi();
+ YouTubeApi.iframeQueue.push(settings);
+ }
+ },
+
+ loadIframeApi: function loadIframeApi() {
+ if (!YouTubeApi.isIframeStarted) {
+ (0, _dom.loadScript)('https://www.youtube.com/player_api');
+ YouTubeApi.isIframeStarted = true;
+ }
+ },
+
+ iFrameReady: function iFrameReady() {
+
+ YouTubeApi.isLoaded = true;
+ YouTubeApi.isIframeLoaded = true;
+
+ while (YouTubeApi.iframeQueue.length > 0) {
+ var settings = YouTubeApi.iframeQueue.pop();
+ YouTubeApi.createIframe(settings);
+ }
+ },
+
+ createIframe: function createIframe(settings) {
+ return new YT.Player(settings.containerId, settings);
+ },
+
+ getYouTubeId: function getYouTubeId(url) {
+
+ var youTubeId = '';
+
+ if (url.indexOf('?') > 0) {
+ youTubeId = YouTubeApi.getYouTubeIdFromParam(url);
+
+ if (youTubeId === '') {
+ youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
+ }
+ } else {
+ youTubeId = YouTubeApi.getYouTubeIdFromUrl(url);
+ }
+
+ var id = youTubeId.substring(youTubeId.lastIndexOf('/') + 1);
+ youTubeId = id.split('?');
+ return youTubeId[0];
+ },
+
+ getYouTubeIdFromParam: function getYouTubeIdFromParam(url) {
+
+ if (url === undefined || url === null || !url.trim().length) {
+ return null;
+ }
+
+ var parts = url.split('?'),
+ parameters = parts[1].split('&');
+
+ var youTubeId = '';
+
+ for (var i = 0, total = parameters.length; i < total; i++) {
+ var paramParts = parameters[i].split('=');
+ if (paramParts[0] === 'v') {
+ youTubeId = paramParts[1];
+ break;
+ }
+ }
+
+ return youTubeId;
+ },
+
+ getYouTubeIdFromUrl: function getYouTubeIdFromUrl(url) {
+
+ if (url === undefined || url === null || !url.trim().length) {
+ return null;
+ }
+
+ var parts = url.split('?');
+ url = parts[0];
+ return url.substring(url.lastIndexOf('/') + 1);
+ },
+
+ getYouTubeNoCookieUrl: function getYouTubeNoCookieUrl(url) {
+ if (url === undefined || url === null || !url.trim().length || url.indexOf('//www.youtube') === -1) {
+ return url;
+ }
+
+ var parts = url.split('/');
+ parts[2] = parts[2].replace('.com', '-nocookie.com');
+ return parts.join('/');
+ }
+};
+
+var YouTubeIframeRenderer = {
+ name: 'youtube_iframe',
+
+ options: {
+ prefix: 'youtube_iframe',
+
+ youtube: {
+ autoplay: 0,
+ controls: 0,
+ disablekb: 1,
+ end: 0,
+ loop: 0,
+ modestbranding: 0,
+ playsinline: 0,
+ rel: 0,
+ showinfo: 0,
+ start: 0,
+ iv_load_policy: 3,
+
+ nocookie: false,
+
+ imageQuality: null
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['video/youtube', 'video/x-youtube'].indexOf(type.toLowerCase());
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var youtube = {},
+ apiStack = [],
+ readyState = 4;
+
+ var youTubeApi = null,
+ paused = true,
+ ended = false,
+ youTubeIframe = null,
+ volume = 1;
+
+ youtube.options = options;
+ youtube.id = mediaElement.id + '_' + options.prefix;
+ youtube.mediaElement = mediaElement;
+
+ var props = _mejs2.default.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ youtube['get' + capName] = function () {
+ if (youTubeApi !== null) {
+ var value = null;
+
+ switch (propName) {
+ case 'currentTime':
+ return youTubeApi.getCurrentTime();
+ case 'duration':
+ return youTubeApi.getDuration();
+ case 'volume':
+ volume = youTubeApi.getVolume() / 100;
+ return volume;
+ case 'paused':
+ return paused;
+ case 'ended':
+ return ended;
+ case 'muted':
+ return youTubeApi.isMuted();
+ case 'buffered':
+ var percentLoaded = youTubeApi.getVideoLoadedFraction(),
+ duration = youTubeApi.getDuration();
+ return {
+ start: function start() {
+ return 0;
+ },
+ end: function end() {
+ return percentLoaded * duration;
+ },
+ length: 1
+ };
+ case 'src':
+ return youTubeApi.getVideoUrl();
+ case 'readyState':
+ return readyState;
+ }
+
+ return value;
+ } else {
+ return null;
+ }
+ };
+
+ youtube['set' + capName] = function (value) {
+ if (youTubeApi !== null) {
+ switch (propName) {
+ case 'src':
+ var url = typeof value === 'string' ? value : value[0].src,
+ _videoId = YouTubeApi.getYouTubeId(url);
+
+ if (mediaElement.originalNode.autoplay) {
+ youTubeApi.loadVideoById(_videoId);
+ } else {
+ youTubeApi.cueVideoById(_videoId);
+ }
+ break;
+ case 'currentTime':
+ youTubeApi.seekTo(value);
+ break;
+ case 'muted':
+ if (value) {
+ youTubeApi.mute();
+ } else {
+ youTubeApi.unMute();
+ }
+ setTimeout(function () {
+ var event = (0, _general.createEvent)('volumechange', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'volume':
+ volume = value;
+ youTubeApi.setVolume(value * 100);
+ setTimeout(function () {
+ var event = (0, _general.createEvent)('volumechange', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'readyState':
+ var event = (0, _general.createEvent)('canplay', youtube);
+ mediaElement.dispatchEvent(event);
+ break;
+ default:
+
+ break;
+ }
+ } else {
+ apiStack.push({ type: 'set', propName: propName, value: value });
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var methods = _mejs2.default.html5media.methods,
+ assignMethods = function assignMethods(methodName) {
+ youtube[methodName] = function () {
+ if (youTubeApi !== null) {
+ switch (methodName) {
+ case 'play':
+ paused = false;
+ return youTubeApi.playVideo();
+ case 'pause':
+ paused = true;
+ return youTubeApi.pauseVideo();
+ case 'load':
+ return null;
+ }
+ } else {
+ apiStack.push({ type: 'call', methodName: methodName });
+ }
+ };
+ };
+
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
+ assignMethods(methods[_i]);
+ }
+
+ var errorHandler = function errorHandler(error) {
+ var message = '';
+ switch (error.data) {
+ case 2:
+ message = 'The request contains an invalid parameter value. Verify that video ID has 11 characters and that contains no invalid characters, such as exclamation points or asterisks.';
+ break;
+ case 5:
+ message = 'The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.';
+ break;
+ case 100:
+ message = 'The video requested was not found. Either video has been removed or has been marked as private.';
+ break;
+ case 101:
+ case 105:
+ message = 'The owner of the requested video does not allow it to be played in embedded players.';
+ break;
+ default:
+ message = 'Unknown error.';
+ break;
+ }
+ mediaElement.generateError('Code ' + error.data + ': ' + message, mediaFiles);
+ };
+
+ var youtubeContainer = _document2.default.createElement('div');
+ youtubeContainer.id = youtube.id;
+
+ if (youtube.options.youtube.nocookie) {
+ mediaElement.originalNode.src = YouTubeApi.getYouTubeNoCookieUrl(mediaFiles[0].src);
+ }
+
+ mediaElement.originalNode.parentNode.insertBefore(youtubeContainer, mediaElement.originalNode);
+ mediaElement.originalNode.style.display = 'none';
+
+ var isAudio = mediaElement.originalNode.tagName.toLowerCase() === 'audio',
+ height = isAudio ? '1' : mediaElement.originalNode.height,
+ width = isAudio ? '1' : mediaElement.originalNode.width,
+ videoId = YouTubeApi.getYouTubeId(mediaFiles[0].src),
+ youtubeSettings = {
+ id: youtube.id,
+ containerId: youtubeContainer.id,
+ videoId: videoId,
+ height: height,
+ width: width,
+ playerVars: Object.assign({
+ controls: 0,
+ rel: 0,
+ disablekb: 1,
+ showinfo: 0,
+ modestbranding: 0,
+ html5: 1,
+ iv_load_policy: 3
+ }, youtube.options.youtube),
+ origin: _window2.default.location.host,
+ events: {
+ onReady: function onReady(e) {
+ mediaElement.youTubeApi = youTubeApi = e.target;
+ mediaElement.youTubeState = {
+ paused: true,
+ ended: false
+ };
+
+ if (apiStack.length) {
+ for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {
+
+ var stackItem = apiStack[_i2];
+
+ if (stackItem.type === 'set') {
+ var propName = stackItem.propName,
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ youtube['set' + capName](stackItem.value);
+ } else if (stackItem.type === 'call') {
+ youtube[stackItem.methodName]();
+ }
+ }
+ }
+
+ youTubeIframe = youTubeApi.getIframe();
+
+ if (mediaElement.originalNode.muted) {
+ youTubeApi.mute();
+ }
+
+ var events = ['mouseover', 'mouseout'],
+ assignEvents = function assignEvents(e) {
+ var newEvent = (0, _general.createEvent)(e.type, youtube);
+ mediaElement.dispatchEvent(newEvent);
+ };
+
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
+ youTubeIframe.addEventListener(events[_i3], assignEvents, false);
+ }
+
+ var initEvents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];
+
+ for (var _i4 = 0, _total4 = initEvents.length; _i4 < _total4; _i4++) {
+ var event = (0, _general.createEvent)(initEvents[_i4], youtube);
+ mediaElement.dispatchEvent(event);
+ }
+ },
+ onStateChange: function onStateChange(e) {
+ var events = [];
+
+ switch (e.data) {
+ case -1:
+ events = ['loadedmetadata'];
+ paused = true;
+ ended = false;
+ break;
+ case 0:
+ events = ['ended'];
+ paused = false;
+ ended = !youtube.options.youtube.loop;
+ if (!youtube.options.youtube.loop) {
+ youtube.stopInterval();
+ }
+ break;
+ case 1:
+ events = ['play', 'playing'];
+ paused = false;
+ ended = false;
+ youtube.startInterval();
+ break;
+ case 2:
+ events = ['pause'];
+ paused = true;
+ ended = false;
+ youtube.stopInterval();
+ break;
+ case 3:
+ events = ['progress'];
+ ended = false;
+ break;
+ case 5:
+ events = ['loadeddata', 'loadedmetadata', 'canplay'];
+ paused = true;
+ ended = false;
+ break;
+ }
+
+ for (var _i5 = 0, _total5 = events.length; _i5 < _total5; _i5++) {
+ var event = (0, _general.createEvent)(events[_i5], youtube);
+ mediaElement.dispatchEvent(event);
+ }
+ },
+ onError: function onError(e) {
+ return errorHandler(e);
+ }
+ }
+ };
+
+ if (isAudio || mediaElement.originalNode.hasAttribute('playsinline')) {
+ youtubeSettings.playerVars.playsinline = 1;
+ }
+
+ if (mediaElement.originalNode.controls) {
+ youtubeSettings.playerVars.controls = 1;
+ }
+ if (mediaElement.originalNode.autoplay) {
+ youtubeSettings.playerVars.autoplay = 1;
+ }
+ if (mediaElement.originalNode.loop) {
+ youtubeSettings.playerVars.loop = 1;
+ }
+
+ if ((youtubeSettings.playerVars.loop && parseInt(youtubeSettings.playerVars.loop, 10) === 1 || mediaElement.originalNode.src.indexOf('loop=') > -1) && !youtubeSettings.playerVars.playlist && mediaElement.originalNode.src.indexOf('playlist=') === -1) {
+ youtubeSettings.playerVars.playlist = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
+ }
+
+ YouTubeApi.enqueueIframe(youtubeSettings);
+
+ youtube.onEvent = function (eventName, player, _youTubeState) {
+ if (_youTubeState !== null && _youTubeState !== undefined) {
+ mediaElement.youTubeState = _youTubeState;
+ }
+ };
+
+ youtube.setSize = function (width, height) {
+ if (youTubeApi !== null) {
+ youTubeApi.setSize(width, height);
+ }
+ };
+ youtube.hide = function () {
+ youtube.stopInterval();
+ youtube.pause();
+ if (youTubeIframe) {
+ youTubeIframe.style.display = 'none';
+ }
+ };
+ youtube.show = function () {
+ if (youTubeIframe) {
+ youTubeIframe.style.display = '';
+ }
+ };
+ youtube.destroy = function () {
+ youTubeApi.destroy();
+ };
+ youtube.interval = null;
+
+ youtube.startInterval = function () {
+ youtube.interval = setInterval(function () {
+ var event = (0, _general.createEvent)('timeupdate', youtube);
+ mediaElement.dispatchEvent(event);
+ }, 250);
+ };
+ youtube.stopInterval = function () {
+ if (youtube.interval) {
+ clearInterval(youtube.interval);
+ }
+ };
+ youtube.getPosterUrl = function () {
+ var quality = options.youtube.imageQuality,
+ resolutions = ['default', 'hqdefault', 'mqdefault', 'sddefault', 'maxresdefault'],
+ id = YouTubeApi.getYouTubeId(mediaElement.originalNode.src);
+ return quality && resolutions.indexOf(quality) > -1 && id ? 'https://img.youtube.com/vi/' + id + '/' + quality + '.jpg' : '';
+ };
+
+ return youtube;
+ }
+};
+
+_window2.default.onYouTubePlayerAPIReady = function () {
+ YouTubeApi.iFrameReady();
+};
+
+_media.typeChecks.push(function (url) {
+ return (/\/\/(www\.youtube|youtu\.?be)/i.test(url) ? 'video/x-youtube' : null
+ );
+});
+
+_renderer.renderer.add(YouTubeIframeRenderer);
+
+},{"17":17,"18":18,"19":19,"2":2,"3":3,"7":7,"8":8}],16:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.cancelFullScreen = exports.requestFullScreen = exports.isFullScreen = exports.FULLSCREEN_EVENT_NAME = exports.HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = exports.SUPPORTS_NATIVE_HLS = exports.SUPPORT_PASSIVE_EVENT = exports.SUPPORT_POINTER_EVENTS = exports.HAS_MSE = exports.IS_STOCK_ANDROID = exports.IS_SAFARI = exports.IS_FIREFOX = exports.IS_CHROME = exports.IS_EDGE = exports.IS_IE = exports.IS_ANDROID = exports.IS_IOS = exports.IS_IPOD = exports.IS_IPHONE = exports.IS_IPAD = exports.UA = exports.NAV = undefined;
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var NAV = exports.NAV = _window2.default.navigator;
+var UA = exports.UA = NAV.userAgent.toLowerCase();
+var IS_IPAD = exports.IS_IPAD = /ipad/i.test(UA) && !_window2.default.MSStream;
+var IS_IPHONE = exports.IS_IPHONE = /iphone/i.test(UA) && !_window2.default.MSStream;
+var IS_IPOD = exports.IS_IPOD = /ipod/i.test(UA) && !_window2.default.MSStream;
+var IS_IOS = exports.IS_IOS = /ipad|iphone|ipod/i.test(UA) && !_window2.default.MSStream;
+var IS_ANDROID = exports.IS_ANDROID = /android/i.test(UA);
+var IS_IE = exports.IS_IE = /(trident|microsoft)/i.test(NAV.appName);
+var IS_EDGE = exports.IS_EDGE = 'msLaunchUri' in NAV && !('documentMode' in _document2.default);
+var IS_CHROME = exports.IS_CHROME = /chrome/i.test(UA);
+var IS_FIREFOX = exports.IS_FIREFOX = /firefox/i.test(UA);
+var IS_SAFARI = exports.IS_SAFARI = /safari/i.test(UA) && !IS_CHROME;
+var IS_STOCK_ANDROID = exports.IS_STOCK_ANDROID = /^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(UA);
+var HAS_MSE = exports.HAS_MSE = 'MediaSource' in _window2.default;
+var SUPPORT_POINTER_EVENTS = exports.SUPPORT_POINTER_EVENTS = function () {
+ var element = _document2.default.createElement('x'),
+ documentElement = _document2.default.documentElement,
+ getComputedStyle = _window2.default.getComputedStyle;
+
+ if (!('pointerEvents' in element.style)) {
+ return false;
+ }
+
+ element.style.pointerEvents = 'auto';
+ element.style.pointerEvents = 'x';
+ documentElement.appendChild(element);
+ var supports = getComputedStyle && getComputedStyle(element, '').pointerEvents === 'auto';
+ element.remove();
+ return !!supports;
+}();
+
+var SUPPORT_PASSIVE_EVENT = exports.SUPPORT_PASSIVE_EVENT = function () {
+ var supportsPassive = false;
+ try {
+ var opts = Object.defineProperty({}, 'passive', {
+ get: function get() {
+ supportsPassive = true;
+ }
+ });
+ _window2.default.addEventListener('test', null, opts);
+ } catch (e) {}
+
+ return supportsPassive;
+}();
+
+var html5Elements = ['source', 'track', 'audio', 'video'];
+var video = void 0;
+
+for (var i = 0, total = html5Elements.length; i < total; i++) {
+ video = _document2.default.createElement(html5Elements[i]);
+}
+
+var SUPPORTS_NATIVE_HLS = exports.SUPPORTS_NATIVE_HLS = IS_SAFARI || IS_ANDROID && (IS_CHROME || IS_STOCK_ANDROID) || IS_IE && /edge/i.test(UA);
+
+var hasiOSFullScreen = video.webkitEnterFullscreen !== undefined;
+
+var hasNativeFullscreen = video.requestFullscreen !== undefined;
+
+if (hasiOSFullScreen && /mac os x 10_5/i.test(UA)) {
+ hasNativeFullscreen = false;
+ hasiOSFullScreen = false;
+}
+
+var hasWebkitNativeFullScreen = video.webkitRequestFullScreen !== undefined;
+var hasMozNativeFullScreen = video.mozRequestFullScreen !== undefined;
+var hasMsNativeFullScreen = video.msRequestFullscreen !== undefined;
+var hasTrueNativeFullScreen = hasWebkitNativeFullScreen || hasMozNativeFullScreen || hasMsNativeFullScreen;
+var nativeFullScreenEnabled = hasTrueNativeFullScreen;
+var fullScreenEventName = '';
+var isFullScreen = void 0,
+ requestFullScreen = void 0,
+ cancelFullScreen = void 0;
+
+if (hasMozNativeFullScreen) {
+ nativeFullScreenEnabled = _document2.default.mozFullScreenEnabled;
+} else if (hasMsNativeFullScreen) {
+ nativeFullScreenEnabled = _document2.default.msFullscreenEnabled;
+}
+
+if (IS_CHROME) {
+ hasiOSFullScreen = false;
+}
+
+if (hasTrueNativeFullScreen) {
+ if (hasWebkitNativeFullScreen) {
+ fullScreenEventName = 'webkitfullscreenchange';
+ } else if (hasMozNativeFullScreen) {
+ fullScreenEventName = 'mozfullscreenchange';
+ } else if (hasMsNativeFullScreen) {
+ fullScreenEventName = 'MSFullscreenChange';
+ }
+
+ exports.isFullScreen = isFullScreen = function isFullScreen() {
+ if (hasMozNativeFullScreen) {
+ return _document2.default.mozFullScreen;
+ } else if (hasWebkitNativeFullScreen) {
+ return _document2.default.webkitIsFullScreen;
+ } else if (hasMsNativeFullScreen) {
+ return _document2.default.msFullscreenElement !== null;
+ }
+ };
+
+ exports.requestFullScreen = requestFullScreen = function requestFullScreen(el) {
+ if (hasWebkitNativeFullScreen) {
+ el.webkitRequestFullScreen();
+ } else if (hasMozNativeFullScreen) {
+ el.mozRequestFullScreen();
+ } else if (hasMsNativeFullScreen) {
+ el.msRequestFullscreen();
+ }
+ };
+
+ exports.cancelFullScreen = cancelFullScreen = function cancelFullScreen() {
+ if (hasWebkitNativeFullScreen) {
+ _document2.default.webkitCancelFullScreen();
+ } else if (hasMozNativeFullScreen) {
+ _document2.default.mozCancelFullScreen();
+ } else if (hasMsNativeFullScreen) {
+ _document2.default.msExitFullscreen();
+ }
+ };
+}
+
+var HAS_NATIVE_FULLSCREEN = exports.HAS_NATIVE_FULLSCREEN = hasNativeFullscreen;
+var HAS_WEBKIT_NATIVE_FULLSCREEN = exports.HAS_WEBKIT_NATIVE_FULLSCREEN = hasWebkitNativeFullScreen;
+var HAS_MOZ_NATIVE_FULLSCREEN = exports.HAS_MOZ_NATIVE_FULLSCREEN = hasMozNativeFullScreen;
+var HAS_MS_NATIVE_FULLSCREEN = exports.HAS_MS_NATIVE_FULLSCREEN = hasMsNativeFullScreen;
+var HAS_IOS_FULLSCREEN = exports.HAS_IOS_FULLSCREEN = hasiOSFullScreen;
+var HAS_TRUE_NATIVE_FULLSCREEN = exports.HAS_TRUE_NATIVE_FULLSCREEN = hasTrueNativeFullScreen;
+var HAS_NATIVE_FULLSCREEN_ENABLED = exports.HAS_NATIVE_FULLSCREEN_ENABLED = nativeFullScreenEnabled;
+var FULLSCREEN_EVENT_NAME = exports.FULLSCREEN_EVENT_NAME = fullScreenEventName;
+exports.isFullScreen = isFullScreen;
+exports.requestFullScreen = requestFullScreen;
+exports.cancelFullScreen = cancelFullScreen;
+
+
+_mejs2.default.Features = _mejs2.default.Features || {};
+_mejs2.default.Features.isiPad = IS_IPAD;
+_mejs2.default.Features.isiPod = IS_IPOD;
+_mejs2.default.Features.isiPhone = IS_IPHONE;
+_mejs2.default.Features.isiOS = _mejs2.default.Features.isiPhone || _mejs2.default.Features.isiPad;
+_mejs2.default.Features.isAndroid = IS_ANDROID;
+_mejs2.default.Features.isIE = IS_IE;
+_mejs2.default.Features.isEdge = IS_EDGE;
+_mejs2.default.Features.isChrome = IS_CHROME;
+_mejs2.default.Features.isFirefox = IS_FIREFOX;
+_mejs2.default.Features.isSafari = IS_SAFARI;
+_mejs2.default.Features.isStockAndroid = IS_STOCK_ANDROID;
+_mejs2.default.Features.hasMSE = HAS_MSE;
+_mejs2.default.Features.supportsNativeHLS = SUPPORTS_NATIVE_HLS;
+_mejs2.default.Features.supportsPointerEvents = SUPPORT_POINTER_EVENTS;
+_mejs2.default.Features.supportsPassiveEvent = SUPPORT_PASSIVE_EVENT;
+_mejs2.default.Features.hasiOSFullScreen = HAS_IOS_FULLSCREEN;
+_mejs2.default.Features.hasNativeFullscreen = HAS_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasWebkitNativeFullScreen = HAS_WEBKIT_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasMozNativeFullScreen = HAS_MOZ_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasMsNativeFullScreen = HAS_MS_NATIVE_FULLSCREEN;
+_mejs2.default.Features.hasTrueNativeFullScreen = HAS_TRUE_NATIVE_FULLSCREEN;
+_mejs2.default.Features.nativeFullScreenEnabled = HAS_NATIVE_FULLSCREEN_ENABLED;
+_mejs2.default.Features.fullScreenEventName = FULLSCREEN_EVENT_NAME;
+_mejs2.default.Features.isFullScreen = isFullScreen;
+_mejs2.default.Features.requestFullScreen = requestFullScreen;
+_mejs2.default.Features.cancelFullScreen = cancelFullScreen;
+
+},{"2":2,"3":3,"7":7}],17:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.removeClass = exports.addClass = exports.hasClass = undefined;
+exports.loadScript = loadScript;
+exports.offset = offset;
+exports.toggleClass = toggleClass;
+exports.fadeOut = fadeOut;
+exports.fadeIn = fadeIn;
+exports.siblings = siblings;
+exports.visible = visible;
+exports.ajax = ajax;
+
+var _window = _dereq_(3);
+
+var _window2 = _interopRequireDefault(_window);
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function loadScript(url) {
+ return new Promise(function (resolve, reject) {
+ var script = _document2.default.createElement('script');
+ script.src = url;
+ script.async = true;
+ script.onload = function () {
+ script.remove();
+ resolve();
+ };
+ script.onerror = function () {
+ script.remove();
+ reject();
+ };
+ _document2.default.head.appendChild(script);
+ });
+}
+
+function offset(el) {
+ var rect = el.getBoundingClientRect(),
+ scrollLeft = _window2.default.pageXOffset || _document2.default.documentElement.scrollLeft,
+ scrollTop = _window2.default.pageYOffset || _document2.default.documentElement.scrollTop;
+ return { top: rect.top + scrollTop, left: rect.left + scrollLeft };
+}
+
+var hasClassMethod = void 0,
+ addClassMethod = void 0,
+ removeClassMethod = void 0;
+
+if ('classList' in _document2.default.documentElement) {
+ hasClassMethod = function hasClassMethod(el, className) {
+ return el.classList !== undefined && el.classList.contains(className);
+ };
+ addClassMethod = function addClassMethod(el, className) {
+ return el.classList.add(className);
+ };
+ removeClassMethod = function removeClassMethod(el, className) {
+ return el.classList.remove(className);
+ };
+} else {
+ hasClassMethod = function hasClassMethod(el, className) {
+ return new RegExp('\\b' + className + '\\b').test(el.className);
+ };
+ addClassMethod = function addClassMethod(el, className) {
+ if (!hasClass(el, className)) {
+ el.className += ' ' + className;
+ }
+ };
+ removeClassMethod = function removeClassMethod(el, className) {
+ el.className = el.className.replace(new RegExp('\\b' + className + '\\b', 'g'), '');
+ };
+}
+
+var hasClass = exports.hasClass = hasClassMethod;
+var addClass = exports.addClass = addClassMethod;
+var removeClass = exports.removeClass = removeClassMethod;
+
+function toggleClass(el, className) {
+ hasClass(el, className) ? removeClass(el, className) : addClass(el, className);
+}
+
+function fadeOut(el) {
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
+ var callback = arguments[2];
+
+ if (!el.style.opacity) {
+ el.style.opacity = 1;
+ }
+
+ var start = null;
+ _window2.default.requestAnimationFrame(function animate(timestamp) {
+ start = start || timestamp;
+ var progress = timestamp - start;
+ var opacity = parseFloat(1 - progress / duration, 2);
+ el.style.opacity = opacity < 0 ? 0 : opacity;
+ if (progress > duration) {
+ if (callback && typeof callback === 'function') {
+ callback();
+ }
+ } else {
+ _window2.default.requestAnimationFrame(animate);
+ }
+ });
+}
+
+function fadeIn(el) {
+ var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 400;
+ var callback = arguments[2];
+
+ if (!el.style.opacity) {
+ el.style.opacity = 0;
+ }
+
+ var start = null;
+ _window2.default.requestAnimationFrame(function animate(timestamp) {
+ start = start || timestamp;
+ var progress = timestamp - start;
+ var opacity = parseFloat(progress / duration, 2);
+ el.style.opacity = opacity > 1 ? 1 : opacity;
+ if (progress > duration) {
+ if (callback && typeof callback === 'function') {
+ callback();
+ }
+ } else {
+ _window2.default.requestAnimationFrame(animate);
+ }
+ });
+}
+
+function siblings(el, filter) {
+ var siblings = [];
+ el = el.parentNode.firstChild;
+ do {
+ if (!filter || filter(el)) {
+ siblings.push(el);
+ }
+ } while (el = el.nextSibling);
+ return siblings;
+}
+
+function visible(elem) {
+ if (elem.getClientRects !== undefined && elem.getClientRects === 'function') {
+ return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
+ }
+ return !!(elem.offsetWidth || elem.offsetHeight);
+}
+
+function ajax(url, dataType, success, error) {
+ var xhr = _window2.default.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
+
+ var type = 'application/x-www-form-urlencoded; charset=UTF-8',
+ completed = false,
+ accept = '*/'.concat('*');
+
+ switch (dataType) {
+ case 'text':
+ type = 'text/plain';
+ break;
+ case 'json':
+ type = 'application/json, text/javascript';
+ break;
+ case 'html':
+ type = 'text/html';
+ break;
+ case 'xml':
+ type = 'application/xml, text/xml';
+ break;
+ }
+
+ if (type !== 'application/x-www-form-urlencoded') {
+ accept = type + ', */*; q=0.01';
+ }
+
+ if (xhr) {
+ xhr.open('GET', url, true);
+ xhr.setRequestHeader('Accept', accept);
+ xhr.onreadystatechange = function () {
+ if (completed) {
+ return;
+ }
+
+ if (xhr.readyState === 4) {
+ if (xhr.status === 200) {
+ completed = true;
+ var data = void 0;
+ switch (dataType) {
+ case 'json':
+ data = JSON.parse(xhr.responseText);
+ break;
+ case 'xml':
+ data = xhr.responseXML;
+ break;
+ default:
+ data = xhr.responseText;
+ break;
+ }
+ success(data);
+ } else if (typeof error === 'function') {
+ error(xhr.status);
+ }
+ }
+ };
+
+ xhr.send();
+ }
+}
+
+_mejs2.default.Utils = _mejs2.default.Utils || {};
+_mejs2.default.Utils.offset = offset;
+_mejs2.default.Utils.hasClass = hasClass;
+_mejs2.default.Utils.addClass = addClass;
+_mejs2.default.Utils.removeClass = removeClass;
+_mejs2.default.Utils.toggleClass = toggleClass;
+_mejs2.default.Utils.fadeIn = fadeIn;
+_mejs2.default.Utils.fadeOut = fadeOut;
+_mejs2.default.Utils.siblings = siblings;
+_mejs2.default.Utils.visible = visible;
+_mejs2.default.Utils.ajax = ajax;
+_mejs2.default.Utils.loadScript = loadScript;
+
+},{"2":2,"3":3,"7":7}],18:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.escapeHTML = escapeHTML;
+exports.debounce = debounce;
+exports.isObjectEmpty = isObjectEmpty;
+exports.splitEvents = splitEvents;
+exports.createEvent = createEvent;
+exports.isNodeAfter = isNodeAfter;
+exports.isString = isString;
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+function escapeHTML(input) {
+
+ if (typeof input !== 'string') {
+ throw new Error('Argument passed must be a string');
+ }
+
+ var map = {
+ '&': '&',
+ '<': '<',
+ '>': '>',
+ '"': '"'
+ };
+
+ return input.replace(/[&<>"]/g, function (c) {
+ return map[c];
+ });
+}
+
+function debounce(func, wait) {
+ var _this = this,
+ _arguments = arguments;
+
+ var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+
+
+ if (typeof func !== 'function') {
+ throw new Error('First argument must be a function');
+ }
+
+ if (typeof wait !== 'number') {
+ throw new Error('Second argument must be a numeric value');
+ }
+
+ var timeout = void 0;
+ return function () {
+ var context = _this,
+ args = _arguments;
+ var later = function later() {
+ timeout = null;
+ if (!immediate) {
+ func.apply(context, args);
+ }
+ };
+ var callNow = immediate && !timeout;
+ clearTimeout(timeout);
+ timeout = setTimeout(later, wait);
+
+ if (callNow) {
+ func.apply(context, args);
+ }
+ };
+}
+
+function isObjectEmpty(instance) {
+ return Object.getOwnPropertyNames(instance).length <= 0;
+}
+
+function splitEvents(events, id) {
+ var rwindow = /^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;
+
+ var ret = { d: [], w: [] };
+ (events || '').split(' ').forEach(function (v) {
+ var eventName = '' + v + (id ? '.' + id : '');
+
+ if (eventName.startsWith('.')) {
+ ret.d.push(eventName);
+ ret.w.push(eventName);
+ } else {
+ ret[rwindow.test(v) ? 'w' : 'd'].push(eventName);
+ }
+ });
+
+ ret.d = ret.d.join(' ');
+ ret.w = ret.w.join(' ');
+ return ret;
+}
+
+function createEvent(eventName, target) {
+
+ if (typeof eventName !== 'string') {
+ throw new Error('Event name must be a string');
+ }
+
+ var eventFrags = eventName.match(/([a-z]+\.([a-z]+))/i),
+ detail = {
+ target: target
+ };
+
+ if (eventFrags !== null) {
+ eventName = eventFrags[1];
+ detail.namespace = eventFrags[2];
+ }
+
+ return new window.CustomEvent(eventName, {
+ detail: detail
+ });
+}
+
+function isNodeAfter(sourceNode, targetNode) {
+
+ return !!(sourceNode && targetNode && sourceNode.compareDocumentPosition(targetNode) & 2);
+}
+
+function isString(value) {
+ return typeof value === 'string';
+}
+
+_mejs2.default.Utils = _mejs2.default.Utils || {};
+_mejs2.default.Utils.escapeHTML = escapeHTML;
+_mejs2.default.Utils.debounce = debounce;
+_mejs2.default.Utils.isObjectEmpty = isObjectEmpty;
+_mejs2.default.Utils.splitEvents = splitEvents;
+_mejs2.default.Utils.createEvent = createEvent;
+_mejs2.default.Utils.isNodeAfter = isNodeAfter;
+_mejs2.default.Utils.isString = isString;
+
+},{"7":7}],19:[function(_dereq_,module,exports){
+'use strict';
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.typeChecks = undefined;
+exports.absolutizeUrl = absolutizeUrl;
+exports.formatType = formatType;
+exports.getMimeFromType = getMimeFromType;
+exports.getTypeFromFile = getTypeFromFile;
+exports.getExtension = getExtension;
+exports.normalizeExtension = normalizeExtension;
+
+var _mejs = _dereq_(7);
+
+var _mejs2 = _interopRequireDefault(_mejs);
+
+var _general = _dereq_(18);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+var typeChecks = exports.typeChecks = [];
+
+function absolutizeUrl(url) {
+
+ if (typeof url !== 'string') {
+ throw new Error('`url` argument must be a string');
+ }
+
+ var el = document.createElement('div');
+ el.innerHTML = 'x ';
+ return el.firstChild.href;
+}
+
+function formatType(url) {
+ var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
+
+ return url && !type ? getTypeFromFile(url) : type;
+}
+
+function getMimeFromType(type) {
+
+ if (typeof type !== 'string') {
+ throw new Error('`type` argument must be a string');
+ }
+
+ return type && type.indexOf(';') > -1 ? type.substr(0, type.indexOf(';')) : type;
+}
+
+function getTypeFromFile(url) {
+
+ if (typeof url !== 'string') {
+ throw new Error('`url` argument must be a string');
+ }
+
+ for (var i = 0, total = typeChecks.length; i < total; i++) {
+ var type = typeChecks[i](url);
+
+ if (type) {
+ return type;
+ }
+ }
+
+ var ext = getExtension(url),
+ normalizedExt = normalizeExtension(ext);
+
+ var mime = 'video/mp4';
+
+ if (normalizedExt) {
+ if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg', 'mov'].indexOf(normalizedExt)) {
+ mime = 'video/' + normalizedExt;
+ } else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {
+ mime = 'audio/' + normalizedExt;
+ }
+ }
+
+ return mime;
+}
+
+function getExtension(url) {
+
+ if (typeof url !== 'string') {
+ throw new Error('`url` argument must be a string');
+ }
+
+ var baseUrl = url.split('?')[0],
+ baseName = baseUrl.split('\\').pop().split('/').pop();
+ return ~baseName.indexOf('.') ? baseName.substring(baseName.lastIndexOf('.') + 1) : '';
+}
+
+function normalizeExtension(extension) {
+
+ if (typeof extension !== 'string') {
+ throw new Error('`extension` argument must be a string');
+ }
+
+ switch (extension) {
+ case 'mp4':
+ case 'm4v':
+ return 'mp4';
+ case 'webm':
+ case 'webma':
+ case 'webmv':
+ return 'webm';
+ case 'ogg':
+ case 'oga':
+ case 'ogv':
+ return 'ogg';
+ default:
+ return extension;
+ }
+}
+
+_mejs2.default.Utils = _mejs2.default.Utils || {};
+_mejs2.default.Utils.typeChecks = typeChecks;
+_mejs2.default.Utils.absolutizeUrl = absolutizeUrl;
+_mejs2.default.Utils.formatType = formatType;
+_mejs2.default.Utils.getMimeFromType = getMimeFromType;
+_mejs2.default.Utils.getTypeFromFile = getTypeFromFile;
+_mejs2.default.Utils.getExtension = getExtension;
+_mejs2.default.Utils.normalizeExtension = normalizeExtension;
+
+},{"18":18,"7":7}],20:[function(_dereq_,module,exports){
+'use strict';
+
+var _document = _dereq_(2);
+
+var _document2 = _interopRequireDefault(_document);
+
+var _promisePolyfill = _dereq_(4);
+
+var _promisePolyfill2 = _interopRequireDefault(_promisePolyfill);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+(function (arr) {
+ arr.forEach(function (item) {
+ if (item.hasOwnProperty('remove')) {
+ return;
+ }
+ Object.defineProperty(item, 'remove', {
+ configurable: true,
+ enumerable: true,
+ writable: true,
+ value: function remove() {
+ this.parentNode.removeChild(this);
+ }
+ });
+ });
+})([Element.prototype, CharacterData.prototype, DocumentType.prototype]);
+
+(function () {
+
+ if (typeof window.CustomEvent === 'function') {
+ return false;
+ }
+
+ function CustomEvent(event, params) {
+ params = params || { bubbles: false, cancelable: false, detail: undefined };
+ var evt = _document2.default.createEvent('CustomEvent');
+ evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
+ return evt;
+ }
+
+ CustomEvent.prototype = window.Event.prototype;
+ window.CustomEvent = CustomEvent;
+})();
+
+if (typeof Object.assign !== 'function') {
+ Object.assign = function (target) {
+
+ if (target === null || target === undefined) {
+ throw new TypeError('Cannot convert undefined or null to object');
+ }
+
+ var to = Object(target);
+
+ for (var index = 1, total = arguments.length; index < total; index++) {
+ var nextSource = arguments[index];
+
+ if (nextSource !== null) {
+ for (var nextKey in nextSource) {
+ if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
+ to[nextKey] = nextSource[nextKey];
+ }
+ }
+ }
+ }
+ return to;
+ };
+}
+
+if (!String.prototype.startsWith) {
+ String.prototype.startsWith = function (searchString, position) {
+ position = position || 0;
+ return this.substr(position, searchString.length) === searchString;
+ };
+}
+
+if (!Element.prototype.matches) {
+ Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s),
+ i = matches.length - 1;
+ while (--i >= 0 && matches.item(i) !== this) {}
+ return i > -1;
+ };
+}
+
+if (window.Element && !Element.prototype.closest) {
+ Element.prototype.closest = function (s) {
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s),
+ i = void 0,
+ el = this;
+ do {
+ i = matches.length;
+ while (--i >= 0 && matches.item(i) !== el) {}
+ } while (i < 0 && (el = el.parentElement));
+ return el;
+ };
+}
+
+(function () {
+ var lastTime = 0;
+ var vendors = ['ms', 'moz', 'webkit', 'o'];
+ for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
+ window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
+ window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
+ }
+
+ if (!window.requestAnimationFrame) window.requestAnimationFrame = function (callback) {
+ var currTime = new Date().getTime();
+ var timeToCall = Math.max(0, 16 - (currTime - lastTime));
+ var id = window.setTimeout(function () {
+ callback(currTime + timeToCall);
+ }, timeToCall);
+ lastTime = currTime + timeToCall;
+ return id;
+ };
+
+ if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function (id) {
+ clearTimeout(id);
+ };
+})();
+
+if (/firefox/i.test(navigator.userAgent)) {
+ var getComputedStyle = window.getComputedStyle;
+ window.getComputedStyle = function (el, pseudoEl) {
+ var t = getComputedStyle(el, pseudoEl);
+ return t === null ? { getPropertyValue: function getPropertyValue() {} } : t;
+ };
+}
+
+if (!window.Promise) {
+ window.Promise = _promisePolyfill2.default;
+}
+
+(function (constructor) {
+ if (constructor && constructor.prototype && constructor.prototype.children === null) {
+ Object.defineProperty(constructor.prototype, 'children', {
+ get: function get() {
+ var i = 0,
+ node = void 0,
+ nodes = this.childNodes,
+ children = [];
+ while (node = nodes[i++]) {
+ if (node.nodeType === 1) {
+ children.push(node);
+ }
+ }
+ return children;
+ }
+ });
+ }
+})(window.Node || window.Element);
+
+},{"2":2,"4":4}]},{},[20,6,5,9,14,11,10,12,13,15]);
diff --git a/node_modules/mediaelement/build/mediaelement.min.js b/node_modules/mediaelement/build/mediaelement.min.js
new file mode 100644
index 00000000..8243888a
--- /dev/null
+++ b/node_modules/mediaelement/build/mediaelement.min.js
@@ -0,0 +1,12 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */
+!function e(t,n,r){function i(a,l){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!l&&s)return s(a,!0);if(o)return o(a,!0);var d=new Error("Cannot find module '"+a+"'");throw d.code="MODULE_NOT_FOUND",d}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n||e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e&&e.length){var n=void 0,i=void 0,o=l.language(),s=function(e,t,n){if("object"!==(void 0===e?"undefined":r(e))||"number"!=typeof t||"number"!=typeof n)return e;return[function(){return arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 0===(arguments.length<=0?void 0:arguments[0])||1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:0!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])||11===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])||12===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])>2&&(arguments.length<=0?void 0:arguments[0])<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||(arguments.length<=0?void 0:arguments[0])%100>0&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:[3]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1&&(arguments.length<=0?void 0:arguments[0])%100!=11?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])>=2&&(arguments.length<=0?void 0:arguments[0])<=4?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return(arguments.length<=0?void 0:arguments[0])%100==1?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])%100==2?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])%100==3||(arguments.length<=0?void 0:arguments[0])%100==4?arguments.length<=4?void 0:arguments[4]:arguments.length<=1?void 0:arguments[1]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])>2&&(arguments.length<=0?void 0:arguments[0])<7?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])>6&&(arguments.length<=0?void 0:arguments[0])<11?arguments.length<=4?void 0:arguments[4]:arguments.length<=5?void 0:arguments[5]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:(arguments.length<=0?void 0:arguments[0])%100>=3&&(arguments.length<=0?void 0:arguments[0])%100<=10?arguments.length<=4?void 0:arguments[4]:(arguments.length<=0?void 0:arguments[0])%100>=11?arguments.length<=5?void 0:arguments[5]:arguments.length<=6?void 0:arguments[6]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:0===(arguments.length<=0?void 0:arguments[0])||(arguments.length<=0?void 0:arguments[0])%100>1&&(arguments.length<=0?void 0:arguments[0])%100<11?arguments.length<=2?void 0:arguments[2]:(arguments.length<=0?void 0:arguments[0])%100>10&&(arguments.length<=0?void 0:arguments[0])%100<20?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10==2?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 11!==(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])%10==1?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:(arguments.length<=0?void 0:arguments[0])%10>=2&&(arguments.length<=0?void 0:arguments[0])%10<=4&&((arguments.length<=0?void 0:arguments[0])%100<10||(arguments.length<=0?void 0:arguments[0])%100>=20)?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:8!==(arguments.length<=0?void 0:arguments[0])&&11!==(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:arguments.length<=2?void 0:arguments[2]},function(){return 1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:2===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:3===(arguments.length<=0?void 0:arguments[0])?arguments.length<=3?void 0:arguments[3]:arguments.length<=4?void 0:arguments[4]},function(){return 0===(arguments.length<=0?void 0:arguments[0])?arguments.length<=1?void 0:arguments[1]:1===(arguments.length<=0?void 0:arguments[0])?arguments.length<=2?void 0:arguments[2]:arguments.length<=3?void 0:arguments[3]}][n].apply(null,[t].concat(e))};return void 0!==l[o]&&(n=l[o][e],null!==t&&"number"==typeof t&&(i=l[o]["mejs.plural-form"],n=s.apply(null,[n,t,i]))),!n&&l.en&&(n=l.en[e],null!==t&&"number"==typeof t&&(i=l.en["mejs.plural-form"],n=s.apply(null,[n,t,i]))),n=n||e,null!==t&&"number"==typeof t&&(n=n.replace("%1",t)),(0,a.escapeHTML)(n)}return e},i.default.i18n=l,"undefined"!=typeof mejsL10n&&i.default.i18n.language(mejsL10n.language,mejsL10n.strings),n.default=l},{18:18,7:7,9:9}],6:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=r(e(3)),a=r(e(2)),l=r(e(7)),s=e(18),d=e(19),u=e(8),c=e(16),f=function e(t,n,r){var f=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var m=this;r=Array.isArray(r)?r:null,m.defaults={renderers:[],fakeNodeName:"mediaelementwrapper",pluginPath:"build/",shimScriptAccess:"sameDomain"},n=Object.assign(m.defaults,n),m.mediaElement=a.default.createElement(n.fakeNodeName);var p=t,h=!1;if("string"==typeof t?m.mediaElement.originalNode=a.default.getElementById(t):(m.mediaElement.originalNode=t,p=t.id),void 0===m.mediaElement.originalNode||null===m.mediaElement.originalNode)return null;m.mediaElement.options=n,p=p||"mejs_"+Math.random().toString().slice(2),m.mediaElement.originalNode.setAttribute("id",p+"_from_mejs");var v=m.mediaElement.originalNode.tagName.toLowerCase();["video","audio"].indexOf(v)>-1&&!m.mediaElement.originalNode.getAttribute("preload")&&m.mediaElement.originalNode.setAttribute("preload","none"),m.mediaElement.originalNode.parentNode.insertBefore(m.mediaElement,m.mediaElement.originalNode),m.mediaElement.appendChild(m.mediaElement.originalNode);var g=function(e,t){if("https:"===o.default.location.protocol&&0===e.indexOf("http:")&&c.IS_IOS&&l.default.html5media.mediaTypes.indexOf(t)>-1){var n=new XMLHttpRequest;n.onreadystatechange=function(){if(4===this.readyState&&200===this.status){var t=(o.default.URL||o.default.webkitURL).createObjectURL(this.response);return m.mediaElement.originalNode.setAttribute("src",t),t}return e},n.open("GET",e),n.responseType="blob",n.send()}return e},y=void 0;if(null!==r)y=r;else if(null!==m.mediaElement.originalNode)switch(y=[],m.mediaElement.originalNode.nodeName.toLowerCase()){case"iframe":y.push({type:"",src:m.mediaElement.originalNode.getAttribute("src")});break;case"audio":case"video":var E=m.mediaElement.originalNode.children.length,b=m.mediaElement.originalNode.getAttribute("src");if(b){var w=m.mediaElement.originalNode,_=(0,d.formatType)(b,w.getAttribute("type"));y.push({type:_,src:g(b,_)})}for(var S=0;S2?t[0]:t[0].src;if(void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&n.mediaElement.renderer.name===e)return n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.show(),n.mediaElement.renderer.setSrc(r),!0;void 0!==n.mediaElement.renderer&&null!==n.mediaElement.renderer&&(n.mediaElement.renderer.pause(),n.mediaElement.renderer.stop&&n.mediaElement.renderer.stop(),n.mediaElement.renderer.hide());var i=n.mediaElement.renderers[e],o=null;if(void 0!==i&&null!==i)return i.show(),i.setSrc(r),n.mediaElement.renderer=i,n.mediaElement.rendererName=e,!0;for(var a=n.mediaElement.options.renderers.length?n.mediaElement.options.renderers:u.renderer.order,l=0,s=a.length;l1&&void 0!==arguments[1]?arguments[1]:[],n=t.length;if(t=t.length?t:this.order,!n){var r=[/^(html5|native)/i,/^flash/i,/iframe$/i],i=function(e){for(var t=0,n=r.length;t-1},create:function(e,t,n){var r=e.originalNode,d=e.id+"_"+t.prefix,u=r.autoplay,c=r.children,m=null,p=null;r.removeAttribute("type");for(var h=0,v=c.length;h0)for(var S=0,N=n.length;St[0]||n[0]===t[0]&&n[1]>t[1]||n[0]===t[0]&&n[1]===t[1]&&n[2]>=t[2]},addPlugin:function(e,t,n,r,i){m.plugins[e]=m.detectPlugin(t,n,r,i)},detectPlugin:function(e,t,n,r){var a=[0,0,0],l=void 0,s=void 0;if(null!==c.NAV.plugins&&void 0!==c.NAV.plugins&&"object"===i(c.NAV.plugins[e])){if((l=c.NAV.plugins[e].description)&&(void 0===c.NAV.mimeTypes||!c.NAV.mimeTypes[t]||c.NAV.mimeTypes[t].enabledPlugin))for(var d=0,u=(a=l.replace(e,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".")).length;d'+s.default.t("mejs.install-flash")+"
"}else x=['id="__'+r.id+'"','name="__'+r.id+'"','play="true"','loop="false"','quality="high"','bgcolor="#000000"','wmode="transparent"','allowScriptAccess="'+r.options.shimScriptAccess+'"','allowFullScreen="true"','type="application/x-shockwave-flash"','pluginspage="//www.macromedia.com/go/getflashplayer"','src="'+r.options.pluginPath+r.options.filename+'"','flashvars="'+A.join("&")+'"'],T?(x.push('width="'+P+'"'),x.push('height="'+F+'"')):x.push('style="position: fixed; left: -9999em; top: -9999em;"'),r.flashWrapper.innerHTML="";if(r.flashNode=r.flashWrapper.lastChild,r.hide=function(){i=!1,T&&(r.flashNode.style.display="none")},r.show=function(){i=!0,T&&(r.flashNode.style.display="")},r.setSize=function(e,t){r.flashNode.style.width=e+"px",r.flashNode.style.height=t+"px",null!==r.flashApi&&"function"==typeof r.flashApi.fire_setSize&&r.flashApi.fire_setSize(e,t)},r.destroy=function(){r.flashNode.remove()},n&&n.length>0)for(var O=0,C=n.length;O-1},create:function(e,t,n){var r=e.originalNode,d=e.id+"_"+t.prefix,u=null,c=null;u=r.cloneNode(!0),t=Object.assign(t,e.options);for(var m=a.default.html5media.properties,p=a.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),h=function(t){var n=(0,s.createEvent)(t.type,e);e.dispatchEvent(n)},v=function(e){var n=""+e.substring(0,1).toUpperCase()+e.substring(1);u["get"+n]=function(){return null!==c?u[e]:null},u["set"+n]=function(n){if(-1===a.default.html5media.readOnlyProperties.indexOf(e))if("src"===e){if(u[e]="object"===(void 0===n?"undefined":i(n))&&n.src?n.src:n,null!==c){var r={};r.type="flv",r.url=n,r.cors=t.flv.cors,r.debug=t.flv.debug,r.path=t.flv.path;var o=t.flv.configs;c.destroy();for(var l=0,s=p.length;l0)for(var E=0,b=n.length;E-1},create:function(e,t,n){var r=e.originalNode,d=e.id+"_"+t.prefix,u=r.getAttribute("preload"),c=r.autoplay,m=null,p=null,h=0,v=n.length;p=r.cloneNode(!0),(t=Object.assign(t,e.options)).hls.autoStartLoad=u&&"none"!==u||c;for(var g=a.default.html5media.properties,y=a.default.html5media.events.concat(["click","mouseover","mouseout"]).filter(function(e){return"error"!==e}),E=function(t){var n=(0,s.createEvent)(t.type,e);e.dispatchEvent(n)},b=function(e){var n=""+e.substring(0,1).toUpperCase()+e.substring(1);p["get"+n]=function(){return null!==m?p[e]:null},p["set"+n]=function(n){if(-1===a.default.html5media.readOnlyProperties.indexOf(e))if("src"===e){if(p[e]="object"===(void 0===n?"undefined":i(n))&&n.src?n.src:n,null!==m){m.destroy();for(var r=0,o=y.length;r3e3)l=(new Date).getTime(),m.recoverMediaError();else if(!d||i-d>3e3)d=(new Date).getTime(),console.warn("Attempting to swap Audio Codec and recover from media error"),m.swapAudioCodec(),m.recoverMediaError();else{var o="Cannot recover, last media error recovery failed";e.generateError(o,p.src),console.error(o)}break;case"networkError":"manifestLoadError"===r.details&&h0)for(;h0)for(;y0;){var e=c.iframeQueue.pop();c.createIframe(e)}},createIframe:function(e){return new YT.Player(e.containerId,e)},getYouTubeId:function(e){var t="";e.indexOf("?")>0?""===(t=c.getYouTubeIdFromParam(e))&&(t=c.getYouTubeIdFromUrl(e)):t=c.getYouTubeIdFromUrl(e);return(t=t.substring(t.lastIndexOf("/")+1).split("?"))[0]},getYouTubeIdFromParam:function(e){if(void 0===e||null===e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),n="",r=0,i=t.length;r-1)&&!T.playerVars.playlist&&-1===e.originalNode.src.indexOf("playlist=")&&(T.playerVars.playlist=c.getYouTubeId(e.originalNode.src)),c.enqueueIframe(T),r.onEvent=function(t,n,r){null!==r&&void 0!==r&&(e.youTubeState=r)},r.setSize=function(e,t){null!==d&&d.setSize(e,t)},r.hide=function(){r.stopInterval(),r.pause(),m&&(m.style.display="none")},r.show=function(){m&&(m.style.display="")},r.destroy=function(){d.destroy()},r.interval=null,r.startInterval=function(){r.interval=setInterval(function(){var t=(0,s.createEvent)("timeupdate",r);e.dispatchEvent(t)},250)},r.stopInterval=function(){r.interval&&clearInterval(r.interval)},r.getPosterUrl=function(){var n=t.youtube.imageQuality,r=c.getYouTubeId(e.originalNode.src);return n&&["default","hqdefault","mqdefault","sddefault","maxresdefault"].indexOf(n)>-1&&r?"https://img.youtube.com/vi/"+r+"/"+n+".jpg":""},r}};i.default.onYouTubePlayerAPIReady=function(){c.iFrameReady()},d.typeChecks.push(function(e){return/\/\/(www\.youtube|youtu\.?be)/i.test(e)?"video/x-youtube":null}),l.renderer.add(f)},{17:17,18:18,19:19,2:2,3:3,7:7,8:8}],16:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.cancelFullScreen=n.requestFullScreen=n.isFullScreen=n.FULLSCREEN_EVENT_NAME=n.HAS_NATIVE_FULLSCREEN_ENABLED=n.HAS_TRUE_NATIVE_FULLSCREEN=n.HAS_IOS_FULLSCREEN=n.HAS_MS_NATIVE_FULLSCREEN=n.HAS_MOZ_NATIVE_FULLSCREEN=n.HAS_WEBKIT_NATIVE_FULLSCREEN=n.HAS_NATIVE_FULLSCREEN=n.SUPPORTS_NATIVE_HLS=n.SUPPORT_PASSIVE_EVENT=n.SUPPORT_POINTER_EVENTS=n.HAS_MSE=n.IS_STOCK_ANDROID=n.IS_SAFARI=n.IS_FIREFOX=n.IS_CHROME=n.IS_EDGE=n.IS_IE=n.IS_ANDROID=n.IS_IOS=n.IS_IPOD=n.IS_IPHONE=n.IS_IPAD=n.UA=n.NAV=void 0;for(var i=r(e(3)),o=r(e(2)),a=r(e(7)),l=n.NAV=i.default.navigator,s=n.UA=l.userAgent.toLowerCase(),d=n.IS_IPAD=/ipad/i.test(s)&&!i.default.MSStream,u=n.IS_IPHONE=/iphone/i.test(s)&&!i.default.MSStream,c=n.IS_IPOD=/ipod/i.test(s)&&!i.default.MSStream,f=(n.IS_IOS=/ipad|iphone|ipod/i.test(s)&&!i.default.MSStream,n.IS_ANDROID=/android/i.test(s)),m=n.IS_IE=/(trident|microsoft)/i.test(l.appName),p=(n.IS_EDGE="msLaunchUri"in l&&!("documentMode"in o.default)),h=n.IS_CHROME=/chrome/i.test(s),v=n.IS_FIREFOX=/firefox/i.test(s),g=n.IS_SAFARI=/safari/i.test(s)&&!h,y=n.IS_STOCK_ANDROID=/^mozilla\/\d+\.\d+\s\(linux;\su;/i.test(s),E=(n.HAS_MSE="MediaSource"in i.default),b=n.SUPPORT_POINTER_EVENTS=function(){var e=o.default.createElement("x"),t=o.default.documentElement,n=i.default.getComputedStyle;if(!("pointerEvents"in e.style))return!1;e.style.pointerEvents="auto",e.style.pointerEvents="x",t.appendChild(e);var r=n&&"auto"===n(e,"").pointerEvents;return e.remove(),!!r}(),w=n.SUPPORT_PASSIVE_EVENT=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});i.default.addEventListener("test",null,t)}catch(e){}return e}(),_=["source","track","audio","video"],S=void 0,N=0,j=_.length;N1&&void 0!==arguments[1]?arguments[1]:400,n=arguments[2];e.style.opacity||(e.style.opacity=1);var r=null;f.default.requestAnimationFrame(function i(o){var a=o-(r=r||o),l=parseFloat(1-a/t,2);e.style.opacity=l<0?0:l,a>t?n&&"function"==typeof n&&n():f.default.requestAnimationFrame(i)})}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,n=arguments[2];e.style.opacity||(e.style.opacity=0);var r=null;f.default.requestAnimationFrame(function i(o){var a=o-(r=r||o),l=parseFloat(a/t,2);e.style.opacity=l>1?1:l,a>t?n&&"function"==typeof n&&n():f.default.requestAnimationFrame(i)})}function d(e,t){var n=[];e=e.parentNode.firstChild;do{t&&!t(e)||n.push(e)}while(e=e.nextSibling);return n}function u(e){return void 0!==e.getClientRects&&"function"===e.getClientRects?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!(!e.offsetWidth&&!e.offsetHeight)}function c(e,t,n,r){var i=f.default.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),o="application/x-www-form-urlencoded; charset=UTF-8",a=!1,l="*/".concat("*");switch(t){case"text":o="text/plain";break;case"json":o="application/json, text/javascript";break;case"html":o="text/html";break;case"xml":o="application/xml, text/xml"}"application/x-www-form-urlencoded"!==o&&(l=o+", */*; q=0.01"),i&&(i.open("GET",e,!0),i.setRequestHeader("Accept",l),i.onreadystatechange=function(){if(!a&&4===i.readyState)if(200===i.status){a=!0;var e=void 0;switch(t){case"json":e=JSON.parse(i.responseText);break;case"xml":e=i.responseXML;break;default:e=i.responseText}n(e)}else"function"==typeof r&&r(i.status)},i.send())}Object.defineProperty(n,"__esModule",{value:!0}),n.removeClass=n.addClass=n.hasClass=void 0,n.loadScript=i,n.offset=o,n.toggleClass=a,n.fadeOut=l,n.fadeIn=s,n.siblings=d,n.visible=u,n.ajax=c;var f=r(e(3)),m=r(e(2)),p=r(e(7)),h=void 0,v=void 0,g=void 0;"classList"in m.default.documentElement?(h=function(e,t){return void 0!==e.classList&&e.classList.contains(t)},v=function(e,t){return e.classList.add(t)},g=function(e,t){return e.classList.remove(t)}):(h=function(e,t){return new RegExp("\\b"+t+"\\b").test(e.className)},v=function(e,t){y(e,t)||(e.className+=" "+t)},g=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","g"),"")});var y=n.hasClass=h,E=n.addClass=v,b=n.removeClass=g;p.default.Utils=p.default.Utils||{},p.default.Utils.offset=o,p.default.Utils.hasClass=y,p.default.Utils.addClass=E,p.default.Utils.removeClass=b,p.default.Utils.toggleClass=a,p.default.Utils.fadeIn=s,p.default.Utils.fadeOut=l,p.default.Utils.siblings=d,p.default.Utils.visible=u,p.default.Utils.ajax=c,p.default.Utils.loadScript=i},{2:2,3:3,7:7}],18:[function(e,t,n){"use strict";function r(e){if("string"!=typeof e)throw new Error("Argument passed must be a string");var t={"&":"&","<":"<",">":">",'"':"""};return e.replace(/[&<>"]/g,function(e){return t[e]})}function i(e,t){var n=this,r=arguments,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("function"!=typeof e)throw new Error("First argument must be a function");if("number"!=typeof t)throw new Error("Second argument must be a numeric value");var o=void 0;return function(){var a=n,l=r,s=i&&!o;clearTimeout(o),o=setTimeout(function(){o=null,i||e.apply(a,l)},t),s&&e.apply(a,l)}}function o(e){return Object.getOwnPropertyNames(e).length<=0}function a(e,t){var n=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/,r={d:[],w:[]};return(e||"").split(" ").forEach(function(e){var i=e+(t?"."+t:"");i.startsWith(".")?(r.d.push(i),r.w.push(i)):r[n.test(e)?"w":"d"].push(i)}),r.d=r.d.join(" "),r.w=r.w.join(" "),r}function l(e,t){if("string"!=typeof e)throw new Error("Event name must be a string");var n=e.match(/([a-z]+\.([a-z]+))/i),r={target:t};return null!==n&&(e=n[1],r.namespace=n[2]),new window.CustomEvent(e,{detail:r})}function s(e,t){return!!(e&&t&&2&e.compareDocumentPosition(t))}function d(e){return"string"==typeof e}Object.defineProperty(n,"__esModule",{value:!0}),n.escapeHTML=r,n.debounce=i,n.isObjectEmpty=o,n.splitEvents=a,n.createEvent=l,n.isNodeAfter=s,n.isString=d;var u=function(e){return e&&e.__esModule?e:{default:e}}(e(7));u.default.Utils=u.default.Utils||{},u.default.Utils.escapeHTML=r,u.default.Utils.debounce=i,u.default.Utils.isObjectEmpty=o,u.default.Utils.splitEvents=a,u.default.Utils.createEvent=l,u.default.Utils.isNodeAfter=s,u.default.Utils.isString=d},{7:7}],19:[function(e,t,n){"use strict";function r(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=document.createElement("div");return t.innerHTML='x ',t.firstChild.href}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e&&!t?a(e):t}function o(e){if("string"!=typeof e)throw new Error("`type` argument must be a string");return e&&e.indexOf(";")>-1?e.substr(0,e.indexOf(";")):e}function a(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");for(var t=0,n=c.length;t=0&&t.item(n)!==this;);return n>-1}),window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t=(this.document||this.ownerDocument).querySelectorAll(e),n=void 0,r=this;do{for(n=t.length;--n>=0&&t.item(n)!==r;);}while(n<0&&(r=r.parentElement));return r}),function(){for(var e=0,t=["ms","moz","webkit","o"],n=0;n .mejs-overlay-button {
+ background-position: -80px -39px;
+}
+
+.mejs-overlay-loading {
+ height: 80px;
+ width: 80px;
+}
+
+.mejs-overlay-loading-bg-img {
+ -webkit-animation: mejs-loading-spinner 1s linear infinite;
+ animation: mejs-loading-spinner 1s linear infinite;
+ background: transparent url('mejs-controls.svg') -160px -40px no-repeat;
+ display: block;
+ height: 80px;
+ width: 80px;
+ z-index: 1;
+}
+
+@-webkit-keyframes mejs-loading-spinner {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+@keyframes mejs-loading-spinner {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+/* End: LAYERS */
+
+/* Start: CONTROL BAR */
+.mejs-controls {
+ bottom: 0;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ height: 40px;
+ left: 0;
+ list-style-type: none;
+ margin: 0;
+ padding: 0 10px;
+ position: absolute;
+ width: 100%;
+ z-index: 3;
+}
+
+.mejs-controls:not([style*='display: none']) {
+ background: rgba(255, 0, 0, 0.7);
+ background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.35));
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.35));
+}
+
+.mejs-button,
+.mejs-time,
+.mejs-time-rail {
+ font-size: 10px;
+ height: 40px;
+ line-height: 10px;
+ margin: 0;
+ width: 32px;
+}
+
+.mejs-button > button {
+ background: transparent url('mejs-controls.svg');
+ border: 0;
+ cursor: pointer;
+ display: block;
+ font-size: 0;
+ height: 20px;
+ line-height: 0;
+ margin: 10px 6px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ text-decoration: none;
+ width: 20px;
+}
+
+/* :focus for accessibility */
+.mejs-button > button:focus {
+ outline: dotted 1px #999;
+}
+
+.mejs-container-keyboard-inactive a,
+.mejs-container-keyboard-inactive a:focus,
+.mejs-container-keyboard-inactive button,
+.mejs-container-keyboard-inactive button:focus,
+.mejs-container-keyboard-inactive [role=slider],
+.mejs-container-keyboard-inactive [role=slider]:focus {
+ outline: 0;
+}
+
+/* End: CONTROL BAR */
+
+/* Start: Time (Current / Duration) */
+.mejs-time {
+ box-sizing: content-box;
+ color: #fff;
+ font-size: 11px;
+ font-weight: bold;
+ height: 24px;
+ overflow: hidden;
+ padding: 16px 6px 0;
+ text-align: center;
+ width: auto;
+}
+
+/* End: Time (Current / Duration) */
+
+/* Start: Play/Pause/Stop */
+.mejs-play > button {
+ background-position: 0 0;
+}
+
+.mejs-pause > button {
+ background-position: -20px 0;
+}
+
+.mejs-replay > button {
+ background-position: -160px 0;
+}
+
+/* End: Play/Pause/Stop */
+
+/* Start: Progress Bar */
+.mejs-time-rail {
+ direction: ltr;
+ -webkit-box-flex: 1;
+ -webkit-flex-grow: 1;
+ -ms-flex-positive: 1;
+ flex-grow: 1;
+ height: 40px;
+ margin: 0 10px;
+ padding-top: 10px;
+ position: relative;
+}
+
+.mejs-time-total,
+.mejs-time-buffering,
+.mejs-time-loaded,
+.mejs-time-current,
+.mejs-time-float,
+.mejs-time-hovered,
+.mejs-time-float-current,
+.mejs-time-float-corner,
+.mejs-time-marker {
+ border-radius: 2px;
+ cursor: pointer;
+ display: block;
+ height: 10px;
+ position: absolute;
+}
+
+.mejs-time-total {
+ background: rgba(255, 255, 255, 0.3);
+ margin: 5px 0 0;
+ width: 100%;
+}
+
+.mejs-time-buffering {
+ -webkit-animation: buffering-stripes 2s linear infinite;
+ animation: buffering-stripes 2s linear infinite;
+ background: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
+ background: linear-gradient(-45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
+ background-size: 15px 15px;
+ width: 100%;
+}
+
+@-webkit-keyframes buffering-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 30px 0;
+ }
+}
+
+@keyframes buffering-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 30px 0;
+ }
+}
+
+.mejs-time-loaded {
+ background: rgba(255, 255, 255, 0.3);
+}
+
+.mejs-time-current,
+.mejs-time-handle-content {
+ background: rgba(255, 255, 255, 0.9);
+}
+
+.mejs-time-hovered {
+ background: rgba(255, 255, 255, 0.5);
+ z-index: 10;
+}
+
+.mejs-time-hovered.negative {
+ background: rgba(0, 0, 0, 0.2);
+}
+
+.mejs-time-current,
+.mejs-time-buffering,
+.mejs-time-loaded,
+.mejs-time-hovered {
+ left: 0;
+ -webkit-transform: scaleX(0);
+ -ms-transform: scaleX(0);
+ transform: scaleX(0);
+ -webkit-transform-origin: 0 0;
+ -ms-transform-origin: 0 0;
+ transform-origin: 0 0;
+ -webkit-transition: 0.15s ease-in all;
+ transition: 0.15s ease-in all;
+ width: 100%;
+}
+
+.mejs-time-buffering {
+ -webkit-transform: scaleX(1);
+ -ms-transform: scaleX(1);
+ transform: scaleX(1);
+}
+
+.mejs-time-hovered {
+ -webkit-transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
+ transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
+}
+
+.mejs-time-hovered.no-hover {
+ -webkit-transform: scaleX(0) !important;
+ -ms-transform: scaleX(0) !important;
+ transform: scaleX(0) !important;
+}
+
+.mejs-time-handle,
+.mejs-time-handle-content {
+ border: 4px solid transparent;
+ cursor: pointer;
+ left: 0;
+ position: absolute;
+ -webkit-transform: translateX(0);
+ -ms-transform: translateX(0);
+ transform: translateX(0);
+ z-index: 11;
+}
+
+.mejs-time-handle-content {
+ border: 4px solid rgba(255, 255, 255, 0.9);
+ border-radius: 50%;
+ height: 10px;
+ left: -7px;
+ top: -4px;
+ -webkit-transform: scale(0);
+ -ms-transform: scale(0);
+ transform: scale(0);
+ width: 10px;
+}
+
+.mejs-time-rail:hover .mejs-time-handle-content,
+.mejs-time-rail .mejs-time-handle-content:focus,
+.mejs-time-rail .mejs-time-handle-content:active {
+ -webkit-transform: scale(1);
+ -ms-transform: scale(1);
+ transform: scale(1);
+}
+
+.mejs-time-float {
+ background: #eee;
+ border: solid 1px #333;
+ bottom: 100%;
+ color: #111;
+ display: none;
+ height: 17px;
+ margin-bottom: 9px;
+ position: absolute;
+ text-align: center;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 36px;
+}
+
+.mejs-time-float-current {
+ display: block;
+ left: 0;
+ margin: 2px;
+ text-align: center;
+ width: 30px;
+}
+
+.mejs-time-float-corner {
+ border: solid 5px #eee;
+ border-color: #eee transparent transparent;
+ border-radius: 0;
+ display: block;
+ height: 0;
+ left: 50%;
+ line-height: 0;
+ position: absolute;
+ top: 100%;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 0;
+}
+
+.mejs-long-video .mejs-time-float {
+ margin-left: -23px;
+ width: 64px;
+}
+
+.mejs-long-video .mejs-time-float-current {
+ width: 60px;
+}
+
+.mejs-broadcast {
+ color: #fff;
+ height: 10px;
+ position: absolute;
+ top: 15px;
+ width: 100%;
+}
+
+/* End: Progress Bar */
+
+/* Start: Fullscreen */
+.mejs-fullscreen-button > button {
+ background-position: -80px 0;
+}
+
+.mejs-unfullscreen > button {
+ background-position: -100px 0;
+}
+
+/* End: Fullscreen */
+
+/* Start: Mute/Volume */
+.mejs-mute > button {
+ background-position: -60px 0;
+}
+
+.mejs-unmute > button {
+ background-position: -40px 0;
+}
+
+.mejs-volume-button {
+ position: relative;
+}
+
+.mejs-volume-button > .mejs-volume-slider {
+ -webkit-backface-visibility: hidden;
+ background: rgba(50, 50, 50, 0.7);
+ border-radius: 0;
+ bottom: 100%;
+ display: none;
+ height: 115px;
+ left: 50%;
+ margin: 0;
+ position: absolute;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 25px;
+ z-index: 1;
+}
+
+.mejs-volume-button:hover {
+ border-radius: 0 0 4px 4px;
+}
+
+.mejs-volume-total {
+ background: rgba(255, 255, 255, 0.5);
+ height: 100px;
+ left: 50%;
+ margin: 0;
+ position: absolute;
+ top: 8px;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 2px;
+}
+
+.mejs-volume-current {
+ background: rgba(255, 255, 255, 0.9);
+ left: 0;
+ margin: 0;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs-volume-handle {
+ background: rgba(255, 255, 255, 0.9);
+ border-radius: 1px;
+ cursor: ns-resize;
+ height: 6px;
+ left: 50%;
+ position: absolute;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 16px;
+}
+
+.mejs-horizontal-volume-slider {
+ display: block;
+ height: 36px;
+ position: relative;
+ vertical-align: middle;
+ width: 56px;
+}
+
+.mejs-horizontal-volume-total {
+ background: rgba(50, 50, 50, 0.8);
+ border-radius: 2px;
+ font-size: 1px;
+ height: 8px;
+ left: 0;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ top: 16px;
+ width: 50px;
+}
+
+.mejs-horizontal-volume-current {
+ background: rgba(255, 255, 255, 0.8);
+ border-radius: 2px;
+ font-size: 1px;
+ height: 100%;
+ left: 0;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+
+.mejs-horizontal-volume-handle {
+ display: none;
+}
+
+/* End: Mute/Volume */
+
+/* Start: Track (Captions and Chapters) */
+.mejs-captions-button,
+.mejs-chapters-button {
+ position: relative;
+}
+
+.mejs-captions-button > button {
+ background-position: -140px 0;
+}
+
+.mejs-chapters-button > button {
+ background-position: -180px 0;
+}
+
+.mejs-captions-button > .mejs-captions-selector,
+.mejs-chapters-button > .mejs-chapters-selector {
+ background: rgba(50, 50, 50, 0.7);
+ border: solid 1px transparent;
+ border-radius: 0;
+ bottom: 100%;
+ margin-right: -43px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ right: 50%;
+ visibility: visible;
+ width: 86px;
+}
+
+.mejs-chapters-button > .mejs-chapters-selector {
+ margin-right: -55px;
+ width: 110px;
+}
+
+.mejs-captions-selector-list,
+.mejs-chapters-selector-list {
+ list-style-type: none !important;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+}
+
+.mejs-captions-selector-list-item,
+.mejs-chapters-selector-list-item {
+ color: #fff;
+ cursor: pointer;
+ display: block;
+ list-style-type: none !important;
+ margin: 0 0 6px;
+ overflow: hidden;
+ padding: 0;
+}
+
+.mejs-captions-selector-list-item:hover,
+.mejs-chapters-selector-list-item:hover {
+ background-color: rgb(200, 200, 200) !important;
+ background-color: rgba(255, 255, 255, 0.4) !important;
+}
+
+.mejs-captions-selector-input,
+.mejs-chapters-selector-input {
+ clear: both;
+ float: left;
+ left: -1000px;
+ margin: 3px 3px 0 5px;
+ position: absolute;
+}
+
+.mejs-captions-selector-label,
+.mejs-chapters-selector-label {
+ cursor: pointer;
+ float: left;
+ font-size: 10px;
+ line-height: 15px;
+ padding: 4px 10px 0;
+ width: 100%;
+}
+
+.mejs-captions-selected,
+.mejs-chapters-selected {
+ color: rgba(33, 248, 248, 1);
+}
+
+.mejs-captions-translations {
+ font-size: 10px;
+ margin: 0 0 5px;
+}
+
+.mejs-captions-layer {
+ bottom: 0;
+ color: #fff;
+ font-size: 16px;
+ left: 0;
+ line-height: 20px;
+ position: absolute;
+ text-align: center;
+}
+
+.mejs-captions-layer a {
+ color: #fff;
+ text-decoration: underline;
+}
+
+.mejs-captions-layer[lang=ar] {
+ font-size: 20px;
+ font-weight: normal;
+}
+
+.mejs-captions-position {
+ bottom: 15px;
+ left: 0;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs-captions-position-hover {
+ bottom: 35px;
+}
+
+.mejs-captions-text,
+.mejs-captions-text * {
+ background: rgba(20, 20, 20, 0.5);
+ box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5);
+ padding: 0;
+ white-space: pre-wrap;
+}
+
+.mejs-container.mejs-hide-cues video::-webkit-media-text-track-container {
+ display: none;
+}
+
+/* End: Track (Captions and Chapters) */
+
+/* Start: Error */
+.mejs-overlay-error {
+ position: relative;
+}
+.mejs-overlay-error > img {
+ left: 0;
+ max-width: 100%;
+ position: absolute;
+ top: 0;
+ z-index: -1;
+}
+.mejs-cannotplay,
+.mejs-cannotplay a {
+ color: #fff;
+ font-size: 0.8em;
+}
+
+.mejs-cannotplay {
+ position: relative;
+}
+
+.mejs-cannotplay p,
+.mejs-cannotplay a {
+ display: inline-block;
+ padding: 0 15px;
+ width: 100%;
+}
+/* End: Error */
\ No newline at end of file
diff --git a/node_modules/mediaelement/build/mediaelementplayer-legacy.min.css b/node_modules/mediaelement/build/mediaelementplayer-legacy.min.css
new file mode 100644
index 00000000..2fe23274
--- /dev/null
+++ b/node_modules/mediaelement/build/mediaelementplayer-legacy.min.css
@@ -0,0 +1 @@
+.mejs-offscreen{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal}.mejs-container{background:#000;font-family:Helvetica,Arial,serif;position:relative;text-align:left;text-indent:0;vertical-align:top}.mejs-container,.mejs-container *{box-sizing:border-box}.mejs-container video::-webkit-media-controls,.mejs-container video::-webkit-media-controls-panel,.mejs-container video::-webkit-media-controls-panel-container,.mejs-container video::-webkit-media-controls-start-playback-button{-webkit-appearance:none;display:none!important}.mejs-fill-container,.mejs-fill-container .mejs-container{height:100%;width:100%}.mejs-fill-container{background:transparent;margin:0 auto;overflow:hidden;position:relative}.mejs-container:focus{outline:none}.mejs-iframe-overlay{height:100%;position:absolute;width:100%}.mejs-embed,.mejs-embed body{background:#000;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.mejs-fullscreen{overflow:hidden!important}.mejs-container-fullscreen{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{height:100%!important;width:100%!important}.mejs-background,.mejs-mediaelement{left:0;position:absolute;top:0}.mejs-mediaelement{height:100%;width:100%;z-index:0}.mejs-poster{background-position:50% 50%;background-repeat:no-repeat;background-size:cover;left:0;position:absolute;top:0;z-index:1}:root .mejs-poster-img{display:none}.mejs-poster-img{border:0;padding:0}.mejs-overlay{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;left:0;position:absolute;top:0}.mejs-layer{z-index:1}.mejs-overlay-play{cursor:pointer}.mejs-overlay-button{background:url(mejs-controls.svg) no-repeat;background-position:0 -39px;height:80px;width:80px}.mejs-overlay:hover>.mejs-overlay-button{background-position:-80px -39px}.mejs-overlay-loading{height:80px;width:80px}.mejs-overlay-loading-bg-img{-webkit-animation:a 1s linear infinite;animation:a 1s linear infinite;background:transparent url(mejs-controls.svg) -160px -40px no-repeat;display:block;height:80px;width:80px;z-index:1}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.mejs-controls{bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:40px;left:0;list-style-type:none;margin:0;padding:0 10px;position:absolute;width:100%;z-index:3}.mejs-controls:not([style*="display: none"]){background:rgba(255,0,0,.7);background:-webkit-linear-gradient(transparent,rgba(0,0,0,.35));background:linear-gradient(transparent,rgba(0,0,0,.35))}.mejs-button,.mejs-time,.mejs-time-rail{font-size:10px;height:40px;line-height:10px;margin:0;width:32px}.mejs-button>button{background:transparent url(mejs-controls.svg);border:0;cursor:pointer;display:block;font-size:0;height:20px;line-height:0;margin:10px 6px;overflow:hidden;padding:0;position:absolute;text-decoration:none;width:20px}.mejs-button>button:focus{outline:1px dotted #999}.mejs-container-keyboard-inactive [role=slider],.mejs-container-keyboard-inactive [role=slider]:focus,.mejs-container-keyboard-inactive a,.mejs-container-keyboard-inactive a:focus,.mejs-container-keyboard-inactive button,.mejs-container-keyboard-inactive button:focus{outline:0}.mejs-time{box-sizing:content-box;color:#fff;font-size:11px;font-weight:700;height:24px;overflow:hidden;padding:16px 6px 0;text-align:center;width:auto}.mejs-play>button{background-position:0 0}.mejs-pause>button{background-position:-20px 0}.mejs-replay>button{background-position:-160px 0}.mejs-time-rail{direction:ltr;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:40px;margin:0 10px;padding-top:10px;position:relative}.mejs-time-buffering,.mejs-time-current,.mejs-time-float,.mejs-time-float-corner,.mejs-time-float-current,.mejs-time-hovered,.mejs-time-loaded,.mejs-time-marker,.mejs-time-total{border-radius:2px;cursor:pointer;display:block;height:10px;position:absolute}.mejs-time-total{background:hsla(0,0%,100%,.3);margin:5px 0 0;width:100%}.mejs-time-buffering{-webkit-animation:b 2s linear infinite;animation:b 2s linear infinite;background:-webkit-linear-gradient(135deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background:linear-gradient(-45deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background-size:15px 15px;width:100%}@-webkit-keyframes b{0%{background-position:0 0}to{background-position:30px 0}}@keyframes b{0%{background-position:0 0}to{background-position:30px 0}}.mejs-time-loaded{background:hsla(0,0%,100%,.3)}.mejs-time-current,.mejs-time-handle-content{background:hsla(0,0%,100%,.9)}.mejs-time-hovered{background:hsla(0,0%,100%,.5);z-index:10}.mejs-time-hovered.negative{background:rgba(0,0,0,.2)}.mejs-time-buffering,.mejs-time-current,.mejs-time-hovered,.mejs-time-loaded{left:0;-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transition:all .15s ease-in;transition:all .15s ease-in;width:100%}.mejs-time-buffering{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1)}.mejs-time-hovered{-webkit-transition:height .1s cubic-bezier(.44,0,1,1);transition:height .1s cubic-bezier(.44,0,1,1)}.mejs-time-hovered.no-hover{-webkit-transform:scaleX(0)!important;-ms-transform:scaleX(0)!important;transform:scaleX(0)!important}.mejs-time-handle,.mejs-time-handle-content{border:4px solid transparent;cursor:pointer;left:0;position:absolute;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);z-index:11}.mejs-time-handle-content{border:4px solid hsla(0,0%,100%,.9);border-radius:50%;height:10px;left:-7px;top:-4px;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);width:10px}.mejs-time-rail .mejs-time-handle-content:active,.mejs-time-rail .mejs-time-handle-content:focus,.mejs-time-rail:hover .mejs-time-handle-content{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.mejs-time-float{background:#eee;border:1px solid #333;bottom:100%;color:#111;display:none;height:17px;margin-bottom:9px;position:absolute;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:36px}.mejs-time-float-current{display:block;left:0;margin:2px;text-align:center;width:30px}.mejs-time-float-corner{border:5px solid #eee;border-color:#eee transparent transparent;border-radius:0;display:block;height:0;left:50%;line-height:0;position:absolute;top:100%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:0}.mejs-long-video .mejs-time-float{margin-left:-23px;width:64px}.mejs-long-video .mejs-time-float-current{width:60px}.mejs-broadcast{color:#fff;height:10px;position:absolute;top:15px;width:100%}.mejs-fullscreen-button>button{background-position:-80px 0}.mejs-unfullscreen>button{background-position:-100px 0}.mejs-mute>button{background-position:-60px 0}.mejs-unmute>button{background-position:-40px 0}.mejs-volume-button{position:relative}.mejs-volume-button>.mejs-volume-slider{-webkit-backface-visibility:hidden;background:rgba(50,50,50,.7);border-radius:0;bottom:100%;display:none;height:115px;left:50%;margin:0;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:25px;z-index:1}.mejs-volume-button:hover{border-radius:0 0 4px 4px}.mejs-volume-total{background:hsla(0,0%,100%,.5);height:100px;left:50%;margin:0;position:absolute;top:8px;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:2px}.mejs-volume-current{left:0;margin:0;width:100%}.mejs-volume-current,.mejs-volume-handle{background:hsla(0,0%,100%,.9);position:absolute}.mejs-volume-handle{border-radius:1px;cursor:ns-resize;height:6px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:16px}.mejs-horizontal-volume-slider{display:block;height:36px;position:relative;vertical-align:middle;width:56px}.mejs-horizontal-volume-total{background:rgba(50,50,50,.8);height:8px;top:16px;width:50px}.mejs-horizontal-volume-current,.mejs-horizontal-volume-total{border-radius:2px;font-size:1px;left:0;margin:0;padding:0;position:absolute}.mejs-horizontal-volume-current{background:hsla(0,0%,100%,.8);height:100%;top:0;width:100%}.mejs-horizontal-volume-handle{display:none}.mejs-captions-button,.mejs-chapters-button{position:relative}.mejs-captions-button>button{background-position:-140px 0}.mejs-chapters-button>button{background-position:-180px 0}.mejs-captions-button>.mejs-captions-selector,.mejs-chapters-button>.mejs-chapters-selector{background:rgba(50,50,50,.7);border:1px solid transparent;border-radius:0;bottom:100%;margin-right:-43px;overflow:hidden;padding:0;position:absolute;right:50%;visibility:visible;width:86px}.mejs-chapters-button>.mejs-chapters-selector{margin-right:-55px;width:110px}.mejs-captions-selector-list,.mejs-chapters-selector-list{list-style-type:none!important;margin:0;overflow:hidden;padding:0}.mejs-captions-selector-list-item,.mejs-chapters-selector-list-item{color:#fff;cursor:pointer;display:block;list-style-type:none!important;margin:0 0 6px;overflow:hidden;padding:0}.mejs-captions-selector-list-item:hover,.mejs-chapters-selector-list-item:hover{background-color:#c8c8c8!important;background-color:hsla(0,0%,100%,.4)!important}.mejs-captions-selector-input,.mejs-chapters-selector-input{clear:both;float:left;left:-1000px;margin:3px 3px 0 5px;position:absolute}.mejs-captions-selector-label,.mejs-chapters-selector-label{cursor:pointer;float:left;font-size:10px;line-height:15px;padding:4px 10px 0;width:100%}.mejs-captions-selected,.mejs-chapters-selected{color:#21f8f8}.mejs-captions-translations{font-size:10px;margin:0 0 5px}.mejs-captions-layer{bottom:0;color:#fff;font-size:16px;left:0;line-height:20px;position:absolute;text-align:center}.mejs-captions-layer a{color:#fff;text-decoration:underline}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs-captions-position{bottom:15px;left:0;position:absolute;width:100%}.mejs-captions-position-hover{bottom:35px}.mejs-captions-text,.mejs-captions-text *{background:hsla(0,0%,8%,.5);box-shadow:5px 0 0 hsla(0,0%,8%,.5),-5px 0 0 hsla(0,0%,8%,.5);padding:0;white-space:pre-wrap}.mejs-container.mejs-hide-cues video::-webkit-media-text-track-container{display:none}.mejs-overlay-error{position:relative}.mejs-overlay-error>img{left:0;max-width:100%;position:absolute;top:0;z-index:-1}.mejs-cannotplay,.mejs-cannotplay a{color:#fff;font-size:.8em}.mejs-cannotplay{position:relative}.mejs-cannotplay a,.mejs-cannotplay p{display:inline-block;padding:0 15px;width:100%}
\ No newline at end of file
diff --git a/node_modules/mediaelement/build/mediaelementplayer.css b/node_modules/mediaelement/build/mediaelementplayer.css
new file mode 100644
index 00000000..7cd9afc1
--- /dev/null
+++ b/node_modules/mediaelement/build/mediaelementplayer.css
@@ -0,0 +1,774 @@
+/* Accessibility: hide screen reader texts (and prefer "top" for RTL languages).
+Reference: http://blog.rrwd.nl/2015/04/04/the-screen-reader-text-class-why-and-how/ */
+.mejs__offscreen {
+ border: 0;
+ clip: rect( 1px, 1px, 1px, 1px );
+ -webkit-clip-path: inset( 50% );
+ clip-path: inset( 50% );
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+ word-wrap: normal;
+}
+
+.mejs__container {
+ background: #000;
+ box-sizing: border-box;
+ font-family: 'Helvetica', Arial, serif;
+ position: relative;
+ text-align: left;
+ text-indent: 0;
+ vertical-align: top;
+}
+
+.mejs__container * {
+ box-sizing: border-box;
+}
+
+/* Hide native play button and control bar from iOS to favor plugin button */
+.mejs__container video::-webkit-media-controls,
+.mejs__container video::-webkit-media-controls-panel,
+.mejs__container video::-webkit-media-controls-panel-container,
+.mejs__container video::-webkit-media-controls-start-playback-button {
+ -webkit-appearance: none;
+ display: none !important;
+}
+
+.mejs__fill-container,
+.mejs__fill-container .mejs__container {
+ height: 100%;
+ width: 100%;
+}
+
+.mejs__fill-container {
+ background: transparent;
+ margin: 0 auto;
+ overflow: hidden;
+ position: relative;
+}
+
+.mejs__container:focus {
+ outline: none;
+}
+
+.mejs__iframe-overlay {
+ height: 100%;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs__embed,
+.mejs__embed body {
+ background: #000;
+ height: 100%;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+ width: 100%;
+}
+
+.mejs__fullscreen {
+ overflow: hidden !important;
+}
+
+.mejs__container-fullscreen {
+ bottom: 0;
+ left: 0;
+ overflow: hidden;
+ position: fixed;
+ right: 0;
+ top: 0;
+ z-index: 1000;
+}
+
+.mejs__container-fullscreen .mejs__mediaelement,
+.mejs__container-fullscreen video {
+ height: 100% !important;
+ width: 100% !important;
+}
+
+/* Start: LAYERS */
+.mejs__background {
+ left: 0;
+ position: absolute;
+ top: 0;
+}
+
+.mejs__mediaelement {
+ height: 100%;
+ left: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+ z-index: 0;
+}
+
+.mejs__poster {
+ background-position: 50% 50%;
+ background-repeat: no-repeat;
+ background-size: cover;
+ left: 0;
+ position: absolute;
+ top: 0;
+ z-index: 1;
+}
+
+:root .mejs__poster-img {
+ display: none;
+}
+
+.mejs__poster-img {
+ border: 0;
+ padding: 0;
+}
+
+.mejs__overlay {
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ -ms-flex-align: center;
+ align-items: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ left: 0;
+ position: absolute;
+ top: 0;
+}
+
+.mejs__layer {
+ z-index: 1;
+}
+
+.mejs__overlay-play {
+ cursor: pointer;
+}
+
+.mejs__overlay-button {
+ background: url('mejs-controls.svg') no-repeat;
+ background-position: 0 -39px;
+ height: 80px;
+ width: 80px;
+}
+
+.mejs__overlay:hover > .mejs__overlay-button {
+ background-position: -80px -39px;
+}
+
+.mejs__overlay-loading {
+ height: 80px;
+ width: 80px;
+}
+
+.mejs__overlay-loading-bg-img {
+ -webkit-animation: mejs__loading-spinner 1s linear infinite;
+ animation: mejs__loading-spinner 1s linear infinite;
+ background: transparent url('mejs-controls.svg') -160px -40px no-repeat;
+ display: block;
+ height: 80px;
+ width: 80px;
+ z-index: 1;
+}
+
+@-webkit-keyframes mejs__loading-spinner {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+@keyframes mejs__loading-spinner {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+/* End: LAYERS */
+
+/* Start: CONTROL BAR */
+.mejs__controls {
+ bottom: 0;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: -ms-flexbox;
+ display: flex;
+ height: 40px;
+ left: 0;
+ list-style-type: none;
+ margin: 0;
+ padding: 0 10px;
+ position: absolute;
+ width: 100%;
+ z-index: 3;
+}
+
+.mejs__controls:not([style*='display: none']) {
+ background: rgba(255, 0, 0, 0.7);
+ background: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.35));
+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.35));
+}
+
+.mejs__button,
+.mejs__time,
+.mejs__time-rail {
+ font-size: 10px;
+ height: 40px;
+ line-height: 10px;
+ margin: 0;
+ width: 32px;
+}
+
+.mejs__button > button {
+ background: transparent url('mejs-controls.svg');
+ border: 0;
+ cursor: pointer;
+ display: block;
+ font-size: 0;
+ height: 20px;
+ line-height: 0;
+ margin: 10px 6px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ text-decoration: none;
+ width: 20px;
+}
+
+/* :focus for accessibility */
+.mejs__button > button:focus {
+ outline: dotted 1px #999;
+}
+
+.mejs__container-keyboard-inactive a,
+.mejs__container-keyboard-inactive a:focus,
+.mejs__container-keyboard-inactive button,
+.mejs__container-keyboard-inactive button:focus,
+.mejs__container-keyboard-inactive [role=slider],
+.mejs__container-keyboard-inactive [role=slider]:focus {
+ outline: 0;
+}
+
+/* End: CONTROL BAR */
+
+/* Start: Time (Current / Duration) */
+.mejs__time {
+ box-sizing: content-box;
+ color: #fff;
+ font-size: 11px;
+ font-weight: bold;
+ height: 24px;
+ overflow: hidden;
+ padding: 16px 6px 0;
+ text-align: center;
+ width: auto;
+}
+
+/* End: Time (Current / Duration) */
+
+/* Start: Play/Pause/Stop */
+.mejs__play > button {
+ background-position: 0 0;
+}
+
+.mejs__pause > button {
+ background-position: -20px 0;
+}
+
+.mejs__replay > button {
+ background-position: -160px 0;
+}
+
+/* End: Play/Pause/Stop */
+
+/* Start: Progress Bar */
+.mejs__time-rail {
+ direction: ltr;
+ -webkit-box-flex: 1;
+ -webkit-flex-grow: 1;
+ -ms-flex-positive: 1;
+ flex-grow: 1;
+ height: 40px;
+ margin: 0 10px;
+ padding-top: 10px;
+ position: relative;
+}
+
+.mejs__time-total,
+.mejs__time-buffering,
+.mejs__time-loaded,
+.mejs__time-current,
+.mejs__time-float,
+.mejs__time-hovered,
+.mejs__time-float-current,
+.mejs__time-float-corner,
+.mejs__time-marker {
+ border-radius: 2px;
+ cursor: pointer;
+ display: block;
+ height: 10px;
+ position: absolute;
+}
+
+.mejs__time-total {
+ background: rgba(255, 255, 255, 0.3);
+ margin: 5px 0 0;
+ width: 100%;
+}
+
+.mejs__time-buffering {
+ -webkit-animation: buffering-stripes 2s linear infinite;
+ animation: buffering-stripes 2s linear infinite;
+ background: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
+ background: linear-gradient(-45deg, rgba(255, 255, 255, 0.4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.4) 75%, transparent 75%, transparent);
+ background-size: 15px 15px;
+ width: 100%;
+}
+
+@-webkit-keyframes buffering-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 30px 0;
+ }
+}
+
+@keyframes buffering-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 30px 0;
+ }
+}
+
+.mejs__time-loaded {
+ background: rgba(255, 255, 255, 0.3);
+}
+
+.mejs__time-current,
+.mejs__time-handle-content {
+ background: rgba(255, 255, 255, 0.9);
+}
+
+.mejs__time-hovered {
+ background: rgba(255, 255, 255, 0.5);
+ z-index: 10;
+}
+
+.mejs__time-hovered.negative {
+ background: rgba(0, 0, 0, 0.2);
+}
+
+.mejs__time-current,
+.mejs__time-buffering,
+.mejs__time-loaded,
+.mejs__time-hovered {
+ left: 0;
+ -webkit-transform: scaleX(0);
+ -ms-transform: scaleX(0);
+ transform: scaleX(0);
+ -webkit-transform-origin: 0 0;
+ -ms-transform-origin: 0 0;
+ transform-origin: 0 0;
+ -webkit-transition: 0.15s ease-in all;
+ transition: 0.15s ease-in all;
+ width: 100%;
+}
+
+.mejs__time-buffering {
+ -webkit-transform: scaleX(1);
+ -ms-transform: scaleX(1);
+ transform: scaleX(1);
+}
+
+.mejs__time-hovered {
+ -webkit-transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
+ transition: height 0.1s cubic-bezier(0.44, 0, 1, 1);
+}
+
+.mejs__time-hovered.no-hover {
+ -webkit-transform: scaleX(0) !important;
+ -ms-transform: scaleX(0) !important;
+ transform: scaleX(0) !important;
+}
+
+.mejs__time-handle,
+.mejs__time-handle-content {
+ border: 4px solid transparent;
+ cursor: pointer;
+ left: 0;
+ position: absolute;
+ -webkit-transform: translateX(0);
+ -ms-transform: translateX(0);
+ transform: translateX(0);
+ z-index: 11;
+}
+
+.mejs__time-handle-content {
+ border: 4px solid rgba(255, 255, 255, 0.9);
+ border-radius: 50%;
+ height: 10px;
+ left: -7px;
+ top: -4px;
+ -webkit-transform: scale(0);
+ -ms-transform: scale(0);
+ transform: scale(0);
+ width: 10px;
+}
+
+.mejs__time-rail:hover .mejs__time-handle-content,
+.mejs__time-rail .mejs__time-handle-content:focus,
+.mejs__time-rail .mejs__time-handle-content:active {
+ -webkit-transform: scale(1);
+ -ms-transform: scale(1);
+ transform: scale(1);
+}
+
+.mejs__time-float {
+ background: #eee;
+ border: solid 1px #333;
+ bottom: 100%;
+ color: #111;
+ display: none;
+ height: 17px;
+ margin-bottom: 9px;
+ position: absolute;
+ text-align: center;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 36px;
+}
+
+.mejs__time-float-current {
+ display: block;
+ left: 0;
+ margin: 2px;
+ text-align: center;
+ width: 30px;
+}
+
+.mejs__time-float-corner {
+ border: solid 5px #eee;
+ border-color: #eee transparent transparent;
+ border-radius: 0;
+ display: block;
+ height: 0;
+ left: 50%;
+ line-height: 0;
+ position: absolute;
+ top: 100%;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 0;
+}
+
+.mejs__long-video .mejs__time-float {
+ margin-left: -23px;
+ width: 64px;
+}
+
+.mejs__long-video .mejs__time-float-current {
+ width: 60px;
+}
+
+.mejs__broadcast {
+ color: #fff;
+ height: 10px;
+ position: absolute;
+ top: 15px;
+ width: 100%;
+}
+
+/* End: Progress Bar */
+
+/* Start: Fullscreen */
+.mejs__fullscreen-button > button {
+ background-position: -80px 0;
+}
+
+.mejs__unfullscreen > button {
+ background-position: -100px 0;
+}
+
+/* End: Fullscreen */
+
+/* Start: Mute/Volume */
+.mejs__mute > button {
+ background-position: -60px 0;
+}
+
+.mejs__unmute > button {
+ background-position: -40px 0;
+}
+
+.mejs__volume-button {
+ position: relative;
+}
+
+.mejs__volume-button > .mejs__volume-slider {
+ -webkit-backface-visibility: hidden;
+ background: rgba(50, 50, 50, 0.7);
+ border-radius: 0;
+ bottom: 100%;
+ display: none;
+ height: 115px;
+ left: 50%;
+ margin: 0;
+ position: absolute;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 25px;
+ z-index: 1;
+}
+
+.mejs__volume-button:hover {
+ border-radius: 0 0 4px 4px;
+}
+
+.mejs__volume-total {
+ background: rgba(255, 255, 255, 0.5);
+ height: 100px;
+ left: 50%;
+ margin: 0;
+ position: absolute;
+ top: 8px;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 2px;
+}
+
+.mejs__volume-current {
+ background: rgba(255, 255, 255, 0.9);
+ left: 0;
+ margin: 0;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs__volume-handle {
+ background: rgba(255, 255, 255, 0.9);
+ border-radius: 1px;
+ cursor: ns-resize;
+ height: 6px;
+ left: 50%;
+ position: absolute;
+ -webkit-transform: translateX(-50%);
+ -ms-transform: translateX(-50%);
+ transform: translateX(-50%);
+ width: 16px;
+}
+
+.mejs__horizontal-volume-slider {
+ display: block;
+ height: 36px;
+ position: relative;
+ vertical-align: middle;
+ width: 56px;
+}
+
+.mejs__horizontal-volume-total {
+ background: rgba(50, 50, 50, 0.8);
+ border-radius: 2px;
+ font-size: 1px;
+ height: 8px;
+ left: 0;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ top: 16px;
+ width: 50px;
+}
+
+.mejs__horizontal-volume-current {
+ background: rgba(255, 255, 255, 0.8);
+ border-radius: 2px;
+ font-size: 1px;
+ height: 100%;
+ left: 0;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+
+.mejs__horizontal-volume-handle {
+ display: none;
+}
+
+/* End: Mute/Volume */
+
+/* Start: Track (Captions and Chapters) */
+.mejs__captions-button,
+.mejs__chapters-button {
+ position: relative;
+}
+
+.mejs__captions-button > button {
+ background-position: -140px 0;
+}
+
+.mejs__chapters-button > button {
+ background-position: -180px 0;
+}
+
+.mejs__captions-button > .mejs__captions-selector,
+.mejs__chapters-button > .mejs__chapters-selector {
+ background: rgba(50, 50, 50, 0.7);
+ border: solid 1px transparent;
+ border-radius: 0;
+ bottom: 100%;
+ margin-right: -43px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ right: 50%;
+ visibility: visible;
+ width: 86px;
+}
+
+.mejs__chapters-button > .mejs__chapters-selector {
+ margin-right: -55px;
+ width: 110px;
+}
+
+.mejs__captions-selector-list,
+.mejs__chapters-selector-list {
+ list-style-type: none !important;
+ margin: 0;
+ overflow: hidden;
+ padding: 0;
+}
+
+.mejs__captions-selector-list-item,
+.mejs__chapters-selector-list-item {
+ color: #fff;
+ cursor: pointer;
+ display: block;
+ list-style-type: none !important;
+ margin: 0 0 6px;
+ overflow: hidden;
+ padding: 0;
+}
+
+.mejs__captions-selector-list-item:hover,
+.mejs__chapters-selector-list-item:hover {
+ background-color: rgb(200, 200, 200) !important;
+ background-color: rgba(255, 255, 255, 0.4) !important;
+}
+
+.mejs__captions-selector-input,
+.mejs__chapters-selector-input {
+ clear: both;
+ float: left;
+ left: -1000px;
+ margin: 3px 3px 0 5px;
+ position: absolute;
+}
+
+.mejs__captions-selector-label,
+.mejs__chapters-selector-label {
+ cursor: pointer;
+ float: left;
+ font-size: 10px;
+ line-height: 15px;
+ padding: 4px 10px 0;
+ width: 100%;
+}
+
+.mejs__captions-selected,
+.mejs__chapters-selected {
+ color: rgba(33, 248, 248, 1);
+}
+
+.mejs__captions-translations {
+ font-size: 10px;
+ margin: 0 0 5px;
+}
+
+.mejs__captions-layer {
+ bottom: 0;
+ color: #fff;
+ font-size: 16px;
+ left: 0;
+ line-height: 20px;
+ position: absolute;
+ text-align: center;
+}
+
+.mejs__captions-layer a {
+ color: #fff;
+ text-decoration: underline;
+}
+
+.mejs__captions-layer[lang=ar] {
+ font-size: 20px;
+ font-weight: normal;
+}
+
+.mejs__captions-position {
+ bottom: 15px;
+ left: 0;
+ position: absolute;
+ width: 100%;
+}
+
+.mejs__captions-position-hover {
+ bottom: 35px;
+}
+
+.mejs__captions-text,
+.mejs__captions-text * {
+ background: rgba(20, 20, 20, 0.5);
+ box-shadow: 5px 0 0 rgba(20, 20, 20, 0.5), -5px 0 0 rgba(20, 20, 20, 0.5);
+ padding: 0;
+ white-space: pre-wrap;
+}
+
+.mejs__container.mejs__hide-cues video::-webkit-media-text-track-container {
+ display: none;
+}
+
+/* End: Track (Captions and Chapters) */
+
+/* Start: Error */
+.mejs__overlay-error {
+ position: relative;
+}
+.mejs__overlay-error > img {
+ left: 0;
+ max-width: 100%;
+ position: absolute;
+ top: 0;
+ z-index: -1;
+}
+.mejs__cannotplay,
+.mejs__cannotplay a {
+ color: #fff;
+ font-size: 0.8em;
+}
+
+.mejs__cannotplay {
+ position: relative;
+}
+
+.mejs__cannotplay p,
+.mejs__cannotplay a {
+ display: inline-block;
+ padding: 0 15px;
+ width: 100%;
+}
+/* End: Error */
\ No newline at end of file
diff --git a/node_modules/mediaelement/build/mediaelementplayer.min.css b/node_modules/mediaelement/build/mediaelementplayer.min.css
new file mode 100644
index 00000000..e3c08f35
--- /dev/null
+++ b/node_modules/mediaelement/build/mediaelementplayer.min.css
@@ -0,0 +1 @@
+.mejs__offscreen{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal}.mejs__container{background:#000;font-family:Helvetica,Arial,serif;position:relative;text-align:left;text-indent:0;vertical-align:top}.mejs__container,.mejs__container *{box-sizing:border-box}.mejs__container video::-webkit-media-controls,.mejs__container video::-webkit-media-controls-panel,.mejs__container video::-webkit-media-controls-panel-container,.mejs__container video::-webkit-media-controls-start-playback-button{-webkit-appearance:none;display:none!important}.mejs__fill-container,.mejs__fill-container .mejs__container{height:100%;width:100%}.mejs__fill-container{background:transparent;margin:0 auto;overflow:hidden;position:relative}.mejs__container:focus{outline:none}.mejs__iframe-overlay{height:100%;position:absolute;width:100%}.mejs__embed,.mejs__embed body{background:#000;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.mejs__fullscreen{overflow:hidden!important}.mejs__container-fullscreen{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.mejs__container-fullscreen .mejs__mediaelement,.mejs__container-fullscreen video{height:100%!important;width:100%!important}.mejs__background,.mejs__mediaelement{left:0;position:absolute;top:0}.mejs__mediaelement{height:100%;width:100%;z-index:0}.mejs__poster{background-position:50% 50%;background-repeat:no-repeat;background-size:cover;left:0;position:absolute;top:0;z-index:1}:root .mejs__poster-img{display:none}.mejs__poster-img{border:0;padding:0}.mejs__overlay{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;left:0;position:absolute;top:0}.mejs__layer{z-index:1}.mejs__overlay-play{cursor:pointer}.mejs__overlay-button{background:url(mejs-controls.svg) no-repeat;background-position:0 -39px;height:80px;width:80px}.mejs__overlay:hover>.mejs__overlay-button{background-position:-80px -39px}.mejs__overlay-loading{height:80px;width:80px}.mejs__overlay-loading-bg-img{-webkit-animation:a 1s linear infinite;animation:a 1s linear infinite;background:transparent url(mejs-controls.svg) -160px -40px no-repeat;display:block;height:80px;width:80px;z-index:1}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.mejs__controls{bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:40px;left:0;list-style-type:none;margin:0;padding:0 10px;position:absolute;width:100%;z-index:3}.mejs__controls:not([style*="display: none"]){background:rgba(255,0,0,.7);background:-webkit-linear-gradient(transparent,rgba(0,0,0,.35));background:linear-gradient(transparent,rgba(0,0,0,.35))}.mejs__button,.mejs__time,.mejs__time-rail{font-size:10px;height:40px;line-height:10px;margin:0;width:32px}.mejs__button>button{background:transparent url(mejs-controls.svg);border:0;cursor:pointer;display:block;font-size:0;height:20px;line-height:0;margin:10px 6px;overflow:hidden;padding:0;position:absolute;text-decoration:none;width:20px}.mejs__button>button:focus{outline:1px dotted #999}.mejs__container-keyboard-inactive [role=slider],.mejs__container-keyboard-inactive [role=slider]:focus,.mejs__container-keyboard-inactive a,.mejs__container-keyboard-inactive a:focus,.mejs__container-keyboard-inactive button,.mejs__container-keyboard-inactive button:focus{outline:0}.mejs__time{box-sizing:content-box;color:#fff;font-size:11px;font-weight:700;height:24px;overflow:hidden;padding:16px 6px 0;text-align:center;width:auto}.mejs__play>button{background-position:0 0}.mejs__pause>button{background-position:-20px 0}.mejs__replay>button{background-position:-160px 0}.mejs__time-rail{direction:ltr;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:40px;margin:0 10px;padding-top:10px;position:relative}.mejs__time-buffering,.mejs__time-current,.mejs__time-float,.mejs__time-float-corner,.mejs__time-float-current,.mejs__time-hovered,.mejs__time-loaded,.mejs__time-marker,.mejs__time-total{border-radius:2px;cursor:pointer;display:block;height:10px;position:absolute}.mejs__time-total{background:hsla(0,0%,100%,.3);margin:5px 0 0;width:100%}.mejs__time-buffering{-webkit-animation:b 2s linear infinite;animation:b 2s linear infinite;background:-webkit-linear-gradient(135deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background:linear-gradient(-45deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background-size:15px 15px;width:100%}@-webkit-keyframes b{0%{background-position:0 0}to{background-position:30px 0}}@keyframes b{0%{background-position:0 0}to{background-position:30px 0}}.mejs__time-loaded{background:hsla(0,0%,100%,.3)}.mejs__time-current,.mejs__time-handle-content{background:hsla(0,0%,100%,.9)}.mejs__time-hovered{background:hsla(0,0%,100%,.5);z-index:10}.mejs__time-hovered.negative{background:rgba(0,0,0,.2)}.mejs__time-buffering,.mejs__time-current,.mejs__time-hovered,.mejs__time-loaded{left:0;-webkit-transform:scaleX(0);-ms-transform:scaleX(0);transform:scaleX(0);-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-transition:all .15s ease-in;transition:all .15s ease-in;width:100%}.mejs__time-buffering{-webkit-transform:scaleX(1);-ms-transform:scaleX(1);transform:scaleX(1)}.mejs__time-hovered{-webkit-transition:height .1s cubic-bezier(.44,0,1,1);transition:height .1s cubic-bezier(.44,0,1,1)}.mejs__time-hovered.no-hover{-webkit-transform:scaleX(0)!important;-ms-transform:scaleX(0)!important;transform:scaleX(0)!important}.mejs__time-handle,.mejs__time-handle-content{border:4px solid transparent;cursor:pointer;left:0;position:absolute;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);z-index:11}.mejs__time-handle-content{border:4px solid hsla(0,0%,100%,.9);border-radius:50%;height:10px;left:-7px;top:-4px;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);width:10px}.mejs__time-rail .mejs__time-handle-content:active,.mejs__time-rail .mejs__time-handle-content:focus,.mejs__time-rail:hover .mejs__time-handle-content{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.mejs__time-float{background:#eee;border:1px solid #333;bottom:100%;color:#111;display:none;height:17px;margin-bottom:9px;position:absolute;text-align:center;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:36px}.mejs__time-float-current{display:block;left:0;margin:2px;text-align:center;width:30px}.mejs__time-float-corner{border:5px solid #eee;border-color:#eee transparent transparent;border-radius:0;display:block;height:0;left:50%;line-height:0;position:absolute;top:100%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:0}.mejs__long-video .mejs__time-float{margin-left:-23px;width:64px}.mejs__long-video .mejs__time-float-current{width:60px}.mejs__broadcast{color:#fff;height:10px;position:absolute;top:15px;width:100%}.mejs__fullscreen-button>button{background-position:-80px 0}.mejs__unfullscreen>button{background-position:-100px 0}.mejs__mute>button{background-position:-60px 0}.mejs__unmute>button{background-position:-40px 0}.mejs__volume-button{position:relative}.mejs__volume-button>.mejs__volume-slider{-webkit-backface-visibility:hidden;background:rgba(50,50,50,.7);border-radius:0;bottom:100%;display:none;height:115px;left:50%;margin:0;position:absolute;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:25px;z-index:1}.mejs__volume-button:hover{border-radius:0 0 4px 4px}.mejs__volume-total{background:hsla(0,0%,100%,.5);height:100px;left:50%;margin:0;position:absolute;top:8px;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:2px}.mejs__volume-current{left:0;margin:0;width:100%}.mejs__volume-current,.mejs__volume-handle{background:hsla(0,0%,100%,.9);position:absolute}.mejs__volume-handle{border-radius:1px;cursor:ns-resize;height:6px;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%);width:16px}.mejs__horizontal-volume-slider{display:block;height:36px;position:relative;vertical-align:middle;width:56px}.mejs__horizontal-volume-total{background:rgba(50,50,50,.8);height:8px;top:16px;width:50px}.mejs__horizontal-volume-current,.mejs__horizontal-volume-total{border-radius:2px;font-size:1px;left:0;margin:0;padding:0;position:absolute}.mejs__horizontal-volume-current{background:hsla(0,0%,100%,.8);height:100%;top:0;width:100%}.mejs__horizontal-volume-handle{display:none}.mejs__captions-button,.mejs__chapters-button{position:relative}.mejs__captions-button>button{background-position:-140px 0}.mejs__chapters-button>button{background-position:-180px 0}.mejs__captions-button>.mejs__captions-selector,.mejs__chapters-button>.mejs__chapters-selector{background:rgba(50,50,50,.7);border:1px solid transparent;border-radius:0;bottom:100%;margin-right:-43px;overflow:hidden;padding:0;position:absolute;right:50%;visibility:visible;width:86px}.mejs__chapters-button>.mejs__chapters-selector{margin-right:-55px;width:110px}.mejs__captions-selector-list,.mejs__chapters-selector-list{list-style-type:none!important;margin:0;overflow:hidden;padding:0}.mejs__captions-selector-list-item,.mejs__chapters-selector-list-item{color:#fff;cursor:pointer;display:block;list-style-type:none!important;margin:0 0 6px;overflow:hidden;padding:0}.mejs__captions-selector-list-item:hover,.mejs__chapters-selector-list-item:hover{background-color:#c8c8c8!important;background-color:hsla(0,0%,100%,.4)!important}.mejs__captions-selector-input,.mejs__chapters-selector-input{clear:both;float:left;left:-1000px;margin:3px 3px 0 5px;position:absolute}.mejs__captions-selector-label,.mejs__chapters-selector-label{cursor:pointer;float:left;font-size:10px;line-height:15px;padding:4px 10px 0;width:100%}.mejs__captions-selected,.mejs__chapters-selected{color:#21f8f8}.mejs__captions-translations{font-size:10px;margin:0 0 5px}.mejs__captions-layer{bottom:0;color:#fff;font-size:16px;left:0;line-height:20px;position:absolute;text-align:center}.mejs__captions-layer a{color:#fff;text-decoration:underline}.mejs__captions-layer[lang=ar]{font-size:20px;font-weight:400}.mejs__captions-position{bottom:15px;left:0;position:absolute;width:100%}.mejs__captions-position-hover{bottom:35px}.mejs__captions-text,.mejs__captions-text *{background:hsla(0,0%,8%,.5);box-shadow:5px 0 0 hsla(0,0%,8%,.5),-5px 0 0 hsla(0,0%,8%,.5);padding:0;white-space:pre-wrap}.mejs__container.mejs__hide-cues video::-webkit-media-text-track-container{display:none}.mejs__overlay-error{position:relative}.mejs__overlay-error>img{left:0;max-width:100%;position:absolute;top:0;z-index:-1}.mejs__cannotplay,.mejs__cannotplay a{color:#fff;font-size:.8em}.mejs__cannotplay{position:relative}.mejs__cannotplay a,.mejs__cannotplay p{display:inline-block;padding:0 15px;width:100%}
\ No newline at end of file
diff --git a/node_modules/mediaelement/build/mejs-controls.png b/node_modules/mediaelement/build/mejs-controls.png
new file mode 100644
index 00000000..d1fef0fc
Binary files /dev/null and b/node_modules/mediaelement/build/mejs-controls.png differ
diff --git a/node_modules/mediaelement/build/mejs-controls.svg b/node_modules/mediaelement/build/mejs-controls.svg
new file mode 100644
index 00000000..6f7a3b78
--- /dev/null
+++ b/node_modules/mediaelement/build/mejs-controls.svg
@@ -0,0 +1 @@
+
diff --git a/node_modules/mediaelement/build/renderers/dailymotion.js b/node_modules/mediaelement/build/renderers/dailymotion.js
new file mode 100644
index 00000000..5b7589a9
--- /dev/null
+++ b/node_modules/mediaelement/build/renderers/dailymotion.js
@@ -0,0 +1,415 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */(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 0) {
+ var settings = DailyMotionApi.iframeQueue.pop();
+
+ DM.init({
+ apiKey: settings.apiKey,
+ status: settings.status,
+ cookie: settings.cookie
+ });
+
+ DailyMotionApi.createIframe(settings);
+ }
+ },
+
+ createIframe: function createIframe(settings) {
+
+ var player = DM.player(settings.container, {
+ height: settings.height || '100%',
+ width: settings.width || '100%',
+ video: settings.videoId,
+ params: Object.assign({ api: true }, settings.params),
+ origin: location.host
+ });
+
+ player.addEventListener('apiready', function () {
+ window['__ready__' + settings.id](player, { paused: true, ended: false });
+ });
+ },
+
+ getDailyMotionId: function getDailyMotionId(url) {
+ var parts = url.split('/'),
+ lastPart = parts[parts.length - 1],
+ dashParts = lastPart.split('_');
+
+ return dashParts[0];
+ }
+};
+
+var DailyMotionIframeRenderer = {
+ name: 'dailymotion_iframe',
+ options: {
+ prefix: 'dailymotion_iframe',
+ dailymotion: {
+ width: '100%',
+ height: '100%',
+ params: {
+ autoplay: false,
+ chromeless: 1,
+ info: 0,
+ logo: 0,
+ related: 0
+ },
+ apiKey: null,
+ status: true,
+ cookie: true
+ }
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['video/dailymotion', 'video/x-dailymotion'].indexOf(type.toLowerCase());
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+
+ var dm = {},
+ apiStack = [],
+ readyState = 4;
+
+ var events = void 0,
+ dmPlayer = null,
+ dmIframe = null,
+ muted = mediaElement.originalNode.muted;
+
+ dm.options = options;
+ dm.id = mediaElement.id + '_' + options.prefix;
+ dm.mediaElement = mediaElement;
+
+ var props = mejs.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ dm['get' + capName] = function () {
+ if (dmPlayer !== null) {
+ var value = null;
+
+ switch (propName) {
+ case 'currentTime':
+ return dmPlayer.currentTime;
+ case 'duration':
+ return isNaN(dmPlayer.duration) ? 0 : dmPlayer.duration;
+ case 'volume':
+ return dmPlayer.volume;
+ case 'paused':
+ return dmPlayer.paused;
+ case 'ended':
+ return dmPlayer.ended;
+ case 'muted':
+ muted = dmPlayer.muted;
+ return muted;
+ case 'buffered':
+ var percentLoaded = dmPlayer.bufferedTime,
+ duration = dmPlayer.duration;
+ return {
+ start: function start() {
+ return 0;
+ },
+ end: function end() {
+ return percentLoaded / duration;
+ },
+ length: 1
+ };
+ case 'src':
+ return mediaElement.originalNode.getAttribute('src');
+ case 'readyState':
+ return readyState;
+ }
+
+ return value;
+ } else {
+ return null;
+ }
+ };
+
+ dm['set' + capName] = function (value) {
+ if (dmPlayer !== null) {
+ switch (propName) {
+ case 'src':
+ var url = typeof value === 'string' ? value : value[0].src;
+ dmPlayer.load(DailyMotionApi.getDailyMotionId(url));
+ break;
+ case 'currentTime':
+ dmPlayer.seek(value);
+ break;
+ case 'muted':
+ if (value === true) {
+ dmPlayer.setVolume(0);
+ }
+ dmPlayer.setMuted(value);
+ muted = value;
+ setTimeout(function () {
+ var event = mejs.Utils.createEvent('volumechange', dm);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'volume':
+ dmPlayer.setVolume(value);
+ if (value === 0 && !dmPlayer.muted) {
+ dmPlayer.setMuted(true);
+ muted = true;
+ } else if (value > 0 && dmPlayer.muted) {
+ dmPlayer.setMuted(false);
+ muted = false;
+ }
+
+ setTimeout(function () {
+ var event = mejs.Utils.createEvent('volumechange', dm);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'readyState':
+ var event = mejs.Utils.createEvent('canplay', dm);
+ mediaElement.dispatchEvent(event);
+ break;
+ default:
+
+ break;
+ }
+ } else {
+ apiStack.push({ type: 'set', propName: propName, value: value });
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var methods = mejs.html5media.methods,
+ assignMethods = function assignMethods(methodName) {
+ dm[methodName] = function () {
+ if (dmPlayer !== null) {
+ switch (methodName) {
+ case 'play':
+ return dmPlayer.play();
+ case 'pause':
+ return dmPlayer.pause();
+ case 'load':
+ return null;
+ }
+ } else {
+ apiStack.push({ type: 'call', methodName: methodName });
+ }
+ };
+ };
+
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
+ assignMethods(methods[_i]);
+ }
+
+ window['__ready__' + dm.id] = function (_dmPlayer) {
+
+ mediaElement.dmPlayer = dmPlayer = _dmPlayer;
+
+ if (apiStack.length) {
+ for (var _i2 = 0, _total2 = apiStack.length; _i2 < _total2; _i2++) {
+
+ var stackItem = apiStack[_i2];
+
+ if (stackItem.type === 'set') {
+ var propName = stackItem.propName,
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ dm['set' + capName](stackItem.value);
+ } else if (stackItem.type === 'call') {
+ dm[stackItem.methodName]();
+ }
+ }
+ }
+
+ dmIframe = document.getElementById(dm.id);
+
+ events = ['mouseover', 'mouseout'];
+ var assignEvents = function assignEvents(e) {
+ var event = mejs.Utils.createEvent(e.type, dm);
+ mediaElement.dispatchEvent(event);
+ };
+
+ for (var _i3 = 0, _total3 = events.length; _i3 < _total3; _i3++) {
+ dmIframe.addEventListener(events[_i3], assignEvents, false);
+ }
+
+ if (mediaElement.originalNode.muted) {
+ dmPlayer.setVolume(0);
+ dmPlayer.setMuted(true);
+ } else {
+ dmPlayer.setVolume(dmPlayer.volume);
+ dmPlayer.setMuted(false);
+ }
+
+ events = mejs.html5media.events;
+ events = events.concat(['click', 'mouseover', 'mouseout']);
+ var assignNativeEvents = function assignNativeEvents(eventName) {
+ if (eventName !== 'ended') {
+ dmPlayer.addEventListener(eventName, function (e) {
+ var event = mejs.Utils.createEvent(e.type, dm);
+ mediaElement.dispatchEvent(event);
+ });
+ }
+ };
+
+ for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) {
+ assignNativeEvents(events[_i4]);
+ }
+
+ dmPlayer.addEventListener('ad_start', function () {
+ var event = mejs.Utils.createEvent('play', dm);
+ mediaElement.dispatchEvent(event);
+
+ event = mejs.Utils.createEvent('progress', dm);
+ mediaElement.dispatchEvent(event);
+
+ event = mejs.Utils.createEvent('timeupdate', dm);
+ mediaElement.dispatchEvent(event);
+ });
+ dmPlayer.addEventListener('ad_timeupdate', function () {
+ var event = mejs.Utils.createEvent('timeupdate', dm);
+ mediaElement.dispatchEvent(event);
+ });
+ dmPlayer.addEventListener('ad_pause', function () {
+ var event = mejs.Utils.createEvent('pause', dm);
+ mediaElement.dispatchEvent(event);
+ });
+ dmPlayer.addEventListener('start', function () {
+ if (dmPlayer.muted) {
+ var event = mejs.Utils.createEvent('volumechange', dm);
+ mediaElement.dispatchEvent(event);
+ }
+ });
+ dmPlayer.addEventListener('video_start', function () {
+ var event = mejs.Utils.createEvent('play', dm);
+ mediaElement.dispatchEvent(event);
+
+ var playingEvent = mejs.Utils.createEvent('playing', dm);
+ mediaElement.dispatchEvent(playingEvent);
+ });
+ dmPlayer.addEventListener('ad_timeupdate', function () {
+ var event = mejs.Utils.createEvent('timeupdate', dm);
+ mediaElement.dispatchEvent(event);
+ });
+ dmPlayer.addEventListener('video_end', function () {
+ var event = mejs.Utils.createEvent('ended', dm);
+ mediaElement.dispatchEvent(event);
+
+ if (mediaElement.originalNode.getAttribute('loop')) {
+ dmPlayer.play();
+ }
+ });
+
+ var initEvents = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];
+
+ for (var _i5 = 0, _total5 = initEvents.length; _i5 < _total5; _i5++) {
+ var event = mejs.Utils.createEvent(initEvents[_i5], dm);
+ mediaElement.dispatchEvent(event);
+ }
+ };
+
+ var dmContainer = document.createElement('div');
+ dmContainer.id = dm.id;
+ mediaElement.appendChild(dmContainer);
+ if (mediaElement.originalNode) {
+ dmContainer.style.width = mediaElement.originalNode.style.width;
+ dmContainer.style.height = mediaElement.originalNode.style.height;
+ }
+ mediaElement.originalNode.style.display = 'none';
+
+ var videoId = DailyMotionApi.getDailyMotionId(mediaFiles[0].src),
+ dmSettings = {
+ id: dm.id,
+ container: dmContainer,
+ videoId: videoId
+ };
+
+ dmSettings.params = Object.assign({}, dm.options.dailymotion);
+
+ dmSettings.params.controls = !!mediaElement.originalNode.controls;
+
+ if (mediaElement.originalNode.autoplay) {
+ dmSettings.params.autoplay = true;
+ }
+ if (mediaElement.originalNode.muted) {
+ dmSettings.params.mute = true;
+ }
+ dmSettings.params.api = '1';
+
+ DailyMotionApi.enqueueIframe(dmSettings);
+
+ dm.hide = function () {
+ dm.pause();
+ if (dmIframe) {
+ dmIframe.style.display = 'none';
+ }
+ };
+ dm.show = function () {
+ if (dmIframe) {
+ dmIframe.style.display = '';
+ }
+ };
+ dm.setSize = function (width, height) {
+ if (dmIframe) {
+ dmIframe.width = width;
+ dmIframe.height = height;
+ }
+ };
+ dm.destroy = function () {
+ dmPlayer.destroy();
+ };
+
+ return dm;
+ }
+};
+
+mejs.Utils.typeChecks.push(function (url) {
+ return (/\/\/((www\.)?dailymotion\.com|dai\.ly)/i.test(url) ? 'video/x-dailymotion' : null
+ );
+});
+
+window.dmAsyncInit = function () {
+ DailyMotionApi.apiReady();
+};
+
+mejs.Renderers.add(DailyMotionIframeRenderer);
+
+},{}]},{},[1]);
diff --git a/node_modules/mediaelement/build/renderers/dailymotion.min.js b/node_modules/mediaelement/build/renderers/dailymotion.min.js
new file mode 100644
index 00000000..5fd48289
--- /dev/null
+++ b/node_modules/mediaelement/build/renderers/dailymotion.min.js
@@ -0,0 +1,12 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */
+!function e(t,a,n){function i(s,o){if(!a[s]){if(!t[s]){var d="function"==typeof require&&require;if(!o&&d)return d(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=a[s]={exports:{}};t[s][0].call(l.exports,function(e){var a=t[s][1][e];return i(a||e)},l,l.exports,e,t,a,n)}return a[s].exports}for(var r="function"==typeof require&&require,s=0;s0;){var e=n.iframeQueue.pop();DM.init({apiKey:e.apiKey,status:e.status,cookie:e.cookie}),n.createIframe(e)}},createIframe:function(e){var t=DM.player(e.container,{height:e.height||"100%",width:e.width||"100%",video:e.videoId,params:Object.assign({api:!0},e.params),origin:location.host});t.addEventListener("apiready",function(){window["__ready__"+e.id](t,{paused:!0,ended:!1})})},getDailyMotionId:function(e){var t=e.split("/");return t[t.length-1].split("_")[0]}},i={name:"dailymotion_iframe",options:{prefix:"dailymotion_iframe",dailymotion:{width:"100%",height:"100%",params:{autoplay:!1,chromeless:1,info:0,logo:0,related:0},apiKey:null,status:!0,cookie:!0}},canPlayType:function(e){return~["video/dailymotion","video/x-dailymotion"].indexOf(e.toLowerCase())},create:function(e,t,a){var i={},r=[],s=void 0,o=null,d=null;e.originalNode.muted;i.options=t,i.id=e.id+"_"+t.prefix,i.mediaElement=e;for(var u=mejs.html5media.properties,l=function(t){var a=""+t.substring(0,1).toUpperCase()+t.substring(1);i["get"+a]=function(){if(null!==o){switch(t){case"currentTime":return o.currentTime;case"duration":return isNaN(o.duration)?0:o.duration;case"volume":return o.volume;case"paused":return o.paused;case"ended":return o.ended;case"muted":return o.muted;case"buffered":var a=o.bufferedTime,n=o.duration;return{start:function(){return 0},end:function(){return a/n},length:1};case"src":return e.originalNode.getAttribute("src");case"readyState":return 4}return null}return null},i["set"+a]=function(a){if(null!==o)switch(t){case"src":var s="string"==typeof a?a:a[0].src;o.load(n.getDailyMotionId(s));break;case"currentTime":o.seek(a);break;case"muted":!0===a&&o.setVolume(0),o.setMuted(a),a,setTimeout(function(){var t=mejs.Utils.createEvent("volumechange",i);e.dispatchEvent(t)},50);break;case"volume":o.setVolume(a),0!==a||o.muted?a>0&&o.muted&&(o.setMuted(!1),!1):(o.setMuted(!0),!0),setTimeout(function(){var t=mejs.Utils.createEvent("volumechange",i);e.dispatchEvent(t)},50);break;case"readyState":var d=mejs.Utils.createEvent("canplay",i);e.dispatchEvent(d)}else r.push({type:"set",propName:t,value:a})}},c=0,m=u.length;c 0) {
+ bufferedTime = duration * loadProgress;
+ var event = mejs.Utils.createEvent('progress', sc);
+ mediaElement.dispatchEvent(event);
+ }
+ });
+ scPlayer.getDuration(function (_duration) {
+ duration = _duration;
+
+ var event = mejs.Utils.createEvent('loadedmetadata', sc);
+ mediaElement.dispatchEvent(event);
+ });
+ });
+
+ var initEvents = ['rendererready', 'loadeddata', 'loadedmetadata', 'canplay'];
+ for (var _i3 = 0, _total3 = initEvents.length; _i3 < _total3; _i3++) {
+ var event = mejs.Utils.createEvent(initEvents[_i3], sc);
+ mediaElement.dispatchEvent(event);
+ }
+ };
+
+ scIframe = document.createElement('iframe');
+ scIframe.id = sc.id;
+ scIframe.width = isVideo ? '100%' : 1;
+ scIframe.height = isVideo ? '100%' : 1;
+ scIframe.frameBorder = 0;
+ scIframe.style.visibility = isVideo ? 'visible' : 'hidden';
+ scIframe.src = mediaFiles[0].src;
+ scIframe.scrolling = 'no';
+
+ mediaElement.appendChild(scIframe);
+ mediaElement.originalNode.style.display = 'none';
+
+ var scSettings = {
+ iframe: scIframe,
+ id: sc.id
+ };
+
+ SoundCloudApi.load(scSettings);
+
+ sc.setSize = function () {};
+ sc.hide = function () {
+ sc.pause();
+ if (scIframe) {
+ scIframe.style.display = 'none';
+ }
+ };
+ sc.show = function () {
+ if (scIframe) {
+ scIframe.style.display = '';
+ }
+ };
+ sc.destroy = function () {
+ scPlayer.destroy();
+ };
+
+ return sc;
+ }
+};
+
+mejs.Utils.typeChecks.push(function (url) {
+ return (/\/\/(w\.)?soundcloud.com/i.test(url) ? 'video/x-soundcloud' : null
+ );
+});
+
+mejs.Renderers.add(SoundCloudIframeRenderer);
+
+},{}]},{},[1]);
diff --git a/node_modules/mediaelement/build/renderers/soundcloud.min.js b/node_modules/mediaelement/build/renderers/soundcloud.min.js
new file mode 100644
index 00000000..e1d7dd6c
--- /dev/null
+++ b/node_modules/mediaelement/build/renderers/soundcloud.min.js
@@ -0,0 +1,12 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */
+!function e(t,n,r){function a(s,o){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(i)return i(s,!0);var d=new Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return a(n||e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s0){c=u*t;var n=mejs.Utils.createEvent("progress",a);e.dispatchEvent(n)}}),f.getDuration(function(t){u=t;var n=mejs.Utils.createEvent("loadedmetadata",a);e.dispatchEvent(n)})});for(var h=["rendererready","loadeddata","loadedmetadata","canplay"],y=0,E=h.length;y 0) {
+ twitchId = TwitchApi.getTwitchIdFromParam(url);
+ if (twitchId === '') {
+ twitchId = TwitchApi.getTwitchIdFromUrl(url);
+ }
+ } else {
+ twitchId = TwitchApi.getTwitchIdFromUrl(url);
+ }
+
+ return twitchId;
+ },
+
+ getTwitchIdFromParam: function getTwitchIdFromParam(url) {
+ if (url === undefined || url === null || !url.trim().length) {
+ return null;
+ }
+
+ var parts = url.split('?'),
+ parameters = parts[1].split('&');
+
+ var twitchId = '';
+
+ for (var i = 0, total = parameters.length; i < total; i++) {
+ var paramParts = parameters[i].split('=');
+ if (~paramParts[0].indexOf('channel')) {
+ twitchId = paramParts[1];
+ break;
+ } else if (~paramParts[0].indexOf('video')) {
+ twitchId = 'v' + paramParts[1];
+ break;
+ }
+ }
+
+ return twitchId;
+ },
+
+ getTwitchIdFromUrl: function getTwitchIdFromUrl(url) {
+ if (url === undefined || url === null || !url.trim().length) {
+ return null;
+ }
+
+ var parts = url.split('?');
+ url = parts[0];
+ var id = url.substring(url.lastIndexOf('/') + 1);
+ return (/^\d+$/i.test(id) ? 'v' + id : id
+ );
+ },
+
+ getTwitchType: function getTwitchType(id) {
+ return (/^v\d+/i.test(id) ? 'video' : 'channel'
+ );
+ }
+};
+
+var TwitchIframeRenderer = {
+ name: 'twitch_iframe',
+ options: {
+ prefix: 'twitch_iframe'
+ },
+
+ canPlayType: function canPlayType(type) {
+ return ~['video/twitch', 'video/x-twitch'].indexOf(type.toLowerCase());
+ },
+
+ create: function create(mediaElement, options, mediaFiles) {
+ var twitch = {},
+ apiStack = [],
+ readyState = 4,
+ twitchId = TwitchApi.getTwitchId(mediaFiles[0].src);
+
+ var twitchPlayer = null,
+ paused = true,
+ ended = false,
+ hasStartedPlaying = false,
+ volume = 1,
+ duration = Infinity,
+ time = 0;
+
+ twitch.options = options;
+ twitch.id = mediaElement.id + '_' + options.prefix;
+ twitch.mediaElement = mediaElement;
+
+ var props = mejs.html5media.properties,
+ assignGettersSetters = function assignGettersSetters(propName) {
+ var capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ twitch['get' + capName] = function () {
+ if (twitchPlayer !== null) {
+ var value = null;
+
+ switch (propName) {
+ case 'currentTime':
+ time = twitchPlayer.getCurrentTime();
+ return time;
+ case 'duration':
+ duration = twitchPlayer.getDuration();
+ return duration;
+ case 'volume':
+ volume = twitchPlayer.getVolume();
+ return volume;
+ case 'paused':
+ paused = twitchPlayer.isPaused();
+ return paused;
+ case 'ended':
+ ended = twitchPlayer.getEnded();
+ return ended;
+ case 'muted':
+ return twitchPlayer.getMuted();
+ case 'buffered':
+ return {
+ start: function start() {
+ return 0;
+ },
+ end: function end() {
+ return 0;
+ },
+ length: 1
+ };
+ case 'src':
+ return TwitchApi.getTwitchType(twitchId) === 'channel' ? twitchPlayer.getChannel() : twitchPlayer.getVideo();
+ case 'readyState':
+ return readyState;
+ }
+
+ return value;
+ } else {
+ return null;
+ }
+ };
+
+ twitch['set' + capName] = function (value) {
+ if (twitchPlayer !== null) {
+ switch (propName) {
+ case 'src':
+ var url = typeof value === 'string' ? value : value[0].src,
+ videoId = TwitchApi.getTwitchId(url);
+
+ if (TwitchApi.getTwitchType(twitchId) === 'channel') {
+ twitchPlayer.setChannel(videoId);
+ } else {
+ twitchPlayer.setVideo(videoId);
+ }
+ break;
+ case 'currentTime':
+ twitchPlayer.seek(value);
+ setTimeout(function () {
+ var event = mejs.Utils.createEvent('timeupdate', twitch);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'muted':
+ twitchPlayer.setMuted(value);
+ setTimeout(function () {
+ var event = mejs.Utils.createEvent('volumechange', twitch);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'volume':
+ volume = value;
+ twitchPlayer.setVolume(value);
+ setTimeout(function () {
+ var event = mejs.Utils.createEvent('volumechange', twitch);
+ mediaElement.dispatchEvent(event);
+ }, 50);
+ break;
+ case 'readyState':
+ var event = mejs.Utils.createEvent('canplay', twitch);
+ mediaElement.dispatchEvent(event);
+ break;
+ default:
+
+ break;
+ }
+ } else {
+ apiStack.push({ type: 'set', propName: propName, value: value });
+ }
+ };
+ };
+
+ for (var i = 0, total = props.length; i < total; i++) {
+ assignGettersSetters(props[i]);
+ }
+
+ var methods = mejs.html5media.methods,
+ assignMethods = function assignMethods(methodName) {
+ twitch[methodName] = function () {
+ if (twitchPlayer !== null) {
+ switch (methodName) {
+ case 'play':
+ paused = false;
+ return twitchPlayer.play();
+ case 'pause':
+ paused = true;
+ return twitchPlayer.pause();
+ case 'load':
+ return null;
+ }
+ } else {
+ apiStack.push({ type: 'call', methodName: methodName });
+ }
+ };
+ };
+
+ for (var _i = 0, _total = methods.length; _i < _total; _i++) {
+ assignMethods(methods[_i]);
+ }
+
+ function sendEvents(events) {
+ for (var _i2 = 0, _total2 = events.length; _i2 < _total2; _i2++) {
+ var event = mejs.Utils.createEvent(events[_i2], twitch);
+ mediaElement.dispatchEvent(event);
+ }
+ }
+
+ window['__ready__' + twitch.id] = function (_twitchPlayer) {
+ mediaElement.twitchPlayer = twitchPlayer = _twitchPlayer;
+
+ if (apiStack.length) {
+ for (var _i3 = 0, _total3 = apiStack.length; _i3 < _total3; _i3++) {
+ var stackItem = apiStack[_i3];
+
+ if (stackItem.type === 'set') {
+ var propName = stackItem.propName,
+ capName = '' + propName.substring(0, 1).toUpperCase() + propName.substring(1);
+
+ twitch['set' + capName](stackItem.value);
+ } else if (stackItem.type === 'call') {
+ twitch[stackItem.methodName]();
+ }
+ }
+ }
+
+ var twitchIframe = document.getElementById(twitch.id).firstChild;
+ twitchIframe.style.width = '100%';
+ twitchIframe.style.height = '100%';
+
+ var events = ['mouseover', 'mouseout'],
+ assignEvents = function assignEvents(e) {
+ var event = mejs.Utils.createEvent(e.type, twitch);
+ mediaElement.dispatchEvent(event);
+ };
+
+ for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) {
+ twitchIframe.addEventListener(events[_i4], assignEvents, false);
+ }
+
+ var timer = void 0;
+
+ twitchPlayer.addEventListener(Twitch.Player.READY, function () {
+ paused = false;
+ ended = false;
+ sendEvents(['rendererready', 'loadedmetadata', 'loadeddata', 'canplay']);
+ });
+ twitchPlayer.addEventListener(Twitch.Player.PLAY, function () {
+ if (!hasStartedPlaying) {
+ hasStartedPlaying = true;
+ }
+ paused = false;
+ ended = false;
+ sendEvents(['play', 'playing', 'progress']);
+
+ timer = setInterval(function () {
+ twitchPlayer.getCurrentTime();
+ sendEvents(['timeupdate']);
+ }, 250);
+ });
+ twitchPlayer.addEventListener(Twitch.Player.PAUSE, function () {
+ paused = true;
+ ended = false;
+ if (!twitchPlayer.getEnded()) {
+ sendEvents(['pause']);
+ }
+ });
+ twitchPlayer.addEventListener(Twitch.Player.ENDED, function () {
+ paused = true;
+ ended = true;
+ sendEvents(['ended']);
+ clearInterval(timer);
+ hasStartedPlaying = false;
+ timer = null;
+ });
+ };
+
+ var height = mediaElement.originalNode.height,
+ width = mediaElement.originalNode.width,
+ twitchContainer = document.createElement('div'),
+ type = TwitchApi.getTwitchType(twitchId),
+ twitchSettings = {
+ id: twitch.id,
+ width: width,
+ height: height,
+ playsinline: false,
+ autoplay: mediaElement.originalNode.autoplay,
+ muted: mediaElement.originalNode.muted
+ };
+
+ twitchSettings[type] = twitchId;
+ twitchContainer.id = twitch.id;
+ twitchContainer.style.width = '100%';
+ twitchContainer.style.height = '100%';
+
+ mediaElement.originalNode.parentNode.insertBefore(twitchContainer, mediaElement.originalNode);
+ mediaElement.originalNode.style.display = 'none';
+ mediaElement.originalNode.autoplay = false;
+
+ twitch.setSize = function (width, height) {
+ if (TwitchApi !== null && !isNaN(width) && !isNaN(height)) {
+ twitchContainer.setAttribute('width', width);
+ twitchContainer.setAttribute('height', height);
+ }
+ };
+ twitch.hide = function () {
+ twitch.pause();
+ twitchContainer.style.display = 'none';
+ };
+ twitch.show = function () {
+ twitchContainer.style.display = '';
+ };
+ twitch.destroy = function () {};
+
+ TwitchApi.load(twitchSettings);
+
+ return twitch;
+ }
+};
+
+mejs.Utils.typeChecks.push(function (url) {
+ return (/\/\/(www|player).twitch.tv/i.test(url) ? 'video/x-twitch' : null
+ );
+});
+
+mejs.Renderers.add(TwitchIframeRenderer);
+
+},{}]},{},[1]);
diff --git a/node_modules/mediaelement/build/renderers/twitch.min.js b/node_modules/mediaelement/build/renderers/twitch.min.js
new file mode 100644
index 00000000..ed7922e6
--- /dev/null
+++ b/node_modules/mediaelement/build/renderers/twitch.min.js
@@ -0,0 +1,12 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */
+!function e(t,n,r){function i(s,o){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!o&&u)return u(s,!0);if(a)return a(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var d=n[s]={exports:{}};t[s][0].call(d.exports,function(e){var n=t[s][1][e];return i(n||e)},d,d.exports,e,t,n,r)}return n[s].exports}for(var a="function"==typeof require&&require,s=0;s0?""===(t=r.getTwitchIdFromParam(e))&&(t=r.getTwitchIdFromUrl(e)):t=r.getTwitchIdFromUrl(e),t},getTwitchIdFromParam:function(e){if(void 0===e||null===e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),n="",r=0,i=t.length;r 0) {
+ bufferedTime = duration * loadProgress;
+ if (mediaElement.originalNode.autoplay) {
+ paused = false;
+ ended = false;
+ var event = mejs.Utils.createEvent('play', vimeo);
+ mediaElement.dispatchEvent(event);
+ }
+ }
+ }).catch(function (error) {
+ errorHandler(error, vimeo);
+ });
+ });
+ vimeoPlayer.on('progress', function () {
+ vimeoPlayer.getDuration().then(function (loadProgress) {
+ duration = loadProgress;
+
+ if (duration > 0) {
+ bufferedTime = duration * loadProgress;
+ if (mediaElement.originalNode.autoplay) {
+ var initEvent = mejs.Utils.createEvent('play', vimeo);
+ mediaElement.dispatchEvent(initEvent);
+
+ var playingEvent = mejs.Utils.createEvent('playing', vimeo);
+ mediaElement.dispatchEvent(playingEvent);
+ }
+ }
+
+ var event = mejs.Utils.createEvent('progress', vimeo);
+ mediaElement.dispatchEvent(event);
+ }).catch(function (error) {
+ return errorHandler(error);
+ });
+ });
+ vimeoPlayer.on('timeupdate', function () {
+ vimeoPlayer.getCurrentTime().then(function (seconds) {
+ currentTime = seconds;
+ var event = mejs.Utils.createEvent('timeupdate', vimeo);
+ mediaElement.dispatchEvent(event);
+ }).catch(function (error) {
+ return errorHandler(error);
+ });
+ });
+ vimeoPlayer.on('play', function () {
+ paused = false;
+ ended = false;
+ var event = mejs.Utils.createEvent('play', vimeo);
+ mediaElement.dispatchEvent(event);
+
+ var playingEvent = mejs.Utils.createEvent('playing', vimeo);
+ mediaElement.dispatchEvent(playingEvent);
+ });
+ vimeoPlayer.on('pause', function () {
+ paused = true;
+ ended = false;
+
+ var event = mejs.Utils.createEvent('pause', vimeo);
+ mediaElement.dispatchEvent(event);
+ });
+ vimeoPlayer.on('ended', function () {
+ paused = false;
+ ended = true;
+
+ var event = mejs.Utils.createEvent('ended', vimeo);
+ mediaElement.dispatchEvent(event);
+ });
+
+ events = ['rendererready', 'loadedmetadata', 'loadeddata', 'canplay'];
+
+ for (var _i4 = 0, _total4 = events.length; _i4 < _total4; _i4++) {
+ var event = mejs.Utils.createEvent(events[_i4], vimeo);
+ mediaElement.dispatchEvent(event);
+ }
+ };
+
+ var height = mediaElement.originalNode.height,
+ width = mediaElement.originalNode.width,
+ vimeoContainer = document.createElement('iframe'),
+ standardUrl = 'https://player.vimeo.com/video/' + VimeoApi.getVimeoId(mediaFiles[0].src);
+
+ var queryArgs = ~mediaFiles[0].src.indexOf('?') ? '?' + mediaFiles[0].src.slice(mediaFiles[0].src.indexOf('?') + 1) : '';
+ if (queryArgs && mediaElement.originalNode.autoplay && queryArgs.indexOf('autoplay') === -1) {
+ queryArgs += '&autoplay=1';
+ }
+ if (queryArgs && mediaElement.originalNode.loop && queryArgs.indexOf('loop') === -1) {
+ queryArgs += '&loop=1';
+ }
+
+ vimeoContainer.setAttribute('id', vimeo.id);
+ vimeoContainer.setAttribute('width', width);
+ vimeoContainer.setAttribute('height', height);
+ vimeoContainer.setAttribute('frameBorder', '0');
+ vimeoContainer.setAttribute('src', '' + standardUrl + queryArgs);
+ vimeoContainer.setAttribute('webkitallowfullscreen', '');
+ vimeoContainer.setAttribute('mozallowfullscreen', '');
+ vimeoContainer.setAttribute('allowfullscreen', '');
+
+ mediaElement.originalNode.parentNode.insertBefore(vimeoContainer, mediaElement.originalNode);
+ mediaElement.originalNode.style.display = 'none';
+
+ VimeoApi.load({
+ iframe: vimeoContainer,
+ id: vimeo.id
+ });
+
+ vimeo.hide = function () {
+ vimeo.pause();
+ if (vimeoPlayer) {
+ vimeoContainer.style.display = 'none';
+ }
+ };
+ vimeo.setSize = function (width, height) {
+ vimeoContainer.setAttribute('width', width);
+ vimeoContainer.setAttribute('height', height);
+ };
+ vimeo.show = function () {
+ if (vimeoPlayer) {
+ vimeoContainer.style.display = '';
+ }
+ };
+
+ vimeo.destroy = function () {};
+
+ return vimeo;
+ }
+};
+
+mejs.Utils.typeChecks.push(function (url) {
+ return (/(\/\/player\.vimeo|vimeo\.com)/i.test(url) ? 'video/x-vimeo' : null
+ );
+});
+
+mejs.Renderers.add(vimeoIframeRenderer);
+
+},{}]},{},[1]);
diff --git a/node_modules/mediaelement/build/renderers/vimeo.min.js b/node_modules/mediaelement/build/renderers/vimeo.min.js
new file mode 100644
index 00000000..00bf05c6
--- /dev/null
+++ b/node_modules/mediaelement/build/renderers/vimeo.min.js
@@ -0,0 +1,12 @@
+/*!
+ * MediaElement.js
+ * http://www.mediaelementjs.com/
+ *
+ * Wrapper that mimics native HTML5 MediaElement (audio and video)
+ * using a variety of technologies (pure JavaScript, Flash, iframe)
+ *
+ * Copyright 2010-2017, John Dyer (http://j.hn/)
+ * License: MIT
+ *
+ */
+!function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return i(n||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o0&&(l=f*t,e.originalNode.autoplay)){o=!1,d=!1;var n=mejs.Utils.createEvent("play",a);e.dispatchEvent(n)}}).catch(function(e){v(e)})}),p.on("progress",function(){p.getDuration().then(function(t){if((f=t)>0&&(l=f*t,e.originalNode.autoplay)){var n=mejs.Utils.createEvent("play",a);e.dispatchEvent(n);var r=mejs.Utils.createEvent("playing",a);e.dispatchEvent(r)}var i=mejs.Utils.createEvent("progress",a);e.dispatchEvent(i)}).catch(function(e){return v(e)})}),p.on("timeupdate",function(){p.getCurrentTime().then(function(t){c=t;var n=mejs.Utils.createEvent("timeupdate",a);e.dispatchEvent(n)}).catch(function(e){return v(e)})}),p.on("play",function(){o=!1,d=!1;var t=mejs.Utils.createEvent("play",a);e.dispatchEvent(t);var n=mejs.Utils.createEvent("playing",a);e.dispatchEvent(n)}),p.on("pause",function(){o=!0,d=!1;var t=mejs.Utils.createEvent("pause",a);e.dispatchEvent(t)}),p.on("ended",function(){o=!1,d=!0;var t=mejs.Utils.createEvent("ended",a);e.dispatchEvent(t)});for(var j=0,w=(g=["rendererready","loadedmetadata","loadeddata","canplay"]).length;j` tag for `