mediaelement
Advanced tools
Comparing version 4.2.12 to 4.2.14
@@ -11,3 +11,3 @@ /*! | ||
* | ||
*/(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){ | ||
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){ | ||
'use strict'; | ||
@@ -14,0 +14,0 @@ |
@@ -12,2 +12,2 @@ /*! | ||
*/ | ||
!function r(s,o,d){function u(a,e){if(!o[a]){if(!s[a]){var t="function"==typeof require&&require;if(!e&&t)return t(a,!0);if(l)return l(a,!0);var n=new Error("Cannot find module '"+a+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[a]={exports:{}};s[a][0].call(i.exports,function(e){var t=s[a][1][e];return u(t||e)},i,i.exports,r,s,o,d)}return o[a].exports}for(var l="function"==typeof require&&require,e=0;e<d.length;e++)u(d[e]);return u}({1:[function(e,t,a){"use strict";var p={isSDKStarted:!1,isSDKLoaded:!1,iframeQueue:[],enqueueIframe:function(e){p.isLoaded?p.createIframe(e):(p.loadIframeApi(),p.iframeQueue.push(e))},loadIframeApi:function(){p.isSDKStarted||(mejs.Utils.loadScript("https://api.dmcdn.net/all.js"),p.isSDKStarted=!0)},apiReady:function(){for(p.isLoaded=!0,p.isSDKLoaded=!0;0<p.iframeQueue.length;){var e=p.iframeQueue.pop();DM.init({apiKey:e.apiKey,status:e.status,cookie:e.cookie}),p.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]}},n={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(h,e,t){var y={},g=[],E=void 0,j=null,w=null;h.originalNode.muted;y.options=e,y.id=h.id+"_"+e.prefix,y.mediaElement=h;for(var a=mejs.html5media.properties,n=function(n){var e=""+n.substring(0,1).toUpperCase()+n.substring(1);y["get"+e]=function(){if(null!==j){switch(n){case"currentTime":return j.currentTime;case"duration":return isNaN(j.duration)?0:j.duration;case"volume":return j.volume;case"paused":return j.paused;case"ended":return j.ended;case"muted":return j.muted;case"buffered":var e=j.bufferedTime,t=j.duration;return{start:function(){return 0},end:function(){return e/t},length:1};case"src":return h.originalNode.getAttribute("src");case"readyState":return 4}return null}return null},y["set"+e]=function(e){if(null!==j)switch(n){case"src":var t="string"==typeof e?e:e[0].src;j.load(p.getDailyMotionId(t));break;case"currentTime":j.seek(e);break;case"muted":!0===e&&j.setVolume(0),j.setMuted(e),e,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",y);h.dispatchEvent(e)},50);break;case"volume":j.setVolume(e),0!==e||j.muted?0<e&&j.muted&&(j.setMuted(!1),!1):(j.setMuted(!0),!0),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",y);h.dispatchEvent(e)},50);break;case"readyState":var a=mejs.Utils.createEvent("canplay",y);h.dispatchEvent(a)}else g.push({type:"set",propName:n,value:e})}},i=0,r=a.length;i<r;i++)n(a[i]);for(var s=mejs.html5media.methods,o=function(e){y[e]=function(){if(null!==j)switch(e){case"play":return j.play();case"pause":return j.pause();case"load":return null}else g.push({type:"call",methodName:e})}},d=0,u=s.length;d<u;d++)o(s[d]);window["__ready__"+y.id]=function(e){if(h.dmPlayer=j=e,g.length)for(var t=0,a=g.length;t<a;t++){var n=g[t];if("set"===n.type){var i=n.propName,r=""+i.substring(0,1).toUpperCase()+i.substring(1);y["set"+r](n.value)}else"call"===n.type&&y[n.methodName]()}w=document.getElementById(y.id);for(var s=function(e){var t=mejs.Utils.createEvent(e.type,y);h.dispatchEvent(t)},o=0,d=(E=["mouseover","mouseout"]).length;o<d;o++)w.addEventListener(E[o],s,!1);h.originalNode.muted?(j.setVolume(0),j.setMuted(!0)):(j.setVolume(j.volume),j.setMuted(!1));for(var u,l=0,c=(E=(E=mejs.html5media.events).concat(["click","mouseover","mouseout"])).length;l<c;l++)"ended"!==(u=E[l])&&j.addEventListener(u,function(e){var t=mejs.Utils.createEvent(e.type,y);h.dispatchEvent(t)});j.addEventListener("ad_start",function(){var e=mejs.Utils.createEvent("play",y);h.dispatchEvent(e),e=mejs.Utils.createEvent("progress",y),h.dispatchEvent(e),e=mejs.Utils.createEvent("timeupdate",y),h.dispatchEvent(e)}),j.addEventListener("ad_timeupdate",function(){var e=mejs.Utils.createEvent("timeupdate",y);h.dispatchEvent(e)}),j.addEventListener("ad_pause",function(){var e=mejs.Utils.createEvent("pause",y);h.dispatchEvent(e)}),j.addEventListener("start",function(){if(j.muted){var e=mejs.Utils.createEvent("volumechange",y);h.dispatchEvent(e)}}),j.addEventListener("video_start",function(){var e=mejs.Utils.createEvent("play",y);h.dispatchEvent(e);var t=mejs.Utils.createEvent("playing",y);h.dispatchEvent(t)}),j.addEventListener("ad_timeupdate",function(){var e=mejs.Utils.createEvent("timeupdate",y);h.dispatchEvent(e)}),j.addEventListener("video_end",function(){var e=mejs.Utils.createEvent("ended",y);h.dispatchEvent(e),h.originalNode.getAttribute("loop")&&j.play()});for(var m=["rendererready","loadedmetadata","loadeddata","canplay"],p=0,v=m.length;p<v;p++){var f=mejs.Utils.createEvent(m[p],y);h.dispatchEvent(f)}};var l=document.createElement("div");l.id=y.id,h.appendChild(l),h.originalNode&&(l.style.width=h.originalNode.style.width,l.style.height=h.originalNode.style.height),h.originalNode.style.display="none";var c=p.getDailyMotionId(t[0].src),m={id:y.id,container:l,videoId:c};return m.params=Object.assign({},y.options.dailymotion),m.params.controls=!!h.originalNode.controls,h.originalNode.autoplay&&(m.params.autoplay=!0),h.originalNode.muted&&(m.params.mute=!0),m.params.api="1",p.enqueueIframe(m),y.hide=function(){y.pause(),w&&(w.style.display="none")},y.show=function(){w&&(w.style.display="")},y.setSize=function(e,t){w&&(w.width=e,w.height=t)},y.destroy=function(){j.destroy()},y}};mejs.Utils.typeChecks.push(function(e){return/\/\/((www\.)?dailymotion\.com|dai\.ly)/i.test(e)?"video/x-dailymotion":null}),window.dmAsyncInit=function(){p.apiReady()},mejs.Renderers.add(n)},{}]},{},[1]); | ||
!function r(s,o,d){function u(t,e){if(!o[t]){if(!s[t]){var a="function"==typeof require&&require;if(!e&&a)return a(t,!0);if(l)return l(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[t]={exports:{}};s[t][0].call(i.exports,function(e){return u(s[t][1][e]||e)},i,i.exports,r,s,o,d)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e<d.length;e++)u(d[e]);return u}({1:[function(e,t,a){"use strict";var p={isSDKStarted:!1,isSDKLoaded:!1,iframeQueue:[],enqueueIframe:function(e){p.isLoaded?p.createIframe(e):(p.loadIframeApi(),p.iframeQueue.push(e))},loadIframeApi:function(){p.isSDKStarted||(mejs.Utils.loadScript("https://api.dmcdn.net/all.js"),p.isSDKStarted=!0)},apiReady:function(){for(p.isLoaded=!0,p.isSDKLoaded=!0;0<p.iframeQueue.length;){var e=p.iframeQueue.pop();DM.init({apiKey:e.apiKey,status:e.status,cookie:e.cookie}),p.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]}},n={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(h,e,t){var y={},g=[],E=void 0,j=null,w=null;h.originalNode.muted;y.options=e,y.id=h.id+"_"+e.prefix,y.mediaElement=h;for(var a=mejs.html5media.properties,n=function(n){var e=""+n.substring(0,1).toUpperCase()+n.substring(1);y["get"+e]=function(){if(null===j)return null;switch(n){case"currentTime":return j.currentTime;case"duration":return isNaN(j.duration)?0:j.duration;case"volume":return j.volume;case"paused":return j.paused;case"ended":return j.ended;case"muted":return j.muted;case"buffered":var e=j.bufferedTime,t=j.duration;return{start:function(){return 0},end:function(){return e/t},length:1};case"src":return h.originalNode.getAttribute("src");case"readyState":return 4}return null},y["set"+e]=function(e){if(null!==j)switch(n){case"src":var t="string"==typeof e?e:e[0].src;j.load(p.getDailyMotionId(t));break;case"currentTime":j.seek(e);break;case"muted":!0===e&&j.setVolume(0),j.setMuted(e),e,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",y);h.dispatchEvent(e)},50);break;case"volume":j.setVolume(e),0!==e||j.muted?0<e&&j.muted&&(j.setMuted(!1),!1):(j.setMuted(!0),!0),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",y);h.dispatchEvent(e)},50);break;case"readyState":var a=mejs.Utils.createEvent("canplay",y);h.dispatchEvent(a)}else g.push({type:"set",propName:n,value:e})}},i=0,r=a.length;i<r;i++)n(a[i]);for(var s=mejs.html5media.methods,o=function(e){y[e]=function(){if(null!==j)switch(e){case"play":return j.play();case"pause":return j.pause();case"load":return null}else g.push({type:"call",methodName:e})}},d=0,u=s.length;d<u;d++)o(s[d]);window["__ready__"+y.id]=function(e){if(h.dmPlayer=j=e,g.length)for(var t=0,a=g.length;t<a;t++){var n=g[t];if("set"===n.type){var i=n.propName,r=""+i.substring(0,1).toUpperCase()+i.substring(1);y["set"+r](n.value)}else"call"===n.type&&y[n.methodName]()}w=document.getElementById(y.id);for(var s=function(e){var t=mejs.Utils.createEvent(e.type,y);h.dispatchEvent(t)},o=0,d=(E=["mouseover","mouseout"]).length;o<d;o++)w.addEventListener(E[o],s,!1);h.originalNode.muted?(j.setVolume(0),j.setMuted(!0)):(j.setVolume(j.volume),j.setMuted(!1));for(var u,l=0,c=(E=(E=mejs.html5media.events).concat(["click","mouseover","mouseout"])).length;l<c;l++)"ended"!==(u=E[l])&&j.addEventListener(u,function(e){var t=mejs.Utils.createEvent(e.type,y);h.dispatchEvent(t)});j.addEventListener("ad_start",function(){var e=mejs.Utils.createEvent("play",y);h.dispatchEvent(e),e=mejs.Utils.createEvent("progress",y),h.dispatchEvent(e),e=mejs.Utils.createEvent("timeupdate",y),h.dispatchEvent(e)}),j.addEventListener("ad_timeupdate",function(){var e=mejs.Utils.createEvent("timeupdate",y);h.dispatchEvent(e)}),j.addEventListener("ad_pause",function(){var e=mejs.Utils.createEvent("pause",y);h.dispatchEvent(e)}),j.addEventListener("start",function(){if(j.muted){var e=mejs.Utils.createEvent("volumechange",y);h.dispatchEvent(e)}}),j.addEventListener("video_start",function(){var e=mejs.Utils.createEvent("play",y);h.dispatchEvent(e);var t=mejs.Utils.createEvent("playing",y);h.dispatchEvent(t)}),j.addEventListener("ad_timeupdate",function(){var e=mejs.Utils.createEvent("timeupdate",y);h.dispatchEvent(e)}),j.addEventListener("video_end",function(){var e=mejs.Utils.createEvent("ended",y);h.dispatchEvent(e),h.originalNode.getAttribute("loop")&&j.play()});for(var m=["rendererready","loadedmetadata","loadeddata","canplay"],p=0,v=m.length;p<v;p++){var f=mejs.Utils.createEvent(m[p],y);h.dispatchEvent(f)}};var l=document.createElement("div");l.id=y.id,h.appendChild(l),h.originalNode&&(l.style.width=h.originalNode.style.width,l.style.height=h.originalNode.style.height),h.originalNode.style.display="none";var c=p.getDailyMotionId(t[0].src),m={id:y.id,container:l,videoId:c};return m.params=Object.assign({},y.options.dailymotion),m.params.controls=!!h.originalNode.controls,h.originalNode.autoplay&&(m.params.autoplay=!0),h.originalNode.muted&&(m.params.mute=!0),m.params.api="1",p.enqueueIframe(m),y.hide=function(){y.pause(),w&&(w.style.display="none")},y.show=function(){w&&(w.style.display="")},y.setSize=function(e,t){w&&(w.width=e,w.height=t)},y.destroy=function(){j.destroy()},y}};mejs.Utils.typeChecks.push(function(e){return/\/\/((www\.)?dailymotion\.com|dai\.ly)/i.test(e)?"video/x-dailymotion":null}),window.dmAsyncInit=function(){p.apiReady()},mejs.Renderers.add(n)},{}]},{},[1]); |
@@ -11,3 +11,3 @@ /*! | ||
* | ||
*/(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){ | ||
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){ | ||
'use strict'; | ||
@@ -14,0 +14,0 @@ |
@@ -12,2 +12,2 @@ /*! | ||
*/ | ||
!function a(o,s,u){function l(n,e){if(!s[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(d)return d(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[n]={exports:{}};o[n][0].call(i.exports,function(e){var t=o[n][1][e];return l(t||e)},i,i.exports,a,o,s,u)}return s[n].exports}for(var d="function"==typeof require&&require,e=0;e<u.length;e++)l(u[e]);return l}({1:[function(e,t,n){"use strict";var p={promise:null,load:function(e){"undefined"!=typeof FB?p._createPlayer(e):(p.promise=p.promise||mejs.Utils.loadScript("https://connect.facebook.net/"+e.options.lang+"/sdk.js"),p.promise.then(function(){FB.init(e.options),setTimeout(function(){p._createPlayer(e)},50)}))},_createPlayer:function(e){window["__ready__"+e.id]()}},r={name:"facebook",options:{prefix:"facebook",facebook:{appId:"",xfbml:!0,version:"v2.10",lang:"en_US"}},canPlayType:function(e){return~["video/facebook","video/x-facebook"].indexOf(e.toLowerCase())},create:function(h,e,t){var N=[],E={},w=!1,k=!0,_=!1,j=null,i="",n="",B=h.originalNode.autoplay;E.options=e,E.id=h.id+"_"+e.prefix,E.mediaElement=h,mejs.Features.isiPhone&&h.originalNode.getAttribute("poster")&&(n=h.originalNode.getAttribute("poster"),h.originalNode.removeAttribute("poster"));for(var r=mejs.html5media.properties,a=function(r){var e=""+r.substring(0,1).toUpperCase()+r.substring(1);E["get"+e]=function(){if(null!==j){switch(r){case"currentTime":return j.getCurrentPosition();case"duration":return j.getDuration();case"volume":return j.getVolume();case"paused":return k;case"ended":return _;case"muted":return j.isMuted();case"buffered":return{start:function(){return 0},end:function(){return 0},length:1};case"src":return i;case"readyState":return 4}return null}return null},E["set"+e]=function(e){if(null!==j)switch(r){case"src":var t="string"==typeof e?e:e[0].src;i=t,f.remove(),(f=document.createElement("div")).id=E.id,f.className="fb-video",f.setAttribute("data-href",t),f.setAttribute("data-allowfullscreen","true"),f.setAttribute("data-controls","false"),h.originalNode.parentNode.insertBefore(f,h.originalNode),h.originalNode.style.display="none",p.load({lang:E.options.lang,id:E.id}),FB.XFBML.parse(),B&&j.play();break;case"currentTime":j.seek(e);break;case"muted":e?j.mute():j.unmute(),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",E);h.dispatchEvent(e)},50);break;case"volume":j.setVolume(e),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",E);h.dispatchEvent(e)},50);break;case"readyState":var n=mejs.Utils.createEvent("canplay",E);h.dispatchEvent(n)}else N.push({type:"set",propName:r,value:e})}},o=0,s=r.length;o<s;o++)a(r[o]);for(var u=mejs.html5media.methods,l=function(e){E[e]=function(){if(null!==j)switch(e){case"play":return j.play();case"pause":return j.pause();case"load":return null}else N.push({type:"call",methodName:e})}},d=0,c=u.length;d<c;d++)l(u[d]);function P(e){for(var t=0,n=e.length;t<n;t++){var r=mejs.Utils.createEvent(e[t],E);h.dispatchEvent(r)}}window["__ready__"+E.id]=function(){FB.Event.subscribe("xfbml.ready",function(e){if("video"===e.type&&E.id===e.id){h.fbPlayer=j=e.instance;var t=document.getElementById(E.id),n=t.offsetWidth,r=t.offsetHeight,i=["mouseover","mouseout"],a=function(e){var t=mejs.Utils.createEvent(e.type,E);h.dispatchEvent(t)};E.setSize(n,r),h.originalNode.muted||j.unmute(),B&&j.play();for(var o=0,s=i.length;o<s;o++)t.addEventListener(i[o],a);E.eventHandler={};for(var u=["startedPlaying","paused","finishedPlaying","startedBuffering","finishedBuffering"],l=0,d=u.length;l<d;l++){var c=u[l],f=E.eventHandler[c];null==f||mejs.Utils.isObjectEmpty(f)||"function"!=typeof f.removeListener||f.removeListener(c)}if(N.length)for(var p=0,m=N.length;p<m;p++){var v=N[p];if("set"===v.type){var g=v.propName,y=""+g.substring(0,1).toUpperCase()+g.substring(1);E["set"+y](v.value)}else"call"===v.type&&E[v.methodName]()}P(["rendererready","loadeddata","canplay","progress","loadedmetadata","timeupdate"]);var b=void 0;E.eventHandler.startedPlaying=j.subscribe("startedPlaying",function(){w||(w=!0),_=k=!1,P(["play","playing","timeupdate"]),b=setInterval(function(){j.getCurrentPosition(),P(["timeupdate"])},250)}),E.eventHandler.paused=j.subscribe("paused",function(){k=!0,_=!1,P(["pause"])}),E.eventHandler.finishedPlaying=j.subscribe("finishedPlaying",function(){_=k=!0,P(["ended"]),clearInterval(b),b=null}),E.eventHandler.startedBuffering=j.subscribe("startedBuffering",function(){P(["progress","timeupdate"])}),E.eventHandler.finishedBuffering=j.subscribe("finishedBuffering",function(){P(["progress","timeupdate"])})}})},i=t[0].src;var f=document.createElement("div");return f.id=E.id,f.className="fb-video",f.setAttribute("data-href",i),f.setAttribute("data-allowfullscreen","true"),f.setAttribute("data-controls",!!h.originalNode.controls),h.originalNode.parentNode.insertBefore(f,h.originalNode),h.originalNode.style.display="none",p.load({options:E.options.facebook,id:E.id}),E.hide=function(){E.pause(),j&&(f.style.display="none")},E.setSize=function(e){null===j||isNaN(e)||(f.style.width=e)},E.show=function(){j&&(f.style.display="")},E.destroy=function(){n&&h.originalNode.setAttribute("poster",n)},E}};mejs.Utils.typeChecks.push(function(e){return~e.toLowerCase().indexOf("//www.facebook")?"video/x-facebook":null}),mejs.Renderers.add(r)},{}]},{},[1]); | ||
!function a(o,s,u){function l(t,e){if(!s[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(d)return d(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[t]={exports:{}};o[t][0].call(i.exports,function(e){return l(o[t][1][e]||e)},i,i.exports,a,o,s,u)}return s[t].exports}for(var d="function"==typeof require&&require,e=0;e<u.length;e++)l(u[e]);return l}({1:[function(e,t,n){"use strict";var p={promise:null,load:function(e){"undefined"!=typeof FB?p._createPlayer(e):(p.promise=p.promise||mejs.Utils.loadScript("https://connect.facebook.net/"+e.options.lang+"/sdk.js"),p.promise.then(function(){FB.init(e.options),setTimeout(function(){p._createPlayer(e)},50)}))},_createPlayer:function(e){window["__ready__"+e.id]()}},r={name:"facebook",options:{prefix:"facebook",facebook:{appId:"",xfbml:!0,version:"v2.10",lang:"en_US"}},canPlayType:function(e){return~["video/facebook","video/x-facebook"].indexOf(e.toLowerCase())},create:function(h,e,t){var N=[],E={},w=!1,k=!0,_=!1,j=null,i="",n="",B=h.originalNode.autoplay;E.options=e,E.id=h.id+"_"+e.prefix,E.mediaElement=h,mejs.Features.isiPhone&&h.originalNode.getAttribute("poster")&&(n=h.originalNode.getAttribute("poster"),h.originalNode.removeAttribute("poster"));for(var r=mejs.html5media.properties,a=function(r){var e=""+r.substring(0,1).toUpperCase()+r.substring(1);E["get"+e]=function(){if(null===j)return null;switch(r){case"currentTime":return j.getCurrentPosition();case"duration":return j.getDuration();case"volume":return j.getVolume();case"paused":return k;case"ended":return _;case"muted":return j.isMuted();case"buffered":return{start:function(){return 0},end:function(){return 0},length:1};case"src":return i;case"readyState":return 4}return null},E["set"+e]=function(e){if(null!==j)switch(r){case"src":var t="string"==typeof e?e:e[0].src;i=t,f.remove(),(f=document.createElement("div")).id=E.id,f.className="fb-video",f.setAttribute("data-href",t),f.setAttribute("data-allowfullscreen","true"),f.setAttribute("data-controls","false"),h.originalNode.parentNode.insertBefore(f,h.originalNode),h.originalNode.style.display="none",p.load({lang:E.options.lang,id:E.id}),FB.XFBML.parse(),B&&j.play();break;case"currentTime":j.seek(e);break;case"muted":e?j.mute():j.unmute(),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",E);h.dispatchEvent(e)},50);break;case"volume":j.setVolume(e),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",E);h.dispatchEvent(e)},50);break;case"readyState":var n=mejs.Utils.createEvent("canplay",E);h.dispatchEvent(n)}else N.push({type:"set",propName:r,value:e})}},o=0,s=r.length;o<s;o++)a(r[o]);for(var u=mejs.html5media.methods,l=function(e){E[e]=function(){if(null!==j)switch(e){case"play":return j.play();case"pause":return j.pause();case"load":return null}else N.push({type:"call",methodName:e})}},d=0,c=u.length;d<c;d++)l(u[d]);function P(e){for(var t=0,n=e.length;t<n;t++){var r=mejs.Utils.createEvent(e[t],E);h.dispatchEvent(r)}}window["__ready__"+E.id]=function(){FB.Event.subscribe("xfbml.ready",function(e){if("video"===e.type&&E.id===e.id){h.fbPlayer=j=e.instance;var t=document.getElementById(E.id),n=t.offsetWidth,r=t.offsetHeight,i=["mouseover","mouseout"],a=function(e){var t=mejs.Utils.createEvent(e.type,E);h.dispatchEvent(t)};E.setSize(n,r),h.originalNode.muted||j.unmute(),B&&j.play();for(var o=0,s=i.length;o<s;o++)t.addEventListener(i[o],a);E.eventHandler={};for(var u=["startedPlaying","paused","finishedPlaying","startedBuffering","finishedBuffering"],l=0,d=u.length;l<d;l++){var c=u[l],f=E.eventHandler[c];null==f||mejs.Utils.isObjectEmpty(f)||"function"!=typeof f.removeListener||f.removeListener(c)}if(N.length)for(var p=0,m=N.length;p<m;p++){var v=N[p];if("set"===v.type){var g=v.propName,y=""+g.substring(0,1).toUpperCase()+g.substring(1);E["set"+y](v.value)}else"call"===v.type&&E[v.methodName]()}P(["rendererready","loadeddata","canplay","progress","loadedmetadata","timeupdate"]);var b=void 0;E.eventHandler.startedPlaying=j.subscribe("startedPlaying",function(){w||(w=!0),_=k=!1,P(["play","playing","timeupdate"]),b=setInterval(function(){j.getCurrentPosition(),P(["timeupdate"])},250)}),E.eventHandler.paused=j.subscribe("paused",function(){_=!(k=!0),P(["pause"])}),E.eventHandler.finishedPlaying=j.subscribe("finishedPlaying",function(){_=k=!0,P(["ended"]),clearInterval(b),b=null}),E.eventHandler.startedBuffering=j.subscribe("startedBuffering",function(){P(["progress","timeupdate"])}),E.eventHandler.finishedBuffering=j.subscribe("finishedBuffering",function(){P(["progress","timeupdate"])})}})},i=t[0].src;var f=document.createElement("div");return f.id=E.id,f.className="fb-video",f.setAttribute("data-href",i),f.setAttribute("data-allowfullscreen","true"),f.setAttribute("data-controls",!!h.originalNode.controls),h.originalNode.parentNode.insertBefore(f,h.originalNode),h.originalNode.style.display="none",p.load({options:E.options.facebook,id:E.id}),E.hide=function(){E.pause(),j&&(f.style.display="none")},E.setSize=function(e){null===j||isNaN(e)||(f.style.width=e)},E.show=function(){j&&(f.style.display="")},E.destroy=function(){n&&h.originalNode.setAttribute("poster",n)},E}};mejs.Utils.typeChecks.push(function(e){return~e.toLowerCase().indexOf("//www.facebook")?"video/x-facebook":null}),mejs.Renderers.add(r)},{}]},{},[1]); |
@@ -11,3 +11,3 @@ /*! | ||
* | ||
*/(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){ | ||
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){ | ||
'use strict'; | ||
@@ -14,0 +14,0 @@ |
@@ -12,2 +12,2 @@ /*! | ||
*/ | ||
!function i(s,o,u){function d(n,e){if(!o[n]){if(!s[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(c)return c(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var a=o[n]={exports:{}};s[n][0].call(a.exports,function(e){var t=s[n][1][e];return d(t||e)},a,a.exports,i,s,o,u)}return o[n].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)d(u[e]);return d}({1:[function(e,t,n){"use strict";var b={promise:null,load:function(e){"undefined"!=typeof SC?b._createPlayer(e):(b.promise=b.promise||mejs.Utils.loadScript("https://w.soundcloud.com/player/api.js"),b.promise.then(function(){b._createPlayer(e)}))},_createPlayer:function(e){var t=SC.Widget(e.iframe);window["__ready__"+e.id](t)}},r={name:"soundcloud_iframe",options:{prefix:"soundcloud_iframe"},canPlayType:function(e){return~["video/soundcloud","video/x-soundcloud"].indexOf(e.toLowerCase())},create:function(c,e,t){var l={},p=[],f=c.originalNode.autoplay,n=null!==c.originalNode&&"video"===c.originalNode.tagName.toLowerCase(),v=0,m=0,h=0,y=!0,E=!1,g=null,a=null;l.options=e,l.id=c.id+"_"+e.prefix,l.mediaElement=c;for(var r=mejs.html5media.properties,i=function(r){var e=""+r.substring(0,1).toUpperCase()+r.substring(1);l["get"+e]=function(){if(null!==g){switch(r){case"currentTime":return m;case"duration":return v;case"volume":return 1;case"paused":return y;case"ended":return E;case"muted":return!1;case"buffered":return{start:function(){return 0},end:function(){return h*v},length:1};case"src":return a?a.src:"";case"readyState":return 4}return null}return null},l["set"+e]=function(e){if(null!==g)switch(r){case"src":var t="string"==typeof e?e:e[0].src;g.load(t),f&&g.play();break;case"currentTime":g.seekTo(1e3*e);break;case"muted":e?g.setVolume(0):g.setVolume(1),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",l);c.dispatchEvent(e)},50);break;case"volume":g.setVolume(e),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",l);c.dispatchEvent(e)},50);break;case"readyState":var n=mejs.Utils.createEvent("canplay",l);c.dispatchEvent(n)}else p.push({type:"set",propName:r,value:e})}},s=0,o=r.length;s<o;s++)i(r[s]);for(var u=mejs.html5media.methods,d=function(e){l[e]=function(){if(null!==g)switch(e){case"play":return g.play();case"pause":return g.pause();case"load":return null}else p.push({type:"call",methodName:e})}},S=0,U=u.length;S<U;S++)d(u[S]);window["__ready__"+l.id]=function(e){if(c.scPlayer=g=e,f&&g.play(),p.length)for(var t=0,n=p.length;t<n;t++){var r=p[t];if("set"===r.type){var a=r.propName,i=""+a.substring(0,1).toUpperCase()+a.substring(1);l["set"+i](r.value)}else"call"===r.type&&l[r.methodName]()}g.bind(SC.Widget.Events.PLAY_PROGRESS,function(){E=y=!1,g.getPosition(function(e){m=e/1e3;var t=mejs.Utils.createEvent("timeupdate",l);c.dispatchEvent(t)})}),g.bind(SC.Widget.Events.PAUSE,function(){y=!0;var e=mejs.Utils.createEvent("pause",l);c.dispatchEvent(e)}),g.bind(SC.Widget.Events.PLAY,function(){E=y=!1;var e=mejs.Utils.createEvent("play",l);c.dispatchEvent(e)}),g.bind(SC.Widget.Events.FINISHED,function(){y=!1,E=!0;var e=mejs.Utils.createEvent("ended",l);c.dispatchEvent(e)}),g.bind(SC.Widget.Events.READY,function(){g.getDuration(function(e){v=e/1e3;var t=mejs.Utils.createEvent("loadedmetadata",l);c.dispatchEvent(t)})}),g.bind(SC.Widget.Events.LOAD_PROGRESS,function(){g.getDuration(function(e){if(0<v){h=v*e;var t=mejs.Utils.createEvent("progress",l);c.dispatchEvent(t)}}),g.getDuration(function(e){v=e;var t=mejs.Utils.createEvent("loadedmetadata",l);c.dispatchEvent(t)})});for(var s=["rendererready","loadeddata","loadedmetadata","canplay"],o=0,u=s.length;o<u;o++){var d=mejs.Utils.createEvent(s[o],l);c.dispatchEvent(d)}},(a=document.createElement("iframe")).id=l.id,a.width=n?"100%":1,a.height=n?"100%":1,a.frameBorder=0,a.style.visibility=n?"visible":"hidden",a.src=t[0].src,a.scrolling="no",c.appendChild(a),c.originalNode.style.display="none";var _={iframe:a,id:l.id};return b.load(_),l.setSize=function(){},l.hide=function(){l.pause(),a&&(a.style.display="none")},l.show=function(){a&&(a.style.display="")},l.destroy=function(){g.destroy()},l}};mejs.Utils.typeChecks.push(function(e){return/\/\/(w\.)?soundcloud.com/i.test(e)?"video/x-soundcloud":null}),mejs.Renderers.add(r)},{}]},{},[1]); | ||
!function i(s,o,u){function d(t,e){if(!o[t]){if(!s[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var a=o[t]={exports:{}};s[t][0].call(a.exports,function(e){return d(s[t][1][e]||e)},a,a.exports,i,s,o,u)}return o[t].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)d(u[e]);return d}({1:[function(e,t,n){"use strict";var b={promise:null,load:function(e){"undefined"!=typeof SC?b._createPlayer(e):(b.promise=b.promise||mejs.Utils.loadScript("https://w.soundcloud.com/player/api.js"),b.promise.then(function(){b._createPlayer(e)}))},_createPlayer:function(e){var t=SC.Widget(e.iframe);window["__ready__"+e.id](t)}},r={name:"soundcloud_iframe",options:{prefix:"soundcloud_iframe"},canPlayType:function(e){return~["video/soundcloud","video/x-soundcloud"].indexOf(e.toLowerCase())},create:function(c,e,t){var l={},p=[],f=c.originalNode.autoplay,n=null!==c.originalNode&&"video"===c.originalNode.tagName.toLowerCase(),v=0,m=0,h=0,y=!0,E=!1,g=null,a=null;l.options=e,l.id=c.id+"_"+e.prefix,l.mediaElement=c;for(var r=mejs.html5media.properties,i=function(r){var e=""+r.substring(0,1).toUpperCase()+r.substring(1);l["get"+e]=function(){if(null===g)return null;switch(r){case"currentTime":return m;case"duration":return v;case"volume":return 1;case"paused":return y;case"ended":return E;case"muted":return!1;case"buffered":return{start:function(){return 0},end:function(){return h*v},length:1};case"src":return a?a.src:"";case"readyState":return 4}return null},l["set"+e]=function(e){if(null!==g)switch(r){case"src":var t="string"==typeof e?e:e[0].src;g.load(t),f&&g.play();break;case"currentTime":g.seekTo(1e3*e);break;case"muted":e?g.setVolume(0):g.setVolume(1),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",l);c.dispatchEvent(e)},50);break;case"volume":g.setVolume(e),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",l);c.dispatchEvent(e)},50);break;case"readyState":var n=mejs.Utils.createEvent("canplay",l);c.dispatchEvent(n)}else p.push({type:"set",propName:r,value:e})}},s=0,o=r.length;s<o;s++)i(r[s]);for(var u=mejs.html5media.methods,d=function(e){l[e]=function(){if(null!==g)switch(e){case"play":return g.play();case"pause":return g.pause();case"load":return null}else p.push({type:"call",methodName:e})}},S=0,U=u.length;S<U;S++)d(u[S]);window["__ready__"+l.id]=function(e){if(c.scPlayer=g=e,f&&g.play(),p.length)for(var t=0,n=p.length;t<n;t++){var r=p[t];if("set"===r.type){var a=r.propName,i=""+a.substring(0,1).toUpperCase()+a.substring(1);l["set"+i](r.value)}else"call"===r.type&&l[r.methodName]()}g.bind(SC.Widget.Events.PLAY_PROGRESS,function(){E=y=!1,g.getPosition(function(e){m=e/1e3;var t=mejs.Utils.createEvent("timeupdate",l);c.dispatchEvent(t)})}),g.bind(SC.Widget.Events.PAUSE,function(){y=!0;var e=mejs.Utils.createEvent("pause",l);c.dispatchEvent(e)}),g.bind(SC.Widget.Events.PLAY,function(){E=y=!1;var e=mejs.Utils.createEvent("play",l);c.dispatchEvent(e)}),g.bind(SC.Widget.Events.FINISHED,function(){E=!(y=!1);var e=mejs.Utils.createEvent("ended",l);c.dispatchEvent(e)}),g.bind(SC.Widget.Events.READY,function(){g.getDuration(function(e){v=e/1e3;var t=mejs.Utils.createEvent("loadedmetadata",l);c.dispatchEvent(t)})}),g.bind(SC.Widget.Events.LOAD_PROGRESS,function(){g.getDuration(function(e){if(0<v){h=v*e;var t=mejs.Utils.createEvent("progress",l);c.dispatchEvent(t)}}),g.getDuration(function(e){v=e;var t=mejs.Utils.createEvent("loadedmetadata",l);c.dispatchEvent(t)})});for(var s=["rendererready","loadeddata","loadedmetadata","canplay"],o=0,u=s.length;o<u;o++){var d=mejs.Utils.createEvent(s[o],l);c.dispatchEvent(d)}},(a=document.createElement("iframe")).id=l.id,a.width=n?"100%":1,a.height=n?"100%":1,a.frameBorder=0,a.style.visibility=n?"visible":"hidden",a.src=t[0].src,a.scrolling="no",c.appendChild(a),c.originalNode.style.display="none";var _={iframe:a,id:l.id};return b.load(_),l.setSize=function(){},l.hide=function(){l.pause(),a&&(a.style.display="none")},l.show=function(){a&&(a.style.display="")},l.destroy=function(){g.destroy()},l}};mejs.Utils.typeChecks.push(function(e){return/\/\/(w\.)?soundcloud.com/i.test(e)?"video/x-soundcloud":null}),mejs.Renderers.add(r)},{}]},{},[1]); |
@@ -11,3 +11,3 @@ /*! | ||
* | ||
*/(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){ | ||
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){ | ||
'use strict'; | ||
@@ -14,0 +14,0 @@ |
@@ -12,2 +12,2 @@ /*! | ||
*/ | ||
!function a(s,o,u){function l(n,e){if(!o[n]){if(!s[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(c)return c(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=o[n]={exports:{}};s[n][0].call(i.exports,function(e){var t=s[n][1][e];return l(t||e)},i,i.exports,a,s,o,u)}return o[n].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)l(u[e]);return l}({1:[function(e,t,n){"use strict";var N={promise:null,load:function(e){"undefined"!=typeof Twitch?N.promise=new Promise(function(e){e()}).then(function(){N._createPlayer(e)}):(N.promise=N.promise||mejs.Utils.loadScript("https://player.twitch.tv/js/embed/v1.js"),N.promise.then(function(){N._createPlayer(e)}))},_createPlayer:function(e){var t=new Twitch.Player(e.id,e);window["__ready__"+e.id](t)},getTwitchId:function(e){var t="";return 0<e.indexOf("?")?""===(t=N.getTwitchIdFromParam(e))&&(t=N.getTwitchIdFromUrl(e)):t=N.getTwitchIdFromUrl(e),t},getTwitchIdFromParam:function(e){if(null==e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),n="",r=0,i=t.length;r<i;r++){var a=t[r].split("=");if(~a[0].indexOf("channel")){n=a[1];break}if(~a[0].indexOf("video")){n="v"+a[1];break}}return n},getTwitchIdFromUrl:function(e){if(null==e||!e.trim().length)return null;var t=(e=e.split("?")[0]).substring(e.lastIndexOf("/")+1);return/^\d+$/i.test(t)?"v"+t:t},getTwitchType:function(e){return/^v\d+/i.test(e)?"video":"channel"}},r={name:"twitch_iframe",options:{prefix:"twitch_iframe"},canPlayType:function(e){return~["video/twitch","video/x-twitch"].indexOf(e.toLowerCase())},create:function(h,e,t){var f={},p=[],a=N.getTwitchId(t[0].src),m=null,v=!1;f.options=e,f.id=h.id+"_"+e.prefix,f.mediaElement=h;for(var n=mejs.html5media.properties,r=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);f["get"+e]=function(){if(null!==m){switch(i){case"currentTime":return m.getCurrentTime();case"duration":return m.getDuration();case"volume":return m.getVolume();case"paused":return m.isPaused();case"ended":return m.getEnded();case"muted":return m.getMuted();case"buffered":return{start:function(){return 0},end:function(){return 0},length:1};case"src":return"channel"===N.getTwitchType(a)?m.getChannel():m.getVideo();case"readyState":return 4}return null}return null},f["set"+e]=function(e){if(null!==m)switch(i){case"src":var t="string"==typeof e?e:e[0].src,n=N.getTwitchId(t);"channel"===N.getTwitchType(a)?m.setChannel(n):m.setVideo(n);break;case"currentTime":m.seek(e),setTimeout(function(){var e=mejs.Utils.createEvent("timeupdate",f);h.dispatchEvent(e)},50);break;case"muted":m.setMuted(e),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",f);h.dispatchEvent(e)},50);break;case"volume":e,m.setVolume(e),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",f);h.dispatchEvent(e)},50);break;case"readyState":var r=mejs.Utils.createEvent("canplay",f);h.dispatchEvent(r)}else p.push({type:"set",propName:i,value:e})}},i=0,s=n.length;i<s;i++)r(n[i]);for(var o=mejs.html5media.methods,u=function(e){f[e]=function(){if(null!==m)switch(e){case"play":return!1,m.play();case"pause":return!0,m.pause();case"load":return null}else p.push({type:"call",methodName:e})}},l=0,c=o.length;l<c;l++)u(o[l]);function g(e){for(var t=0,n=e.length;t<n;t++){var r=mejs.Utils.createEvent(e[t],f);h.dispatchEvent(r)}}window["__ready__"+f.id]=function(e){if(h.twitchPlayer=m=e,p.length)for(var t=0,n=p.length;t<n;t++){var r=p[t];if("set"===r.type){var i=r.propName,a=""+i.substring(0,1).toUpperCase()+i.substring(1);f["set"+a](r.value)}else"call"===r.type&&f[r.methodName]()}var s=document.getElementById(f.id).firstChild;s.style.width="100%",s.style.height="100%";for(var o=["mouseover","mouseout"],u=function(e){var t=mejs.Utils.createEvent(e.type,f);h.dispatchEvent(t)},l=0,c=o.length;l<c;l++)s.addEventListener(o[l],u,!1);var d=void 0;m.addEventListener(Twitch.Player.READY,function(){!1,g(["rendererready","loadedmetadata","loadeddata","canplay"])}),m.addEventListener(Twitch.Player.PLAY,function(){v||(v=!0),!1,g(["play","playing","progress"]),d=setInterval(function(){m.getCurrentTime(),g(["timeupdate"])},250)}),m.addEventListener(Twitch.Player.PAUSE,function(){!0,!1,m.getEnded()||g(["pause"])}),m.addEventListener(Twitch.Player.ENDED,function(){!0,g(["ended"]),clearInterval(d),v=!1,d=null})};var d=h.originalNode.height,y=h.originalNode.width,w=document.createElement("div"),T=N.getTwitchType(a),E={id:f.id,width:y,height:d,playsinline:!1,autoplay:h.originalNode.autoplay,muted:h.originalNode.muted};return E[T]=a,w.id=f.id,w.style.width="100%",w.style.height="100%",h.originalNode.parentNode.insertBefore(w,h.originalNode),h.originalNode.style.display="none",h.originalNode.autoplay=!1,f.setSize=function(e,t){null===N||isNaN(e)||isNaN(t)||(w.setAttribute("width",e),w.setAttribute("height",t))},f.hide=function(){f.pause(),w.style.display="none"},f.show=function(){w.style.display=""},f.destroy=function(){},N.load(E),f}};mejs.Utils.typeChecks.push(function(e){return/\/\/(www|player).twitch.tv/i.test(e)?"video/x-twitch":null}),mejs.Renderers.add(r)},{}]},{},[1]); | ||
!function a(s,o,u){function l(t,e){if(!o[t]){if(!s[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(c)return c(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=o[t]={exports:{}};s[t][0].call(i.exports,function(e){return l(s[t][1][e]||e)},i,i.exports,a,s,o,u)}return o[t].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)l(u[e]);return l}({1:[function(e,t,n){"use strict";var N={promise:null,load:function(e){"undefined"!=typeof Twitch?N.promise=new Promise(function(e){e()}).then(function(){N._createPlayer(e)}):(N.promise=N.promise||mejs.Utils.loadScript("https://player.twitch.tv/js/embed/v1.js"),N.promise.then(function(){N._createPlayer(e)}))},_createPlayer:function(e){var t=new Twitch.Player(e.id,e);window["__ready__"+e.id](t)},getTwitchId:function(e){var t="";return 0<e.indexOf("?")?""===(t=N.getTwitchIdFromParam(e))&&(t=N.getTwitchIdFromUrl(e)):t=N.getTwitchIdFromUrl(e),t},getTwitchIdFromParam:function(e){if(null==e||!e.trim().length)return null;for(var t=e.split("?")[1].split("&"),n="",r=0,i=t.length;r<i;r++){var a=t[r].split("=");if(~a[0].indexOf("channel")){n=a[1];break}if(~a[0].indexOf("video")){n="v"+a[1];break}}return n},getTwitchIdFromUrl:function(e){if(null==e||!e.trim().length)return null;var t=(e=e.split("?")[0]).substring(e.lastIndexOf("/")+1);return/^\d+$/i.test(t)?"v"+t:t},getTwitchType:function(e){return/^v\d+/i.test(e)?"video":"channel"}},r={name:"twitch_iframe",options:{prefix:"twitch_iframe"},canPlayType:function(e){return~["video/twitch","video/x-twitch"].indexOf(e.toLowerCase())},create:function(h,e,t){var f={},p=[],a=N.getTwitchId(t[0].src),m=null,v=!1;f.options=e,f.id=h.id+"_"+e.prefix,f.mediaElement=h;for(var n=mejs.html5media.properties,r=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);f["get"+e]=function(){if(null===m)return null;switch(i){case"currentTime":return m.getCurrentTime();case"duration":return m.getDuration();case"volume":return m.getVolume();case"paused":return m.isPaused();case"ended":return m.getEnded();case"muted":return m.getMuted();case"buffered":return{start:function(){return 0},end:function(){return 0},length:1};case"src":return"channel"===N.getTwitchType(a)?m.getChannel():m.getVideo();case"readyState":return 4}return null},f["set"+e]=function(e){if(null!==m)switch(i){case"src":var t="string"==typeof e?e:e[0].src,n=N.getTwitchId(t);"channel"===N.getTwitchType(a)?m.setChannel(n):m.setVideo(n);break;case"currentTime":m.seek(e),setTimeout(function(){var e=mejs.Utils.createEvent("timeupdate",f);h.dispatchEvent(e)},50);break;case"muted":m.setMuted(e),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",f);h.dispatchEvent(e)},50);break;case"volume":e,m.setVolume(e),setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",f);h.dispatchEvent(e)},50);break;case"readyState":var r=mejs.Utils.createEvent("canplay",f);h.dispatchEvent(r)}else p.push({type:"set",propName:i,value:e})}},i=0,s=n.length;i<s;i++)r(n[i]);for(var o=mejs.html5media.methods,u=function(e){f[e]=function(){if(null!==m)switch(e){case"play":return!1,m.play();case"pause":return!0,m.pause();case"load":return null}else p.push({type:"call",methodName:e})}},l=0,c=o.length;l<c;l++)u(o[l]);function g(e){for(var t=0,n=e.length;t<n;t++){var r=mejs.Utils.createEvent(e[t],f);h.dispatchEvent(r)}}window["__ready__"+f.id]=function(e){if(h.twitchPlayer=m=e,p.length)for(var t=0,n=p.length;t<n;t++){var r=p[t];if("set"===r.type){var i=r.propName,a=""+i.substring(0,1).toUpperCase()+i.substring(1);f["set"+a](r.value)}else"call"===r.type&&f[r.methodName]()}var s=document.getElementById(f.id).firstChild;s.style.width="100%",s.style.height="100%";for(var o=["mouseover","mouseout"],u=function(e){var t=mejs.Utils.createEvent(e.type,f);h.dispatchEvent(t)},l=0,c=o.length;l<c;l++)s.addEventListener(o[l],u,!1);var d=void 0;m.addEventListener(Twitch.Player.READY,function(){!1,g(["rendererready","loadedmetadata","loadeddata","canplay"])}),m.addEventListener(Twitch.Player.PLAY,function(){v||(v=!0),!1,g(["play","playing","progress"]),d=setInterval(function(){m.getCurrentTime(),g(["timeupdate"])},250)}),m.addEventListener(Twitch.Player.PAUSE,function(){!!0,m.getEnded()||g(["pause"])}),m.addEventListener(Twitch.Player.ENDED,function(){!0,g(["ended"]),clearInterval(d),v=!1,d=null})};var d=h.originalNode.height,y=h.originalNode.width,w=document.createElement("div"),T=N.getTwitchType(a),E={id:f.id,width:y,height:d,playsinline:!1,autoplay:h.originalNode.autoplay,muted:h.originalNode.muted};return E[T]=a,w.id=f.id,w.style.width="100%",w.style.height="100%",h.originalNode.parentNode.insertBefore(w,h.originalNode),h.originalNode.style.display="none",h.originalNode.autoplay=!1,f.setSize=function(e,t){null===N||isNaN(e)||isNaN(t)||(w.setAttribute("width",e),w.setAttribute("height",t))},f.hide=function(){f.pause(),w.style.display="none"},f.show=function(){w.style.display=""},f.destroy=function(){},N.load(E),f}};mejs.Utils.typeChecks.push(function(e){return/\/\/(www|player).twitch.tv/i.test(e)?"video/x-twitch":null}),mejs.Renderers.add(r)},{}]},{},[1]); |
@@ -11,3 +11,3 @@ /*! | ||
* | ||
*/(function(){function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}return e})()({1:[function(_dereq_,module,exports){ | ||
*/(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){ | ||
'use strict'; | ||
@@ -14,0 +14,0 @@ |
@@ -12,2 +12,2 @@ /*! | ||
*/ | ||
!function a(o,s,u){function c(n,e){if(!s[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(l)return l(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[n]={exports:{}};o[n][0].call(i.exports,function(e){var t=o[n][1][e];return c(t||e)},i,i.exports,a,o,s,u)}return s[n].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,n){"use strict";var T={promise:null,load:function(e){"undefined"!=typeof Vimeo?T._createPlayer(e):(T.promise=T.promise||mejs.Utils.loadScript("https://player.vimeo.com/api/player.js"),T.promise.then(function(){T._createPlayer(e)}))},_createPlayer:function(e){var t=new Vimeo.Player(e.iframe);window["__ready__"+e.id](t)},getVimeoId:function(e){return null==e?null:(e=e.split("?")[0],parseInt(e.substring(e.lastIndexOf("/")+1),10))}},r={name:"vimeo_iframe",options:{prefix:"vimeo_iframe"},canPlayType:function(e){return~["video/vimeo","video/x-vimeo"].indexOf(e.toLowerCase())},create:function(m,e,t){var v=[],h={},y=!0,g=1,a=g,E=0,b=0,j=!1,U=0,w=null,n="";h.options=e,h.id=m.id+"_"+e.prefix,h.mediaElement=m;for(var N=function(e){m.generateError("Code "+e.name+": "+e.message,t)},r=mejs.html5media.properties,i=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);h["get"+e]=function(){if(null!==w){switch(i){case"currentTime":return E;case"duration":return U;case"volume":return g;case"muted":return 0===g;case"paused":return y;case"ended":return j;case"src":return w.getVideoUrl().then(function(e){n=e}).catch(function(e){return N(e)}),n;case"buffered":return{start:function(){return 0},end:function(){return b*U},length:1};case"readyState":return 4}return null}return null},h["set"+e]=function(e){if(null!==w)switch(i){case"src":var t="string"==typeof e?e:e[0].src,n=T.getVimeoId(t);w.loadVideo(n).then(function(){m.originalNode.autoplay&&w.play()}).catch(function(e){return N(e)});break;case"currentTime":w.setCurrentTime(e).then(function(){E=e,setTimeout(function(){var e=mejs.Utils.createEvent("timeupdate",h);m.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"volume":w.setVolume(e).then(function(){a=g=e,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);m.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"loop":w.setLoop(e).catch(function(e){return N(e)});break;case"muted":e?w.setVolume(0).then(function(){g=0,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);m.dispatchEvent(e)},50)}).catch(function(e){return N(e)}):w.setVolume(a).then(function(){g=a,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);m.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"readyState":var r=mejs.Utils.createEvent("canplay",h);m.dispatchEvent(r)}else v.push({type:"set",propName:i,value:e})}},o=0,s=r.length;o<s;o++)i(r[o]);for(var u=mejs.html5media.methods,c=function(e){h[e]=function(){if(null!==w)switch(e){case"play":return y=!1,w.play();case"pause":return y=!0,w.pause();case"load":return null}else v.push({type:"call",methodName:e})}},l=0,d=u.length;l<d;l++)c(u[l]);window["__ready__"+h.id]=function(e){if(m.vimeoPlayer=w=e,v.length)for(var t=0,n=v.length;t<n;t++){var r=v[t];if("set"===r.type){var i=r.propName,a=""+i.substring(0,1).toUpperCase()+i.substring(1);h["set"+a](r.value)}else"call"===r.type&&h[r.methodName]()}m.originalNode.muted&&(w.setVolume(0),g=0);for(var o=document.getElementById(h.id),s=void 0,u=function(e){var t=mejs.Utils.createEvent(e.type,h);m.dispatchEvent(t)},c=0,l=(s=["mouseover","mouseout"]).length;c<l;c++)o.addEventListener(s[c],u,!1);w.on("loaded",function(){w.getDuration().then(function(e){if(0<(U=e)&&(b=U*e,m.originalNode.autoplay)){j=y=!1;var t=mejs.Utils.createEvent("play",h);m.dispatchEvent(t)}}).catch(function(e){N(e)})}),w.on("progress",function(){w.getDuration().then(function(e){if(0<(U=e)&&(b=U*e,m.originalNode.autoplay)){var t=mejs.Utils.createEvent("play",h);m.dispatchEvent(t);var n=mejs.Utils.createEvent("playing",h);m.dispatchEvent(n)}var r=mejs.Utils.createEvent("progress",h);m.dispatchEvent(r)}).catch(function(e){return N(e)})}),w.on("timeupdate",function(){w.getCurrentTime().then(function(e){E=e;var t=mejs.Utils.createEvent("timeupdate",h);m.dispatchEvent(t)}).catch(function(e){return N(e)})}),w.on("play",function(){j=y=!1;var e=mejs.Utils.createEvent("play",h);m.dispatchEvent(e);var t=mejs.Utils.createEvent("playing",h);m.dispatchEvent(t)}),w.on("pause",function(){y=!0,j=!1;var e=mejs.Utils.createEvent("pause",h);m.dispatchEvent(e)}),w.on("ended",function(){y=!1,j=!0;var e=mejs.Utils.createEvent("ended",h);m.dispatchEvent(e)});for(var d=0,p=(s=["rendererready","loadedmetadata","loadeddata","canplay"]).length;d<p;d++){var f=mejs.Utils.createEvent(s[d],h);m.dispatchEvent(f)}};var p=m.originalNode.height,f=m.originalNode.width,_=document.createElement("iframe"),x="https://player.vimeo.com/video/"+T.getVimeoId(t[0].src),A=~t[0].src.indexOf("?")?"?"+t[0].src.slice(t[0].src.indexOf("?")+1):"",V=[];return m.originalNode.autoplay&&-1===A.indexOf("autoplay")&&V.push("autoplay=1"),m.originalNode.loop&&-1===A.indexOf("loop")&&V.push("loop=1"),A=A+(A?"&":"?")+V.join("&"),_.setAttribute("id",h.id),_.setAttribute("width",f),_.setAttribute("height",p),_.setAttribute("frameBorder","0"),_.setAttribute("src",""+x+A),_.setAttribute("webkitallowfullscreen","true"),_.setAttribute("mozallowfullscreen","true"),_.setAttribute("allowfullscreen","true"),_.setAttribute("allow","autoplay"),m.originalNode.parentNode.insertBefore(_,m.originalNode),m.originalNode.style.display="none",T.load({iframe:_,id:h.id}),h.hide=function(){h.pause(),w&&(_.style.display="none")},h.setSize=function(e,t){_.setAttribute("width",e),_.setAttribute("height",t)},h.show=function(){w&&(_.style.display="")},h.destroy=function(){},h}};mejs.Utils.typeChecks.push(function(e){return/(\/\/player\.vimeo|vimeo\.com)/i.test(e)?"video/x-vimeo":null}),mejs.Renderers.add(r)},{}]},{},[1]); | ||
!function a(o,s,u){function c(t,e){if(!s[t]){if(!o[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[t]={exports:{}};o[t][0].call(i.exports,function(e){return c(o[t][1][e]||e)},i,i.exports,a,o,s,u)}return s[t].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,n){"use strict";var T={promise:null,load:function(e){"undefined"!=typeof Vimeo?T._createPlayer(e):(T.promise=T.promise||mejs.Utils.loadScript("https://player.vimeo.com/api/player.js"),T.promise.then(function(){T._createPlayer(e)}))},_createPlayer:function(e){var t=new Vimeo.Player(e.iframe);window["__ready__"+e.id](t)},getVimeoId:function(e){return null==e?null:(e=e.split("?")[0],parseInt(e.substring(e.lastIndexOf("/")+1),10))}},r={name:"vimeo_iframe",options:{prefix:"vimeo_iframe"},canPlayType:function(e){return~["video/vimeo","video/x-vimeo"].indexOf(e.toLowerCase())},create:function(m,e,t){var v=[],h={},y=!0,g=1,a=g,E=0,b=0,j=!1,U=0,w=null,n="";h.options=e,h.id=m.id+"_"+e.prefix,h.mediaElement=m;for(var N=function(e){m.generateError("Code "+e.name+": "+e.message,t)},r=mejs.html5media.properties,i=function(i){var e=""+i.substring(0,1).toUpperCase()+i.substring(1);h["get"+e]=function(){if(null===w)return null;switch(i){case"currentTime":return E;case"duration":return U;case"volume":return g;case"muted":return 0===g;case"paused":return y;case"ended":return j;case"src":return w.getVideoUrl().then(function(e){n=e}).catch(function(e){return N(e)}),n;case"buffered":return{start:function(){return 0},end:function(){return b*U},length:1};case"readyState":return 4}return null},h["set"+e]=function(e){if(null!==w)switch(i){case"src":var t="string"==typeof e?e:e[0].src,n=T.getVimeoId(t);w.loadVideo(n).then(function(){m.originalNode.autoplay&&w.play()}).catch(function(e){return N(e)});break;case"currentTime":w.setCurrentTime(e).then(function(){E=e,setTimeout(function(){var e=mejs.Utils.createEvent("timeupdate",h);m.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"volume":w.setVolume(e).then(function(){a=g=e,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);m.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"loop":w.setLoop(e).catch(function(e){return N(e)});break;case"muted":e?w.setVolume(0).then(function(){g=0,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);m.dispatchEvent(e)},50)}).catch(function(e){return N(e)}):w.setVolume(a).then(function(){g=a,setTimeout(function(){var e=mejs.Utils.createEvent("volumechange",h);m.dispatchEvent(e)},50)}).catch(function(e){return N(e)});break;case"readyState":var r=mejs.Utils.createEvent("canplay",h);m.dispatchEvent(r)}else v.push({type:"set",propName:i,value:e})}},o=0,s=r.length;o<s;o++)i(r[o]);for(var u=mejs.html5media.methods,c=function(e){h[e]=function(){if(null!==w)switch(e){case"play":return y=!1,w.play();case"pause":return y=!0,w.pause();case"load":return null}else v.push({type:"call",methodName:e})}},l=0,d=u.length;l<d;l++)c(u[l]);window["__ready__"+h.id]=function(e){if(m.vimeoPlayer=w=e,v.length)for(var t=0,n=v.length;t<n;t++){var r=v[t];if("set"===r.type){var i=r.propName,a=""+i.substring(0,1).toUpperCase()+i.substring(1);h["set"+a](r.value)}else"call"===r.type&&h[r.methodName]()}m.originalNode.muted&&(w.setVolume(0),g=0);for(var o=document.getElementById(h.id),s=void 0,u=function(e){var t=mejs.Utils.createEvent(e.type,h);m.dispatchEvent(t)},c=0,l=(s=["mouseover","mouseout"]).length;c<l;c++)o.addEventListener(s[c],u,!1);w.on("loaded",function(){w.getDuration().then(function(e){if(0<(U=e)&&(b=U*e,m.originalNode.autoplay)){j=y=!1;var t=mejs.Utils.createEvent("play",h);m.dispatchEvent(t)}}).catch(function(e){N(e)})}),w.on("progress",function(){w.getDuration().then(function(e){if(0<(U=e)&&(b=U*e,m.originalNode.autoplay)){var t=mejs.Utils.createEvent("play",h);m.dispatchEvent(t);var n=mejs.Utils.createEvent("playing",h);m.dispatchEvent(n)}var r=mejs.Utils.createEvent("progress",h);m.dispatchEvent(r)}).catch(function(e){return N(e)})}),w.on("timeupdate",function(){w.getCurrentTime().then(function(e){E=e;var t=mejs.Utils.createEvent("timeupdate",h);m.dispatchEvent(t)}).catch(function(e){return N(e)})}),w.on("play",function(){j=y=!1;var e=mejs.Utils.createEvent("play",h);m.dispatchEvent(e);var t=mejs.Utils.createEvent("playing",h);m.dispatchEvent(t)}),w.on("pause",function(){j=!(y=!0);var e=mejs.Utils.createEvent("pause",h);m.dispatchEvent(e)}),w.on("ended",function(){j=!(y=!1);var e=mejs.Utils.createEvent("ended",h);m.dispatchEvent(e)});for(var d=0,p=(s=["rendererready","loadedmetadata","loadeddata","canplay"]).length;d<p;d++){var f=mejs.Utils.createEvent(s[d],h);m.dispatchEvent(f)}};var p=m.originalNode.height,f=m.originalNode.width,_=document.createElement("iframe"),x="https://player.vimeo.com/video/"+T.getVimeoId(t[0].src),A=~t[0].src.indexOf("?")?"?"+t[0].src.slice(t[0].src.indexOf("?")+1):"",V=[];return m.originalNode.autoplay&&-1===A.indexOf("autoplay")&&V.push("autoplay=1"),m.originalNode.loop&&-1===A.indexOf("loop")&&V.push("loop=1"),A=A+(A?"&":"?")+V.join("&"),_.setAttribute("id",h.id),_.setAttribute("width",f),_.setAttribute("height",p),_.setAttribute("frameBorder","0"),_.setAttribute("src",""+x+A),_.setAttribute("webkitallowfullscreen","true"),_.setAttribute("mozallowfullscreen","true"),_.setAttribute("allowfullscreen","true"),_.setAttribute("allow","autoplay"),m.originalNode.parentNode.insertBefore(_,m.originalNode),m.originalNode.style.display="none",T.load({iframe:_,id:h.id}),h.hide=function(){h.pause(),w&&(_.style.display="none")},h.setSize=function(e,t){_.setAttribute("width",e),_.setAttribute("height",t)},h.show=function(){w&&(_.style.display="")},h.destroy=function(){},h}};mejs.Utils.typeChecks.push(function(e){return/(\/\/player\.vimeo|vimeo\.com)/i.test(e)?"video/x-vimeo":null}),mejs.Renderers.add(r)},{}]},{},[1]); |
@@ -137,3 +137,3 @@ # API and Configuration | ||
startLanguage | string | _(empty)_ | Automatically turn on a `<track>` element. Note: Will not work when toggleCaptionsButtonWhenOnlyOne is set to `true` | ||
slidesSelector | string | _(empty)_ | Selector for slides; could be any valid Javascript selector (`#id`, `.class`, `img`, etc.) | ||
slidesSelector | string | _(empty)_ | Selector for slides; could be any valid JavaScript selector (`#id`, `.class`, `img`, etc.) | ||
tracksText | string | `null` | Title for Closed Captioning button for WARIA purposes | ||
@@ -140,0 +140,0 @@ chaptersText | string | `null` | Title for Chapters button for WARIA purposes |
@@ -72,3 +72,3 @@ # Installation | ||
4. Through NPM: `npm install mediaelement` | ||
4. Through npm: `npm install mediaelement` | ||
@@ -333,3 +333,3 @@ 5. Through BOWER: `bower install mediaelement` | ||
If you wish to install the sources in different directories (i.e., all Javascript files in a _js_, all CSS in a _styles_, Flash shims in _plugins_, etc.), add the following CSS update after the _mediaelementplayer.css_ reference (**only if the images are not in the same folder as the stylesheet**): | ||
If you wish to install the sources in different directories (i.e., all JavaScript files in a _js_, all CSS in a _styles_, Flash shims in _plugins_, etc.), add the following CSS update after the _mediaelementplayer.css_ reference (**only if the images are not in the same folder as the stylesheet**): | ||
```html | ||
@@ -336,0 +336,0 @@ <link rel="stylesheet" href="/path/to/mediaelementplayer.min.css" /> |
@@ -26,3 +26,3 @@ # Resources | ||
* [CSS Tricks: Video Source by Screen Size](https://css-tricks.com/video-source-by-screen-size/) | ||
* [Mute tab audio on tab unfocus in javascript/html](https://stackoverflow.com/questions/34506133/mute-tab-audio-on-tab-unfocus-in-javascript-html) | ||
* [Mute tab audio on tab unfocus in JavaScript/html](https://stackoverflow.com/questions/34506133/mute-tab-audio-on-tab-unfocus-in-javascript-html) | ||
* [MediaElementPlayer.js: use `AudioContext.decodeAudioData()`](https://gist.github.com/rafa8626/e6afe41dd00742a75c4d25cc387a7d61) | ||
@@ -29,0 +29,0 @@ * [Use of DRM with MediaElement](https://jsfiddle.net/f431r2zq/12/) |
@@ -7,3 +7,3 @@ # Usage | ||
* [jQuery](#jquery) | ||
* [NPM/Meteor](#npm-meteor) | ||
* [npm/Meteor](#npm-meteor) | ||
* [RequireJS](#requirejs) | ||
@@ -82,3 +82,3 @@ * [React](#react) | ||
<a id="npm-meteor"></a> | ||
### NPM/Meteor | ||
### npm/Meteor | ||
```javascript | ||
@@ -122,3 +122,3 @@ // To import only MediaElement class | ||
To make it work, install via NPM any of the external libraries you will need (i.e., HLS.js). | ||
To make it work, install via npm any of the external libraries you will need (i.e., HLS.js). | ||
``` | ||
@@ -157,3 +157,3 @@ npm install hls.js | ||
Once installed through NPM, you will be able to create your component using `MediaElement`. As an example: | ||
Once installed through npm, you will be able to create your component using `MediaElement`. As an example: | ||
@@ -306,3 +306,3 @@ **MediaElement.js** | ||
``` | ||
* For other renderers that cannot be installed through NPM, such as YouTube, you might need to load their script through `componentDidMount` method: | ||
* For other renderers that cannot be installed through npm, such as YouTube, you might need to load their script through `componentDidMount` method: | ||
```javascript | ||
@@ -386,3 +386,3 @@ componentDidMount() { | ||
Native video/audio | `html5` | --- | video/mp4, audio/mp4, video/webm, audio/mpeg, audio/mp3, audio/ogg, audio/oga, video/ogg | ||
HLS native | `native_hls` | [`hls.js` API](https://github.com/dailymotion/hls.js/blob/master/doc/API.md) | application/x-mpegURL, vnd.apple.mpegURL | ||
HLS native | `native_hls` | [`hls.js` API](https://github.com/dailymotion/hls.js/blob/master/docs/API.md) | application/x-mpegURL, vnd.apple.mpegURL | ||
M(PEG)-DASH native | `native_dash` | [`dash.js` Documentation](http://cdn.dashjs.org/latest/jsdoc/index.html) | application/dash+xml | ||
@@ -395,3 +395,3 @@ FLV native | `native_flv` | [`flv.js` API](https://github.com/Bilibili/flv.js/blob/master/docs/api.md) | video/flv | ||
DailyMotion | `dailymotion_iframe` | [Dailymotion Player API](https://developer.dailymotion.com/player#player-api) | video/dailymotion, video/x-dailymotion | ||
Twitch | `twitch_iframe` | [Twitch Emded API](https://github.com/justintv/Twitch-API/blob/master/embed-video.md) | video/twitch, video/x-twitch | ||
Twitch | `twitch_iframe` | [Twitch Emded API](https://dev.twitch.tv/docs/embed/video-and-clips/) | video/twitch, video/x-twitch | ||
Video shim | `flash_video` | --- | video/mp4, video/rtmp, audio/rtmp, rtmp/mp4, audio/mp4 | ||
@@ -416,3 +416,3 @@ Audio shim | `flash_audio` | --- | audio/mp3 | ||
* `flv` and `mpd` will not work on iOS since it doesn't support MSE; for `mpd` use a `m3u8` fallback. | ||
* Soundcloud can play with `html5` renderer using the following URL format: `https://api.soundcloud.com/tracks/XXX/stream?client_id=XXX` | ||
* SoundCloud can play with `html5` renderer using the following URL format: `https://api.soundcloud.com/tracks/XXX/stream?client_id=XXX` | ||
@@ -428,3 +428,3 @@ | ||
auto | Mode by default, this mode checks if there are any elements in the `video`/`audio` tag to turn the _responsive_ mode; if not, will set it up in _none_ mode. | ||
responsive | Can be turned on by setting `max-width: 100%` style (inline, or in the stylesheet), or `width="100%" height="100%"` attributes in the `video`/`audio` tag. In Javascript, set in the player's configuration `stretching: 'responsive'` (preferred) or `videoWidth: '100%' videoHeight: '100%'`. | ||
responsive | Can be turned on by setting `max-width: 100%` style (inline, or in the stylesheet), or `width="100%" height="100%"` attributes in the `video`/`audio` tag. In JavaScript, set in the player's configuration `stretching: 'responsive'` (preferred) or `videoWidth: '100%' videoHeight: '100%'`. | ||
fill | This mode will crop the video to adapt it to the dimensions of the parent container by only setting up `stretching: 'fill'`. It is encouraged to set up the parent's `height` to `100%` to make it work as expected. | ||
@@ -437,3 +437,3 @@ none | Use `width` and `height` attributes specified in the `video`/`audio` tags and no `max-width: 100%` or `width="100%" height="100%"` attributes; otherwise, use the `stretching: 'none'` configuration element to achieve this. | ||
Since `MediaElement` can adapt its size to be responsive, some might be tempted to use CSS or Javascript to create a responsive grid of videos. | ||
Since `MediaElement` can adapt its size to be responsive, some might be tempted to use CSS or JavaScript to create a responsive grid of videos. | ||
@@ -440,0 +440,0 @@ So far, right now the best plugin to be used with `MediaElement` for this task has been [Flexr](http://flexrgrid.com/). |
@@ -110,2 +110,3 @@ module.exports = function (grunt) { | ||
'build/renderers/twitch.js': 'src/js/renderers/twitch.js', | ||
'build/renderers/youtube.js': 'src/js/renderers/youtube.js', | ||
'build/renderers/vimeo.js': 'src/js/renderers/vimeo.js' | ||
@@ -112,0 +113,0 @@ }, |
Package.describe({ | ||
name: 'johndyer:mediaelement', | ||
summary: '*Official* MediaElement.js: <video> and <audio> made easy. One file. Any browser. Same UI.', | ||
version: '4.2.12', | ||
version: '4.2.14', | ||
git: 'https://github.com/mediaelement/mediaelement' | ||
@@ -6,0 +6,0 @@ }); |
{ | ||
"name": "mediaelement", | ||
"license": "MIT", | ||
"version": "4.2.12", | ||
"version": "4.2.14", | ||
"main": "full.js", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -45,3 +45,3 @@ # ![MediaElementJS](https://cloud.githubusercontent.com/assets/910829/22357262/e6cf32b4-e404-11e6-876b-59afa009f65c.png) | ||
Since Sierra version, `autoplay` policies have changed. You may experience an error if you try to execute `play` programatically or via `autoplay` attribute with MediaElement, unless `muted` attribute is specified. | ||
Since Sierra version, `autoplay` policies have changed. You may experience an error if you try to execute `play` programmatically or via `autoplay` attribute with MediaElement, unless `muted` attribute is specified. | ||
@@ -68,3 +68,3 @@ For more information, read https://webkit.org/blog/7734/auto-play-policy-changes-for-macos/ | ||
3. You **must** set up now the path for the Flash shims if they are not in the same folder as the JS files. To do this, set the path via the `pluginPath` configuration. In the same topic, if you need to support browsers with Javascript disabled, you **must** reference the correct Flash shim, since in `2.x` there was only a single Flash shim and in `3.x` it was split to target specific media types. Check the [Browsers with JavaScript disabled](docs/installation.md#disabled-javascript) section for more details. | ||
3. You **must** set up now the path for the Flash shims if they are not in the same folder as the JS files. To do this, set the path via the `pluginPath` configuration. In the same topic, if you need to support browsers with JavaScript disabled, you **must** reference the correct Flash shim, since in `2.x` there was only a single Flash shim and in `3.x` it was split to target specific media types. Check the [Browsers with JavaScript disabled](docs/installation.md#disabled-javascript) section for more details. | ||
@@ -71,0 +71,0 @@ 4. If you want to use Flash shims from a CDN, do the change related to `pluginPath` setting the CDN's URL, and also setting `shimScriptAccess` configuration as **`always`**. |
@@ -9,3 +9,3 @@ 'use strict'; | ||
// version number | ||
mejs.version = '4.2.12'; | ||
mejs.version = '4.2.14'; | ||
@@ -12,0 +12,0 @@ // Basic HTML5 settings |
@@ -902,3 +902,3 @@ 'use strict'; | ||
} | ||
text = text.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>"); | ||
text = text === null ? '' : text.trim().replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig, "<a href='$1' target='_blank'>$1</a>"); | ||
entries.push({ | ||
@@ -988,2 +988,2 @@ identifier: identifier, | ||
} | ||
}; | ||
}; |
@@ -154,3 +154,3 @@ 'use strict'; | ||
} else { | ||
if (value > 0) node[propName] = value; | ||
node[propName] = value; | ||
} | ||
@@ -282,2 +282,2 @@ } | ||
renderer.add(DashNativeRenderer); | ||
renderer.add(DashNativeRenderer); |
@@ -145,3 +145,3 @@ 'use strict'; | ||
} else { | ||
if (value > 0) node[propName] = value; | ||
node[propName] = value; | ||
} | ||
@@ -148,0 +148,0 @@ } |
@@ -142,3 +142,3 @@ 'use strict'; | ||
} else { | ||
if (value > 0) node[propName] = value; | ||
node[propName] = value; | ||
} | ||
@@ -145,0 +145,0 @@ } |
@@ -76,3 +76,3 @@ 'use strict'; | ||
if (mejs.html5media.readOnlyProperties.indexOf(propName) === -1) { | ||
if (value > 0) node[propName] = value; | ||
node[propName] = value; | ||
} | ||
@@ -162,2 +162,2 @@ }; | ||
renderer.add(HtmlMediaElement); | ||
renderer.add(HtmlMediaElement); |
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
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
5067316
228
31585
9
34