/*!
* Mui Player Mobile Plugin Javascript Library v1.0.3
* Date:2021-07-11
* Released under GPL-3.0 license
* https://muiplayer.js.org/
*/
"use strict";
function _typeof(e) {
return (_typeof = "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
}
)(e)
}
!function(e, t) {
"object" == ("undefined" == typeof exports ? "undefined" : _typeof(exports)) && "object" == ("undefined" == typeof module ? "undefined" : _typeof(module)) ? module.exports = t() : "function" == typeof define && _typeof(define.amd) ? define(t) : e.MuiPlayerMobilePlugin = t()
}(window, function() {
return function(u) {
function l() {
return {
mPlayer: t,
mplayerTime: t.querySelector("#mplayer-time"),
timeStart: t.querySelector("#time-start"),
timeEnd: t.querySelector("#time-end"),
timeProgress: t.querySelector("#time-progress"),
timeTotal: t.querySelector("#time-total"),
volumeControl: t.querySelector("#volume-control"),
volumeProgress: t.querySelector("#volume-progress"),
volumeTotal: t.querySelector("#volume-total"),
luminanceControl: t.querySelector("#luminance-control"),
luminanceProgress: t.querySelector("#luminance-progress"),
luminanceTotal: t.querySelector("#luminance-total"),
mplayerLeft: t.querySelector("#mplayer-left"),
lockScreen: t.querySelector("#lock-screen"),
menuButton: t.querySelector("#menu-button"),
batteryInfo: t.querySelector("#battery-info"),
mplayerSidebar: t.querySelector("#mplayer-sidebar"),
toggleFit: t.querySelector("#toggle-fit"),
toggleLoop: t.querySelector("#toggle-loop")
}
}
var u = u || {}
, m = {}
, t = null
, i = new function() {
return {
isLockScreen: !1,
startX: null,
startY: null,
moveX: null,
moveY: null,
_defaultVolumePro: null,
_defaultLuminanicePro: null,
isTouchMove: !1,
useTouchType: null
}
}
, o = '\x3c!-- 播放器中央进度控件 --\x3e
/
\x3c!--Progress Time--\x3e
'
, n = '\x3c!-- Mplayer屏幕亮度显示控件 --\x3e'
, r = '\x3c!-- Mplayer音量显示控件 --\x3e'
, a = '\x3c!-- Mplayer 左侧操作按钮 --\x3e\x3c!--锁屏--\x3e
\x3c!--Lock--\x3e
\x3c!--Open--\x3e
'
, s = '\x3c!-- Mplayer弹出右侧栏菜单 --\x3e'
, c = ''
, d = ''
, g = null
, p = {
overloadingEl: function() {
g = new l;
for (var e = 0, t = Object.keys(g); e < t.length; e++) {
var o = t[e];
"mPlayer" != o && (g[o] || (g[o] = {
style: {},
classList: {
add: function() {},
contains: function() {},
remove: function() {}
},
addEventListener: function() {},
removeEventListener: function() {}
}),
g[o].querySelector = function(e) {
e = this.querySelectorAll ? this.querySelectorAll(e) : [];
return e[0] || {
exist: !1,
style: {},
height: "",
width: ""
}
}
)
}
},
plusRuntimeAction: function() {
function e() {
(new p.plusRuntimeHandle)._volume_luminance("init")
}
window.plus ? e() : setTimeout(function() {
window.plus ? e() : p.unPlusRuntimeHandle()
}, 3e3)
},
initLanguage: function(e) {
var t = m.$method.getLangObject()
, o = e.querySelector("#mplayer-sidebar").children;
return o[0].innerText = t.settings,
o[1].querySelector(".box-name").innerText = t.coveredPlay,
o[2].querySelector(".box-name").innerText = t.loopPlay,
o[3].innerText = t.playbackSpeed,
o[5].innerText = t.share,
e
},
initConifgAttribute: function(e) {
var t = m.option.volume;
return 0 <= t && t <= 1 ? (e.querySelector("#volume-total").style.width = 100 * t + "%",
e.querySelector("video").volume = t) : e.querySelector("#volume-total").style.width = "100%",
0 <= u.defaultLuminance && u.defaultLuminance <= 1 ? e.querySelector("#luminance-total").style.width = 100 * u.defaultLuminance + "%" : e.querySelector("#luminance-total").style.width = "100%",
e
},
initConfigControls: function(s) {
!1 === u.showLock && m.$method.removeNode(s, "#lock-screen"),
!1 !== u.showBattery && navigator.getBattery || m.$method.removeNode(s, "#battery-info");
var e = u.hotKeyConfig || {};
!1 === e.volumeHandle && m.$method.removeNode(s, "#volume-control"),
1 != e.luminanceHandle && m.$method.removeNode(s, "#luminance-control"),
!0 === m.option.loop && (s.querySelector("#toggle-loop").classList.add("open"),
s.querySelector("#toggle-loop").classList.remove("close")),
"cover" == m.option.objectFit && (s.querySelector("#toggle-fit").classList.add("open"),
s.querySelector("#toggle-fit").classList.remove("close"));
return 0 != u.showMenuButton ? function() {
var e = u.defaultMenuConfig || {};
!0 === m.option.live && (e.showSpeedSwitch = !1,
e.showLoopSwitch = !1,
m.$method.removeNode(s, "#mplayer-time")),
!1 === e.showFillSwitch && s.querySelector("#toggle-fit").parentNode.parentNode.removeChild(s.querySelector("#toggle-fit").parentNode),
!1 === e.showLoopSwitch && s.querySelector("#toggle-loop").parentNode.parentNode.removeChild(s.querySelector("#toggle-loop").parentNode),
!1 === e.showSpeedSwitch && s.querySelector(".play-speed").parentNode.parentNode.removeChild(s.querySelector(".play-speed").parentNode);
for (var t = e.showShare || [], o = s.querySelectorAll(".share-box"), l = 0; l < o.length; l++) {
for (var n = o[l].getAttribute("data"), i = !1, r = 0; r < t.length; r++)
if (n == t[r]) {
i = !0;
break
}
i || o[l] && o[l].parentNode.removeChild(o[l])
}
for (var a = s.querySelectorAll("#mplayer-sidebar .title"), l = 0; l < a.length; l++)
0 == a[l].nextElementSibling.children.length && a[l] && a[l].parentNode.removeChild(a[l])
}() : (m.$method.removeNode(s, "#menu-button"),
m.$method.removeNode(s, "#mplayer-sidebar")),
s
},
initConfigTheme: function(e) {
return m.$habit.forwardRate = 0 < u.forwardRate && u.forwardRate <= 1 ? u.forwardRate : .1,
e.querySelector("#time-start") && (e.querySelector("#time-start").style.color = m.$habit.themeColor),
e.querySelector("#time-total") && (e.querySelector("#time-total").style.background = m.$habit.themeColor),
e.querySelector("#toggle-fit") && (e.querySelector("#toggle-fit").style.background = m.$habit.themeColor),
e.querySelector("#toggle-loop") && (e.querySelector("#toggle-loop").style.background = m.$habit.themeColor),
0 < e.querySelectorAll("#mplayer-sidebar .play-speed").length && (e.querySelectorAll("#mplayer-sidebar .play-speed")[1].style.background = m.$habit.themeColor),
e
},
parseCamel: function(e) {
return e.replace(/\B([A-Z])/g, "-$1").toLowerCase()
},
unPlusRuntimeHandle: function() {},
plusRuntimeHandle: function() {
var o = this
, l = 0;
this._volume_luminance = function(e) {
var t = plus.device.getVolume();
if (0 == t && l < 3 && "init" == e)
return l++,
void setTimeout(function() {
o._volume_luminance(e)
}, 200);
1 < t ? t = 100 <= 10 * t ? 100 : 10 * t : t <= 1 && (t = 100 <= 100 * t ? 100 : 100 * t),
g.volumeTotal.style.width = t + "%",
m.$el.videoObject.volume = 1;
t = plus.screen.getBrightness();
1 < t ? t = 100 < 10 * t ? 100 : 10 * t : t <= 1 && (t = 100 < 100 * t ? 100 : 100 * t),
g.luminanceTotal.style.width = t + "%"
}
},
toggleControlsDisplay: function() {
var e, t = g.mplayerLeft.getBoundingClientRect().width;
m.$method.hasNotchInScreen() && (e = plus.navigator.getStatusbarHeight(),
t += Math.round(e) / 2),
this.ON_SideLeft = function() {
g.mplayerLeft.style.left = t + "px"
}
,
this.OFF_SideLeft = function() {
g.mplayerLeft.style.left = -t + "px"
}
},
readBattery: function(e) {
var t, o, n;
"showControls" != (e = e || {}).type && !1 !== m.option.showBattery && (t = new Date,
o = 1 == (o = t.getHours()).toString().length ? "0" + o : o,
t = t.getMinutes(),
t = o + ":" + (t = 1 == t.toString().length ? "0" + t : t),
g.batteryInfo.querySelector("#time").innerHTML = t,
n = !1,
e = function l() {
navigator.getBattery().then(function(e) {
var t = e.level
, o = e.charging;
0 < t && (n = !0),
o = o,
g.batteryInfo.querySelector("#count").style.background = o ? "#55c612" : "#FFFFFF",
o = null,
1 < (t = t) ? o = 100 < 10 * t ? 100 : 10 * t : t <= 1 && (o = 100 < 10 * t ? 100 : 100 * t),
100 == o ? g.batteryInfo.querySelector("#count").style.borderRadius = "1px" : o < 10 && (g.batteryInfo.querySelector("#count").style.background = "red"),
g.batteryInfo.querySelector("#count").style.width = o + "%",
e.onlevelchange = function(e) {
l()
}
,
e.onchargingchange = function(e) {
l()
}
})
}
,
navigator.getBattery && e(),
setTimeout(function() {
n || g.batteryInfo instanceof Element && m.$method.removeNode(g.mPlayer, "#battery-info")
}, 1e3))
},
onLockScreenTap: function(e) {
e.stopPropagation(),
i.isLockScreen ? (g.lockScreen.querySelector("#_lock").style.display = "flex",
g.lockScreen.querySelector("#_unlock").style.display = "none",
i.isLockScreen = !1,
m.$method.toggleControlsDisplay({
type: "showControls"
}),
p.toggleEventListenerGlobal("add")) : (g.lockScreen.querySelector("#_lock").style.display = "none",
g.lockScreen.querySelector("#_unlock").style.display = "flex",
i.isLockScreen = !0,
m.$method.toggleControlsDisplay({
type: "hideControls"
}),
p.toggleEventListenerGlobal("remove", "lockAction"))
},
onShareBox: function(e) {
e.stopPropagation();
e = Number.parseFloat(e.currentTarget.getAttribute("data"));
m._this.emit("share", {
type: e
})
},
onPlaySpeed: function(o) {
o.stopPropagation();
var e, t = Number.parseFloat(o.currentTarget.getAttribute("data"));
m.$el.videoObject.playbackRate != t && (m.$method.toggleControlsDisplay(o),
function() {
for (var e = g.mplayerSidebar.querySelectorAll(".play-speed"), t = 0; t < e.length; t++)
e[t].style.background = "transparent";
o.currentTarget.style.background = m.$habit.themeColor
}(),
m.$el.videoObject.playbackRate = t,
e = m.$method.getLangObject(),
1 != t ? m.$method.showToast(e.tsps.replace("?", t)) : m.$method.showToast(e.dsps))
},
onToggleLoop: function(e) {
e.stopPropagation(),
-1 < e.currentTarget.getAttribute("class").indexOf("open") ? (m.$el.videoObject.loop = !1,
e.currentTarget.classList.add("close"),
e.currentTarget.classList.remove("open")) : (m.$el.videoObject.loop = !0,
e.currentTarget.classList.add("open"),
e.currentTarget.classList.remove("close"))
},
onToggleFit: function(e) {
(e = e || {}).stopPropagation && e.stopPropagation();
this.fill = function() {
-1 < (g.toggleFit instanceof Element ? g.toggleFit.getAttribute("class") : "").indexOf("close") && (g.toggleFit.classList.add("open"),
g.toggleFit.classList.remove("close"),
m.$el.videoObject.classList.add("covered"))
}
,
this.unfill = function() {
-1 < (g.toggleFit instanceof Element ? g.toggleFit.getAttribute("class") : "").indexOf("open") && (g.toggleFit.classList.add("close"),
g.toggleFit.classList.remove("open"),
m.$el.videoObject.classList.remove("covered"))
}
,
e.type && (-1 < g.toggleFit.getAttribute("class").indexOf("close") ? this.fill() : this.unfill())
},
videoScreenTouch: function(e) {
if ((e = e || {}).stopPropagation && e.stopPropagation(),
m.$data.mediaStatus && !(m.$data.duration <= 1) && (!1 !== u.pageGetsture || m.$data.isFullScreen)) {
if ("touchstart" == e.type) {
if (i.isTouchMove)
return;
i.startX = e.touches[0].clientX,
i.startY = e.touches[0].clientY,
g.mPlayer.addEventListener("touchmove", p.videoScreenTouch),
g.mPlayer.addEventListener("touchend", p.videoScreenTouch),
g.mPlayer.addEventListener("touchcancel", p.videoScreenTouch)
}
var t, o;
if ("touchmove" == e.type)
switch (e.preventDefault(),
i.moveX = e.touches[0].clientX,
i.moveY = e.touches[0].clientY,
i.isTouchMove || (i.isTouchMove = !0,
m.$method.createTimerCloseControl("cancel")),
m.$data.showScreenControls && i.useTouchType && m.$method.toggleControlsDisplay(e),
i.useTouchType || (t = u.hotKeyConfig || {},
10 < Math.abs(i.moveX - i.startX) && !m.option.live && m.$data.duration != 1 / 0 && 0 != t.processHandle ? i.useTouchType = "forward" : 10 < Math.abs(i.moveY - i.startY) && (!1 === t.volumeHandle || 1 != t.luminanceHandle ? (0 != t.volumeHandle && (i.useTouchType = "volume"),
!0 === t.luminanceHandle && (i.useTouchType = "luminance")) : (o = g.mPlayer.getBoundingClientRect().width,
i.useTouchType = o / 2 > o - i.startX ? 0 != t.volumeHandle ? "volume" : "" : 0 != t.luminanceHandle ? "luminance" : "")),
function() {
switch (i.useTouchType) {
case "forward":
m.$data._defaultPlayProgressPro = m.$el.progressPlay.style.width.substr(0, m.$el.progressPlay.style.width.length - 1) || 0,
g.timeTotal.style.width = m.$data._defaultPlayProgressPro + "%",
m.$data._defaultPlayProgressPro;
break;
case "volume":
window.plus && (new p.plusRuntimeHandle)._volume_luminance(),
i._defaultVolumePro = g.volumeTotal.style.width.substr(0, g.volumeTotal.style.width.length - 1),
p.toggleVolumeIcon(Number.parseFloat(i._defaultVolumePro)),
g.volumeControl.style.transition = "none",
g.volumeControl.style.opacity = 1;
break;
case "luminance":
window.plus && (new p.plusRuntimeHandle)._volume_luminance(),
i._defaultLuminanicePro = g.luminanceTotal.style.width.substr(0, g.luminanceTotal.style.width.length - 1),
g.luminanceControl.style.transition = "none",
g.luminanceControl.style.opacity = 1
}
}()),
i.useTouchType) {
case "forward":
var l = i.moveX - i.startX;
m.$method.progressControlHandle(l, g.timeProgress, m.$habit.forwardRate),
p.toggleMiddleProgress("show");
break;
case "volume":
l = i.startY - i.moveY;
p.screenVolumeHandle(l);
break;
case "luminance":
l = i.startY - i.moveY;
p.screenLuminanceHandle(l)
}
"touchend" == e.type && (g.mPlayer.removeEventListener("touchmove", p.videoScreenTouch),
g.mPlayer.removeEventListener("touchend", p.videoScreenTouch),
g.mPlayer.removeEventListener("touchcancel", p.videoScreenTouch),
"forward" == i.useTouchType ? (m.$el.videoObject.currentTime = m.$data.currentTime,
p.toggleMiddleProgress("hide")) : "volume" == i.useTouchType ? (g.volumeControl.style.transition = "opacity 0.5s",
g.volumeControl.style.opacity = 0) : "luminance" == i.useTouchType && (g.luminanceControl.style.transition = "opacity 0.5s",
g.luminanceControl.style.opacity = 0),
p.resetTouchVariable()),
"touchcancel" == e.type && (g.mPlayer.removeEventListener("touchmove", p.videoScreenTouch),
g.mPlayer.removeEventListener("touchend", p.videoScreenTouch),
g.mPlayer.removeEventListener("touchcancel", p.videoScreenTouch),
g.volumeControl.style.transition = "opacity 0.5s",
g.volumeControl.style.opacity = 0,
g.luminanceControl.style.transition = "opacity 0.5s",
g.luminanceControl.style.opacity = 0,
p.resetTouchVariable())
}
},
screenLuminanceHandle: function(e) {
m.$method.computeProgress(e, g.luminanceProgress, function(e) {
e = Number.parseFloat(i._defaultLuminanicePro) + .35 * e;
100 <= e ? e = 100 : e <= 0 && (e = 0),
g.luminanceTotal.style.width = e + "%",
m._this.emit("luminance-change", {
size: (.01 * e).toFixed(2)
})
})
},
screenVolumeHandle: function(e) {
m.$method.computeProgress(e, g.volumeProgress, function(e) {
e = Number.parseFloat(i._defaultVolumePro) + .35 * e;
100 <= e ? e = 100 : e <= 0 && (e = 0),
p.toggleVolumeIcon(e),
g.volumeTotal.style.width = e + "%",
m._this.emit("volume-change", {
size: (.01 * e).toFixed(2)
})
})
},
toggleVolumeIcon: function(e) {
0 == e ? (g.volumeControl.querySelector(".icon-zero").style.display = "inline",
g.volumeControl.querySelector(".icon-two").style.display = "none",
g.volumeControl.querySelector(".icon-one").style.display = "none") : 50 <= e ? (g.volumeControl.querySelector(".icon-two").style.display = "inline",
g.volumeControl.querySelector(".icon-zero").style.display = "none",
g.volumeControl.querySelector(".icon-one").style.display = "none") : (g.volumeControl.querySelector(".icon-one").style.display = "inline",
g.volumeControl.querySelector(".icon-zero").style.display = "none",
g.volumeControl.querySelector(".icon-two").style.display = "none")
},
resetTouchVariable: function() {
setTimeout(function() {
i.startX = null,
i.startY = null,
i.moveX = null,
i.moveY = null,
i.isTouchMove = !1,
i.useTouchType = null,
m.$data._defaultPlayProgressPro = null,
i._defaultVolumePro = null,
i._defaultLuminanicePro = null
}, 200)
},
toggleMiddleProgress: function(e) {
"show" == e ? (g.mplayerTime.style.transition = "none",
g.mplayerTime.style.opacity = 1,
m.$method.showCover()) : "hide" == e && (g.mplayerTime.style.transition = "opacity 1s",
g.mplayerTime.style.opacity = 0,
m.$method.hideCover())
},
onAgentEventAction: function(e) {
switch (e) {
case "touchmove-footerbar":
p.toggleMiddleProgress("show");
break;
case "touchend-footerbar":
p.toggleMiddleProgress("hide");
break;
case "remove-event":
p.toggleEventListenerGlobal("remove")
}
},
onMenuTap: function(e) {
e.stopPropagation(),
m._this.showRightSidebar("mplayer-sidebar")
},
showThumbnails: function(e) {
var n = 0
, i = 0
, t = u.thumbnails || {}
, r = t.preview || []
, o = t.tile || [10, 10]
, t = t.scale || [160, 90]
, a = o[0] || 10
, s = o[1] || 10
, c = t[0] || 160
, d = t[1] || 90;
0 != r.length && (t = parseInt(e / 100 * m.$data.duration),
e = (n = t) % a == 0 ? 0 : parseInt(n % a) * c,
t = n / a < 1 ? 0 : parseInt(n / a) * d,
function() {
var e;
i = parseInt(n / (a * s)),
!1 === g.mplayerTime.querySelector('[data-playimage-index="' + i + '"]').exist && ((t = document.createElement("div")).setAttribute("class", "preview-image"),
t.setAttribute("data-playimage-index", i),
t.style.width = "100%",
t.style.height = "100%",
t.style.borderRadius = "4px",
t.style.backgroundImage = "url(" + r[i] + ")",
!1 === (e = g.mplayerTime.querySelector(".mp-thumbnails")).exist ? ((e = document.createElement("div")).setAttribute("class", "mp-thumbnails"),
e.style.width = c + "px",
e.style.height = d + "px",
e.style.margin = "12px auto auto auto",
e.appendChild(t),
g.mplayerTime.appendChild(e)) : e.appendChild(t));
for (var t = g.mplayerTime.querySelectorAll(".preview-image"), o = 0; o < t.length; o++) {
var l = t[o].getAttribute("data-playimage-index");
t[o].style.display = l != i ? "none" : "block"
}
}(),
g.mplayerTime.querySelector('[data-playimage-index="' + i + '"]').style.backgroundPosition = -e + "px " + -t + "px")
},
onSeekProgress: function(e) {
g.timeTotal.style.width = e.percentage + "%",
m.$method.computePlayTime(m.$data.percentage, m.$data.duration, function(e) {
g.timeStart.innerHTML = e
}),
"landscape" == m._this._global_.mobilePlugin.direction && p.showThumbnails(e.percentage)
},
onDurationChange: function(t) {
setTimeout(function() {
var e;
t.duration != 1 / 0 && (e = m.$method.formatCurrentTime(t.duration),
g.timeEnd.innerHTML = e)
}, 100)
},
onControlsToggle: function(t) {
var e;
i.isLockScreen || (t.show && g && p.readBattery(),
e = function() {
var e = new p.toggleControlsDisplay;
t.show ? e.ON_SideLeft() : e.OFF_SideLeft()
}
,
m._this._global_.isReady ? e() : setTimeout(function() {
e()
}, 150))
},
onFullscreenChange: function(e) {
function t() {
m._this._global_.mobilePlugin.direction = e.direction,
"portrait" == e.direction && (g.menuButton.style.display = "none",
g.batteryInfo.style.display = "none",
g.mplayerLeft.style.opacity = 0,
g.mplayerTime.style.top = "50%",
g.mplayerTime.querySelector(".mp-thumbnails").style.display = "none"),
"landscape" == e.direction && (g.menuButton.style.display = "block",
g.batteryInfo.style.display = "flex",
g.mplayerLeft.style.opacity = 1,
g.mplayerTime.style.top = "35%",
g.mplayerTime.querySelector(".mp-thumbnails").style.display = "block")
}
m._this._global_.isReady ? t() : setTimeout(function() {
t()
}, 150)
},
onReady: function() {
var e;
"function" == typeof m.$el && (e = new m.$el,
m.$el = e),
t = m.$el.mPlayer,
p.overloadingEl(),
p.plusRuntimeAction(),
p.toggleEventListenerGlobal("add", "playerReady"),
p.readBattery()
},
onDestory: function() {
p.toggleEventListenerGlobal("remove", "playerDestory")
},
onError: function() {
p.toggleEventListenerGlobal("remove", "playerError")
},
onAction: function(e) {
e = "add" == e ? "on" : "off";
m._this[e]("seek-progress", p.onSeekProgress),
m._this[e]("duration-change", p.onDurationChange),
m._this[e]("controls-toggle", p.onControlsToggle),
m._this[e]("fullscreen-change", p.onFullscreenChange),
m._this[e]("ready", p.onReady),
m._this[e]("destory", p.onDestory),
m._this[e]("error", p.onError)
},
toggleEventListenerGlobal: function(e, t) {
var l = "add" == e ? "addEventListener" : "removeEventListener";
m._this._global_.mobilePlugin.eventStatus = l;
!function() {
g.mPlayer[l]("touchstart", p.videoScreenTouch),
g.menuButton[l]("click", p.onMenuTap),
g.toggleFit && g.toggleFit[l]("click", p.onToggleFit),
g.toggleLoop && g.toggleLoop[l]("click", p.onToggleLoop);
for (var e = g.mplayerSidebar instanceof Element ? g.mplayerSidebar.querySelectorAll(".play-speed") : [], t = 0; t < e.length; t++)
e[t][l]("click", p.onPlaySpeed);
for (var o = g.mplayerSidebar instanceof Element ? g.mplayerSidebar.querySelectorAll(".share-box") : [], t = 0; t < o.length; t++)
o[t][l]("click", p.onShareBox)
}(),
"playerReady" == t && g.lockScreen.addEventListener("click", p.onLockScreenTap),
"removeEventListener" == l && "lockAction" != t && p.onAction("remove")
}
};
this.interface = function(n) {
this._onAgentMpTap = function(e) {
var t, o, l;
i.isLockScreen ? (t = new p.toggleControlsDisplay,
o = g.mplayerLeft.getBoundingClientRect(),
l = g.mPlayer.getBoundingClientRect(),
0 < o.left - l.left ? t.OFF_SideLeft() : t.ON_SideLeft()) : ("click" == e && m.$method.toggleControlsDisplay(n),
"dbclick" == e && m.$method.onPlayTap({
type: "dblscreen"
}))
}
,
this._onAgentEventAction = function(e) {
p.onAgentEventAction(e)
}
}
,
this.appendTemplate = function(e, t) {
m = {},
m = t,
console.info("loading mui player mobile plugin..."),
p.onAction("add");
t = (t = o + n + r + a + s).toString().replace(//g, ""),
t = m.$method.createRangeIsDocFragment(t);
return p.initLanguage(t),
e.appendChild(t),
e.querySelector("#buttom-group").appendChild(m.$method.createRangeIsDocFragment(c)),
e.querySelector("#buttom-group").appendChild(m.$method.createRangeIsDocFragment(d)),
e = p.initConifgAttribute(e),
e = p.initConfigControls(e),
e = p.initConfigTheme(e)
}
,
this.name = "MuiPlayerMobilePlugin"
}
});