15s back/skip buttons on player

This commit is contained in:
mischa.spelt committed 2020-03-22 22:23:25 +01:00
1 parent 3b8c85215f
commit 4d62fb676a
18 files changed
+178

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
<?php
$pluginBaseUrl = 'https://github.com/mediaelement/mediaelement-plugins/raw/master/dist/';
$plugins = ['airplay' => ['airplay.svg', 'airplay.png'],
'chromecast' => ['chromecast.svg', 'chromecast.png'],
'context-menu' => [],
'jump-forward' => ['jumpforward.svg', 'jumpforward.png'],
'skip-back' => ['skipback.svg', 'skipback.png']];
$js = '';
$css = '';
foreach($plugins as $plugin => $resources) {
$js .= file_get_contents($pluginBaseUrl . $plugin . '/' . $plugin . '.min.js');
$css .= file_get_contents($pluginBaseUrl . $plugin . '/' . $plugin . '.min.css');
foreach($resources as $resource) {
file_put_contents('public/css/' . $resource,
file_get_contents($pluginBaseUrl . $plugin . '/' . $resource));
}
}
file_put_contents('public/js/mediaplayer_plugins.min.js', $js);
file_put_contents('public/css/mediaplayer_plugins.min.css', $css);
?>
Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

+1
View File
@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" width="17" height="14" viewBox="0 0 16.9 13.9"><defs><style>.fill{fill:#fff;}</style></defs><title>7</title><g id="airplay"><polygon class="fill" points="0 0 16.9 0 16.9 10.4 13.2 10.4 11.9 8.9 15.4 8.9 15.4 1.6 1.5 1.6 1.5 8.9 5 8.9 3.6 10.4 0 10.4 0 0"/><polygon class="fill" points="2.7 13.9 8.4 7 14.2 13.9 2.7 13.9"/></g></svg>

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

+1
View File
@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.3 13.4" x="0" y="0" width="17" height="14"><defs><style>.cls-1{fill:#fff;}</style></defs><title>5</title><path id="chromecast" class="cls-1" d="M80.4,13v2.2h2.2A2.22,2.22,0,0,0,80.4,13Zm0-2.9v1.5a3.69,3.69,0,0,1,3.7,3.68s0,0,0,0h1.5a5.29,5.29,0,0,0-5.2-5.2h0ZM93.7,4.9H83.4V6.1a9.59,9.59,0,0,1,6.2,6.2h4.1V4.9h0ZM80.4,7.1V8.6a6.7,6.7,0,0,1,6.7,6.7h1.4a8.15,8.15,0,0,0-8.1-8.2h0ZM95.1,1.9H81.8a1.54,1.54,0,0,0-1.5,1.5V5.6h1.5V3.4H95.1V13.7H89.9v1.5h5.2a1.54,1.54,0,0,0,1.5-1.5V3.4A1.54,1.54,0,0,0,95.1,1.9Z" transform="translate(-80.3 -1.9)"/></svg>

After

Width:  |  Height:  |  Size: 637 B

View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
View File
Whitespace-only changes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

+1
View File
@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 19" x="0" y="0" width="19" height="19"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:none;stroke:#fff;stroke-width:2px;}</style></defs><title>2</title><g id="jumpforward"><path class="cls-1" d="M32.1,2.3L27.8,4.5V0.2Z" transform="translate(-20.7 -0.2)"/><path class="cls-1" d="M34.8,2.3L30.5,4.5V0.2Z" transform="translate(-20.7 -0.2)"/><path class="cls-2" d="M29.9,2.3a8.15,8.15,0,0,0-8.2,8.1h0" transform="translate(-20.7 -0.2)"/><path class="cls-2" d="M21.8,10a8.15,8.15,0,0,0,8.1,8.2h0" transform="translate(-20.7 -0.2)"/><path class="cls-2" d="M29.5,18.2a8.15,8.15,0,0,0,8.2-8.1h0" transform="translate(-20.7 -0.2)"/></g></svg>

After

Width:  |  Height:  |  Size: 718 B

+1
View File
@@ -0,0 +1 @@
.mejs-airplay-button>button,.mejs__airplay-button>button{background:url(airplay.svg) no-repeat 0 4px}.mejs-airplay-button>button .fill,.mejs__airplay-button>button .fill{fill:#fff}.mejs-airplay-button>button.active .fill,.mejs__airplay-button>button.active .fill{fill:#66a8cc}.mejs-chromecast-button>button,.mejs__chromecast-button>button{--disconnected-color:#fff;background:none;display:inline-block}.mejs-chromecast-container,.mejs__chromecast-container{background:#000;color:#fff;font-size:10px;left:0;padding:5px;position:absolute;top:0;z-index:1}.mejs-chromecast-layer>img,.mejs__chromecast-layer>img{left:0;position:absolute;top:0;z-index:0}.mejs-chromecast-icon,.mejs__chromecast-icon{background:url(chromecast.svg) no-repeat 0 0;display:inline-block;height:14px;margin-right:5px;width:17px}.mejs-contextmenu,.mejs__contextmenu{background:#fff;border:1px solid #999;border-radius:4px;left:0;padding:10px;position:absolute;top:0;width:150px;z-index:1}.mejs-contextmenu-separator,.mejs__contextmenu-separator{background:#333;font-size:0;height:1px;margin:5px 6px}.mejs-contextmenu-item,.mejs__contextmenu-item{color:#333;cursor:pointer;font-size:12px;padding:4px 6px}.mejs-contextmenu-item:hover,.mejs__contextmenu-item:hover{background:#2c7c91;color:#fff}.mejs-jump-forward-button>button,.mejs__jump-forward-button>button{background:url(jumpforward.svg) no-repeat 0 0;color:#fff;font-size:8px;line-height:normal;position:relative}.mejs-skip-back-button>button,.mejs__skip-back-button>button{background:url(skipback.svg) no-repeat 0 -1px;color:#fff;font-size:8px;line-height:normal;position:relative}
+1
View File
@@ -0,0 +1 @@
.mejs__offscreen{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal}.mejs__container{background:#000;font-family:Helvetica,Arial,serif;position:relative;text-align:left;text-indent:0;vertical-align:top}.mejs__container,.mejs__container *{box-sizing:border-box}.mejs__container video::-webkit-media-controls,.mejs__container video::-webkit-media-controls-panel,.mejs__container video::-webkit-media-controls-panel-container,.mejs__container video::-webkit-media-controls-start-playback-button{-webkit-appearance:none;display:none!important}.mejs__fill-container,.mejs__fill-container .mejs__container{height:100%;width:100%}.mejs__fill-container{background:transparent;margin:0 auto;overflow:hidden;position:relative}.mejs__container:focus{outline:none}.mejs__iframe-overlay{height:100%;position:absolute;width:100%}.mejs__embed,.mejs__embed body{background:#000;height:100%;margin:0;overflow:hidden;padding:0;width:100%}.mejs__fullscreen{overflow:hidden!important}.mejs__container-fullscreen{bottom:0;left:0;overflow:hidden;position:fixed;right:0;top:0;z-index:1000}.mejs__container-fullscreen .mejs__mediaelement,.mejs__container-fullscreen video{height:100%!important;width:100%!important}.mejs__background,.mejs__mediaelement{left:0;position:absolute;top:0}.mejs__mediaelement{height:100%;width:100%;z-index:0}.mejs__poster{background-position:50% 50%;background-repeat:no-repeat;background-size:cover;left:0;position:absolute;top:0;z-index:1}:root .mejs__poster-img{display:none}.mejs__poster-img{border:0;padding:0}.mejs__overlay{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;left:0;position:absolute;top:0}.mejs__layer{z-index:1}.mejs__overlay-play{cursor:pointer}.mejs__overlay-button{background:url(mejs-controls.svg) no-repeat;background-position:0 -39px;height:80px;width:80px}.mejs__overlay:hover>.mejs__overlay-button{background-position:-80px -39px}.mejs__overlay-loading{height:80px;width:80px}.mejs__overlay-loading-bg-img{-webkit-animation:a 1s linear infinite;animation:a 1s linear infinite;background:transparent url(mejs-controls.svg) -160px -40px no-repeat;display:block;height:80px;width:80px;z-index:1}@-webkit-keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.mejs__controls{bottom:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:40px;left:0;list-style-type:none;margin:0;padding:0 10px;position:absolute;width:100%;z-index:3}.mejs__controls:not([style*="display: none"]){background:rgba(255,0,0,.7);background:-webkit-linear-gradient(transparent,rgba(0,0,0,.35));background:linear-gradient(transparent,rgba(0,0,0,.35))}.mejs__button,.mejs__time,.mejs__time-rail{font-size:10px;height:40px;line-height:10px;margin:0;width:32px}.mejs__button>button{background:transparent url(mejs-controls.svg);border:0;cursor:pointer;display:block;font-size:0;height:20px;line-height:0;margin:10px 6px;overflow:hidden;padding:0;position:absolute;text-decoration:none;width:20px}.mejs__button>button:focus{outline:1px dotted #999}.mejs__container-keyboard-inactive [role=slider],.mejs__container-keyboard-inactive [role=slider]:focus,.mejs__container-keyboard-inactive a,.mejs__container-keyboard-inactive a:focus,.mejs__container-keyboard-inactive button,.mejs__container-keyboard-inactive button:focus{outline:0}.mejs__time{box-sizing:content-box;color:#fff;font-size:11px;font-weight:700;height:24px;overflow:hidden;padding:16px 6px 0;text-align:center;width:auto}.mejs__play>button{background-position:0 0}.mejs__pause>button{background-position:-20px 0}.mejs__replay>button{background-position:-160px 0}.mejs__time-rail{direction:ltr;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;height:40px;margin:0 10px;padding-top:10px;position:relative}.mejs__time-buffering,.mejs__time-current,.mejs__time-float,.mejs__time-float-corner,.mejs__time-float-current,.mejs__time-hovered,.mejs__time-loaded,.mejs__time-marker,.mejs__time-total{border-radius:2px;cursor:pointer;display:block;height:10px;position:absolute}.mejs__time-total{background:hsla(0,0%,100%,.3);margin:5px 0 0;width:100%}.mejs__time-buffering{-webkit-animation:b 2s linear infinite;animation:b 2s linear infinite;background:-webkit-linear-gradient(135deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background:linear-gradient(-45deg,hsla(0,0%,100%,.4) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.4) 0,hsla(0,0%,100%,.4) 75%,transparent 0,transparent);background-size:15px 15px;width:100%}@-webkit-keyframes b{0%{background-position:0 0}to{Line truncated
Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="-290 291 19 19" style="enable-background:new -290 291 19 19;" xml:space="preserve">
<style type="text/css">
.st0{fill:#fff;}
.st1{fill:none;stroke:#fff;stroke-width:2;}
</style>
<title>2</title>
<g id="jumpforward">
<path class="st0" d="M-278.6,291v4.3l-4.3-2.2L-278.6,291z"/>
<path class="st0" d="M-281.3,291v4.3l-4.3-2.2L-281.3,291z"/>
<path class="st1" d="M-272.5,301.2L-272.5,301.2C-272.5,301.2-272.5,301.2-272.5,301.2c0-4.5-3.7-8.1-8.2-8.1"/>
<path class="st1" d="M-280.7,309L-280.7,309C-280.7,309-280.7,309-280.7,309c4.5,0,8.1-3.7,8.1-8.2"/>
<path class="st1" d="M-288.5,300.9L-288.5,300.9C-288.5,300.9-288.5,300.9-288.5,300.9c0,4.5,3.7,8.1,8.2,8.1"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 948 B

+56
View File
@@ -0,0 +1,56 @@
/*!
* 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 n(l,o,s){function d(t,e){if(!o[t]){if(!l[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(c)return c(t,!0);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}var r=o[t]={exports:{}};l[t][0].call(r.exports,function(e){return d(l[t][1][e]||e)},r,r.exports,n,l,o,s)}return o[t].exports}for(var c="function"==typeof require&&require,e=0;e<s.length;e++)d(s[e]);return d}({1:[function(e,t,i){"use strict";Object.assign(mejs.MepDefaults,{airPlayText:null}),Object.assign(MediaElementPlayer.prototype,{buildairplay:function(){if(window.WebKitPlaybackTargetAvailabilityEvent){var r=this,e=mejs.Utils.isString(r.options.airPlayText)?r.options.airPlayText:"AirPlay",n=document.createElement("div");n.className=r.options.classPrefix+"button "+r.options.classPrefix+"airplay-button",n.innerHTML='<button type="button" aria-controls="'+r.id+'" title="'+e+'" aria-label="'+e+'" tabindex="0"></button>',n.addEventListener("click",function(){r.media.originalNode.webkitShowPlaybackTargetPicker()});var t=r.media.originalNode.getAttribute("x-webkit-airplay");t&&"allow"===t||r.media.originalNode.setAttribute("x-webkit-airplay","allow"),r.media.originalNode.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",function(){var e=r.media.originalNode.webkitCurrentPlaybackTargetIsWireless?"Started":"Stopped",t=r.media.originalNode.webkitCurrentPlaybackTargetIsWireless?"active":"",i=n.querySelector("button"),a=mejs.Utils.createEvent("airplay"+e,r.media);r.media.dispatchEvent(a),"active"===t?mejs.Utils.addClass(i,"active"):mejs.Utils.removeClass(i,"active")}),r.media.originalNode.addEventListener("webkitplaybacktargetavailabilitychanged",function(e){"available"===e.availability&&r.addControlElement(n,"airplay")})}}})},{}]},{},[1]);/*!
* 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 s(o,n,c){function l(t,e){if(!n[t]){if(!o[t]){var a="function"==typeof require&&require;if(!e&&a)return a(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=n[t]={exports:{}};o[t][0].call(i.exports,function(e){return l(o[t][1][e]||e)},i,i.exports,s,o,n,c)}return n[t].exports}for(var d="function"==typeof require&&require,e=0;e<c.length;e++)l(c[e]);return l}({1:[function(e,t,a){"use strict";var r,i=e(2),o=(r=i)&&r.__esModule?r:{default:r};mejs.i18n.en["mejs.chromecast-legend"]="Casting to:",Object.assign(mejs.MepDefaults,{castTitle:null,castAppID:null,castPolicy:"origin",castEnableTracks:!1,castIsLive:!1}),Object.assign(MediaElementPlayer.prototype,{buildchromecast:function(a,e,t,r){var i=this,s=document.createElement("div"),o=mejs.Utils.isString(i.options.castTitle)?i.options.castTitle:"Chromecast";if(a.chromecastLayer=document.createElement("div"),a.chromecastLayer.className=i.options.classPrefix+"chromecast-layer "+i.options.classPrefix+"layer",a.chromecastLayer.innerHTML='<div class="'+i.options.classPrefix+'chromecast-info"></div>',a.chromecastLayer.style.display="none",t.insertBefore(a.chromecastLayer,t.firstChild),s.className=i.options.classPrefix+"button "+i.options.classPrefix+"chromecast-button",s.innerHTML='<button type="button" is="google-cast-button" aria-controls="'+i.id+'" title="'+o+'" aria-label="'+o+'" tabindex="0"></button>',s.style.display="none",i.addControlElement(s,"chromecast"),i.castButton=s,a.chromecastLayer.innerHTML='<div class="'+i.options.classPrefix+'chromecast-container"><span class="'+i.options.classPrefix+'chromecast-icon"></span><span class="'+i.options.classPrefix+'chromecast-info">'+mejs.i18n.t("mejs.chromecast-legend")+' <span class="device"></span></span></div>',r.originalNode.getAttribute("poster")&&(a.chromecastLayer.innerHTML+='<img src="'+r.originalNode.getAttribute("poster")+'" width="100%" height="100%">',a.chromecastLayer.querySelector("img").addEventListener("click",function(){if(a.options.clickToPlayPause){var e=i.container.querySelector("."+i.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");a.paused?a.play():a.pause(),e.setAttribute("aria-pressed",!!t),a.container.focus()}})),window.__onGCastApiAvailable=function(e){var t=mejs.Utils.getTypeFromFile(r.originalNode.src).toLowerCase(),a=t&&-1<["application/x-mpegurl","application/vnd.apple.mpegurl","application/dash+xml","video/mp4","audio/mp3","audio/mp4"].indexOf(t);e&&a&&i._initializeCastPlayer()},window.cast){var n=i.controls.querySelector("."+i.options.classPrefix+"chromecast-button>button");return n&&"none"!==n.style.display&&(i.controls.querySelector("."+i.options.classPrefix+"chromecast-button").style.display=""),void i._initializeCastPlayer()}mejs.Utils.loadScript("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1")},cleanchromecast:function(e){if(window.cast){var t=cast.framework.CastContext.getInstance().getCurrentSession();t&&t.endSession(!0)}e.castButton&&e.castButton.remove(),e.chromecastLayer&&e.chromecastLayer.remove()},_initializeCastPlayer:function(){var e=this,t=void 0;switch(this.options.castPolicy){case"tab":t="TAB_AND_ORIGIN_SCOPED";break;case"page":t="PAGE_SCOPED";break;default:t="ORIGIN_SCOPED"}var a=cast.framework.CastContext.getInstance(),r=a.getCurrentSession();if(a.setOptions({receiverApplicationId:e.options.castAppID||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy[t]}),a.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,e._checkCastButtonStatus.bind(e)),e.remotePlayer=new cast.framework.RemotePlayer,e.remotePlayerController=new cast.framework.RemotePlayerController(e.remotePlayer),e.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,e._switchToCastPlayer.bind(this)),r){var i=a.getCastState(),s=e.controls.querySelector("."+e.options.classPrefix+"chromecast-button");s&&i===cast.framework.CastState.NO_DEVICES_AVAILABLE?s.style.display="none":s&&(e.chromecastLayer&&(e.chromecastLayer.style.display=i===cast.framework.CastState.CONNECTED?"":"none"),s.style.display=""),e._switchToCastPlayer()}},_checkCastButtonStatus:function(e){var t=this,a=t.controls.querySelector("."+t.options.classPrefix+"chromecast-button");a&&e.castState===cast.framework.CastState.NO_DEVICES_AVAILABLE?a.style.display="none":a&&(t.chromecastLayer&&(t.chromecastLayer.style.display=e.castState===cast.framework.CastState.CONNECTED?"":"none"),a.style.display=""),setTimeout(function(){t.setPlayerSize(t.width,t.height),t.setControlsSize()},0)},_switchToCastPlayer:function(){var e=this;if((e.proxy&&e.proxy.pause(),cast&&cast.framework)&&(cast.framework.CastContext.getInstance().addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,e._checkCastButtonStatus.bind(e)),e.remotePlayer.isConnected))return void e._setupCastPlayer();e._setDefaultPlayer()},_setupCastPlayer:function(){var r=thisLine truncated
* 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 u(r,c,s){function l(n,e){if(!c[n]){if(!r[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(a)return a(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var i=c[n]={exports:{}};r[n][0].call(i.exports,function(e){return l(r[n][1][e]||e)},i,i.exports,u,r,c,s)}return c[n].exports}for(var a="function"==typeof require&&require,e=0;e<s.length;e++)l(s[e]);return l}({1:[function(e,n,t){"use strict";mejs.i18n.en["mejs.fullscreen-off"]="Turn off Fullscreen",mejs.i18n.en["mejs.fullscreen-on"]="Go Fullscreen",mejs.i18n.en["mejs.download-video"]="Download Video",Object.assign(mejs.MepDefaults,{contextMenuItems:[{render:function(e){return void 0===e.enterFullScreen?null:e.isFullScreen?mejs.i18n.t("mejs.fullscreen-off"):mejs.i18n.t("mejs.fullscreen-on")},click:function(e){e.isFullScreen?e.exitFullScreen():e.enterFullScreen()}},{render:function(e){return e.media.muted?mejs.i18n.t("mejs.unmute"):mejs.i18n.t("mejs.mute")},click:function(e){e.media.muted?e.setMuted(!1):e.setMuted(!0)}},{isSeparator:!0},{render:function(){return mejs.i18n.t("mejs.download-video")},click:function(e){window.location.href=e.media.currentSrc}}]}),Object.assign(MediaElementPlayer.prototype,{isContextMenuEnabled:!0,contextMenuTimeout:null,buildcontextmenu:function(n){n.isVideo&&(document.querySelector("."+n.options.classPrefix+"contextmenu")||(n.contextMenu=document.createElement("div"),n.contextMenu.className=n.options.classPrefix+"contextmenu",n.contextMenu.style.display="none",document.body.appendChild(n.contextMenu)),n.container.addEventListener("contextmenu",function(e){!n.isContextMenuEnabled||3!==e.keyCode&&3!==e.which||(n.renderContextMenu(e),e.preventDefault(),e.stopPropagation())}),n.container.addEventListener("click",function(){n.contextMenu.style.display="none"}),n.contextMenu.addEventListener("mouseleave",function(){n.startContextMenuTimer()}))},cleancontextmenu:function(e){e.contextMenu.remove()},enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},startContextMenuTimer:function(){var e=this;e.killContextMenuTimer(),e.contextMenuTimer=setTimeout(function(){e.hideContextMenu(),e.killContextMenuTimer()},750)},killContextMenuTimer:function(){var e=this.contextMenuTimer;null!=e&&(clearTimeout(e),e=null)},hideContextMenu:function(){this.contextMenu.style.display="none"},renderContextMenu:function(e){for(var u=this,n="",t=u.options.contextMenuItems,o=0,i=t.length;o<i;o++){var r=t[o];if(r.isSeparator)n+='<div class="'+u.options.classPrefix+'contextmenu-separator"></div>';else{var c=r.render(u);null!=c&&(n+='<div class="'+u.options.classPrefix+'contextmenu-item" data-itemindex="'+o+'" id="element-'+1e6*Math.random()+'">'+c+"</div>")}}u.contextMenu.innerHTML=n;var s=u.contextMenu.offsetWidth,l=u.contextMenu.offsetHeight,a=e.pageX,d=e.pageY,f=document.documentElement,m=(window.pageXOffset||f.scrollLeft)-(f.clientLeft||0),x=(window.pageYOffset||f.scrollTop)-(f.clientTop||0),M=a+s>window.innerWidth+m?a-s:a,p=d+l>window.innerHeight+x?d-l:d;u.contextMenu.style.display="",u.contextMenu.style.left=M+"px",u.contextMenu.style.top=p+"px";for(var v=u.contextMenu.querySelectorAll("."+u.options.classPrefix+"contextmenu-item"),h=function(e,n){var t=v[e],o=parseInt(t.getAttribute("data-itemindex"),10),i=u.options.contextMenuItems[o];void 0!==i.show&&i.show(t,u),t.addEventListener("click",function(){void 0!==i.click&&i.click(u),u.contextMenu.style.display="none"})},y=0,j=v.length;y<j;y++)h(y);setTimeout(function(){u.killControlsTimer()},100)}})},{}]},{},[1]);/*!
* 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(a,u,s){function p(t,r){if(!u[t]){if(!a[t]){var e="function"==typeof require&&require;if(!r&&e)return e(t,!0);if(m)return m(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=u[t]={exports:{}};a[t][0].call(o.exports,function(r){return p(a[t][1][r]||r)},o,o.exports,i,a,u,s)}return u[t].exports}for(var m="function"==typeof require&&require,r=0;r<s.length;r++)p(s[r]);return p}({1:[function(r,t,e){"use strict";mejs.i18n.en["mejs.time-jump-forward"]=["Jump forward 1 second","Jump forward %1 seconds"],Object.assign(mejs.MepDefaults,{jumpForwardInterval:30,jumpForwardText:null}),Object.assign(MediaElementPlayer.prototype,{buildjumpforward:function(r,t,e,n){var o=this,i=mejs.i18n.t("mejs.time-jump-forward",o.options.jumpForwardInterval),a=mejs.Utils.isString(o.options.jumpForwardText)?o.options.jumpForwardText.replace("%1",o.options.jumpForwardInterval):i,u=document.createElement("div");u.className=o.options.classPrefix+"button "+o.options.classPrefix+"jump-forward-button",u.innerHTML='<button type="button" aria-controls="'+o.id+'" title="'+a+'" aria-label="'+a+'" tabindex="0">'+o.options.jumpForwardInterval+"</button>",o.addControlElement(u,"jumpforward"),u.addEventListener("click",function(){var r=isNaN(n.duration)?o.options.jumpForwardInterval:n.duration;if(r){var t=n.currentTime===1/0?0:n.currentTime;n.setCurrentTime(Math.min(t+o.options.jumpForwardInterval,r)),this.querySelector("button").blur()}})}})},{}]},{},[1]);/*!
* 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 s(o,a,c){function p(e,t){if(!a[e]){if(!o[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(u)return u(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var r=a[e]={exports:{}};o[e][0].call(r.exports,function(t){return p(o[e][1][t]||t)},r,r.exports,s,o,a,c)}return a[e].exports}for(var u="function"==typeof require&&require,t=0;t<c.length;t++)p(c[t]);return p}({1:[function(t,e,i){"use strict";mejs.i18n.en["mejs.time-skip-back"]=["Skip back 1 second","Skip back %1 seconds"],Object.assign(mejs.MepDefaults,{skipBackInterval:30,skipBackText:null}),Object.assign(MediaElementPlayer.prototype,{buildskipback:function(t,e,i,n){var r=this,s=mejs.i18n.t("mejs.time-skip-back",r.options.skipBackInterval),o=mejs.Utils.isString(r.options.skipBackText)?r.options.skipBackText.replace("%1",r.options.skipBackInterval):s,a=document.createElement("div");a.className=r.options.classPrefix+"button "+r.options.classPrefix+"skip-back-button",a.innerHTML='<button type="button" aria-controls="'+r.id+'" title="'+o+'" aria-label="'+o+'" tabindex="0">'+r.options.skipBackInterval+"</button>",r.addControlElement(a,"skipback"),a.addEventListener("click",function(){if(isNaN(n.duration)?r.options.skipBackInterval:n.duration){var t=n.currentTime===1/0?0:n.currentTime;n.setCurrentTime(Math.max(t-r.options.skipBackInterval,0)),this.querySelector("button").blur()}})}})},{}]},{},[1]);
+67
View File
@@ -0,0 +1,67 @@
/*!
* MediaElement.js
* http://www.mediaelementjs.com/
*
* Wrapper that mimics native HTML5 MediaElement (audio and video)
* using a variety of technologies (pure JavaScript, Flash, iframe)
*
* Copyright 2010-2017, John Dyer (http://j.hn/)
* License: MIT
*
*/
!function e(t,n,o){function i(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var d=new Error("Cannot find module '"+a+"'");throw d.code="MODULE_NOT_FOUND",d}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return i(n||e)},u,u.exports,e,t,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(e,t,n){},{}],2:[function(e,t,n){(function(n){var o,i=void 0!==n?n:"undefined"!=typeof window?window:{},r=e(1);"undefined"!=typeof document?o=document:(o=i["__GLOBAL_DOCUMENT_CACHE@4"])||(o=i["__GLOBAL_DOCUMENT_CACHE@4"]=r),t.exports=o}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],3:[function(e,t,n){(function(e){var n;n="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(e,t,n){!function(e){function n(){}function o(e,t){return function(){e.apply(t,arguments)}}function i(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],u(e,this)}function r(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,i._immediateFn(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var o;try{o=n(e._value)}catch(e){return void s(t.promise,e)}a(t.promise,o)}else(1===e._state?a:s)(t.promise,e._value)})):e._deferreds.push(t)}function a(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof i)return e._state=3,e._value=t,void l(e);if("function"==typeof n)return void u(o(n,t),e)}e._state=1,e._value=t,l(e)}catch(t){s(e,t)}}function s(e,t){e._state=2,e._value=t,l(e)}function l(e){2===e._state&&0===e._deferreds.length&&i._immediateFn(function(){e._handled||i._unhandledRejectionFn(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)r(e,e._deferreds[t]);e._deferreds=null}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function u(e,t){var n=!1;try{e(function(e){n||(n=!0,a(t,e))},function(e){n||(n=!0,s(t,e))})}catch(e){if(n)return;n=!0,s(t,e)}}var c=setTimeout;i.prototype.catch=function(e){return this.then(null,e)},i.prototype.then=function(e,t){var o=new this.constructor(n);return r(this,new d(e,t,o)),o},i.all=function(e){var t=Array.prototype.slice.call(e);return new i(function(e,n){function o(r,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){o(r,e)},n)}t[r]=a,0==--i&&e(t)}catch(e){n(e)}}if(0===t.length)return e([]);for(var i=t.length,r=0;r<t.length;r++)o(r,t[r])})},i.resolve=function(e){return e&&"object"==typeof e&&e.constructor===i?e:new i(function(t){t(e)})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(e){return new i(function(t,n){for(var o=0,i=e.length;o<i;o++)e[o].then(t,n)})},i._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){c(e,0)},i._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)},i._setImmediateFn=function(e){i._immediateFn=e},i._setUnhandledRejectionFn=function(e){i._unhandledRejectionFn=e},void 0!==t&&t.exports?t.exports=i:e.Promise||(e.Promise=i)}(this)},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o="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},i=function(e){return e&&e.__esModule?e:{default:e}}(e(7)),r=e(15),a=e(27),s={lang:"en",en:r.EN};s.language=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(null!==t&&void 0!==t&&t.length){if("string"!=typeof t[0])throw new TypeError("Language code must be a string value");if(!/^[a-z]{2,3}((\-|_)[a-z]{2})?$/i.test(t[0]))throw new TypeError("Language code must have format 2-3 letters and. optionally, hyphen, underscore followed by 2 more letters");s.lang=t[0],void 0===s[t[0]]?(t[1]=null!==t[1]&&void 0!==t[1]&&"object"===o(t[1])?t[1]:{},s[t[0]]=(0,a.isObjectEmpty)(t[1])?r.EN:t[1]):null!==t[1]&&void 0!==t[1]&&"object"===o(t[1])&&(s[t[0]]=t[1])}return s.lang},s.t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e&&e.length){var n=void 0,i=void 0,r=s.language(),l=function(e,t,n){return"object"!==(void 0===e?"undefined":o(e))||"number"!=typeof t||"number"!=typeof n?e:[function(){return arguments.length<=1?void 0:arguments[1]},function(){retLine truncated
* 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 n(l,o,s){function d(t,e){if(!o[t]){if(!l[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(c)return c(t,!0);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}var r=o[t]={exports:{}};l[t][0].call(r.exports,function(e){return d(l[t][1][e]||e)},r,r.exports,n,l,o,s)}return o[t].exports}for(var c="function"==typeof require&&require,e=0;e<s.length;e++)d(s[e]);return d}({1:[function(e,t,i){"use strict";Object.assign(mejs.MepDefaults,{airPlayText:null}),Object.assign(MediaElementPlayer.prototype,{buildairplay:function(){if(window.WebKitPlaybackTargetAvailabilityEvent){var r=this,e=mejs.Utils.isString(r.options.airPlayText)?r.options.airPlayText:"AirPlay",n=document.createElement("div");n.className=r.options.classPrefix+"button "+r.options.classPrefix+"airplay-button",n.innerHTML='<button type="button" aria-controls="'+r.id+'" title="'+e+'" aria-label="'+e+'" tabindex="0"></button>',n.addEventListener("click",function(){r.media.originalNode.webkitShowPlaybackTargetPicker()});var t=r.media.originalNode.getAttribute("x-webkit-airplay");t&&"allow"===t||r.media.originalNode.setAttribute("x-webkit-airplay","allow"),r.media.originalNode.addEventListener("webkitcurrentplaybacktargetiswirelesschanged",function(){var e=r.media.originalNode.webkitCurrentPlaybackTargetIsWireless?"Started":"Stopped",t=r.media.originalNode.webkitCurrentPlaybackTargetIsWireless?"active":"",i=n.querySelector("button"),a=mejs.Utils.createEvent("airplay"+e,r.media);r.media.dispatchEvent(a),"active"===t?mejs.Utils.addClass(i,"active"):mejs.Utils.removeClass(i,"active")}),r.media.originalNode.addEventListener("webkitplaybacktargetavailabilitychanged",function(e){"available"===e.availability&&r.addControlElement(n,"airplay")})}}})},{}]},{},[1]);/*!
* 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 s(o,n,c){function l(t,e){if(!n[t]){if(!o[t]){var a="function"==typeof require&&require;if(!e&&a)return a(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=n[t]={exports:{}};o[t][0].call(i.exports,function(e){return l(o[t][1][e]||e)},i,i.exports,s,o,n,c)}return n[t].exports}for(var d="function"==typeof require&&require,e=0;e<c.length;e++)l(c[e]);return l}({1:[function(e,t,a){"use strict";var r,i=e(2),o=(r=i)&&r.__esModule?r:{default:r};mejs.i18n.en["mejs.chromecast-legend"]="Casting to:",Object.assign(mejs.MepDefaults,{castTitle:null,castAppID:null,castPolicy:"origin",castEnableTracks:!1,castIsLive:!1}),Object.assign(MediaElementPlayer.prototype,{buildchromecast:function(a,e,t,r){var i=this,s=document.createElement("div"),o=mejs.Utils.isString(i.options.castTitle)?i.options.castTitle:"Chromecast";if(a.chromecastLayer=document.createElement("div"),a.chromecastLayer.className=i.options.classPrefix+"chromecast-layer "+i.options.classPrefix+"layer",a.chromecastLayer.innerHTML='<div class="'+i.options.classPrefix+'chromecast-info"></div>',a.chromecastLayer.style.display="none",t.insertBefore(a.chromecastLayer,t.firstChild),s.className=i.options.classPrefix+"button "+i.options.classPrefix+"chromecast-button",s.innerHTML='<button type="button" is="google-cast-button" aria-controls="'+i.id+'" title="'+o+'" aria-label="'+o+'" tabindex="0"></button>',s.style.display="none",i.addControlElement(s,"chromecast"),i.castButton=s,a.chromecastLayer.innerHTML='<div class="'+i.options.classPrefix+'chromecast-container"><span class="'+i.options.classPrefix+'chromecast-icon"></span><span class="'+i.options.classPrefix+'chromecast-info">'+mejs.i18n.t("mejs.chromecast-legend")+' <span class="device"></span></span></div>',r.originalNode.getAttribute("poster")&&(a.chromecastLayer.innerHTML+='<img src="'+r.originalNode.getAttribute("poster")+'" width="100%" height="100%">',a.chromecastLayer.querySelector("img").addEventListener("click",function(){if(a.options.clickToPlayPause){var e=i.container.querySelector("."+i.options.classPrefix+"overlay-button"),t=e.getAttribute("aria-pressed");a.paused?a.play():a.pause(),e.setAttribute("aria-pressed",!!t),a.container.focus()}})),window.__onGCastApiAvailable=function(e){var t=mejs.Utils.getTypeFromFile(r.originalNode.src).toLowerCase(),a=t&&-1<["application/x-mpegurl","application/vnd.apple.mpegurl","application/dash+xml","video/mp4","audio/mp3","audio/mp4"].indexOf(t);e&&a&&i._initializeCastPlayer()},window.cast){var n=i.controls.querySelector("."+i.options.classPrefix+"chromecast-button>button");return n&&"none"!==n.style.display&&(i.controls.querySelector("."+i.options.classPrefix+"chromecast-button").style.display=""),void i._initializeCastPlayer()}mejs.Utils.loadScript("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1")},cleanchromecast:function(e){if(window.cast){var t=cast.framework.CastContext.getInstance().getCurrentSession();t&&t.endSession(!0)}e.castButton&&e.castButton.remove(),e.chromecastLayer&&e.chromecastLayer.remove()},_initializeCastPlayer:function(){var e=this,t=void 0;switch(this.options.castPolicy){case"tab":t="TAB_AND_ORIGIN_SCOPED";break;case"page":t="PAGE_SCOPED";break;default:t="ORIGIN_SCOPED"}var a=cast.framework.CastContext.getInstance(),r=a.getCurrentSession();if(a.setOptions({receiverApplicationId:e.options.castAppID||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy[t]}),a.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,e._checkCastButtonStatus.bind(e)),e.remotePlayer=new cast.framework.RemotePlayer,e.remotePlayerController=new cast.framework.RemotePlayerController(e.remotePlayer),e.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,e._switchToCastPlayer.bind(this)),r){var i=a.getCastState(),s=e.controls.querySelector("."+e.options.classPrefix+"chromecast-button");s&&i===cast.framework.CastState.NO_DEVICES_AVAILABLE?s.style.display="none":s&&(e.chromecastLayer&&(e.chromecastLayer.style.display=i===cast.framework.CastState.CONNECTED?"":"none"),s.style.display=""),e._switchToCastPlayer()}},_checkCastButtonStatus:function(e){var t=this,a=t.controls.querySelector("."+t.options.classPrefix+"chromecast-button");a&&e.castState===cast.framework.CastState.NO_DEVICES_AVAILABLE?a.style.display="none":a&&(t.chromecastLayer&&(t.chromecastLayer.style.display=e.castState===cast.framework.CastState.CONNECTED?"":"none"),a.style.display=""),setTimeout(function(){t.setPlayerSize(t.width,t.height),t.setControlsSize()},0)},_switchToCastPlayer:function(){var e=this;if((e.proxy&&e.proxy.pause(),cast&&cast.framework)&&(cast.framework.CastContext.getInstance().addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,e._checkCastButtonStatus.bind(e)),e.remotePlayer.isConnected))return void e._setupCastPlayer();e._setDefaultPlayer()},_setupCastPlayer:function(){var r=thisLine truncated
* 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 u(r,c,s){function l(n,e){if(!c[n]){if(!r[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(a)return a(n,!0);var o=new Error("Cannot find module '"+n+"'");throw o.code="MODULE_NOT_FOUND",o}var i=c[n]={exports:{}};r[n][0].call(i.exports,function(e){return l(r[n][1][e]||e)},i,i.exports,u,r,c,s)}return c[n].exports}for(var a="function"==typeof require&&require,e=0;e<s.length;e++)l(s[e]);return l}({1:[function(e,n,t){"use strict";mejs.i18n.en["mejs.fullscreen-off"]="Turn off Fullscreen",mejs.i18n.en["mejs.fullscreen-on"]="Go Fullscreen",mejs.i18n.en["mejs.download-video"]="Download Video",Object.assign(mejs.MepDefaults,{contextMenuItems:[{render:function(e){return void 0===e.enterFullScreen?null:e.isFullScreen?mejs.i18n.t("mejs.fullscreen-off"):mejs.i18n.t("mejs.fullscreen-on")},click:function(e){e.isFullScreen?e.exitFullScreen():e.enterFullScreen()}},{render:function(e){return e.media.muted?mejs.i18n.t("mejs.unmute"):mejs.i18n.t("mejs.mute")},click:function(e){e.media.muted?e.setMuted(!1):e.setMuted(!0)}},{isSeparator:!0},{render:function(){return mejs.i18n.t("mejs.download-video")},click:function(e){window.location.href=e.media.currentSrc}}]}),Object.assign(MediaElementPlayer.prototype,{isContextMenuEnabled:!0,contextMenuTimeout:null,buildcontextmenu:function(n){n.isVideo&&(document.querySelector("."+n.options.classPrefix+"contextmenu")||(n.contextMenu=document.createElement("div"),n.contextMenu.className=n.options.classPrefix+"contextmenu",n.contextMenu.style.display="none",document.body.appendChild(n.contextMenu)),n.container.addEventListener("contextmenu",function(e){!n.isContextMenuEnabled||3!==e.keyCode&&3!==e.which||(n.renderContextMenu(e),e.preventDefault(),e.stopPropagation())}),n.container.addEventListener("click",function(){n.contextMenu.style.display="none"}),n.contextMenu.addEventListener("mouseleave",function(){n.startContextMenuTimer()}))},cleancontextmenu:function(e){e.contextMenu.remove()},enableContextMenu:function(){this.isContextMenuEnabled=!0},disableContextMenu:function(){this.isContextMenuEnabled=!1},startContextMenuTimer:function(){var e=this;e.killContextMenuTimer(),e.contextMenuTimer=setTimeout(function(){e.hideContextMenu(),e.killContextMenuTimer()},750)},killContextMenuTimer:function(){var e=this.contextMenuTimer;null!=e&&(clearTimeout(e),e=null)},hideContextMenu:function(){this.contextMenu.style.display="none"},renderContextMenu:function(e){for(var u=this,n="",t=u.options.contextMenuItems,o=0,i=t.length;o<i;o++){var r=t[o];if(r.isSeparator)n+='<div class="'+u.options.classPrefix+'contextmenu-separator"></div>';else{var c=r.render(u);null!=c&&(n+='<div class="'+u.options.classPrefix+'contextmenu-item" data-itemindex="'+o+'" id="element-'+1e6*Math.random()+'">'+c+"</div>")}}u.contextMenu.innerHTML=n;var s=u.contextMenu.offsetWidth,l=u.contextMenu.offsetHeight,a=e.pageX,d=e.pageY,f=document.documentElement,m=(window.pageXOffset||f.scrollLeft)-(f.clientLeft||0),x=(window.pageYOffset||f.scrollTop)-(f.clientTop||0),M=a+s>window.innerWidth+m?a-s:a,p=d+l>window.innerHeight+x?d-l:d;u.contextMenu.style.display="",u.contextMenu.style.left=M+"px",u.contextMenu.style.top=p+"px";for(var v=u.contextMenu.querySelectorAll("."+u.options.classPrefix+"contextmenu-item"),h=function(e,n){var t=v[e],o=parseInt(t.getAttribute("data-itemindex"),10),i=u.options.contextMenuItems[o];void 0!==i.show&&i.show(t,u),t.addEventListener("click",function(){void 0!==i.click&&i.click(u),u.contextMenu.style.display="none"})},y=0,j=v.length;y<j;y++)h(y);setTimeout(function(){u.killControlsTimer()},100)}})},{}]},{},[1]);/*!
* 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(a,u,s){function p(t,r){if(!u[t]){if(!a[t]){var e="function"==typeof require&&require;if(!r&&e)return e(t,!0);if(m)return m(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=u[t]={exports:{}};a[t][0].call(o.exports,function(r){return p(a[t][1][r]||r)},o,o.exports,i,a,u,s)}return u[t].exports}for(var m="function"==typeof require&&require,r=0;r<s.length;r++)p(s[r]);return p}({1:[function(r,t,e){"use strict";mejs.i18n.en["mejs.time-jump-forward"]=["Jump forward 1 second","Jump forward %1 seconds"],Object.assign(mejs.MepDefaults,{jumpForwardInterval:30,jumpForwardText:null}),Object.assign(MediaElementPlayer.prototype,{buildjumpforward:function(r,t,e,n){var o=this,i=mejs.i18n.t("mejs.time-jump-forward",o.options.jumpForwardInterval),a=mejs.Utils.isString(o.options.jumpForwardText)?o.options.jumpForwardText.replace("%1",o.options.jumpForwardInterval):i,u=document.createElement("div");u.className=o.options.classPrefix+"button "+o.options.classPrefix+"jump-forward-button",u.innerHTML='<button type="button" aria-controls="'+o.id+'" title="'+a+'" aria-label="'+a+'" tabindex="0">'+o.options.jumpForwardInterval+"</button>",o.addControlElement(u,"jumpforward"),u.addEventListener("click",function(){var r=isNaN(n.duration)?o.options.jumpForwardInterval:n.duration;if(r){var t=n.currentTime===1/0?0:n.currentTime;n.setCurrentTime(Math.min(t+o.options.jumpForwardInterval,r)),this.querySelector("button").blur()}})}})},{}]},{},[1]);/*!
* 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 s(o,a,c){function p(e,t){if(!a[e]){if(!o[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(u)return u(e,!0);var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}var r=a[e]={exports:{}};o[e][0].call(r.exports,function(t){return p(o[e][1][t]||t)},r,r.exports,s,o,a,c)}return a[e].exports}for(var u="function"==typeof require&&require,t=0;t<c.length;t++)p(c[t]);return p}({1:[function(t,e,i){"use strict";mejs.i18n.en["mejs.time-skip-back"]=["Skip back 1 second","Skip back %1 seconds"],Object.assign(mejs.MepDefaults,{skipBackInterval:30,skipBackText:null}),Object.assign(MediaElementPlayer.prototype,{buildskipback:function(t,e,i,n){var r=this,s=mejs.i18n.t("mejs.time-skip-back",r.options.skipBackInterval),o=mejs.Utils.isString(r.options.skipBackText)?r.options.skipBackText.replace("%1",r.options.skipBackInterval):s,a=document.createElement("div");a.className=r.options.classPrefix+"button "+r.options.classPrefix+"skip-back-button",a.innerHTML='<button type="button" aria-controls="'+r.id+'" title="'+o+'" aria-label="'+o+'" tabindex="0">'+r.options.skipBackInterval+"</button>",r.addControlElement(a,"skipback"),a.addEventListener("click",function(){if(isNaN(n.duration)?r.options.skipBackInterval:n.duration){var t=n.currentTime===1/0?0:n.currentTime;n.setCurrentTime(Math.max(t-r.options.skipBackInterval,0)),this.querySelector("button").blur()}})}})},{}]},{},[1]);
@@ -5,23 +5,31 @@ if(!isset($MEDIAPLAYER_INCLUDED)):
?> ?>
@push('scripts') @push('scripts')
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.7/mediaelement-and-player.min.js"></script> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.7/mediaelement-and-player.min.js"></script>
<script type="text/javascript" src="/js/mediaplayer_plugins.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
var pluginPath = 'https://cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.7/'; var pluginPath = 'https://cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.7/';
$("audio").mediaelementplayer({ $("audio").mediaelementplayer({
pluginPath: pluginPath, pluginPath: pluginPath,
stretching: 'responsive', stretching: 'responsive',
features: ['playpause','skipback','jumpforward','current','progress','duration','volume','airplay','chromecast'],
skipBackInterval: 15,
jumpForwardInterval: 15,
}); });
$("video").mediaelementplayer({ $("video").mediaelementplayer({
pluginPath: pluginPath, pluginPath: pluginPath,
videoWidth: '100%', videoWidth: '100%',
videoHeight: '100%', videoHeight: '100%',
enableAutosize: true, enableAutosize: true,
features: ['playpause','skipback','jumpforward','current','progress','duration','volume','airplay','chromecast'],
skipBackInterval: 15,
jumpForwardInterval: 15,
}); });
</script> </script>
@endpush @endpush
@push('styles') @push('styles')
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.7/mediaelementplayer.css" /> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/mediaelement/4.2.7/mediaelementplayer.css" />
<link rel="stylesheet" href="/css/mediaplayer_plugins.min.css" />
@endpush @endpush
<?php endif; ?> <?php endif; ?>