mediaelement
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -0,0 +0,0 @@ /*! |
@@ -0,0 +0,0 @@ /*! |
@@ -0,0 +0,0 @@ /*! |
@@ -0,0 +0,0 @@ /*! |
@@ -0,0 +0,0 @@ /*! |
@@ -66,3 +66,3 @@ /*! | ||
mejs.version = '6.0.1'; | ||
mejs.version = '6.0.2'; | ||
@@ -69,0 +69,0 @@ mejs.html5media = { |
@@ -12,2 +12,2 @@ /*! | ||
*/ | ||
!function o(i,u,s){function l(r,e){if(!u[r]){if(!i[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(d)return d(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var a=u[r]={exports:{}};i[r][0].call(a.exports,function(e){var t=i[r][1][e];return l(t||e)},a,a.exports,o,i,u,s)}return u[r].exports}for(var d="function"==typeof require&&require,e=0;e<s.length;e++)l(s[e]);return l}({1:[function(e,t,r){},{}],2:[function(a,o,e){(function(e){var t,r=void 0!==e?e:"undefined"!=typeof window?window:{},n=a(1);"undefined"!=typeof document?t=document:(t=r["__GLOBAL_DOCUMENT_CACHE@4"])||(t=r["__GLOBAL_DOCUMENT_CACHE@4"]=n),o.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],3:[function(e,r,t){(function(e){var t;t="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},r.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,a=e(3);var o={version:"6.0.1",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"]}};((n=a)&&n.__esModule?n:{default:n}).default.mejs=o,r.default=o},{3:3}],5:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.renderer=void 0;var n,a="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=function(){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),i=e(4),u=(n=i)&&n.__esModule?n:{default:n};var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.renderers={},this.order=[]}return o(e,[{key:"add",value:function(e){if(void 0===e.name)throw new TypeError("renderer must contain at least `name` property");this.renderers[e.name]=e,this.order.push(e.name)}},{key:"select",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],r=t.length;if(t=t.length?t:this.order,!r){var n=[/^(html5|native)/i,/^flash/i,/iframe$/i],a=function(e){for(var t=0,r=n.length;t<r;t++)if(n[t].test(e))return t;return n.length};t.sort(function(e,t){return a(e)-a(t)})}for(var o=0,i=t.length;o<i;o++){var u=t[o],s=this.renderers[u];if(null!=s)for(var l=0,d=e.length;l<d;l++)if("function"==typeof s.canPlayType&&"string"==typeof e[l].type&&s.canPlayType(e[l].type))return{rendererName:s.name,src:e[l].src}}return null}},{key:"order",set:function(e){if(!Array.isArray(e))throw new TypeError("order must be an array of strings.");this._order=e},get:function(){return this._order}},{key:"renderers",set:function(e){if(null!==e&&"object"!==(void 0===e?"undefined":a(e)))throw new TypeError("renderers must be an array of objects.");this._renderers=e},get:function(){return this._renderers}}]),e}(),l=r.renderer=new s;u.default.Renderers=l},{4:4}],6:[function(e,t,r){"use strict";var k=i(e(3)),x=i(e(2)),U=i(e(4)),n=e(5),I=e(8),a=e(9),o=e(7);function i(e){return e&&e.__esModule?e:{default:e}}var _={isIframeStarted:!1,isIframeLoaded:!1,iframeQueue:[],enqueueIframe:function(e){_.isLoaded="undefined"!=typeof YT&&YT.loaded,_.isLoaded?_.createIframe(e):(_.loadIframeApi(),_.iframeQueue.push(e))},loadIframeApi:function(){_.isIframeStarted||((0,o.loadScript)("https://www.youtube.com/player_api"),_.isIframeStarted=!0)},iFrameReady:function(){for(_.isLoaded=!0,_.isIframeLoaded=!0;0<_.iframeQueue.length;){var e=_.iframeQueue.pop();_.createIframe(e)}},createIframe:function(e){return new YT.Player(e.containerId,e)},getYouTubeId:function(e){var t="";return 0<e.indexOf("?")?""===(t=_.getYouTubeIdFromParam(e))&&(t=_.getYouTubeIdFromUrl(e)):t=_.getYouTubeIdFromUrl(e),(t=t.substring(t.lastIndexOf("/")+1).split("?"))[0]},getYouTubeIdFromParam:function(e){if(null==e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),r="",n=0,a=t.length;n<a;n++){var o=t[n].split("=");if("v"===o[0]){r=o[1];break}}return r},getYouTubeIdFromUrl:function(e){return null!=e&&e.trim().length?(e=e.split("?")[0]).substring(e.lastIndexOf("/")+1):null},getYouTubeNoCookieUrl:function(e){if(null==e||!e.trim().length||-1===e.indexOf("//www.youtube"))return e;var t=e.split("/");return t[2]=t[2].replace(".com","-nocookie.com"),t.join("/")}},u={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:!1,imageQuality:null}},canPlayType:function(e){return~["video/youtube","video/x-youtube"].indexOf(e.toLowerCase())},create:function(m,r,n){var v={},y=[],g=null,o=!0,i=!1,h=null;v.options=r,v.id=m.id+"_"+r.prefix,v.mediaElement=m;for(var e=U.default.html5media.properties,t=function(a){var e=""+a.substring(0,1).toUpperCase()+a.substring(1);v["get"+e]=function(){if(null!==g){switch(a){case"currentTime":return g.getCurrentTime();case"duration":return g.getDuration();case"volume":return g.getVolume()/100;case"playbackRate":return g.getPlaybackRate();case"paused":return o;case"ended":return i;case"muted":return g.isMuted();case"buffered":var e=g.getVideoLoadedFraction(),t=g.getDuration();return{start:function(){return 0},end:function(){return e*t},length:1};case"src":return g.getVideoUrl();case"readyState":return 4}return null}return null},v["set"+e]=function(e){if(null!==g)switch(a){case"src":var t="string"==typeof e?e:e[0].src,r=_.getYouTubeId(t);m.originalNode.autoplay?g.loadVideoById(r):g.cueVideoById(r);break;case"currentTime":g.seekTo(e);break;case"muted":e?g.mute():g.unMute(),setTimeout(function(){var e=(0,I.createEvent)("volumechange",v);m.dispatchEvent(e)},50);break;case"volume":e,g.setVolume(100*e),setTimeout(function(){var e=(0,I.createEvent)("volumechange",v);m.dispatchEvent(e)},50);break;case"playbackRate":g.setPlaybackRate(e),setTimeout(function(){var e=(0,I.createEvent)("ratechange",v);m.dispatchEvent(e)},50);break;case"readyState":var n=(0,I.createEvent)("canplay",v);m.dispatchEvent(n)}else y.push({type:"set",propName:a,value:e})}},a=0,u=e.length;a<u;a++)t(e[a]);for(var s=U.default.html5media.methods,l=function(e){v[e]=function(){if(null!==g)switch(e){case"play":return o=!1,g.playVideo();case"pause":return o=!0,g.pauseVideo();case"load":return null}else y.push({type:"call",methodName:e})}},d=0,f=s.length;d<f;d++)l(s[d]);var c=x.default.createElement("div");c.id=v.id,v.options.youtube.nocookie&&(m.originalNode.src=_.getYouTubeNoCookieUrl(n[0].src)),m.originalNode.parentNode.insertBefore(c,m.originalNode),m.originalNode.style.display="none";var p="audio"===m.originalNode.tagName.toLowerCase(),b=p?"1":m.originalNode.height,w=p?"1":m.originalNode.width,T=_.getYouTubeId(n[0].src),E={id:v.id,containerId:c.id,videoId:T,height:b,width:w,host:v.options.youtube&&v.options.youtube.nocookie?"https://www.youtube-nocookie.com":void 0,playerVars:Object.assign({controls:0,rel:0,disablekb:1,showinfo:0,modestbranding:0,html5:1,iv_load_policy:3},v.options.youtube),origin:k.default.location.host,events:{onReady:function(e){if(m.youTubeApi=g=e.target,m.youTubeState={paused:!0,ended:!1},y.length)for(var t=0,r=y.length;t<r;t++){var n=y[t];if("set"===n.type){var a=n.propName,o=""+a.substring(0,1).toUpperCase()+a.substring(1);v["set"+o](n.value)}else"call"===n.type&&v[n.methodName]()}h=g.getIframe(),m.originalNode.muted&&g.mute();for(var i=["mouseover","mouseout"],u=function(e){var t=(0,I.createEvent)(e.type,v);m.dispatchEvent(t)},s=0,l=i.length;s<l;s++)h.addEventListener(i[s],u,!1);for(var d=["rendererready","loadedmetadata","loadeddata","canplay"],f=0,c=d.length;f<c;f++){var p=(0,I.createEvent)(d[f],v);m.dispatchEvent(p)}},onStateChange:function(e){var t=[];switch(e.data){case-1:t=["loadedmetadata"],o=!0,i=!1;break;case 0:t=["ended"],o=!1,i=!v.options.youtube.loop,v.options.youtube.loop||v.stopInterval();break;case 1:t=["play","playing"],i=o=!1,v.startInterval();break;case 2:t=["pause"],o=!0,i=!1,v.stopInterval();break;case 3:t=["progress"],i=!1;break;case 5:t=["loadeddata","loadedmetadata","canplay"],o=!0,i=!1}for(var r=0,n=t.length;r<n;r++){var a=(0,I.createEvent)(t[r],v);m.dispatchEvent(a)}},onError:function(e){return function(e){var t="";switch(e.data){case 2:t="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:t="The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.";break;case 100:t="The video requested was not found. Either video has been removed or has been marked as private.";break;case 101:case 105:t="The owner of the requested video does not allow it to be played in embedded players.";break;default:t="Unknown error."}m.generateError("Code "+e.data+": "+t,n)}(e)}}};return(p||m.originalNode.hasAttribute("playsinline"))&&(E.playerVars.playsinline=1),m.originalNode.controls&&(E.playerVars.controls=1),m.originalNode.autoplay&&(E.playerVars.autoplay=1),m.originalNode.loop&&(E.playerVars.loop=1),(E.playerVars.loop&&1===parseInt(E.playerVars.loop,10)||-1<m.originalNode.src.indexOf("loop="))&&!E.playerVars.playlist&&-1===m.originalNode.src.indexOf("playlist=")&&(E.playerVars.playlist=_.getYouTubeId(m.originalNode.src)),_.enqueueIframe(E),v.onEvent=function(e,t,r){null!=r&&(m.youTubeState=r)},v.setSize=function(e,t){null!==g&&g.setSize(e,t)},v.hide=function(){v.stopInterval(),v.pause(),h&&(h.style.display="none")},v.show=function(){h&&(h.style.display="")},v.destroy=function(){g.destroy()},v.interval=null,v.startInterval=function(){v.interval=setInterval(function(){var e=(0,I.createEvent)("timeupdate",v);m.dispatchEvent(e)},250)},v.stopInterval=function(){v.interval&&clearInterval(v.interval)},v.getPosterUrl=function(){var e=r.youtube.imageQuality,t=_.getYouTubeId(m.originalNode.src);return e&&-1<["default","hqdefault","mqdefault","sddefault","maxresdefault"].indexOf(e)&&t?"https://img.youtube.com/vi/"+t+"/"+e+".jpg":""},v}};k.default.onYouTubePlayerAPIReady=function(){_.iFrameReady()},a.typeChecks.push(function(e){return/\/\/(www\.youtube|youtu\.?be)/i.test(e)?"video/x-youtube":null}),n.renderer.add(u)},{2:2,3:3,4:4,5:5,7:7,8:8,9:9}],7:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.removeClass=r.addClass=r.hasClass=void 0,r.loadScript=i,r.offset=u,r.toggleClass=v,r.fadeOut=y,r.fadeIn=g,r.siblings=h,r.visible=b,r.ajax=w;var s=o(e(3)),a=o(e(2)),n=o(e(4));function o(e){return e&&e.__esModule?e:{default:e}}function i(n){return new Promise(function(e,t){var r=a.default.createElement("script");r.src=n,r.async=!0,r.onload=function(){r.remove(),e()},r.onerror=function(){r.remove(),t()},a.default.head.appendChild(r)})}function u(e){var t=e.getBoundingClientRect(),r=s.default.pageXOffset||a.default.documentElement.scrollLeft,n=s.default.pageYOffset||a.default.documentElement.scrollTop;return{top:t.top+n,left:t.left+r}}var l=void 0,d=void 0,f=void 0;"classList"in a.default.documentElement?(l=function(e,t){return void 0!==e.classList&&e.classList.contains(t)},d=function(e,t){return e.classList.add(t)},f=function(e,t){return e.classList.remove(t)}):(l=function(e,t){return new RegExp("\\b"+t+"\\b").test(e.className)},d=function(e,t){c(e,t)||(e.className+=" "+t)},f=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","g"),"")});var c=r.hasClass=l,p=r.addClass=d,m=r.removeClass=f;function v(e,t){c(e,t)?m(e,t):p(e,t)}function y(a){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,i=arguments[2];a.style.opacity||(a.style.opacity=1);var u=null;s.default.requestAnimationFrame(function e(t){var r=t-(u=u||t),n=parseFloat(1-r/o,2);a.style.opacity=n<0?0:n,o<r?i&&"function"==typeof i&&i():s.default.requestAnimationFrame(e)})}function g(a){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,i=arguments[2];a.style.opacity||(a.style.opacity=0);var u=null;s.default.requestAnimationFrame(function e(t){var r=t-(u=u||t),n=parseFloat(r/o,2);a.style.opacity=1<n?1:n,o<r?i&&"function"==typeof i&&i():s.default.requestAnimationFrame(e)})}function h(e,t){var r=[];for(e=e.parentNode.firstChild;t&&!t(e)||r.push(e),e=e.nextSibling;);return r}function b(e){return void 0!==e.getClientRects&&"function"===e.getClientRects?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!(!e.offsetWidth&&!e.offsetHeight)}function w(e,t,r,n){var a=s.default.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),o="application/x-www-form-urlencoded; charset=UTF-8",i=!1,u="*/".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&&(u=o+", */*; q=0.01"),a&&(a.open("GET",e,!0),a.setRequestHeader("Accept",u),a.onreadystatechange=function(){if(!i&&4===a.readyState)if(200===a.status){i=!0;var e=void 0;switch(t){case"json":e=JSON.parse(a.responseText);break;case"xml":e=a.responseXML;break;default:e=a.responseText}r(e)}else"function"==typeof n&&n(a.status)},a.send())}n.default.Utils=n.default.Utils||{},n.default.Utils.offset=u,n.default.Utils.hasClass=c,n.default.Utils.addClass=p,n.default.Utils.removeClass=m,n.default.Utils.toggleClass=v,n.default.Utils.fadeIn=g,n.default.Utils.fadeOut=y,n.default.Utils.siblings=h,n.default.Utils.visible=b,n.default.Utils.ajax=w,n.default.Utils.loadScript=i},{2:2,3:3,4:4}],8:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.escapeHTML=i,r.debounce=u,r.isObjectEmpty=s,r.splitEvents=l,r.createEvent=d,r.isNodeAfter=f,r.isString=c;var n,a=e(4),o=(n=a)&&n.__esModule?n:{default:n};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 u(n,a){var o=this,i=arguments,u=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if("function"!=typeof n)throw new Error("First argument must be a function");if("number"!=typeof a)throw new Error("Second argument must be a numeric value");var s=void 0;return function(){var e=o,t=i,r=u&&!s;clearTimeout(s),s=setTimeout(function(){s=null,u||n.apply(e,t)},a),r&&n.apply(e,t)}}function s(e){return Object.getOwnPropertyNames(e).length<=0}function l(e,r){var n=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/,a={d:[],w:[]};return(e||"").split(" ").forEach(function(e){var t=e+(r?"."+r:"");t.startsWith(".")?(a.d.push(t),a.w.push(t)):a[n.test(e)?"w":"d"].push(t)}),a.d=a.d.join(" "),a.w=a.w.join(" "),a}function d(e,t){if("string"!=typeof e)throw new Error("Event name must be a string");var r=e.match(/([a-z]+\.([a-z]+))/i),n={target:t};return null!==r&&(e=r[1],n.namespace=r[2]),new window.CustomEvent(e,{detail:n})}function f(e,t){return!!(e&&t&&2&e.compareDocumentPosition(t))}function c(e){return"string"==typeof e}o.default.Utils=o.default.Utils||{},o.default.Utils.escapeHTML=i,o.default.Utils.debounce=u,o.default.Utils.isObjectEmpty=s,o.default.Utils.splitEvents=l,o.default.Utils.createEvent=d,o.default.Utils.isNodeAfter=f,o.default.Utils.isString=c},{4:4}],9:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.typeChecks=void 0,r.absolutizeUrl=s,r.formatType=l,r.getMimeFromType=d,r.getTypeFromFile=f,r.getExtension=c,r.normalizeExtension=p;var n,a=e(4),o=(n=a)&&n.__esModule?n:{default:n},i=e(8);var u=r.typeChecks=[];function s(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=document.createElement("div");return t.innerHTML='<a href="'+(0,i.escapeHTML)(e)+'">x</a>',t.firstChild.href}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return e&&!t?f(e):t}function d(e){if("string"!=typeof e)throw new Error("`type` argument must be a string");return e&&-1<e.indexOf(";")?e.substr(0,e.indexOf(";")):e}function f(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");for(var t=0,r=u.length;t<r;t++){var n=u[t](e);if(n)return n}var a=p(c(e)),o="video/mp4";return a&&(~["mp4","m4v","ogg","ogv","webm","flv","mpeg"].indexOf(a)?o="video/"+a:"mov"===a?o="video/quicktime":~["mp3","oga","wav","mid","midi"].indexOf(a)&&(o="audio/"+a)),o}function c(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=e.split("?")[0].split("\\").pop().split("/").pop();return~t.indexOf(".")?t.substring(t.lastIndexOf(".")+1):""}function p(e){if("string"!=typeof e)throw new Error("`extension` argument must be a string");switch(e){case"mp4":case"m4v":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return e}}o.default.Utils=o.default.Utils||{},o.default.Utils.typeChecks=u,o.default.Utils.absolutizeUrl=s,o.default.Utils.formatType=l,o.default.Utils.getMimeFromType=d,o.default.Utils.getTypeFromFile=f,o.default.Utils.getExtension=c,o.default.Utils.normalizeExtension=p},{4:4,8:8}]},{},[6]); | ||
!function o(i,u,s){function l(r,e){if(!u[r]){if(!i[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(d)return d(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var a=u[r]={exports:{}};i[r][0].call(a.exports,function(e){var t=i[r][1][e];return l(t||e)},a,a.exports,o,i,u,s)}return u[r].exports}for(var d="function"==typeof require&&require,e=0;e<s.length;e++)l(s[e]);return l}({1:[function(e,t,r){},{}],2:[function(a,o,e){(function(e){var t,r=void 0!==e?e:"undefined"!=typeof window?window:{},n=a(1);"undefined"!=typeof document?t=document:(t=r["__GLOBAL_DOCUMENT_CACHE@4"])||(t=r["__GLOBAL_DOCUMENT_CACHE@4"]=n),o.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],3:[function(e,r,t){(function(e){var t;t="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},r.exports=t}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,a=e(3);var o={version:"6.0.2",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"]}};((n=a)&&n.__esModule?n:{default:n}).default.mejs=o,r.default=o},{3:3}],5:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.renderer=void 0;var n,a="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=function(){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}}(),i=e(4),u=(n=i)&&n.__esModule?n:{default:n};var s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.renderers={},this.order=[]}return o(e,[{key:"add",value:function(e){if(void 0===e.name)throw new TypeError("renderer must contain at least `name` property");this.renderers[e.name]=e,this.order.push(e.name)}},{key:"select",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],r=t.length;if(t=t.length?t:this.order,!r){var n=[/^(html5|native)/i,/^flash/i,/iframe$/i],a=function(e){for(var t=0,r=n.length;t<r;t++)if(n[t].test(e))return t;return n.length};t.sort(function(e,t){return a(e)-a(t)})}for(var o=0,i=t.length;o<i;o++){var u=t[o],s=this.renderers[u];if(null!=s)for(var l=0,d=e.length;l<d;l++)if("function"==typeof s.canPlayType&&"string"==typeof e[l].type&&s.canPlayType(e[l].type))return{rendererName:s.name,src:e[l].src}}return null}},{key:"order",set:function(e){if(!Array.isArray(e))throw new TypeError("order must be an array of strings.");this._order=e},get:function(){return this._order}},{key:"renderers",set:function(e){if(null!==e&&"object"!==(void 0===e?"undefined":a(e)))throw new TypeError("renderers must be an array of objects.");this._renderers=e},get:function(){return this._renderers}}]),e}(),l=r.renderer=new s;u.default.Renderers=l},{4:4}],6:[function(e,t,r){"use strict";var k=i(e(3)),x=i(e(2)),U=i(e(4)),n=e(5),I=e(8),a=e(9),o=e(7);function i(e){return e&&e.__esModule?e:{default:e}}var _={isIframeStarted:!1,isIframeLoaded:!1,iframeQueue:[],enqueueIframe:function(e){_.isLoaded="undefined"!=typeof YT&&YT.loaded,_.isLoaded?_.createIframe(e):(_.loadIframeApi(),_.iframeQueue.push(e))},loadIframeApi:function(){_.isIframeStarted||((0,o.loadScript)("https://www.youtube.com/player_api"),_.isIframeStarted=!0)},iFrameReady:function(){for(_.isLoaded=!0,_.isIframeLoaded=!0;0<_.iframeQueue.length;){var e=_.iframeQueue.pop();_.createIframe(e)}},createIframe:function(e){return new YT.Player(e.containerId,e)},getYouTubeId:function(e){var t="";return 0<e.indexOf("?")?""===(t=_.getYouTubeIdFromParam(e))&&(t=_.getYouTubeIdFromUrl(e)):t=_.getYouTubeIdFromUrl(e),(t=t.substring(t.lastIndexOf("/")+1).split("?"))[0]},getYouTubeIdFromParam:function(e){if(null==e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),r="",n=0,a=t.length;n<a;n++){var o=t[n].split("=");if("v"===o[0]){r=o[1];break}}return r},getYouTubeIdFromUrl:function(e){return null!=e&&e.trim().length?(e=e.split("?")[0]).substring(e.lastIndexOf("/")+1):null},getYouTubeNoCookieUrl:function(e){if(null==e||!e.trim().length||-1===e.indexOf("//www.youtube"))return e;var t=e.split("/");return t[2]=t[2].replace(".com","-nocookie.com"),t.join("/")}},u={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:!1,imageQuality:null}},canPlayType:function(e){return~["video/youtube","video/x-youtube"].indexOf(e.toLowerCase())},create:function(m,r,n){var v={},y=[],g=null,o=!0,i=!1,h=null;v.options=r,v.id=m.id+"_"+r.prefix,v.mediaElement=m;for(var e=U.default.html5media.properties,t=function(a){var e=""+a.substring(0,1).toUpperCase()+a.substring(1);v["get"+e]=function(){if(null!==g){switch(a){case"currentTime":return g.getCurrentTime();case"duration":return g.getDuration();case"volume":return g.getVolume()/100;case"playbackRate":return g.getPlaybackRate();case"paused":return o;case"ended":return i;case"muted":return g.isMuted();case"buffered":var e=g.getVideoLoadedFraction(),t=g.getDuration();return{start:function(){return 0},end:function(){return e*t},length:1};case"src":return g.getVideoUrl();case"readyState":return 4}return null}return null},v["set"+e]=function(e){if(null!==g)switch(a){case"src":var t="string"==typeof e?e:e[0].src,r=_.getYouTubeId(t);m.originalNode.autoplay?g.loadVideoById(r):g.cueVideoById(r);break;case"currentTime":g.seekTo(e);break;case"muted":e?g.mute():g.unMute(),setTimeout(function(){var e=(0,I.createEvent)("volumechange",v);m.dispatchEvent(e)},50);break;case"volume":e,g.setVolume(100*e),setTimeout(function(){var e=(0,I.createEvent)("volumechange",v);m.dispatchEvent(e)},50);break;case"playbackRate":g.setPlaybackRate(e),setTimeout(function(){var e=(0,I.createEvent)("ratechange",v);m.dispatchEvent(e)},50);break;case"readyState":var n=(0,I.createEvent)("canplay",v);m.dispatchEvent(n)}else y.push({type:"set",propName:a,value:e})}},a=0,u=e.length;a<u;a++)t(e[a]);for(var s=U.default.html5media.methods,l=function(e){v[e]=function(){if(null!==g)switch(e){case"play":return o=!1,g.playVideo();case"pause":return o=!0,g.pauseVideo();case"load":return null}else y.push({type:"call",methodName:e})}},d=0,f=s.length;d<f;d++)l(s[d]);var c=x.default.createElement("div");c.id=v.id,v.options.youtube.nocookie&&(m.originalNode.src=_.getYouTubeNoCookieUrl(n[0].src)),m.originalNode.parentNode.insertBefore(c,m.originalNode),m.originalNode.style.display="none";var p="audio"===m.originalNode.tagName.toLowerCase(),b=p?"1":m.originalNode.height,w=p?"1":m.originalNode.width,T=_.getYouTubeId(n[0].src),E={id:v.id,containerId:c.id,videoId:T,height:b,width:w,host:v.options.youtube&&v.options.youtube.nocookie?"https://www.youtube-nocookie.com":void 0,playerVars:Object.assign({controls:0,rel:0,disablekb:1,showinfo:0,modestbranding:0,html5:1,iv_load_policy:3},v.options.youtube),origin:k.default.location.host,events:{onReady:function(e){if(m.youTubeApi=g=e.target,m.youTubeState={paused:!0,ended:!1},y.length)for(var t=0,r=y.length;t<r;t++){var n=y[t];if("set"===n.type){var a=n.propName,o=""+a.substring(0,1).toUpperCase()+a.substring(1);v["set"+o](n.value)}else"call"===n.type&&v[n.methodName]()}h=g.getIframe(),m.originalNode.muted&&g.mute();for(var i=["mouseover","mouseout"],u=function(e){var t=(0,I.createEvent)(e.type,v);m.dispatchEvent(t)},s=0,l=i.length;s<l;s++)h.addEventListener(i[s],u,!1);for(var d=["rendererready","loadedmetadata","loadeddata","canplay"],f=0,c=d.length;f<c;f++){var p=(0,I.createEvent)(d[f],v);m.dispatchEvent(p)}},onStateChange:function(e){var t=[];switch(e.data){case-1:t=["loadedmetadata"],o=!0,i=!1;break;case 0:t=["ended"],o=!1,i=!v.options.youtube.loop,v.options.youtube.loop||v.stopInterval();break;case 1:t=["play","playing"],i=o=!1,v.startInterval();break;case 2:t=["pause"],o=!0,i=!1,v.stopInterval();break;case 3:t=["progress"],i=!1;break;case 5:t=["loadeddata","loadedmetadata","canplay"],o=!0,i=!1}for(var r=0,n=t.length;r<n;r++){var a=(0,I.createEvent)(t[r],v);m.dispatchEvent(a)}},onError:function(e){return function(e){var t="";switch(e.data){case 2:t="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:t="The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.";break;case 100:t="The video requested was not found. Either video has been removed or has been marked as private.";break;case 101:case 105:t="The owner of the requested video does not allow it to be played in embedded players.";break;default:t="Unknown error."}m.generateError("Code "+e.data+": "+t,n)}(e)}}};return(p||m.originalNode.hasAttribute("playsinline"))&&(E.playerVars.playsinline=1),m.originalNode.controls&&(E.playerVars.controls=1),m.originalNode.autoplay&&(E.playerVars.autoplay=1),m.originalNode.loop&&(E.playerVars.loop=1),(E.playerVars.loop&&1===parseInt(E.playerVars.loop,10)||-1<m.originalNode.src.indexOf("loop="))&&!E.playerVars.playlist&&-1===m.originalNode.src.indexOf("playlist=")&&(E.playerVars.playlist=_.getYouTubeId(m.originalNode.src)),_.enqueueIframe(E),v.onEvent=function(e,t,r){null!=r&&(m.youTubeState=r)},v.setSize=function(e,t){null!==g&&g.setSize(e,t)},v.hide=function(){v.stopInterval(),v.pause(),h&&(h.style.display="none")},v.show=function(){h&&(h.style.display="")},v.destroy=function(){g.destroy()},v.interval=null,v.startInterval=function(){v.interval=setInterval(function(){var e=(0,I.createEvent)("timeupdate",v);m.dispatchEvent(e)},250)},v.stopInterval=function(){v.interval&&clearInterval(v.interval)},v.getPosterUrl=function(){var e=r.youtube.imageQuality,t=_.getYouTubeId(m.originalNode.src);return e&&-1<["default","hqdefault","mqdefault","sddefault","maxresdefault"].indexOf(e)&&t?"https://img.youtube.com/vi/"+t+"/"+e+".jpg":""},v}};k.default.onYouTubePlayerAPIReady=function(){_.iFrameReady()},a.typeChecks.push(function(e){return/\/\/(www\.youtube|youtu\.?be)/i.test(e)?"video/x-youtube":null}),n.renderer.add(u)},{2:2,3:3,4:4,5:5,7:7,8:8,9:9}],7:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.removeClass=r.addClass=r.hasClass=void 0,r.loadScript=i,r.offset=u,r.toggleClass=v,r.fadeOut=y,r.fadeIn=g,r.siblings=h,r.visible=b,r.ajax=w;var s=o(e(3)),a=o(e(2)),n=o(e(4));function o(e){return e&&e.__esModule?e:{default:e}}function i(n){return new Promise(function(e,t){var r=a.default.createElement("script");r.src=n,r.async=!0,r.onload=function(){r.remove(),e()},r.onerror=function(){r.remove(),t()},a.default.head.appendChild(r)})}function u(e){var t=e.getBoundingClientRect(),r=s.default.pageXOffset||a.default.documentElement.scrollLeft,n=s.default.pageYOffset||a.default.documentElement.scrollTop;return{top:t.top+n,left:t.left+r}}var l=void 0,d=void 0,f=void 0;"classList"in a.default.documentElement?(l=function(e,t){return void 0!==e.classList&&e.classList.contains(t)},d=function(e,t){return e.classList.add(t)},f=function(e,t){return e.classList.remove(t)}):(l=function(e,t){return new RegExp("\\b"+t+"\\b").test(e.className)},d=function(e,t){c(e,t)||(e.className+=" "+t)},f=function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","g"),"")});var c=r.hasClass=l,p=r.addClass=d,m=r.removeClass=f;function v(e,t){c(e,t)?m(e,t):p(e,t)}function y(a){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,i=arguments[2];a.style.opacity||(a.style.opacity=1);var u=null;s.default.requestAnimationFrame(function e(t){var r=t-(u=u||t),n=parseFloat(1-r/o,2);a.style.opacity=n<0?0:n,o<r?i&&"function"==typeof i&&i():s.default.requestAnimationFrame(e)})}function g(a){var o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:400,i=arguments[2];a.style.opacity||(a.style.opacity=0);var u=null;s.default.requestAnimationFrame(function e(t){var r=t-(u=u||t),n=parseFloat(r/o,2);a.style.opacity=1<n?1:n,o<r?i&&"function"==typeof i&&i():s.default.requestAnimationFrame(e)})}function h(e,t){var r=[];for(e=e.parentNode.firstChild;t&&!t(e)||r.push(e),e=e.nextSibling;);return r}function b(e){return void 0!==e.getClientRects&&"function"===e.getClientRects?!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length):!(!e.offsetWidth&&!e.offsetHeight)}function w(e,t,r,n){var a=s.default.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),o="application/x-www-form-urlencoded; charset=UTF-8",i=!1,u="*/".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&&(u=o+", */*; q=0.01"),a&&(a.open("GET",e,!0),a.setRequestHeader("Accept",u),a.onreadystatechange=function(){if(!i&&4===a.readyState)if(200===a.status){i=!0;var e=void 0;switch(t){case"json":e=JSON.parse(a.responseText);break;case"xml":e=a.responseXML;break;default:e=a.responseText}r(e)}else"function"==typeof n&&n(a.status)},a.send())}n.default.Utils=n.default.Utils||{},n.default.Utils.offset=u,n.default.Utils.hasClass=c,n.default.Utils.addClass=p,n.default.Utils.removeClass=m,n.default.Utils.toggleClass=v,n.default.Utils.fadeIn=g,n.default.Utils.fadeOut=y,n.default.Utils.siblings=h,n.default.Utils.visible=b,n.default.Utils.ajax=w,n.default.Utils.loadScript=i},{2:2,3:3,4:4}],8:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.escapeHTML=i,r.debounce=u,r.isObjectEmpty=s,r.splitEvents=l,r.createEvent=d,r.isNodeAfter=f,r.isString=c;var n,a=e(4),o=(n=a)&&n.__esModule?n:{default:n};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 u(n,a){var o=this,i=arguments,u=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if("function"!=typeof n)throw new Error("First argument must be a function");if("number"!=typeof a)throw new Error("Second argument must be a numeric value");var s=void 0;return function(){var e=o,t=i,r=u&&!s;clearTimeout(s),s=setTimeout(function(){s=null,u||n.apply(e,t)},a),r&&n.apply(e,t)}}function s(e){return Object.getOwnPropertyNames(e).length<=0}function l(e,r){var n=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/,a={d:[],w:[]};return(e||"").split(" ").forEach(function(e){var t=e+(r?"."+r:"");t.startsWith(".")?(a.d.push(t),a.w.push(t)):a[n.test(e)?"w":"d"].push(t)}),a.d=a.d.join(" "),a.w=a.w.join(" "),a}function d(e,t){if("string"!=typeof e)throw new Error("Event name must be a string");var r=e.match(/([a-z]+\.([a-z]+))/i),n={target:t};return null!==r&&(e=r[1],n.namespace=r[2]),new window.CustomEvent(e,{detail:n})}function f(e,t){return!!(e&&t&&2&e.compareDocumentPosition(t))}function c(e){return"string"==typeof e}o.default.Utils=o.default.Utils||{},o.default.Utils.escapeHTML=i,o.default.Utils.debounce=u,o.default.Utils.isObjectEmpty=s,o.default.Utils.splitEvents=l,o.default.Utils.createEvent=d,o.default.Utils.isNodeAfter=f,o.default.Utils.isString=c},{4:4}],9:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.typeChecks=void 0,r.absolutizeUrl=s,r.formatType=l,r.getMimeFromType=d,r.getTypeFromFile=f,r.getExtension=c,r.normalizeExtension=p;var n,a=e(4),o=(n=a)&&n.__esModule?n:{default:n},i=e(8);var u=r.typeChecks=[];function s(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=document.createElement("div");return t.innerHTML='<a href="'+(0,i.escapeHTML)(e)+'">x</a>',t.firstChild.href}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return e&&!t?f(e):t}function d(e){if("string"!=typeof e)throw new Error("`type` argument must be a string");return e&&-1<e.indexOf(";")?e.substr(0,e.indexOf(";")):e}function f(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");for(var t=0,r=u.length;t<r;t++){var n=u[t](e);if(n)return n}var a=p(c(e)),o="video/mp4";return a&&(~["mp4","m4v","ogg","ogv","webm","flv","mpeg"].indexOf(a)?o="video/"+a:"mov"===a?o="video/quicktime":~["mp3","oga","wav","mid","midi"].indexOf(a)&&(o="audio/"+a)),o}function c(e){if("string"!=typeof e)throw new Error("`url` argument must be a string");var t=e.split("?")[0].split("\\").pop().split("/").pop();return~t.indexOf(".")?t.substring(t.lastIndexOf(".")+1):""}function p(e){if("string"!=typeof e)throw new Error("`extension` argument must be a string");switch(e){case"mp4":case"m4v":return"mp4";case"webm":case"webma":case"webmv":return"webm";case"ogg":case"oga":case"ogv":return"ogg";default:return e}}o.default.Utils=o.default.Utils||{},o.default.Utils.typeChecks=u,o.default.Utils.absolutizeUrl=s,o.default.Utils.formatType=l,o.default.Utils.getMimeFromType=d,o.default.Utils.getTypeFromFile=f,o.default.Utils.getExtension=c,o.default.Utils.normalizeExtension=p},{4:4,8:8}]},{},[6]); |
Package.describe({ | ||
name: 'johndyer:mediaelement', | ||
summary: '*Official* MediaElement.js: <video> and <audio> made easy. One file. Any browser. Same UI.', | ||
version: '6.0.1', | ||
version: '6.0.2', | ||
git: 'https://github.com/mediaelement/mediaelement' | ||
@@ -6,0 +6,0 @@ }); |
{ | ||
"name": "mediaelement", | ||
"license": "MIT", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"main": "full.js", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -9,3 +9,3 @@ 'use strict'; | ||
// version number | ||
mejs.version = '6.0.1'; | ||
mejs.version = '6.0.2'; | ||
@@ -12,0 +12,0 @@ // Basic HTML5 settings |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3447350
31574