123456789101112 |
- /*!
- * MediaElement.js
- * http://www.mediaelementjs.com/
- *
- * Wrapper that mimics native HTML5 MediaElement (audio and video)
- * using a variety of technologies (pure JavaScript, Flash, iframe)
- *
- * Copyright 2010-2017, John Dyer (http://j.hn/)
- * License: MIT
- *
- */
- !function i(n,a,l){function p(r,e){if(!a[r]){if(!n[r]){var s="function"==typeof require&&require;if(!e&&s)return s(r,!0);if(c)return c(r,!0);var t=new Error("Cannot find module '"+r+"'");throw t.code="MODULE_NOT_FOUND",t}var o=a[r]={exports:{}};n[r][0].call(o.exports,function(e){return p(n[r][1][e]||e)},o,o.exports,i,n,a,l)}return a[r].exports}for(var c="function"==typeof require&&require,e=0;e<l.length;e++)p(l[e]);return p}({1:[function(e,r,s){"use strict";Object.assign(mejs.MepDefaults,{markersRollsColor:"#E9BC3D",markersRollsWidth:1,markersRolls:{}}),Object.assign(MediaElementPlayer.prototype,{buildmarkersrolls:function(e,r,s,t){var o=-1,i=-1,n=-1,a=Object.keys(e.options.markersRolls).length;if(a){for(var l=0,p=a;l<p;++l){var c=document.createElement("span");c.className=this.options.classPrefix+"time-marker",r.querySelector("."+this.options.classPrefix+"time-total").appendChild(c)}var u=document.createElement("iframe");u.frameBorder="0",u.className=this.options.classPrefix+"markersrolls-layer "+this.options.classPrefix+"overlay "+this.options.classPrefix+"layer",u.style.display="none",u.style.backgroundColor="#FFF",u.style.border="0 none",u.style.boxShadow="#B0B0B0 0px 0px 20px -10px inset",s.appendChild(u),t.addEventListener("durationchange",function(){e.setmarkersrolls(r)}),t.addEventListener("timeupdate",function(){(o=Math.floor(t.currentTime))<i?o<n&&(n=-1):i=o,0!==a&&e.options.markersRolls[o]&&o!==n&&(n=o,t.pause(),u.src=e.options.markersRolls[o],u.style.display="block")},!1),t.addEventListener("play",function(){u.style.display="none",u.src=""},!1)}},setmarkersrolls:function(e){var r=e.querySelectorAll("."+this.options.classPrefix+"time-marker"),s=0;for(var t in this.options.markersRolls)if(this.options.markersRolls.hasOwnProperty(t)&&!((t=parseInt(t))>=this.media.duration||t<0)){var o=100*t/this.media.duration,i=r[s];i.style.width=this.options.markersRollsWidth+"px",i.style.left=o+"%",i.style.background=this.options.markersRollsColor,s++}}})},{}]},{},[1]);
|