2024-03-15 16:53:30 +08:00
import {
_ _commonJS
2024-08-02 18:19:39 +08:00
} from "./chunk-A5ICIBVI.js" ;
2024-03-15 16:53:30 +08:00
// node_modules/mui-player/dist/mui-player.min.js
var require _mui _player _min = _ _commonJS ( {
"node_modules/mui-player/dist/mui-player.min.js" ( exports , module ) {
"use strict" ;
function _toConsumableArray ( e ) {
return _arrayWithoutHoles ( e ) || _iterableToArray ( e ) || _unsupportedIterableToArray ( e ) || _nonIterableSpread ( ) ;
}
function _nonIterableSpread ( ) {
throw new TypeError ( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
}
function _iterableToArray ( e ) {
if ( typeof Symbol != "undefined" && e [ Symbol . iterator ] != null || e [ "@@iterator" ] != null )
return Array . from ( e ) ;
}
function _arrayWithoutHoles ( e ) {
if ( Array . isArray ( e ) )
return _arrayLikeToArray ( e ) ;
}
function _createForOfIteratorHelper ( e , t ) {
var o = typeof Symbol != "undefined" && e [ Symbol . iterator ] || e [ "@@iterator" ] ;
if ( ! o ) {
if ( Array . isArray ( e ) || ( o = _unsupportedIterableToArray ( e ) ) || t && e && typeof e . length == "number" ) {
o && ( e = o ) ;
var r = 0 , t = function ( ) {
} ;
return { s : t , n : function ( ) {
return r >= e . length ? { done : true } : { done : false , value : e [ r ++ ] } ;
} , e : function ( e2 ) {
throw e2 ;
} , f : t } ;
}
throw new TypeError ( "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
}
var n , i2 = true , l = false ;
return { s : function ( ) {
o = o . call ( e ) ;
} , n : function ( ) {
var e2 = o . next ( ) ;
return i2 = e2 . done , e2 ;
} , e : function ( e2 ) {
l = true , n = e2 ;
} , f : function ( ) {
try {
i2 || o . return == null || o . return ( ) ;
} finally {
if ( l )
throw n ;
}
} } ;
}
function _unsupportedIterableToArray ( e , t ) {
if ( e ) {
if ( typeof e == "string" )
return _arrayLikeToArray ( e , t ) ;
var o = Object . prototype . toString . call ( e ) . slice ( 8 , - 1 ) ;
return ( o = o === "Object" && e . constructor ? e . constructor . name : o ) === "Map" || o === "Set" ? Array . from ( e ) : o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( o ) ? _arrayLikeToArray ( e , t ) : void 0 ;
}
}
function _arrayLikeToArray ( e , t ) {
( t == null || t > e . length ) && ( t = e . length ) ;
for ( var o = 0 , r = new Array ( t ) ; o < t ; o ++ )
r [ o ] = e [ o ] ;
return r ;
}
function _typeof ( e ) {
return ( _typeof = typeof Symbol == "function" && typeof Symbol . iterator == "symbol" ? function ( e2 ) {
return typeof e2 ;
} : function ( e2 ) {
return e2 && typeof Symbol == "function" && e2 . constructor === Symbol && e2 !== Symbol . prototype ? "symbol" : typeof e2 ;
} ) ( e ) ;
}
! function ( e , t ) {
( typeof exports == "undefined" ? "undefined" : _typeof ( exports ) ) == "object" && ( typeof module == "undefined" ? "undefined" : _typeof ( module ) ) == "object" ? module . exports = t ( ) : typeof define == "function" && _typeof ( define . amd ) ? define ( t ) : e . MuiPlayer = t ( ) ;
} ( window , function ( ) {
var MuiPlayer = function MuiPlayer ( config ) {
var _this = this ;
_this . _global _ = { } ;
var webpagePlugin = "" , mobilePlugin = "" , hls = null , flv = null , option = config || { } , plugins = option . plugins || [ ] ;
this . _event _ = { } ;
var con = typeof option . container == "string" ? document . querySelector ( option . container ) : option . container , $CONSTANT , $habit , $node , $global , element , $el , variable , $data , $method ;
con && ( $CONSTANT = { unitLengthReg : /^(auto|inherit|initial|\d+(\.\d+)?(\%|px|cm|mm|em|rem|vw|vh|)?)$/i , encodeKey : "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" } , $habit = { themeColor : "#1e98d4" } , $node = { video : '<!-- HTML5 Video --><div class="video-wrapper"><video width="100%" height="100%"></video></div>' , mplayerPoster : '<div class="mplayer-poster" id="mplayer-poster"></div>' , mplayerCover : '<!-- \u5A92\u4F53\u64AD\u653E\u906E\u7F69\u5C42 --><div class="mplayer-cover" id="mplayer-cover"></div>' , mplayerLoading : '<!-- Mplayer\u52A0\u8F7DLoading --><div class="mplayer-loading"id="mplayer-loading"control><svg viewBox="25 25 50 50"class="mplayer-loading__circular"><circle cx="50"cy="50"r="20"fill="none"></circle></svg></div>' , mplayerError : '<!-- \u89C6\u9891\u52A0\u8F7D\u9519\u8BEF\u663E\u793A --><div class="mplayer-error"id="mplayer-error"control><div class="errop-tip">\u89C6\u9891\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u5237\u65B0</div><svg t="1575125481608"class="icon"viewBox="0 0 1024 1024"version="1.1"xmlns="http://www.w3.org/2000/svg"p-id="5893"width="28"height="28"><path d="M513.34 831.74C337.03 831.74 193.6 688.31 193.6 512c0-71.09 23.31-138.85 65.53-194.03v51.61c0 17.67 14.33 32 32 32s32-14.33 32-32V239.45c0-5.87-1.59-11.36-4.34-16.09-0.06-0.1-0.11-0.2-0.17-0.3-0.16-0.28-0.34-0.55-0.51-0.82-0.13-0.2-0.26-0.41-0.39-0.61-0.08-0.13-0.17-0.25-0.26-0.37a35.5 35.5 0 0 0-1.58-2.13c-6.81-8.35-16.96-12.35-26.95-11.69h-130c-17.67 0-32 14.33-32 32s14.33 32 32 32h55.35C159.8 339 129.6 423.35 129.6 512c0 51.79 10.15 102.05 30.17 149.38 19.33 45.7 46.99 86.74 82.23 121.97 35.23 35.23 76.27 62.9 121.97 82.23 47.33 20.02 97.59 30.17 149.38 30.17 17.67 0 32-14.33 32-32s-14.34-32.01-32.01-32.01zM855.38 762.3h-51.23c19.81-23 36.93-48.3 50.75-75.22 27.6-53.74 42.18-114.28 42.18-175.08 0-51.79-10.15-102.05-30.17-149.38-19.33-45.7-46.99-86.73-82.23-121.97-35.23-35.23-76.27-62.9-121.97-82.23-47.33-20.02-97.59-30.17-149.38-30.17-17.67 0-32 14.33-32 32s14.33 32 32 32c176.31 0 319.74 143.44 319.74 319.74 0 78.31-27.68 151.61-77.6 209.05l0.24-56.04c0.08-17.67-14.19-32.06-31.86-32.14h-0.14c-17.61 0-31.92 14.24-32 31.86l-0.55 129.43a31.988 31.988 0 0 0 9.32 22.71 31.68 31.68 0 0 0 5.33 4.3c0.02 0.01 0.04 0.02 0.06 0.04 0.48 0.31 0.97 0.61 1.47 0.89l0.15 0.09c0.5 0.28 1 0.54 1.51 0.8 0.03 0.01 0.05 0.03 0.08 0.04 1.64 0.8 3.34 1.46 5.1 1.98 0.01 0 0.02 0.01 0.03 0.01 0.55 0.16 1.1 0.3 1.66 0.43 0.07 0.02 0.15 0.03 0.22 0.05 0.5 0.11 1 0.21 1.5 0.3 0.1 0.02 0.2 0.04 0.3 0.05 0.48 0.08 0.96 0.15 1.44 0.21 0.11 0.01 0.23 0.03 0.34 0.04 0.48 0.05 0.95 0.09 1.43 0.12l0.34 0.03c0.53 0.03 1.07 0.04 1.61 0.05h132.31c17.67 0 32-14.33 32-32s-14.31-31.99-31.98-31.99z"p-id="5894"fill="#ffffff"></path></svg></div>' , mplayerHeader : '<!-- Mplayer \u9876\u90E8\u5BFC\u822A --><div class="mplayer-header"id="mplayer-header"><div class="title-groupt"id="title-groupt"><button class="player-btn header-control back-button keyboard-input"id="back-button"control><svg id="back-icon-svg"t="1573891955387"viewBox="0 0 1024 1024"version="1.1"xmlns="http://www.w3.org/2000/svg"p-id="4550"width="18"height="18"><path d="M305.519192 557.640404c-11.636364 0-23.40202-4.39596-32.323232-13.317172-17.842424-17.842424-17.842424-46.674747 0-64.517171L683.830303 69.30101c17.842424-17.842424 46.674747-17.842424 64.517172 0 17.842424 17.842424 17.842424 46.674747 0 64.517172L337.713131 544.323232c-8.921212 8.921212-20.557576 13.317172-32.193939 13.317172z m0 0"fill="#ffffff"p-id="4551"></path><path d="M715.894949 968.145455c-11.636364 0-23.40202-4.39596-32.323232-13.317172L273.19596 544.323232c-17.842424-17.842424-17.842424-46.674747 0-64.517171 17.842424-17.842424 46.674747-17.842424 64.517171 0l410.505051 410.50505c17.842424 17.842424 17.842424 46.674747 0 64.517172-8.921212 8.921212-20.557576 13.317172-32.323233 13.317172z m0 0"fill="#ffffff"p-id="4552"></path></svg><div class="title-name"id="title-name"></div></button></div><div class="buttom-group"id="buttom-group"></div></div>' , mplayerFooter : ' <!-- Mplayer \u5E95\u90E8\u64CD\u4F5C\u63A7\u4EF6 -- > < div class = " mplayer -
return { first _authplay : false , isReady : false , webpagePlugin : { } , mobilePlugin : { } , cssAutoprefixer : [ "webkit" , "ms" , "moz" , "o" ] } ;
} , element = function ( ) {
return { mPlayer : con , videoObject : con . querySelector ( "video" ) , mplayerCover : con . querySelector ( "#mplayer-cover" ) , mplayerPoster : con . querySelector ( "#mplayer-poster" ) , mplayerHeader : con . querySelector ( "#mplayer-header" ) , headerMenu : con . querySelector ( "#buttom-group" ) , backButton : con . querySelector ( "#back-button" ) , mplayerFooter : con . querySelector ( "#mplayer-footer" ) , progressContainer : con . querySelector ( "#progress-container" ) , playSwitch : con . querySelector ( "#play-switch" ) , fullSwitch : con . querySelector ( "#full-switch" ) , progressBall : con . querySelector ( "#progress-ball" ) , progressBegin : con . querySelector ( "#progress-begin" ) , progressLong : con . querySelector ( "#progress-long" ) , touchEffective : con . querySelector ( "#touch-effective" ) , progressBuffered : con . querySelector ( "#progress-buffered" ) , progressPlay : con . querySelector ( "#progress-play" ) , miniProgress : con . querySelector ( "#mini-progress" ) , miniBuffered : con . querySelector ( "#mini-buffered" ) , miniPlay : con . querySelector ( "#mini-play" ) , mplayerLoading : con . querySelector ( "#mplayer-loading" ) , mplayerError : con . querySelector ( "#mplayer-error" ) } ;
} , $el = new element ( ) , variable = function ( ) {
return { mediaPlayDirectives : 0 , isFullScreen : false , showScreenControls : false , ball _move _status : false , isPlay : false , mediaStatus : false , duration : 0 , percentage : 0 , currentTime : 0 , playError : 0 , isDestroy : false , isShowRightSidebar : false , startX : null , startY : null , moveX : null , moveY : null , _defaultPlayProgressPro : null , isTouchMove : false , isControlsTimer : true } ;
} , $data = new variable ( ) , $method = { getLanguageText : function ( ) {
return { "zh-cn" : { srcNull : "\u89C6\u9891\u5730\u5740\u4E3A\u7A7A" , begin : "\u5F00\u59CB" , end : "\u7ED3\u675F" , live : "\u76F4\u64AD" , settings : "\u8BBE\u7F6E" , coveredPlay : "\u94FA\u6EE1\u64AD\u653E" , loopPlay : "\u5FAA\u73AF\u64AD\u653E" , playbackSpeed : "\u64AD\u653E\u901F\u5EA6" , share : "\u5206\u4EAB" , pictureInPicture : "\u753B\u4E2D\u753B" , exitPictureInPicture : "\u9000\u51FA\u753B\u4E2D\u753B" , pageScreen : "\u7F51\u9875\u5168\u5C4F" , exitPageScreen : "\u9000\u51FA\u7F51\u9875\u5168\u5C4F" , fullScreen : "\u5168\u5C4F" , exitFullScreen : "\u9000\u51FA\u5168\u5C4F" , normal : "\u6B63\u5E38" , open : "\u6253\u5F00" , subtitles : "\u5B57\u5E55" , selectLangage : "\u9009\u62E9\u8BED\u8A00" , dsps : "\u5207\u6362\u5230\u9ED8\u8BA4\u500D\u901F\u5EA6\u64AD\u653E" , tsps : "\u5207\u6362\u5230?\u500D\u901F\u5EA6\u64AD\u653E" , errorTip : "\u89C6\u9891\u52A0\u8F7D\u5931\u8D25\uFF0C\u70B9\u51FB\u5237\u65B0" , shortcuts : "\u5FEB\u6377\u952E" , shortcutsPanel : { title : "\u5FEB\u6377\u529F\u80FD" , space : "\u7A7A\u683C" , spaceAction : "\u64AD\u653E/\u6682\u505C" , esc : "\u9000\u51FA\u5168\u5C4F" , up : "\u97F3\u91CF\u589E\u52A05%" , down : "\u97F3\u91CF\u51CF\u5C115%" , right : "\u5FEB\u8FDB5\u79D2" , left : "\u5FEB\u90005\u79D2" } , advertise : "\u5E7F\u544A" } , en : { srcNull : "Video address is empty" , begin : "Begin" , end : "End" , live : "Live" , settings : "Settings" , coveredPlay : "Covered play" , loopPlay : "Loop play" , playbackSpeed : "Playback speed" , share : "Share" , pictureInPicture : "Picture in picture" , exitPictureInPicture : "Exit picture in picture" , pageScreen : "Page screen" , exitPageScreen : "Exit page screen" , fullScreen : "Full screen" , exitFullScreen : "Exit full screen" , normal : "Normal" , open : "Open" , subtitles : "Subtitles" , selectLangage : "Select langage" , dsps : "to default speed playback" , tsps : "to ?x speed playback" , errorTip : "Video failed to load, click refresh" , shortcuts : "Shortcuts" , shortcutsPanel : { title : "Shortcuts function" , space : "Space" , spaceAction : "play/pause" , esc : "exit full screen" , up : "voice increase 5%" , down : "voice reduce 5%" , right : "fast forward 5 seconds" , left : "fast backward 5 seconds" } , advertise : "Advertise" } , "zh-tw" : { srcNull : "\u8996\u983B\u5730\u5740\u70BA\u7A7A" , begin : "\u958B\u59CB" , end : "\u7D50\u675F" , live : "\u76F4\u64AD" , settings : "\u8A2D\u7F6E" , coveredPlay : "\u92EA\u6EFF\u64AD\u653E" , loopPlay : "\u5FAA\u74B0\u64AD\u653E" , playbackSpeed : "\u64AD\u653E\u901F\u5EA6" , share : "\u5206\u4EAB" , pictureInPicture : "\u756B\u4E2D\u756B" , exitPictureInPicture : "\u9000\u51FA\u756B\u4E2D\u756B" , pageScreen : "\u7DB2\u9801\u5168\u5C4F" , exitPageScreen : "\u9000\u51FA\u7DB2\u9801\u5168\u5C4F" , fullScreen : "\u5168\u5C4F" , exitFullScreen : "\u9000\u51FA\u5168\u5C4F" , normal : "\u6B63\u5E38" , open : "\u6253\u958B" , subtitles : "\u5B57\u5E55" , selectLangage : "\u9078\u64C7\u8A9E\u8A00" , dsps : "\u5207\u63DB\u5230\u9ED8\u8A8D\u500D\u901F\u5EA6\u64AD\u653E" , tsps : "\u5207\u63DB\u5230?\u500D\u901F\u5EA6\u64AD\u653E" , errorTip : "\u8996\u983B\u52A0\u8F09\u5931\u6557\uFF0C\u9EDE\u64CA\u5237\u65B0" , shortcuts : "\u5FEB\u6377\u9375" , shortcutsPanel : { title : "\u5FEB\u6377\u529F\u80FD" , space : "\u7A7A\u683C" , spaceAction : "\u64AD\u653E/\u66AB\u505C" , esc : "\u9000\u51FA\u5168\u5C4F" , up : "\u97F3\u91CF\u589E\u52A05%" , down : "\u97F3\u91CF\u51CF\u5C115%" , right : "\u5FEB\u90325\u79D2" , left : "\u5FEB\u90005\u79D2" } , advertise : "\u5EE3\u544A" } } ;
} , getLangObject : function ( ) {
var e = option . lang || navigator . language || navigator . browserLanguage || "zh-cn" ;
return [ "zh-cn" , "en" , "zh-tw" ] . indexOf ( e . toLowerCase ( ) ) != - 1 ? $method . getLanguageText ( ) [ e . toLowerCase ( ) ] : $method . getLanguageText ( ) [ "zh-cn" ] ;
} , initCreateMplayer : function ( e ) {
for ( var t = $node . video + $node . mplayerPoster + $node . mplayerCover + $node . mplayerLoading + $node . mplayerError + $node . mplayerHeader + $node . mplayerFooter + $node . miniProgress , t = $node . logWrite ? t + $node . logWrite : t , o = 0 ; o < plugins . length ; o ++ )
if ( plugins [ o ] instanceof Object ) {
if ( plugins [ o ] . name == "MuiPlayerDesktopPlugin" && $method . returnSys ( ) == "window" ) {
webpagePlugin = plugins [ o ] ;
break ;
}
if ( plugins [ o ] . name == "MuiPlayerMobilePlugin" && ( $method . returnSys ( ) == "androd" || $method . returnSys ( ) == "ios" || plugins [ o ] . webpage === true ) ) {
mobilePlugin = plugins [ o ] ;
break ;
}
}
t = t . toString ( ) . replace ( /<!--.*?-->/g , "" ) ;
t = $method . createRangeIsDocFragment ( t ) , t = $method . initConifgAttribute ( t , e ) ;
t = $method . initConfigControl ( t ) , t = $method . initConfigCustom ( t ) , t = $method . initConfigTheme ( t ) ;
e = { option , _this , $el : element , $data , $method , $habit , $CONSTANT } ;
mobilePlugin && ( t = mobilePlugin . appendTemplate ( t , e ) ) , webpagePlugin && ( t = webpagePlugin . appendTemplate ( t , e ) ) ;
e = con . querySelector ( "#mplayer-media-wrapper" ) ;
e && $method . removeNode ( con , "#mplayer-media-wrapper" ) , ( e = document . createElement ( "div" ) ) . setAttribute ( "id" , "mplayer-media-wrapper" ) , e . setAttribute ( "class" , "player-wrapper" ) , e . appendChild ( t ) , $el . mPlayer . appendChild ( e ) , option . src ? ( $method . playerReady ( ) , setTimeout ( function ( ) {
_this . _global _ . isReady = true , _this . emit ( "ready" ) , setTimeout ( function ( ) {
$method . onScreenResize ( { type : "showControls" } ) , $method . removeOriginControls ( ) ;
} , 10 ) ;
} , 100 ) ) : $method . showToast ( $method . getLangObject ( ) . srcNull ) ;
} , onAction : function ( ) {
} , removeOriginControls : function ( ) {
$el . videoObject . removeAttribute ( "controls" ) ;
} , playerReady : function ( ) {
$method . resetVariable ( ) , option . autoplay === true && ( $data . mediaPlayDirectives = 1 , $method . onPlay ( ) ) , $method . toggleEventListenerGlobal ( "add" , "playerReady" ) , $method . toggleEventListenerCustom ( "add" ) , $method . nodesObserver ( ) ;
} , overloadingEl : function ( ) {
$el = new element ( ) ;
for ( var e = 0 , t = Object . keys ( $el ) ; e < t . length ; e ++ ) {
var o = t [ e ] ;
o != "mPlayer" && ( $el [ o ] || ( $el [ o ] = { style : { } , classList : { add : function ( ) {
} , contains : function ( ) {
} , remove : function ( ) {
} } , addEventListener : function ( ) {
} , removeEventListener : function ( ) {
} } ) , $el [ o ] . querySelector = function ( e2 ) {
e2 = this . querySelectorAll ? this . querySelectorAll ( e2 ) : [ ] ;
return e2 [ 0 ] || { exist : false , style : { } , height : "" , width : "" } ;
} ) ;
}
} , resetVariable : function ( ) {
for ( var e = new variable ( ) , t = 0 ; t < Object . keys ( e ) . length ; t ++ ) {
var o = Object . keys ( e ) [ t ] ;
$data [ o ] = e [ o ] ;
}
$method . overloadingEl ( ) , _this . _global _ = new $global ( ) ;
} , plusRuntimeHandle : function ( e ) {
( e = e || { } ) . type == "resume" && ( _this . _global _ . _beferPlayState && $el . videoObject . play ( ) , $data . isFullScreen && plus . navigator . hideSystemNavigation ( ) ) , e . type == "pause" && ( _this . _global _ . _beferPlayState = $data . isPlay , $el . videoObject . pause ( ) ) ;
} , runtimeCompatibleHandle : function ( e ) {
( e = e || { } ) . type == "webkitbeginfullscreen" && $method . createTimerCloseControl ( { type : "cancel" } ) , e . type == "webkitendfullscreen" && $method . createTimerCloseControl ( ) ;
} , assginConfig : function ( ) {
option . themeColor && ( $habit . themeColor = option . themeColor ) ;
} , parseCamel : function ( e ) {
return e . replace ( /\B([A-Z])/g , "-$1" ) . toLowerCase ( ) ;
} , randomText : function ( ) {
for ( var e = 0 < arguments . length && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : 5 , t = "" , o = 0 ; o < e ; o ++ )
t += String . fromCharCode ( Math . floor ( 26 * Math . random ( ) ) + "a" . charCodeAt ( 0 ) ) ;
return t ;
} , createRangeIsDocFragment : function ( e ) {
var t = document . createRange ( ) ;
return t . selectNode ( $el . mPlayer ) , t . createContextualFragment ( e ) ;
} , consoleLog : function ( e , t ) {
console [ t || "log" ] ( e ) ;
} , removeNode : function ( e , t ) {
e instanceof Element || e instanceof DocumentFragment ? ( e = e . querySelector ( t ) ) instanceof Element ? e . parentNode . removeChild ( e ) : console . warn ( "the body element not query the selector node......" ) : ( t = document . querySelector ( t ) ) ? t . parentNode . removeChild ( t ) : console . warn ( "from document not query the selector node......" ) ;
} , getKeyCode : function ( e ) {
return e . keyCode || e . which || "" ;
} , focusToggle : function ( e ) {
$el . mPlayer . classList [ e == "ON" ? "add" : "remove" ] ( "mp-keyboard-focus" ) ;
} , setElementStyle : function ( e , t ) {
var o = Object . keys ( t ) ;
if ( 0 < o . length ) {
var r , n = _createForOfIteratorHelper ( o ) ;
try {
for ( n . s ( ) ; ! ( r = n . n ( ) ) . done ; ) {
var i2 = r . value ;
e . style [ $method . parseCamel ( i2 ) ] = t [ i2 ] ;
}
} catch ( e2 ) {
n . e ( e2 ) ;
} finally {
n . f ( ) ;
}
e . setAttribute ( "stylesheet" , JSON . stringify ( t ) ) ;
}
} , initConfigTheme : function ( e ) {
return $method . assginConfig ( ) , e . querySelector ( "#progress-play" ) && ( e . querySelector ( "#progress-play" ) . style . background = $habit . themeColor ) , e . querySelector ( "#mplayer-loading" ) && ( e . querySelector ( "#mplayer-loading" ) . style . color = $habit . themeColor ) , e . querySelector ( "#mini-play" ) && ( e . querySelector ( "#mini-play" ) . style . background = $habit . themeColor ) , e . querySelector ( "#live-mode" ) && ( e . querySelector ( "#live-mode .spot" ) . style . background = $habit . themeColor ) , e ;
} , initConfigCustom : function ( e ) {
for ( var t = option . custom || { } , o = t . headControls || [ ] , r = 0 ; r < o . length && ! ( 5 <= r ) ; r ++ )
o [ r ] instanceof Object && o [ r ] . slot && ( i2 = o [ r ] . slot , ( l = $el . mPlayer . querySelector ( "[slot=" + i2 + "]" ) ) && ( a = l . tagName == "TEMPLATE" ? l . content . cloneNode ( true ) : $method . createRangeIsDocFragment ( l . innerHTML ) , ( s2 = document . createElement ( "button" ) ) . setAttribute ( "class" , "player-btn header-control" ) , s2 . setAttribute ( "slot" , i2 ) , s2 . setAttribute ( "control" , "" ) , o [ r ] . click instanceof Function && s2 . classList . add ( "keyboard-input" ) , o [ r ] . style && o [ r ] . style instanceof Object && $method . setElementStyle ( s2 , o [ r ] . style ) , s2 . appendChild ( a ) , e . querySelector ( "#buttom-group" ) . insertBefore ( s2 , e . querySelector ( "#buttom-group .header-control" ) ) , l . style . display = "none" ) ) ;
for ( var n = t . footerControls || [ ] , r = 0 ; r < n . length && ! ( 5 <= r ) ; r ++ )
n [ r ] instanceof Object && n [ r ] . slot && ( i2 = n [ r ] . slot , ( l = $el . mPlayer . querySelector ( "[slot=" + i2 + "]" ) ) && ( a = l . tagName == "TEMPLATE" ? l . content . cloneNode ( true ) : $method . createRangeIsDocFragment ( l . innerHTML ) , ( s2 = document . createElement ( "button" ) ) . setAttribute ( "class" , "player-btn footer-control" ) , s2 . setAttribute ( "slot" , i2 ) , s2 . setAttribute ( "control" , "" ) , n [ r ] . tooltip && s2 . setAttribute ( "tooltip" , n [ r ] . tooltip ) , n [ r ] . click instanceof Function && s2 . classList . add ( "keyboard-input" ) , n [ r ] . style && n [ r ] . style instanceof Object && $method . setElementStyle ( s2 , n [ r ] . style ) , s2 . appendChild ( a ) , n [ r ] . position == "left" ? e . querySelector ( "#mplayer-footer #left-part" ) . appendChild ( s2 ) : e . querySelector ( "#mplayer-footer #right-part" ) . insertBefore ( s2 , e . querySelector ( "#mplayer-footer #right-part" ) . childNodes [ 0 ] ) , l . style . display = "none" ) ) ;
for ( var i2 , l , a , s2 , c , d2 = t . rightSidebar || [ ] , r = 0 ; r < d2 . length && ! ( 5 <= r ) ; r ++ )
d2 [ r ] instanceof Object && d2 [ r ] . slot && ( i2 = d2 [ r ] . slot , ( l = $el . mPlayer . querySelector ( "[slot=" + i2 + "]" ) ) && ( a = l . tagName == "TEMPLATE" ? l . content . cloneNode ( true ) : $method . createRangeIsDocFragment ( l . innerHTML ) , ( s2 = document . createElement ( "div" ) ) . appendChild ( a ) , s2 . setAttribute ( "slot" , i2 ) , s2 . setAttribute ( "class" , "mplayer-sidebar" ) , c = d2 [ r ] . width || "" , $CONSTANT . unitLengthReg . test ( c ) && ( s2 . style . width = isNaN ( Number ( c ) ) ? c : c + "px" ) , e . appendChild ( s2 ) , l . style . display = "none" ) ) ;
return e ;
} , initConfigControl : function ( e ) {
option . showMiniProgress !== false && option . live !== true || $method . removeNode ( e , "#mini-progress" ) , option . live === true ? ( e . querySelector ( "#live-mode .mode-text" ) . innerText = $method . getLangObject ( ) . live , $method . removeNode ( e , "#progress-container" ) ) : $method . removeNode ( e , "#live-mode" ) , option . pageHead === false && ( e . querySelector ( "#mplayer-header" ) . style . opacity = 0 ) ;
var t = option . subtitle || { } , o = t . tracks , r = t . styles ;
if ( Object . prototype . toString . call ( o ) === "[object Array]" && 0 < o . length ) {
for ( var n = document . createDocumentFragment ( ) , i2 = 0 ; i2 < o . length ; i2 ++ ) {
var l , a = o [ i2 ] ;
_typeof ( a ) == "object" && /.\.vtt$/ . test ( a . src ) && ( ( l = document . createElement ( "track" ) ) . setAttribute ( "src" , a . src ) , l . setAttribute ( "kind" , a . kind || "subtitles" ) , l . setAttribute ( "label" , a . label || "\u5B57\u5E55" + ( i2 + 1 ) ) , a . srclang && l . setAttribute ( "srclang" , a . srclang ) , a . default === true && l . setAttribute ( "default" , true ) , n . appendChild ( l ) ) ;
}
e . querySelector ( "video" ) . appendChild ( n ) ;
}
if ( Object . prototype . toString . call ( r ) == "[object Object]" && 0 < Object . keys ( r ) . length ) {
var s2 = document . createElement ( "style" ) ;
s2 . setAttribute ( "id" , "pseudo-classes-cue" ) , s2 . setAttribute ( "type" , "text/css" ) ;
for ( var c = "" , d2 = 0 , u = Object . keys ( r ) ; d2 < u . length ; d2 ++ ) {
var p = u [ d2 ] ;
c += $method . parseCamel ( p ) + ":" + r [ p ] + "!important;" ;
}
t = document . createTextNode ( ".m-player video::cue {" + c + "}" ) ;
s2 . appendChild ( t ) , document . getElementsByTagName ( "head" ) . item ( 0 ) . appendChild ( s2 ) ;
}
return e ;
} , initConifgAttribute : function ( a , e ) {
var t = $el . mPlayer . getBoundingClientRect ( ) , o = t . width , r = t . height ;
$el . mPlayer . classList . add ( "m-player" ) , $el . mPlayer . setAttribute ( "tabindex" , "0" ) ;
var n , t = option . width || "auto" ;
! $CONSTANT . unitLengthReg . test ( t ) && e !== true || $data . isFullScreen || ( n = isNaN ( Number ( t ) ) ? t : t + "px" , $el . mPlayer . style . width = e === true ? o + "px" : n , e === true && setTimeout ( function ( ) {
$el . mPlayer . style . width = n ;
} , 800 ) ) ;
var i2 , o = option . height || "225px" ;
! $CONSTANT . unitLengthReg . test ( o ) && e !== true || $data . isFullScreen || ( i2 = isNaN ( Number ( o ) ) ? o : o + "px" , $el . mPlayer . style . height = e === true ? r + "px" : i2 , e === true && option . autoFit === false && setTimeout ( function ( ) {
$el . mPlayer . style . height = i2 ;
} , 800 ) ) , 0 <= option . volume && option . volume <= 1 && ( a . querySelector ( "video" ) . volume = option . volume ) , option . muted === true && ( a . querySelector ( "video" ) . muted = true ) ;
function l ( e2 , t2 ) {
var o2 = a . querySelector ( "video" ) ;
if ( e2 == "src" ) {
var r2 = option . parse || { } , n2 = r2 . type , i3 = r2 . loader , l2 = r2 . config || { } ;
if ( r2 . customKernel && r2 . customKernel instanceof Function )
return console . info ( "custom kernel..." ) , r2 . customKernel ( o2 , t2 ) , 0 ;
if ( o2 . setAttribute ( e2 , t2 ) , n2 == "hls" ) {
if ( typeof i3 != "function" )
return ;
i3 . isSupported ( ) == 1 ? $method . hlsDecodeAction ( o2 , t2 , { loader : i3 , config : l2 } ) : console . error ( "browser does not support hls js. to check whether your browser is supporting MediaSource Extensions." ) ;
}
n2 == "flv" && _typeof ( i3 ) == "object" && ( i3 . isSupported ( ) == 1 ? $method . flvDecodeAction ( o2 , t2 , { loader : i3 , config : l2 } ) : console . error ( "browser does not support flv js. to check whether your browser is supporting MediaSource Extensions." ) ) ;
} else
o2 . setAttribute ( e2 , t2 ) ;
}
option . src && l ( "src" , option . src ) , option . autoplay === true && l ( "autoplay" , "autoplay" ) , option . autoplay == 1 || option . preload && l ( "preload" , option . preload ) , option . loop && l ( "loop" , "loop" ) ;
var s2 = option . videoAttribute || [ ] ;
if ( 0 < s2 . length )
for ( var c = 0 ; c < s2 . length ; c ++ )
l ( s2 [ c ] . attrKey , s2 [ c ] . attrValue ) ;
return option . poster ? ( ( e = document . createElement ( "img" ) ) . setAttribute ( "src" , option . poster ) , e . setAttribute ( "style" , "width: 100%;height: 100%;object-fit: cover;" ) , a . querySelector ( "#mplayer-poster" ) . appendChild ( e ) ) : $method . removeNode ( a , "#mplayer-poster" ) , option . title && ( a . querySelector ( "#title-name" ) . innerHTML = option . title ) , option . initFullFixed === true && $el . mPlayer . classList . add ( "page-fullscreen" ) , option . dragSpotShape == "square" && ( a . querySelector ( "#progress-ball .progress-ball" ) . style . borderRadius = "3px" , a . querySelector ( "#progress-ball .progress-ball" ) . style . width = "9px" , a . querySelector ( "#progress-ball .progress-ball" ) . style . height = "14px" ) , option . objectFit == "cover" && a . querySelector ( "video" ) . classList . add ( "covered" ) , a . querySelector ( "#mplayer-footer #full-switch" ) . setAttribute ( "tooltip" , $method . getLangObject ( ) . fullScreen ) , a . querySelector ( "#mplayer-error .errop-tip" ) . innerText = $method . getLangObject ( ) . errorTip , a . querySelector ( "#progress-begin" ) . innerText = $method . getLangObject ( ) . begin , a . querySelector ( "#progress-long" ) . innerText = $method . getLangObject ( ) . end , a ;
} , hlsDecodeAction : function ( e , t , o ) {
console . info ( "hls create..." ) ;
var r = Object . assign ( { autoStartLoad : option . autoplay === true || option . preload != "none" } , o . config ) ;
( hls = new o . loader ( r ) ) . attachMedia ( e ) , hls . on ( o . loader . Events . MEDIA _ATTACHED , function ( ) {
hls . loadSource ( t ) ;
} ) , hls . on ( o . loader . Events . ERROR , $method . onError ) ;
} , flvDecodeAction : function ( e , t , o ) {
console . info ( "flv create..." ) ;
t = Object . assign ( { type : "flv" , url : t } , o . config ) ;
( flv = o . loader . createPlayer ( t ) ) . attachMediaElement ( e ) , option . autoplay !== true && option . preload == "none" || flv . load ( ) , flv . on ( o . loader . Events . ERROR , $method . onError ) ;
} , hasNotchInScreen : function ( ) {
return ! ! window . plus && plus . navigator . hasNotchInScreen ( ) ;
} , applicationFullHandle : function ( e ) {
window . plus && ( this . _landscape _lock = function ( ) {
plus . navigator . setFullscreen ( true ) , plus . screen . lockOrientation ( "landscape" ) , setTimeout ( function ( ) {
plus . navigator . hideSystemNavigation ( ) ;
} , 200 ) , setTimeout ( function ( ) {
var e2 = plus . navigator . getStatusbarHeight ( ) , e2 = $method . hasNotchInScreen ( ) ? e2 + 10 : 10 ;
$el . mplayerHeader . style . paddingLeft = e2 + "px" , $el . mplayerHeader . style . paddingRight = e2 + "px" , $el . mplayerFooter . style . paddingLeft = e2 + "px" , $el . mplayerFooter . style . paddingRight = e2 + "px" , $el . progressContainer . style . left = e2 + "px" , $el . progressContainer . style . right = e2 + "px" ;
} , 100 ) ;
} , this . _portrait _lock = function ( ) {
plus . navigator . setFullscreen ( false ) , plus . screen . lockOrientation ( "portrait" ) , setTimeout ( function ( ) {
$el . mplayerHeader . style . paddingLeft = "10px" , $el . mplayerHeader . style . paddingRight = "10px" , $el . mplayerFooter . style . paddingLeft = "10px" , $el . mplayerFooter . style . paddingRight = "10px" ;
} , 100 ) ;
} ) ;
} , setTooltipText : function ( e , t ) {
e . setAttribute && e . setAttribute ( "tooltip" , t ) , $el . mplayerFooter . querySelector ( ".mp-tooltip" ) . innerText = t ;
} , fullToggle : function ( e ) {
( e = e || { type : "" } ) . stopPropagation && e . stopPropagation ( ) ;
_this . _global _ . generate _fullscreen _listener || ( _this . _global _ . generate _fullscreen _listener = true , $el . mPlayer . requestFullscreen ? document . addEventListener ( "fullscreenchange" , function ( ) {
document . fullscreenElement ? $method . fullScreenChangeAction ( "Y" ) : $method . fullScreenChangeAction ( "N" ) ;
} ) : $el . mPlayer . webkitRequestFullscreen ? document . addEventListener ( "webkitfullscreenchange" , function ( ) {
document . webkitFullscreenElement ? $method . fullScreenChangeAction ( "Y" ) : $method . fullScreenChangeAction ( "N" ) ;
} ) : $el . mPlayer . mozRequestFullScreen ? document . addEventListener ( "mozfullscreenchange" , function ( ) {
document . mozFullScreenElement ? $method . fullScreenChangeAction ( "Y" ) : $method . fullScreenChangeAction ( "N" ) ;
} ) : $el . mPlayer . msRequestFullscreen && document . addEventListener ( "msfullscreenchange" , function ( ) {
document . msFullscreenElement ? $method . fullScreenChangeAction ( "Y" ) : $method . fullScreenChangeAction ( "N" ) ;
} ) ) , $data . isFullScreen ? $method . closeFullScreen ( ) : $method . openFullScreen ( ) ;
} , fullScreenChangeAction : function ( e ) {
e == "Y" ? ( $data . isFullScreen = true , $el . fullSwitch . querySelector ( "._full" ) . style . display = "none" , $el . fullSwitch . querySelector ( "._unfull" ) . style . display = "block" , $method . setTooltipText ( $el . fullSwitch , $method . getLangObject ( ) . exitFullScreen ) ) : e == "N" && ( $data . isFullScreen = false , $el . fullSwitch . querySelector ( "._full" ) . style . display = "block" , $el . fullSwitch . querySelector ( "._unfull" ) . style . display = "none" , $method . setTooltipText ( $el . fullSwitch , $method . getLangObject ( ) . fullScreen ) , $el . mPlayer . classList . contains ( "browser-fullscreen" ) && $method . closeFullScreen ( "completed" ) ) , window . plus && ( $data . isPlay ? plus . device . setWakelock ( true ) : plus . device . setWakelock ( false ) ) ;
} , closeFullScreen : function ( e ) {
function t ( ) {
$data . isFullScreen = false , $method . createTimerCloseControl ( ) , $el . mPlayer . classList . remove ( "browser-fullscreen" ) , e != "completed" && ( document . exitFullscreen ? document . exitFullscreen ( ) : document . webkitExitFullscreen ? document . webkitExitFullscreen ( ) : document . mozCancelFullScreen ? document . mozCancelFullScreen ( ) : document . msExitFullscreen && document . msExitFullscreen ( ) ) ;
}
option . autoOrientaion != 0 && window . plus && $method . returnSys ( ) != "ios" ? ( new $method . applicationFullHandle ( ) . _portrait _lock ( ) , setTimeout ( function ( ) {
t ( ) , option . pageHead === false && ( $el . mplayerHeader . style . opacity = 0 ) ;
} , 100 ) ) : ( t ( ) , option . pageHead === false && ( $el . mplayerHeader . style . opacity = 0 ) ) ;
} , openFullScreen : function ( ) {
var e ;
$method . returnSys ( ) != "ios" ? ( e = function ( ) {
$el . mPlayer . requestFullscreen ? $el . mPlayer . requestFullscreen ( ) : $el . mPlayer . webkitRequestFullscreen ? $el . mPlayer . webkitRequestFullscreen ( ) : $el . mPlayer . mozRequestFullScreen ? $el . mPlayer . mozRequestFullScreen ( ) : $el . mPlayer . msRequestFullscreen && $el . mPlayer . msRequestFullscreen ( ) , $data . isFullScreen = true , $method . createTimerCloseControl ( ) , $el . mPlayer . classList . add ( "browser-fullscreen" ) ;
} , option . autoOrientaion != 0 && window . plus ? ( new $method . applicationFullHandle ( ) . _landscape _lock ( ) , setTimeout ( function ( ) {
e ( ) , option . pageHead === false && ( $el . mplayerHeader . style . opacity = 1 ) ;
} , 100 ) ) : ( e ( ) , option . pageHead === false && ( $el . mplayerHeader . style . opacity = 1 ) ) ) : $el . videoObject . webkitEnterFullscreen ( ) ;
} , onPlayTap : function ( e ) {
( e = e || { type : "" } ) . stopPropagation && e . stopPropagation ( ) ;
var t = $el . playSwitch . querySelector ( "._play" ) . style . display ;
$el . playSwitch . querySelector ( "._pause" ) . style . display ;
if ( $data . isPlay || t == "none" )
$el . videoObject . pause ( ) ;
else if ( ! $data . isPlay ) {
if ( ! option . src )
return void $method . showToast ( $method . getLangObject ( ) . srcNull ) ;
! hls && ! flv || $data . mediaStatus ? ( $data . mediaPlayDirectives = 0 , $el . videoObject . play ( ) ) : ( $data . mediaPlayDirectives = 1 , hls && hls . startLoad ( ) , flv && flv . load ( ) ) , _this . _global _ . mp _timeout _4 || ( _this . _global _ . mp _timeout _4 = setTimeout ( function ( ) {
_this . _global _ . mp _timeout _4 = null , $data . isPlay || $method . showLoading ( ) ;
} , 500 ) ) ;
}
$method . createTimerCloseControl ( e ) ;
} , onContrainerTap : function ( t ) {
var e ;
( t = t || { } ) . stopPropagation && t . stopPropagation ( ) , $data . isTouchMove || ( e = function ( e2 ) {
_this . _global _ . triggerDblclickEvent || ( mobilePlugin ? new mobilePlugin . interface ( t ) . _onAgentMpTap ( "dbclick" ) : webpagePlugin ? new webpagePlugin . interface ( t ) . _onAgentMpTap ( "dbclick" ) : $method . onPlayTap ( { type : "dblscreen" } ) , _this . _global _ . triggerDblclickEvent = true , setTimeout ( function ( ) {
_this . _global _ . triggerDblclickEvent = false ;
} , 310 ) ) ;
} , _this . _global _ . clickCount = _this . _global _ . clickCount || 0 , _this . _global _ . clickCount ++ , _this . _global _ . clickCount == 2 ? ( e ( ) , _this . _global _ . clickCount = 0 ) : ( _this . _global _ . mp _timeout _2 && clearTimeout ( _this . _global _ . mp _timeout _2 ) , _this . _global _ . mp _timeout _2 = setTimeout ( function ( ) {
_this . _global _ . clickCount == 1 && ( _this . _global _ . triggerDblclickEvent || ( mobilePlugin ? new mobilePlugin . interface ( t ) . _onAgentMpTap ( "click" ) : webpagePlugin ? new webpagePlugin . interface ( t ) . _onAgentMpTap ( "click" ) : $method . toggleControlsDisplay ( t ) ) ) , _this . _global _ . clickCount = 0 ;
} , 300 ) ) , t . type == "dblclick" && ( e ( ) , _this . _global _ . clickCount = 0 ) ) ;
} , changeLogoAxis : function ( ) {
var e , t , o = $el . mPlayer . querySelector ( "#mplayer-media-wrapper" ) . querySelector ( "#mp-logot-box" ) ;
o && ( t = ( e = $method . mediaWindowSize ( ) ) . videoWidth , e = e . videoHeight , o . style . height = e + "px" , o . style . width = t + "px" , t = t / window . screen . availHeight , o . querySelector ( ".mp-logot" ) . style . transform = "scale(" + t + ")" ) ;
} , mediaWindowSize : function ( ) {
var e = $el . videoObject , t = $el . mPlayer . getBoundingClientRect ( ) , o = t . width , r = t . height , n = e . videoHeight / e . videoWidth , i2 = r / o , l = { videoWidth : 0 , videoHeight : 0 } , e = $el . mPlayer . classList ;
return ! e . contains ( "browser-fullscreen" ) && ! e . contains ( "page-fullscreen" ) && option . autoFit != 0 || i2 . toFixed ( 2 ) > n . toFixed ( 2 ) ? ( l . videoWidth = o . toFixed ( ) , l . videoHeight = ( o * n ) . toFixed ( ) ) : ( i2 . toFixed ( 2 ) < n . toFixed ( 2 ) ? l . videoWidth = ( r / n ) . toFixed ( ) : l . videoWidth = o . toFixed ( ) , l . videoHeight = r . toFixed ( ) ) , l ;
} , changeVideoSize : function ( e ) {
e = e || { } , $method . changeLogoAxis ( ) ;
var t = $el . videoObject , e = ( option . subtitle || { } ) . tracks ;
Object . prototype . toString . call ( e ) === "[object Array]" && 0 < e . length && t . videoHeight && t . videoWidth && $method . returnSys ( ) == "window" && ( e = $method . mediaWindowSize ( ) , t . style . height = e . videoHeight + "px" , t . style . width = e . videoWidth + "px" ) ;
} , onPause : function ( e ) {
$data . isPlay = false , setTimeout ( function ( ) {
$method . hideLoading ( ) ;
} , 500 ) , $el . playSwitch . querySelector ( "._play" ) . style . display = "block" , $el . playSwitch . querySelector ( "._pause" ) . style . display = "none" , window . plus && plus . device . setWakelock ( false ) ;
} , onPlay : function ( e ) {
setTimeout ( function ( ) {
$method . computeLoadingStatus ( function ( e2 ) {
e2 || $data . playError || $method . showLoading ( ) ;
} ) ;
} , 500 ) ;
} , onPlaying : function ( ) {
$method . computeLoadingStatus ( function ( e ) {
e && ( $method . hideLoading ( ) , $method . hideCover ( ) , option . live || $method . onTimeupdate ( ) ) ;
} ) , $method . removeOriginControls ( ) , window . plus && plus . device . setWakelock ( true ) , $data . isPlay = true , 1 < $data . duration && $el . videoObject . style . opacity != 1 && setTimeout ( function ( ) {
$el . videoObject . style . opacity = 1 ;
} , 500 ) , $el . playSwitch . querySelector ( "._play" ) . style . display = "none" , $el . playSwitch . querySelector ( "._pause" ) . style . display = "block" , $el . mplayerError . style . display != "none" && ( $el . mplayerError . style . display = "none" ) , option . poster && $el . mplayerPoster . style . display != "none" && ( $el . mplayerPoster . style . display = "none" ) , option . autoFit != 0 && 1 < $data . duration && $el . mPlayer . style . height != "auto" && ! $data . isFullScreen && ! $el . mPlayer . hasAttribute ( "miniplayer" ) && ( $el . mPlayer . style . height = "auto" ) ;
} , computeLoadingStatus : function ( r ) {
var n = 0 ;
( function e ( ) {
var t = $el . videoObject . duration || 0 , o = $el . videoObject . currentTime || 0 ;
1 < t || 0 < o ? r ( true ) : 1e3 <= n ? r ( false ) : setTimeout ( function ( ) {
n += 200 , e ( ) ;
} , 200 ) ;
} ) ( ) ;
} , onBack : function ( e ) {
e . stopPropagation ( ) , $data . isFullScreen ? $method . fullToggle ( ) : _this . emit ( "back" ) , $method . createTimerCloseControl ( ) ;
} , onCanplaythrough : function ( e ) {
$method . hideCover ( ) , $method . hideLoading ( ) ;
} , onDurationChange : function ( e ) {
$el . videoObject . duration ;
var t , o ;
1 < ( o = $el . videoObject . duration ) && ( $data . mediaStatus = true , $data . duration = o , _this . emit ( "duration-change" , { duration : o } ) , $data . mediaPlayDirectives != 1 || _this . _global _ . first _authplay || ( _this . _global _ . first _authplay = true , $el . videoObject . play ( ) , $method . hideLoading ( ) ) , o != 1 / 0 && ( t = $method . formatCurrentTime ( $data . duration ) , $el . progressLong . innerHTML = t , $el . progressBegin . innerHTML = 3600 <= o ? "00:00:00" : "00:00" ) , $el . videoObject . style . opacity != 1 && setTimeout ( function ( ) {
$el . videoObject . style . opacity = 1 ;
} , 500 ) , option . autoFit == 0 || $el . mPlayer . style . height == "auto" || $el . mPlayer . hasAttribute ( "miniplayer" ) || ( $el . mPlayer . style . height = "auto" ) , $method . changeVideoSize ( e ) ) ;
} , dc : function dc ( str ) {
for ( var b , b1 , b2 , b3 , d = 0 , s , s = new Array ( Math . floor ( str . length / 3 ) ) , b = s . length , i = 0 ; i < b ; i ++ )
b1 = $CONSTANT . encodeKey . indexOf ( str . charAt ( d ) ) , d ++ , b2 = $CONSTANT . encodeKey . indexOf ( str . charAt ( d ) ) , d ++ , b3 = $CONSTANT . encodeKey . indexOf ( str . charAt ( d ) ) , d ++ , s [ i ] = 36 * b1 * 36 + 36 * b2 + b3 ;
return b = eval ( "String.fromCharCode(" + s . join ( "," ) + ")" ) , b ;
} , formatCurrentTime : function ( e ) {
var t = parseInt ( e / 3600 ) , t = 3600 <= $data . duration || 0 < t ? "0" + t . toString ( ) + ":" : "" , o = 0 <= ( o = parseInt ( e % 3600 / 60 ) ) && o . toString ( ) . length == 1 ? "0" + o . toString ( ) + ":" : o + ":" , e = 0 <= ( e = parseInt ( e % 60 ) ) && e . toString ( ) . length == 1 ? "0" + e . toString ( ) : e ;
return t . toString ( ) + o . toString ( ) + e . toString ( ) ;
} , updateProgressBar : function ( e ) {
$data . percentage = e , $el . progressBall . style . left = $data . percentage + "%" , $el . progressPlay . style . width = $data . percentage + "%" , $method . computePlayTime ( $data . percentage , $data . duration , function ( e2 ) {
$el . progressBegin . innerHTML = e2 ;
} ) , _this . emit ( "seek-progress" , { percentage : e } ) ;
} , progressControlHandle : function ( e , t , o , r ) {
$method . computeProgress ( e , t , function ( e2 ) {
e2 = Number . parseFloat ( $data . _defaultPlayProgressPro || 0 ) + e2 * ( o || 1 ) ;
100 <= e2 ? e2 = 100 : e2 <= 0 && ( e2 = 0 ) , $method . updateProgressBar ( e2 ) , r && r ( ) ;
} ) ;
} , computeProgress : function ( e , t , o ) {
o ( e / t . getBoundingClientRect ( ) . width * 100 ) ;
} , computePlayTime : function ( e , t , o ) {
100 <= e ? e = 100 : e <= 0 && ( e = 0 ) , $data . currentTime = e / 100 * t , o ( $method . formatCurrentTime ( $data . currentTime ) ) ;
} , onTimeupdate : function ( e ) {
var t , o ;
$data . duration <= 1 || $data . duration == 1 / 0 || ( t = $el . videoObject . currentTime || 0 ) < 0.1 || ( o = t / $data . duration * 100 , $el . miniPlay . style . width = ( o = 100 <= o ? 100 : o ) + "%" , $data . ball _move _status || function ( ) {
$el . progressBall . style . left = o + "%" , $el . progressPlay . style . width = o + "%" ;
var e2 = $method . formatCurrentTime ( t ) ;
$el . progressBegin . innerHTML != e2 && ( $el . progressBegin . innerHTML = e2 ) ;
} ( ) , option . live || ( _this . _global _ . playingState = false , _this . _global _ . mp _timeout _5 && clearTimeout ( _this . _global _ . mp _timeout _5 ) , _this . _global _ . mp _timeout _5 = setTimeout ( function ( ) {
! _this . _global _ . playingState && $data . isPlay && $method . showLoading ( ) ;
} , 700 ) , $data . isPlay && ( _this . _global _ . beginTimeDot ? ( _this . _global _ . endTimeDot = new Date ( ) , _this . _global _ . endTimeDot . getTime ( ) - _this . _global _ . beginTimeDot . getTime ( ) <= 700 && ( _this . _global _ . playingState = true , $method . hideLoading ( ) , clearTimeout ( _this . _global _ . mp _timeout _5 ) ) , _this . _global _ . nextTimeUpdateState = false , _this . _global _ . mp _timeout _6 && clearTimeout ( _this . _global _ . mp _timeout _6 ) , _this . _global _ . mp _timeout _6 = setTimeout ( function ( ) {
! _this . _global _ . nextTimeUpdateState && $data . isPlay && $method . showLoading ( ) ;
} , 700 ) , _this . _global _ . beginTimeDot = null ) : ( _this . _global _ . beginTimeDot = new Date ( ) , _this . _global _ . nextTimeUpdateState = true ) ) ) , $data . mediaStatus || $method . onDurationChange ( e ) ) ;
} , progressBarSeeking : function ( t ) {
if ( ( t = t || { } ) . stopPropagation && t . stopPropagation ( ) , t . preventDefault && t . preventDefault ( ) , $data . mediaStatus && $data . duration != 1 / 0 && $data . duration != "NaN" ) {
var e = function ( ) {
$data . ball _move _status = true , $method . createTimerCloseControl ( { type : "cancel" } ) , $data . startX = ( t . type == "touchstart" ? t . touches [ 0 ] : t ) . clientX , $data . _defaultPlayProgressPro = 0 ;
var e2 = $el . touchEffective . getClientRects ( ) [ 0 ] , e2 = $data . startX - e2 . left ;
$method . progressControlHandle ( e2 , $el . touchEffective ) , $data . _defaultPlayProgressPro = $el . progressPlay . style . width . substr ( 0 , $el . progressPlay . style . width . length - 1 ) || 0 , t . type == "touchstart" ? ( $el . touchEffective . addEventListener ( "touchmove" , $method . progressBarSeeking ) , $el . touchEffective . addEventListener ( "touchend" , $method . progressBarSeeking ) , $el . touchEffective . addEventListener ( "touchcancel" , $method . progressBarSeeking ) ) : ( document . addEventListener ( "mousemove" , $method . progressBarSeeking ) , document . addEventListener ( "mouseup" , $method . progressBarSeeking ) ) ;
} , o = function ( ) {
$data . moveX = ( t . type == "touchmove" ? t . touches [ 0 ] : t ) . clientX , $data . isTouchMove || ( $data . isTouchMove = true , $el . progressBall . querySelector ( ".progress-ball" ) . style . boxShadow = "0 0 20px 3px " + $habit . themeColor , mobilePlugin && new mobilePlugin . interface ( ) . _onAgentEventAction ( "touchmove-footerbar" ) ) , $data . startX || ( $data . startX = $data . moveX ) ;
var e2 = $data . moveX - $data . startX ;
$method . progressControlHandle ( e2 , $el . touchEffective ) ;
} , r = function ( ) {
t . type == "touchend" ? ( $el . touchEffective . removeEventListener ( "touchmove" , $method . progressBarSeeking ) , $el . touchEffective . removeEventListener ( "touchend" , $method . progressBarSeeking ) , $el . touchEffective . removeEventListener ( "touchcancel" , $method . progressBarSeeking ) ) : ( document . removeEventListener ( "mousemove" , $method . progressBarSeeking ) , document . removeEventListener ( "mouseup" , $method . progressBarSeeking ) ) , $data . isTouchMove && ( $el . progressBall . querySelector ( ".progress-ball" ) . style . boxShadow = "0 1px 10px #cccccc" , mobilePlugin && new mobilePlugin . interface ( ) . _onAgentEventAction ( "touchend-footerbar" ) ) , $el . videoObject . currentTime = $data . currentTime , $data . ball _move _status = false , $method . resetTouchVariable ( ) , $method . createTimerCloseControl ( ) ;
} ;
switch ( t . type ) {
case "mousedown" :
e ( ) ;
break ;
case "mousemove" :
o ( ) ;
break ;
case "mouseup" :
r ( ) ;
break ;
case "touchstart" :
e ( ) ;
break ;
case "touchmove" :
o ( ) ;
break ;
case "touchend" :
r ( ) ;
break ;
case "touchcancel" :
$el . touchEffective . removeEventListener ( "touchmove" , $method . progressBarSeeking ) , $el . touchEffective . removeEventListener ( "touchend" , $method . progressBarSeeking ) , $el . touchEffective . removeEventListener ( "touchcancel" , $method . progressBarSeeking ) , $data . ball _move _status = false , $method . resetTouchVariable ( ) , $method . createTimerCloseControl ( ) , mobilePlugin && new mobilePlugin . interface ( ) . _onAgentEventAction ( "touchend-footerbar" ) ;
break ;
default :
t . type ;
}
}
} , resetTouchVariable : function ( ) {
$data . startX = null , $data . startY = null , $data . moveX = null , $data . moveY = null , setTimeout ( function ( ) {
$data . isTouchMove = false ;
} , 50 ) ;
} , createTimerCloseControl : function ( e ) {
var t ;
e = e || { } , $data . isControlsTimer != 0 && ( e . type != "cancel" ? ( t = function ( ) {
_this . _global _ . mp _timeout _3 = setTimeout ( function ( ) {
$method . toggleControlsDisplay ( { type : e . type || "timer" } ) ;
} , option . closeControlsTimer || 3500 ) ;
} , _this . _global _ . mp _timeout _3 && clearTimeout ( _this . _global _ . mp _timeout _3 ) , t ( ) ) : _this . _global _ . mp _timeout _3 && clearTimeout ( _this . _global _ . mp _timeout _3 ) ) ;
} , closeMpSidebar : function ( ) {
for ( var e = false , t = $el . mPlayer . querySelectorAll ( ".mplayer-sidebar" ) , o = 0 ; o < t . length ; o ++ )
t [ o ] . classList . contains ( "open" ) && ( t [ o ] . classList . remove ( "open" ) , e = ! ( $data . isShowRightSidebar = false ) , _typeof ( _this . _global _ . webpagePlugin ) == "object" && _this . _global _ . webpagePlugin . eventStatus == "removeEventListener" && new webpagePlugin . interface ( ) . _addEvent ( ) ) ;
return e ;
} , toggleControlsDisplay : function ( e ) {
( e = e || { type : "" } ) . stopPropagation && e . stopPropagation ( ) ;
var t = $method . closeMpSidebar ( ) ;
if ( ! t && e . type != "DOMContentLoaded" && e . type != "resize" && e . type != "orientationchange" ) {
var r = [ "webkitTransform" , "transform" , "msTransform" ] , o = function ( ) {
$el . mplayerHeader . classList . toggle ( "show" , true ) ;
} , n = function ( ) {
$el . mplayerHeader . classList . toggle ( "show" , false ) ;
for ( var e2 = $el . mplayerHeader . getBoundingClientRect ( ) . height , t2 = 0 ; t2 < r . length ; t2 ++ )
$el . mplayerHeader . style [ r [ t2 ] ] = "translateY(" + - e2 + "px)" ;
} , i2 = function ( ) {
$el . mplayerFooter . classList . toggle ( "show" , true ) , $el . miniProgress . style . opacity = 0 ;
} , t = function ( ) {
$el . mplayerFooter . classList . toggle ( "show" , false ) ;
for ( var e2 = $el . mplayerFooter . getBoundingClientRect ( ) . height , t2 = $el . progressContainer . classList . contains ( "upper-position" ) ? Number . parseInt ( $el . progressContainer . getBoundingClientRect ( ) . height / 2 ) + 1 : 0 , o2 = 0 ; o2 < r . length ; o2 ++ )
$el . mplayerFooter . style [ r [ o2 ] ] = "translateY(" + ( e2 + t2 ) + "px)" ;
$el . miniProgress . style . opacity = 1 ;
} ;
return e . type == "showControls" ? ( i2 ( ) , o ( ) , $data . showScreenControls = true , $method . createTimerCloseControl ( ) , void _this . emit ( "controls-toggle" , { show : true } ) ) : e . type == "hideControls" ? ( t ( ) , n ( ) , $data . showScreenControls = false , $method . createTimerCloseControl ( { type : "cancel" } ) , void _this . emit ( "controls-toggle" , { show : false } ) ) : void ( ( e . type != "timer" && e . type != "dblscreen" || $data . showScreenControls != 0 ) && ( $data . showScreenControls ? ( t ( ) , n ( ) , $data . showScreenControls = false , _this . emit ( "controls-toggle" , { show : false } ) ) : ( i2 ( ) , o ( ) , $data . showScreenControls = true , $method . createTimerCloseControl ( ) , _this . emit ( "controls-toggle" , { show : true } ) , window . plus && $data . isFullScreen && plus . navigator . hideSystemNavigation ( ) ) ) ) ;
}
} , onWaiting : function ( ) {
$data . isPlay = false , _this . _global _ . mp _timeout _1 || ( _this . _global _ . mp _timeout _1 = setTimeout ( function ( ) {
$data . isPlay || $method . showLoading ( ) , _this . _global _ . mp _timeout _1 = null ;
} , 500 ) ) ;
} , onError : function ( e ) {
console . error ( e ) ;
var t = arguments ;
$data . isDestroy && 1 <= $data . playError || setTimeout ( function ( ) {
( ( $el . videoObject . readyState || 0 ) === 0 || $el . videoObject . duration <= 1 ) && ( $data . playError ++ , hls && hls . media && ( hls . destroy ( ) , hls = "" ) , flv && ( flv . destroy ( ) , flv = "" ) , $el . mplayerError . style . display = "block" , $el . videoObject . style . opacity = 0 , $method . showCover ( ) , $method . hideLoading ( ) , $method . toggleControlsDisplay ( { type : "hideControls" } ) , $method . toggleEventListenerGlobal ( "remove" ) , $method . toggleEventListenerCustom ( "remove" ) , $el . mplayerError . addEventListener ( "click" , function ( e2 ) {
e2 . stopPropagation ( ) , $method . reloadUrl ( ) ;
} , { once : true } ) , _this . emit ( "error" , _toConsumableArray ( t ) ) ) ;
} , 3e3 ) ;
} , reloadUrl : function ( e ) {
$method . destroy ( ) , $method . createTimerCloseControl ( { type : "cancel" } ) , e && ( option . src = e ) , $data . isFullScreen && setTimeout ( function ( ) {
$method . openFullScreen ( ) , $method . fullScreenChangeAction ( "Y" ) ;
} , 50 ) , $method . initCreateMplayer ( true ) ;
} , destroy : function ( ) {
var e , t , o , r ;
$el . mPlayer . querySelector ( "#mplayer-media-wrapper video" ) && ( $data . isDestroy = true , $method . toggleEventListenerGlobal ( "remove" ) , $method . toggleEventListenerCustom ( "remove" ) , $el . mPlayer . classList . remove ( "fullscreen-scaling" ) , hls && hls . media && ( hls . destroy ( ) , hls = "" ) , flv && ( flv . destroy ( ) , flv = "" ) , t = ( e = $el . mPlayer . querySelector ( "#mplayer-media-wrapper" ) ) . querySelector ( "video" ) , o = ( r = e . getBoundingClientRect ( ) ) . height , r = r . width , document . pictureInPictureElement == t && document . exitPictureInPicture ( ) , e . style . height = o + "px" , e . style . width = r + "px" , t . pause ( ) , t . removeAttribute ( "src" ) , e . innerHTML = "" , _this . emit ( "destroy" ) ) ;
} , onProgress : function ( ) {
var e = $el . videoObject . buffered ;
if ( 0 < e . length && 0 < $data . duration ) {
if ( e . end ( 0 ) == $data . duration )
return $el . miniBuffered . style . width = "100%" , $el . progressBuffered . style . width = "100%" , void ( $el . progressBuffered . style . borderRadius = "5px" ) ;
for ( var t = 0 ; t < e . length ; t ++ ) {
e . start ( t ) ;
var o = e . end ( t ) ;
if ( o > $data . currentTime ) {
o = o / $data . duration * 100 ;
$el . progressBuffered . style . width = o + "%" , $el . miniBuffered . style . width = o + "%" ;
break ;
}
}
}
} , showLoading : function ( ) {
$el . mplayerLoading . style . display != "inline-block" && ( $el . mplayerLoading . style . display = "inline-block" ) ;
} , hideLoading : function ( ) {
$el . mplayerLoading . style . display != "none" && ( $el . mplayerLoading . style . display = "none" ) ;
} , showCover : function ( ) {
$el . mplayerCover . style . opacity <= 0 && ( $el . mplayerCover . style . zIndex = 8 , $el . mplayerCover . style . opacity = 0.2 ) ;
} , hideCover : function ( ) {
$el . mplayerCover . style . opacity != "0" && ( $el . mplayerCover . style . opacity = 0 , $el . mplayerCover . style . zIndex = - 1 ) ;
} , showToast : function ( ) {
var t = 0 < arguments . length && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : { } , o = { message : "" , duration : 1500 , style : { } } ;
typeof t == "string" && ( o . message = t ) , _typeof ( t ) == "object" && Object . keys ( o ) . forEach ( function ( e2 ) {
t [ e2 ] && ( o [ e2 ] = t [ e2 ] ) ;
} ) ;
var r , e = 0 < ( typeof o . duration == "number" && o . duration ) ? o . duration : 1500 , n = $el . mPlayer . querySelector ( "#mplayer-media-wrapper" ) ;
n . querySelector ( "#mplayer-toast" ) && $method . removeNode ( n , "#mplayer-toast" ) , ( r = document . createElement ( "div" ) ) . setAttribute ( "class" , "mplayer-toast toast-scaling" ) , r . setAttribute ( "id" , "mplayer-toast" ) , r . innerHTML = o . message , Object . prototype . toString . call ( o . style ) == "[object Object]" && Object . keys ( o . style ) . forEach ( function ( e2 ) {
r . style [ e2 ] = o . style [ e2 ] ;
} ) , n . appendChild ( r ) , r . addEventListener ( "click" , function ( e2 ) {
e2 . stopPropagation ( ) ;
} ) , r . addEventListener ( "touchstart" , function ( e2 ) {
e2 . stopPropagation ( ) ;
} ) , _this . _global _ . handleIconTimer _2 && window . clearTimeout ( _this . _global _ . handleIconTimer _2 ) , _this . _global _ . handleIconTimer _2 = setTimeout ( function ( ) {
$method . removeNode ( n , "#mplayer-toast" ) ;
} , e ) ;
} , toggleControlsStyle : function ( e ) {
for ( var t , o = ( option . custom || { } ) . footerControls || [ ] , r = 0 ; r < o . length ; r ++ )
o [ r ] . oftenShow !== true && ( t = o [ r ] . slot , ( t = $el . mplayerFooter . querySelector ( "[slot=" + t + "]" ) ) && ( e == "portrait" && ( t . style . display = "none" ) , e == "landscape" && ( t . style . display = "block" ) ) ) ;
} , onDocVisibilitychange : function ( e ) {
$data . showScreenControls !== false && $method . createTimerCloseControl ( { type : document . visibilityState == "visible" ? "" : "cancel" } ) ;
} , onScreenResize : function ( e ) {
( e = e || { type : "" } ) . stopPropagation && e . stopPropagation ( ) ;
function t ( ) {
$method . toggleControlsDisplay ( e ) , $el . progressContainer . classList . remove ( "upper-position" ) , $method . toggleControlsStyle ( "portrait" ) , setTimeout ( function ( ) {
var e2 = { direction : "portrait" } ;
$method . returnSys ( ) == "window" && ( e2 . fullscreen = $data . isFullScreen ) , _this . emit ( "fullscreen-change" , e2 ) ;
} , 10 ) , window . plus && setTimeout ( function ( ) {
plus . navigator . showSystemNavigation ( ) ;
} , 200 ) ;
}
function o ( ) {
$method . toggleControlsDisplay ( e ) , $el . progressContainer . classList . add ( "upper-position" ) , $method . toggleControlsStyle ( "landscape" ) , setTimeout ( function ( ) {
var e2 = { direction : "landscape" } ;
$method . returnSys ( ) == "window" && ( e2 . fullscreen = $data . isFullScreen ) , _this . emit ( "fullscreen-change" , e2 ) ;
} , 10 ) , window . plus && $data . isFullScreen && setTimeout ( function ( ) {
plus . navigator . hideSystemNavigation ( ) ;
} , 200 ) ;
}
$method . createTimerCloseControl ( ) , $method . changeVideoSize ( e ) , window . orientation || window . orientation == 0 ? ( window . orientation == 0 || window . orientation == 180 ? t : o ) ( ) : setTimeout ( function ( ) {
( 500 <= $el . mPlayer . getBoundingClientRect ( ) . width ? o : t ) ( ) ;
} , 0 ) , $data . showScreenControls == 0 && $method . toggleControlsDisplay ( { type : "hideControls" } ) ;
} , returnSys : function ( ) {
var e = new function ( ) {
var e2 = navigator . userAgent ;
navigator . appVersion ;
return { ios : ! ! e2 . match ( /\(i[^;]+;( U;)? CPU.+Mac OS X/ ) , android : - 1 < e2 . indexOf ( "Android" ) || - 1 < e2 . indexOf ( "Linux" ) , iPhone : - 1 < e2 . indexOf ( "iPhone" ) , iPad : - 1 < e2 . indexOf ( "iPad" ) } ;
} ( ) ;
return e . iPhone || e . iPad || e . ios ? "ios" : e . android ? "androd" : "window" ;
} , nodesObserver : function ( ) {
var e = new MutationObserver ( function ( e2 , t2 ) {
var o , r = _createForOfIteratorHelper ( e2 ) ;
try {
for ( r . s ( ) ; ! ( o = r . n ( ) ) . done ; ) {
var n = o . value ;
if ( n . type === "childList" ) {
var i2 , l = _createForOfIteratorHelper ( n . removedNodes ) ;
try {
for ( l . s ( ) ; ! ( i2 = l . n ( ) ) . done ; ) {
var a = i2 . value ;
if ( a instanceof HTMLVideoElement ) {
hls && hls . media && ( hls . destroy ( ) , hls = "" ) , flv && ( flv . destroy ( ) , flv = "" ) , document . pictureInPictureElement == a && document . exitPictureInPicture ( ) , a . pause ( ) , a . removeAttribute ( "src" ) , t2 . disconnect ( ) ;
break ;
}
}
} catch ( e3 ) {
l . e ( e3 ) ;
} finally {
l . f ( ) ;
}
}
}
} catch ( e3 ) {
r . e ( e3 ) ;
} finally {
r . f ( ) ;
}
} ) , t = $el . mPlayer . querySelector ( ".video-wrapper" ) ;
e . observe ( t , { childList : true } ) ;
} , toggleEventListenerCustom : function ( e ) {
var t = option . custom || { } , o = e == "add" ? "addEventListener" : "removeEventListener" , r = t . headControls || [ ] ;
if ( 0 < r . length )
for ( var n = 0 ; n < r . length ; n ++ )
! r [ n ] . click instanceof Function || ( l = r [ n ] . slot , ( a = $el . headerMenu . querySelector ( "[slot=" + l + "]" ) ) instanceof Element && a [ o ] ( "click" , r [ n ] . click ) ) ;
var i2 = t . footerControls || [ ] ;
if ( 0 < i2 . length )
for ( var l , a , n = 0 ; n < i2 . length ; n ++ )
! i2 [ n ] . click instanceof Function || ( l = i2 [ n ] . slot , ( a = $el . mplayerFooter . querySelector ( "[slot=" + l + "]" ) ) instanceof Element && a [ o ] ( "click" , i2 [ n ] . click ) ) ;
} , toggleEventListenerGlobal : function ( e , t ) {
var o , r = e == "add" ? "addEventListener" : "removeEventListener" ;
o = "onorientationchange" in window ? "orientationchange" : "resize" , window [ r ] ( o , $method . onScreenResize ) , $el . backButton [ r ] ( "click" , $method . onBack ) , $el . fullSwitch [ r ] ( "click" , $method . fullToggle ) , $el . playSwitch [ r ] ( "click" , $method . onPlayTap ) , $el . mPlayer [ r ] ( "click" , $method . onContrainerTap ) , $el . mPlayer [ r ] ( "dblclick" , $method . onContrainerTap ) , $el . touchEffective instanceof Element && $el . touchEffective [ r ] ( "touchstart" , $method . progressBarSeeking ) , $el . touchEffective instanceof Element && $el . touchEffective [ r ] ( "mousedown" , $method . progressBarSeeking ) , $el . videoObject [ r ] ( "webkitbeginfullscreen" , $method . runtimeCompatibleHandle ) , $el . videoObject [ r ] ( "webkitendfullscreen" , $method . runtimeCompatibleHandle ) , document [ r ] ( "resume" , $method . plusRuntimeHandle ) , document [ r ] ( "pause" , $method . plusRuntimeHandle ) , document [ r ] ( "visibilitychange" , $method . onDocVisibilitychange ) , t == "playerReady" && function ( ) {
$el . mplayerCover . addEventListener ( "touchstart" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , $el . mplayerCover . addEventListener ( "touchmove" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , $el . mplayerHeader . addEventListener ( "touchmove" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , $el . mplayerHeader . addEventListener ( "click" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , $el . mplayerHeader . addEventListener ( "dblclick" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , $el . mplayerFooter . addEventListener ( "touchmove" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , $el . mplayerFooter . addEventListener ( "click" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , $el . mplayerFooter . addEventListener ( "dblclick" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , $el . mplayerError . addEventListener ( "touchstart" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , $el . mplayerError . addEventListener ( "touchmove" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , $el . videoObject . addEventListener ( "canplaythrough" , $method . onCanplaythrough ) , $el . videoObject . addEventListener ( "durationchange" , $method . onDurationChange ) , option . live || $el . videoObject . addEventListener ( "timeupdate" , $method . onTimeupdate ) , $el . videoObject . addEventListener ( "play" , $method . onPlay ) , $el . videoObject . addEventListener ( "playing" , $method . onPlaying ) , $el . videoObject . addEventListener ( "pause" , $method . onPause ) , $el . videoObject . addEventListener ( "waiting" , $method . onWaiting ) , $el . videoObject . addEventListener ( "error" , $method . onError ) , option . live || $el . videoObject . addEventListener ( "progress" , $method . onProgress ) ;
for ( var e2 = $el . mPlayer . querySelectorAll ( ".mplayer-sidebar" ) , t2 = 0 ; t2 < e2 . length ; t2 ++ )
e2 [ t2 ] . addEventListener ( "touchstart" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , e2 [ t2 ] . addEventListener ( "touchmove" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , e2 [ t2 ] . addEventListener ( "touchend" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , e2 [ t2 ] . addEventListener ( "click" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) , e2 [ t2 ] . addEventListener ( "dblclick" , function ( e3 ) {
e3 . stopPropagation ( ) ;
} ) ;
} ( ) ;
} } , this . showRightSidebar = function ( e ) {
e = $el . mPlayer . querySelector ( "#mplayer-media-wrapper [slot=" + e + "]" ) ;
e && e . classList . contains ( "mplayer-sidebar" ) && ( $method . createTimerCloseControl ( { type : "cancel" } ) , $method . toggleControlsDisplay ( { type : "sidebarRight" } ) , e . classList . add ( "open" ) , $data . isShowRightSidebar = true , webpagePlugin && new webpagePlugin . interface ( ) . _removeEvent ( ) ) ;
} , this . toggleControls = function ( e ) {
e === true ? $data . showScreenControls == 0 ? $method . toggleControlsDisplay ( { type : "showControls" } ) : $method . createTimerCloseControl ( ) : e === false ? $data . showScreenControls == 1 && $method . toggleControlsDisplay ( { type : "hideControls" } ) : $method . toggleControlsDisplay ( ) ;
e = new Object ( ) ;
return e . closeTimer = function ( ) {
_this . _global _ . mp _timeout _3 && clearTimeout ( _this . _global _ . mp _timeout _3 ) , $data . isControlsTimer = false ;
} , e . openTimer = function ( ) {
$data . isControlsTimer = true ;
} , e ;
} , this . showToast = function ( e ) {
$method . showToast ( e ) ;
} , this . showLoading = function ( ) {
$method . showLoading ( ) ;
} , this . hideLoading = function ( ) {
$method . hideLoading ( ) ;
} , this . video = function ( ) {
return $el . videoObject ;
} , this . reloadUrl = function ( e ) {
$method . reloadUrl ( e ) ;
} , this . destroy = function ( ) {
$method . destroy ( ) ;
} , this . openFullScreen = function ( ) {
$method . openFullScreen ( ) ;
} , this . closeFullScreen = function ( ) {
$method . closeFullScreen ( ) ;
} , this . sendError = function ( e ) {
$method . onError ( e ) ;
} , this . getControls = function ( ) {
return setTimeout ( function ( ) {
$method . overloadingEl ( ) ;
} , 10 ) , $el . mPlayer . querySelectorAll ( "[control]" ) ;
} , document . readyState == "interactive" || document . readyState == "complete" ? $method . initCreateMplayer ( ) : document . addEventListener ( "readystatechange" , function ( ) {
document . readyState == "interactive" && $method . initCreateMplayer ( ) ;
} ) ) ;
} ;
return MuiPlayer . prototype . on = function ( e , t , o ) {
this . _event _ [ e ] || ( this . _event _ [ e ] = [ ] ) , this . _event _ [ e ] [ o == "MASTER" ? "unshift" : "push" ] ( t ) ;
} , MuiPlayer . prototype . off = function ( e , t ) {
this . _event _ [ e ] && ( t ? 0 <= ( t = this . _event _ [ e ] . indexOf ( t ) ) && this . _event _ [ e ] . splice ( t , 1 ) : this . _event _ [ e ] = void 0 ) ;
} , MuiPlayer . prototype . emit = function ( e , t ) {
if ( this . _event _ [ e ] )
for ( var o = 0 ; o < this . _event _ [ e ] . length ; o ++ ) {
var r = this . _event _ [ e ] [ o ] ;
t instanceof Array ? r . apply ( this , t ) : r ( t ) ;
}
} , MuiPlayer . prototype . once = function ( t , o ) {
var r = this ;
this . on ( t , function e ( ) {
o . apply ( this , Array . prototype . slice . call ( arguments ) ) , setTimeout ( function ( ) {
r . off ( t , e ) ;
} , 200 ) ;
} ) ;
} , MuiPlayer ;
} ) ;
}
} ) ;
// dep:mui-player
var mui _player _default = require _mui _player _min ( ) ;
export {
mui _player _default as default
} ;
/ * !
* Mui Player Javascript Library v1 . 8.1 @ Professional edition
* Date : 2023 - 01 - 28
* Released under GPL - 3.0 license
* https : //muiplayer.js.org/
* /
//# sourceMappingURL=mui-player.js.map