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

mediaelement

Package Overview
Dependencies
Maintainers
4
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mediaelement - npm Package Compare versions

Comparing version 4.2.16 to 4.2.17

0

build/renderers/dailymotion.js

@@ -0,0 +0,0 @@ /*!

@@ -0,0 +0,0 @@ /*!

@@ -0,0 +0,0 @@ /*!

@@ -0,0 +0,0 @@ /*!

@@ -0,0 +0,0 @@ /*!

7

build/renderers/youtube.js

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

mejs.version = '4.2.16';
mejs.version = '4.2.17';

@@ -547,2 +547,3 @@ mejs.html5media = {

width: width,
host: youtube.options.youtube && youtube.options.youtube.nocookie ? 'https://www.youtube-nocookie.com' : undefined,
playerVars: Object.assign({

@@ -1172,4 +1173,6 @@ controls: 0,

if (normalizedExt) {
if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg', 'mov'].indexOf(normalizedExt)) {
if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg'].indexOf(normalizedExt)) {
mime = 'video/' + normalizedExt;
} else if ('mov' === normalizedExt) {
mime = 'video/quicktime';
} else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {

@@ -1176,0 +1179,0 @@ mime = 'audio/' + normalizedExt;

@@ -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:"4.2.16",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,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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};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","mov"].indexOf(a)?o="video/"+a:~["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:"4.2.17",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={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};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: '4.2.16',
version: '4.2.17',
git: 'https://github.com/mediaelement/mediaelement'

@@ -6,0 +6,0 @@ });

{
"name": "mediaelement",
"license": "MIT",
"version": "4.2.16",
"version": "4.2.17",
"main": "full.js",

@@ -6,0 +6,0 @@ "repository": {

Instructions for the Maintainer
# Instructions for the Maintainer
**********************
PREPARING A RELEASE - first steps, command line
## PREPARING A RELEASE - first steps, command line
**********************
- Create a dedicated branch for the release;
### 1. Switch to / create the <rel-4.x.x> branch
git checkout master
git checkout -b release_4.X.X
`git checkout -b rel-4.x.x`
- Run basic npm security checks;
### 2. Run basic npm security checks;
npm audit fix
`npm audit fix`
- update version
### 3. update version
src/js/core/mejs.js:mejs.version = '4.x.x';
package.js: version: '4.x.x',
package-lock.json: "version": "4.x.x",
package.json: "version": "4.x.x",
* src/js/core/mejs.js:mejs.version = '4.x.x';
* package.js: version: '4.x.x',
* package-lock.json: "version": "4.x.x",
* package.json: "version": "4.x.x",
- check with shell command;
### 4. check with shell command;
`egrep "version:|mejs.version =" package.js src/js/core/mejs.js`
egrep "version:|mejs.version =" package.js src/js/core/mejs.js
head -4 package*.json | grep version
`head -4 package*.json | grep version`
### 5. Update changelog.md
- Update changelog.md
### 6. Build release;
- Build release;
`grunt`
grunt
### 7. check that mejs.version has been updated sucessfully below build/
- check that mejs.version has been updated sucessfully below build/
`grep mejs.version build/* -r`
grep mejs.version build/* -r
### 8. add/commit all including build/
- add/commit/push all including build/
`git add --all`
git add --all
git commit -am "release 4.X.X"
git push
`git commit -am "release 4.x.x`
### 9. carefully, interractivelly rebase, allowing "reword"ing commits for cleaner git log
`git rebase -i master`
### 10. git push
**********************
PREPARING A RELEASE - second step on github.com
# PREPARING A RELEASE - second step on github.com
**********************
- prepare a new release using changelog.md
* prepare a new release using changelog.md
**********************
PREPARING A RELEASE - third step on npmjs.com
# PREPARING A RELEASE - third step on npmjs.com
**********************

@@ -415,7 +415,9 @@ 'use strict';

}
return response
} else {
t.mediaElement.renderer[methodName](args);
return t.mediaElement.renderer[methodName](args);
}
} catch (e) {
t.mediaElement.generateError(e, mediaFiles);
throw e;
}

@@ -428,9 +430,10 @@ },

if (t.mediaElement.promises.length) {
Promise.all(t.mediaElement.promises).then(() => {
triggerAction(methodName, args);
return Promise.all(t.mediaElement.promises).then(() => {
return triggerAction(methodName, args);
}).catch((e) => {
t.mediaElement.generateError(e, mediaFiles);
return Promise.reject(e);
});
} else {
triggerAction(methodName, args);
return triggerAction(methodName, args);
}

@@ -437,0 +440,0 @@ }

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

// version number
mejs.version = '4.2.16';
mejs.version = '4.2.17';

@@ -12,0 +12,0 @@ // Basic HTML5 settings

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

// and if the player can play the current source
if (t.options.useFakeFullscreen === false && Features.IS_IOS && Features.HAS_IOS_FULLSCREEN &&
if (t.options.useFakeFullscreen === false && (Features.IS_IOS || Features.IS_SAFARI) && Features.HAS_IOS_FULLSCREEN &&
typeof t.media.originalNode.webkitEnterFullscreen === 'function' &&

@@ -208,0 +208,0 @@ t.media.originalNode.canPlayType(getTypeFromFile(t.media.getSrc()))) {

@@ -927,13 +927,12 @@ 'use strict';

parse (trackText) {
trackText = $(trackText).filter('tt');
const
container = trackText.firstChild,
const trackElem = document.adoptNode(new DOMParser().parseFromString(trackText, 'application/xml').documentElement),
container = trackElem.querySelector('div'),
lines = container.querySelectorAll('p'),
styleNode = trackText.getElementById(`${container.attr('style')}`),
styleNode = document.getElementById(container.getAttribute('style')),
entries = []
;
;
let styles;
if (styleNode.length) {
if (styleNode) {
styleNode.removeAttribute('id');

@@ -960,13 +959,13 @@ const attributes = styleNode.attributes;

if (lines.eq(i).attr('begin')) {
_temp.start = convertSMPTEtoSeconds(lines.eq(i).attr('begin'));
if (lines[i].getAttribute('begin')) {
_temp.start = convertSMPTEtoSeconds(lines[i].getAttribute('begin'));
}
if (!_temp.start && lines.eq(i - 1).attr('end')) {
_temp.start = convertSMPTEtoSeconds(lines.eq(i - 1).attr('end'));
if (!_temp.start && lines[i - 1].getAttribute('end')) {
_temp.start = convertSMPTEtoSeconds(lines[i - 1].getAttribute('end'));
}
if (lines.eq(i).attr('end')) {
_temp.stop = convertSMPTEtoSeconds(lines.eq(i).attr('end'));
if (lines[i].getAttribute('end')) {
_temp.stop = convertSMPTEtoSeconds(lines[i].getAttribute('end'));
}
if (!_temp.stop && lines.eq(i + 1).attr('begin')) {
_temp.stop = convertSMPTEtoSeconds(lines.eq(i + 1).attr('begin'));
if (!_temp.stop && lines[i + 1].getAttribute('begin')) {
_temp.stop = convertSMPTEtoSeconds(lines[i + 1].getAttribute('begin'));
}

@@ -977,3 +976,3 @@

for (let _style in styles) {
style += `${_style}:${styles[_style]};`;
style += `${_style}: ${styles[_style] };`;
}

@@ -987,3 +986,3 @@ }

}
_temp.text = lines.eq(i).innerHTML.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
_temp.text = lines[i].innerHTML.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_| !:, .; ]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>");
entries.push(_temp);

@@ -990,0 +989,0 @@ }

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

`<button type="button" aria-controls="${t.id}" title="${muteText}" aria-label="${muteText}" tabindex="0"></button>` +
`<a href="javascript:void(0);" class="${t.options.classPrefix}volume-slider" ` +
`<a class="${t.options.classPrefix}volume-slider" ` +
`aria-label="${i18n.t('mejs.volume-slider')}" aria-valuemin="0" aria-valuemax="100" role="slider" ` +

@@ -160,3 +160,2 @@ `aria-orientation="vertical">` +

anchor.className = `${t.options.classPrefix}horizontal-volume-slider`;
anchor.href = 'javascript:void(0);';
anchor.setAttribute('aria-label', i18n.t('mejs.volume-slider'));

@@ -303,2 +302,3 @@ anchor.setAttribute('aria-valuemin', 0);

} else {
positionVolumeHandle(media.volume);

@@ -430,3 +430,2 @@ removeClass(mute, `${t.options.classPrefix}unmute`);

media.setMuted(true);
player.options.startVolume = 0;
}

@@ -445,2 +444,5 @@ media.setVolume(player.options.startVolume);

}
if(player.options.startVolume === 0){
player.options.startVolume = 0;
}
media.setVolume(player.options.startVolume);

@@ -456,3 +458,5 @@ t.setControlsSize();

media.setMuted(true);
player.options.startVolume = 0;
if(player.options.startVolume === 0){
player.options.startVolume = 0;
}
toggleMute();

@@ -465,2 +469,2 @@ }

}
});
});

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

autoplay = !(autoplayAttr === undefined || autoplayAttr === null || autoplayAttr === 'false'),
isNative = media.rendererName !== null && /(native|html5)/i.test(t.media.rendererName)
isNative = media.rendererName !== null && /(native|html5)/i.test(media.rendererName)
;

@@ -1078,2 +1078,6 @@

aspectRatio = (() => {
//enableAutosize == false maintain original ratio
if(!t.options.enableAutosize){
return t.initialAspectRatio;
}
let ratio = 1;

@@ -1715,2 +1719,6 @@ if (!t.isVideo) {

t.globalKeydownCallback = (event) => {
if (!document.activeElement) {
return true;
}
const

@@ -1805,11 +1813,11 @@ container = document.activeElement.closest(`.${t.options.classPrefix}container`),

play () {
this.proxy.play();
return this.proxy.play();
}
pause () {
this.proxy.pause();
return this.proxy.pause();
}
load () {
this.proxy.load();
return this.proxy.load();
}

@@ -1977,3 +1985,5 @@

const offscreen = t.getElement(t.container).parentNode.querySelector(`.${t.options.classPrefix}offscreen`);
if(offscreen){
offscreen.remove();
}
t.getElement(t.container).remove();

@@ -1980,0 +1990,0 @@ }

@@ -72,7 +72,7 @@ 'use strict';

play () {
this.media.play();
return this.media.play();
}
pause () {
this.media.pause();
return this.media.pause();
}

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

@@ -442,2 +442,3 @@ 'use strict';

width: width,
host: youtube.options.youtube && youtube.options.youtube.nocookie ? 'https://www.youtube-nocookie.com' : undefined,
playerVars: Object.assign({

@@ -444,0 +445,0 @@ controls: 0,

@@ -81,4 +81,6 @@ 'use strict';

if (normalizedExt) {
if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg', 'mov'].indexOf(normalizedExt)) {
if (~['mp4', 'm4v', 'ogg', 'ogv', 'webm', 'flv', 'mpeg'].indexOf(normalizedExt)) {
mime = `video/${normalizedExt}`;
} else if ('mov' === normalizedExt) {
mime = 'video/quicktime';
} else if (~['mp3', 'oga', 'wav', 'mid', 'midi'].indexOf(normalizedExt)) {

@@ -85,0 +87,0 @@ mime = `audio/${normalizedExt}`;

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 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 not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc