From 4940356eeb287d14949556adba1b86d591b54847 Mon Sep 17 00:00:00 2001 From: capdiem Date: Fri, 22 Dec 2023 14:30:43 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=86=95=20feat(labs):=20add=20xgplayer=20c?= =?UTF-8?q?omponent=20(#1685)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Examples/labs/xgplayer/Controls.razor | 6 + .../Examples/labs/xgplayer/Default.razor | 3 + .../Examples/labs/xgplayer/Ignores.razor | 6 + .../Examples/labs/xgplayer/MusicPlayer.razor | 9 + .../Examples/labs/xgplayer/StartTime.razor | 4 + .../Examples/labs/xgplayer/Switch.razor | 67 +++++ docs/Masa.Blazor.Docs/wwwroot/data/nav.json | 5 + .../wwwroot/pages/labs/xgplayer/en-US.md | 61 ++++ .../wwwroot/pages/labs/xgplayer/zh-CN.md | 58 ++++ docs/Masa.Docs.Server/Pages/_Host.cshtml | 1 + .../wwwroot/locale/en-US.json | 4 +- .../wwwroot/locale/zh-CN.json | 4 +- docs/Masa.Docs.WebAssembly/wwwroot/index.html | 1 + .../Components/Xgplayer/IXgplayer.cs | 6 + .../Components/Xgplayer/MXgMusicPlayer.cs | 273 ++++++++++++++++++ .../Components/Xgplayer/MXgplayer.cs | 180 ++++++++++++ .../Components/Xgplayer/MediaStreamUrl.cs | 18 ++ .../Xgplayer/Plugins/BuiltInPlugin.cs | 31 ++ .../Xgplayer/Plugins/Controls/ControlsMode.cs | 10 + .../Plugins/Controls/IXgplayerControls.cs | 23 ++ .../Plugins/Controls/MXgplayerControls.cs | 17 ++ .../Xgplayer/Plugins/Play/IXgplayerPlay.cs | 17 ++ .../Xgplayer/Plugins/Play/MXgplayerPlay.cs | 16 + .../Xgplayer/Plugins/PluginPosition.cs | 16 + .../Xgplayer/Plugins/Time/IXgplayerTime.cs | 15 + .../Xgplayer/Plugins/Time/MXgplayerTime.cs | 17 ++ .../Xgplayer/Plugins/XgplayerPluginBase.cs | 33 +++ .../Components/Xgplayer/XgplayerJSModule.cs | 22 ++ .../Xgplayer/XgplayerJSObjectReference.cs | 48 +++ .../Components/Xgplayer/XgplayerMusic.cs | 6 + .../Components/Xgplayer/XgplayerOptions.cs | 229 +++++++++++++++ .../Xgplayer/XgplayerPropsAndStates.cs | 78 +++++ .../ServiceCollectionExtensions.cs | 2 + src/Masa.Blazor/_Imports.cs | 2 + .../wwwroot/js/proxies/xgplayer-proxy.js | 2 + .../wwwroot/js/proxies/xgplayer-proxy.js.map | 1 + src/Masa.Try.Server/Pages/_Host.cshtml | 1 + src/Masa.Try.WebAssembly/wwwroot/index.html | 1 + 38 files changed, 1291 insertions(+), 2 deletions(-) create mode 100644 docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Controls.razor create mode 100644 docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Default.razor create mode 100644 docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Ignores.razor create mode 100644 docs/Masa.Blazor.Docs/Examples/labs/xgplayer/MusicPlayer.razor create mode 100644 docs/Masa.Blazor.Docs/Examples/labs/xgplayer/StartTime.razor create mode 100644 docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Switch.razor create mode 100644 docs/Masa.Blazor.Docs/wwwroot/pages/labs/xgplayer/en-US.md create mode 100644 docs/Masa.Blazor.Docs/wwwroot/pages/labs/xgplayer/zh-CN.md create mode 100644 src/Masa.Blazor/Components/Xgplayer/IXgplayer.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/MXgMusicPlayer.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/MXgplayer.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/MediaStreamUrl.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/Plugins/BuiltInPlugin.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/ControlsMode.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/IXgplayerControls.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/MXgplayerControls.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/Plugins/Play/IXgplayerPlay.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/Plugins/Play/MXgplayerPlay.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/Plugins/PluginPosition.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/Plugins/Time/IXgplayerTime.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/Plugins/Time/MXgplayerTime.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/Plugins/XgplayerPluginBase.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/XgplayerJSModule.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/XgplayerJSObjectReference.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/XgplayerMusic.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/XgplayerOptions.cs create mode 100644 src/Masa.Blazor/Components/Xgplayer/XgplayerPropsAndStates.cs create mode 100644 src/Masa.Blazor/wwwroot/js/proxies/xgplayer-proxy.js create mode 100644 src/Masa.Blazor/wwwroot/js/proxies/xgplayer-proxy.js.map diff --git a/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Controls.razor b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Controls.razor new file mode 100644 index 0000000000..4631863c28 --- /dev/null +++ b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Controls.razor @@ -0,0 +1,6 @@ +@using Masa.Blazor.Components.Xgplayer.Plugins.Controls + + + + diff --git a/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Default.razor b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Default.razor new file mode 100644 index 0000000000..03734c909a --- /dev/null +++ b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Default.razor @@ -0,0 +1,3 @@ + + diff --git a/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Ignores.razor b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Ignores.razor new file mode 100644 index 0000000000..8d5096d374 --- /dev/null +++ b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Ignores.razor @@ -0,0 +1,6 @@ +@using Masa.Blazor.Components.Xgplayer.Plugins + + + diff --git a/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/MusicPlayer.razor b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/MusicPlayer.razor new file mode 100644 index 0000000000..2d21a1ec5c --- /dev/null +++ b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/MusicPlayer.razor @@ -0,0 +1,9 @@ +@using Masa.Blazor.Components.Xgplayer.Plugins.Controls + + + + diff --git a/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/StartTime.razor b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/StartTime.razor new file mode 100644 index 0000000000..859a4e1f41 --- /dev/null +++ b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/StartTime.razor @@ -0,0 +1,4 @@ + + diff --git a/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Switch.razor b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Switch.razor new file mode 100644 index 0000000000..75b2a51cbb --- /dev/null +++ b/docs/Masa.Blazor.Docs/Examples/labs/xgplayer/Switch.razor @@ -0,0 +1,67 @@ +@using Masa.Blazor.Components.Xgplayer.Plugins +@using Masa.Blazor.Components.Xgplayer + +
+
+ @if (_isMusic) + { + + + + + } + else + { + + + + } +
+ + Toggle to @(_isMusic ? "Video" : "Music") +
+ +@code { + + private bool _isMusic; + + private double _startTime; + private bool _isRunning; + + private MXgMusicPlayer _xgMusicPlayer = null!; + private MXgplayer _xgplayer = null!; + + private async Task ToggleMusic() + { + if (_isMusic) + { + _isMusic = false; + await SetStateAsync(_xgMusicPlayer); + } + else + { + _isMusic = true; + await SetStateAsync(_xgplayer); + } + } + + private async Task SetStateAsync(MXgMusicPlayer player) + { + var attr = await player.GetPropsAndStatesAsync(); + _startTime = attr.CurrentTime; + _isRunning = attr.State == XgplayerState.Running; + } + +} diff --git a/docs/Masa.Blazor.Docs/wwwroot/data/nav.json b/docs/Masa.Blazor.Docs/wwwroot/data/nav.json index c737246b5d..096181bdf4 100644 --- a/docs/Masa.Blazor.Docs/wwwroot/data/nav.json +++ b/docs/Masa.Blazor.Docs/wwwroot/data/nav.json @@ -294,6 +294,11 @@ "title": "watermark", "state": "new", "releasedOn": "v1.1.1" + }, + { + "title": "xgplayer", + "state": "new", + "releasedOn": "v1.3.0" } ] }, diff --git a/docs/Masa.Blazor.Docs/wwwroot/pages/labs/xgplayer/en-US.md b/docs/Masa.Blazor.Docs/wwwroot/pages/labs/xgplayer/en-US.md new file mode 100644 index 0000000000..cf3aeb2786 --- /dev/null +++ b/docs/Masa.Blazor.Docs/wwwroot/pages/labs/xgplayer/en-US.md @@ -0,0 +1,61 @@ +--- +title: Xgplayer +desc: "A HTML5 video player component base on [Xigua Video Playerv3.0.11](https://h5player.bytedance.com/en)." +tag: "JS Proxy" +--- + +You need to reference the following files before using it: + +```html + +``` + +## Usage + + + + + +## Examples + +### Props + +#### StartTime + +`StartTime` property can specify the start time of the video. + + + +#### Ignores + +Disable plugins through the `Ignores` property. The built-in plugin list can be viewed in `BultinPlugins`. + + + +### Misc + +#### Switch music and video + +**MXgMusicPlayer** is a separate music player component. +This example shows how to switch between music and video. +The `_startTime` field is used to record the progress of video and audio playback. +The `_isRunning` field is used to record whether the video or audio is playing. + + + +## Music player + +**MXgplayer** has a base class component **MXgMusicPlayer** that can be used separately. + + + +## Plugin components + +Currently, only three plugin components **Controls**, **Play**, **Time** are implemented, +and other plugin components are welcome to PR. + +### Controls + +Use the built-in control plugin component to customize the style of the control bar. + + diff --git a/docs/Masa.Blazor.Docs/wwwroot/pages/labs/xgplayer/zh-CN.md b/docs/Masa.Blazor.Docs/wwwroot/pages/labs/xgplayer/zh-CN.md new file mode 100644 index 0000000000..a23953c87e --- /dev/null +++ b/docs/Masa.Blazor.Docs/wwwroot/pages/labs/xgplayer/zh-CN.md @@ -0,0 +1,58 @@ +--- +title: Xgplayer(西瓜视频播放器) +desc: "一个基于 [Xigua Video Playervv3.0.11](https://h5player.bytedance.com/) 的 HTML5 视频播放器组件。" +tag: "JS代理" +--- + +在使用之前你必须引入以下文件: + +```html + +``` + +## 使用 + + + + + +## 示例 + +### 属性 + +#### 开始时间 + +`StartTime` 属性可以指定视频的开始播放时间。 + + + +#### 禁用插件 + +通过 `Ignores` 属性禁用插件,内置的插件列表在 `BultinPlugins` 中可以查看。 + + + +### 其他 + +#### 切换音乐和视频 + +**MXgMusicPlayer** 是单独的音乐播放器组件,这个例子演示了如何在音乐和视频之间切换。 +`_startTime` 字段用于记录视频和音频播放的进度。`_isRunning` 字段用于记录视频或音频是否正在播放。 + + + +## 音乐播放器 + +**MXgplayer** 结构上有个 **MXgMusicPlayer** 的基类组件,可以单独使用。 + + + +## 插件组件 + +目前仅实现了 **Controls**、**Play**、**Time** 三个插件组件,其他插件组件欢迎 PR。 + +### 控制条 + +使用内置的控制插件组件,可以自定义控制条的样式。 + + diff --git a/docs/Masa.Docs.Server/Pages/_Host.cshtml b/docs/Masa.Docs.Server/Pages/_Host.cshtml index a5964eacd5..2995892081 100644 --- a/docs/Masa.Docs.Server/Pages/_Host.cshtml +++ b/docs/Masa.Docs.Server/Pages/_Host.cshtml @@ -28,6 +28,7 @@ + diff --git a/docs/Masa.Docs.Shared/wwwroot/locale/en-US.json b/docs/Masa.Docs.Shared/wwwroot/locale/en-US.json index 7f04458c3e..a8dd556666 100644 --- a/docs/Masa.Docs.Shared/wwwroot/locale/en-US.json +++ b/docs/Masa.Docs.Shared/wwwroot/locale/en-US.json @@ -244,6 +244,7 @@ "treeview": "Treeview", "virtual-scroll": "Virtual scroll", "watermark": "Watermark", + "xgplayer": "Xgplayer", "md-breakpoints": "Material Design Breakpoints", "device": "Device", "code": "Code", @@ -426,7 +427,8 @@ "tooltips": "The Tooltips component is useful for conveying information when a user hovers over an element", "treeview": "The Treeview component is useful for displaying large amounts of nested data.", "virtual-scroller": "The VirtualScroller component displays a virtual、infinite list", - "watermark": "Add specific text or image to the page" + "watermark": "Add specific text or image to the page", + "xgplayer": "A HTML5 video player based on Xgplayer" }, "contribute": { "edit": "Edit on {0}", diff --git a/docs/Masa.Docs.Shared/wwwroot/locale/zh-CN.json b/docs/Masa.Docs.Shared/wwwroot/locale/zh-CN.json index b65ed244a3..0ceeaaeb2f 100644 --- a/docs/Masa.Docs.Shared/wwwroot/locale/zh-CN.json +++ b/docs/Masa.Docs.Shared/wwwroot/locale/zh-CN.json @@ -247,6 +247,7 @@ "treeview": "Treeview(树形视图)", "virtual-scroll": "Virtual scroll(虚拟滚动条)", "watermark": "Watermark(水印)", + "xgplayer": "Xgplayer(视频播放器)", "md-breakpoints": "Material Design 断点", "device": "设备", "code": "代码", @@ -545,7 +546,8 @@ "tooltips": "当用户悬停在元素上时, Tooltips 组件可用于传递信息", "treeview": "适用于显示大量嵌套数据", "virtual-scroller": "VirtualScroller 组件显示一个虚拟、无限 的列表", - "watermark": "给某个区域加上水印" + "watermark": "给某个区域加上水印", + "xgplayer": "基于 Xgplayer 的 HTML5 视频播放器" }, "contribute": { "edit": "在 {0} 上编辑", diff --git a/docs/Masa.Docs.WebAssembly/wwwroot/index.html b/docs/Masa.Docs.WebAssembly/wwwroot/index.html index 5f82dd6f78..4c62365df1 100644 --- a/docs/Masa.Docs.WebAssembly/wwwroot/index.html +++ b/docs/Masa.Docs.WebAssembly/wwwroot/index.html @@ -26,6 +26,7 @@ + diff --git a/src/Masa.Blazor/Components/Xgplayer/IXgplayer.cs b/src/Masa.Blazor/Components/Xgplayer/IXgplayer.cs new file mode 100644 index 0000000000..2f8b9f68b4 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/IXgplayer.cs @@ -0,0 +1,6 @@ +namespace Masa.Blazor.Components.Xgplayer; + +public interface IXgplayer +{ + Task ConfigPluginAsync(object plugin); +} diff --git a/src/Masa.Blazor/Components/Xgplayer/MXgMusicPlayer.cs b/src/Masa.Blazor/Components/Xgplayer/MXgMusicPlayer.cs new file mode 100644 index 0000000000..e297506bc8 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/MXgMusicPlayer.cs @@ -0,0 +1,273 @@ +using Masa.Blazor.Components.Xgplayer; +using Masa.Blazor.Components.Xgplayer.Plugins; +using Masa.Blazor.Components.Xgplayer.Plugins.Controls; +using Masa.Blazor.Components.Xgplayer.Plugins.Play; +using Masa.Blazor.Components.Xgplayer.Plugins.Time; + +namespace Masa.Blazor; + +public class MXgMusicPlayer : BDomComponentBase, IXgplayer +{ + [Inject] private XgplayerJSModule XgplayerJSModule { get; set; } = default!; + + [Inject] private I18n I18n { get; set; } = default!; + + /// + /// Media resource URL, when the URL is in the form of an array, + /// [Source tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source) will be used for playback. + /// + [Parameter] [EditorRequired] public XgplayerUrl Url { get; set; } = default!; + + [Parameter] public StringNumber? Width { get; set; } + + [Parameter] public StringNumber? Height { get; set; } + + /// + /// If set with value , player would invoke video.play() after enough media data loaded. + /// + /// + /// Notice In many cases, autoplay action was limited by browser policy, for more details see https://h5player.bytedance.com/guide/extends/aautoplay.html + /// + [Parameter] public bool Autoplay { get; set; } + + /// + /// Mute when autoplay + /// + [Parameter] public bool AutoplayMuted { get; set; } + + /// + /// Default playback rate for media element, reference values: 0.5, 0.75, 1, 1.5, 2 + /// + [Parameter] [MasaApiParameter(1)] public float DefaultPlaybackRate { get; set; } = 1; + + /// + /// Default volume for media element, reference values: 0 ~ 1 + /// + [Parameter] [MasaApiParameter(0.6)] public float Volume { get; set; } = 0.6f; + + /// + /// Determine whether to play in a loop + /// + [Parameter] public bool Loop { get; set; } + + /// + /// The second of video to start playing + /// + [Parameter] public double StartTime { get; set; } + + /// + /// Player language + /// + [Parameter] public string? Lang { get; set; } + + /// + /// Player status after seeking + /// + [Parameter] public SeekedStatus SeekedStatus { get; set; } + + /// + /// Marks for progress bar + /// + [Parameter] public IEnumerable? ProgressDots { get; set; } + + /// + /// Whether to enable the screen and control bar separation mode, + /// set to , the control bar will be resident + /// and will not overlap with the video screen. + /// + [Parameter] public bool MarginControls { get; set; } + + /// + /// The list of plugins to be ignored. + /// You can find all built-in plugins in + /// + [Parameter] public IEnumerable? Ignores { get; set; } + + [Parameter] public RenderFragment? ChildContent { get; set; } + + private CancellationTokenSource? _cancellationTokenSource; + private bool _hasFirstRender; + private XgplayerUrl? _prevUrl; + + private IXgplayerControls? _controls; + private IXgplayerPlay? _play; + private IXgplayerTime? _time; + + private string ComputedLang + { + get + { + if (!string.IsNullOrWhiteSpace(Lang)) + { + return Lang; + } + + var culture = I18n.Culture; + + if (culture.TwoLetterISOLanguageName == "zh") + { + return IsHant(culture) ? "zh-hk" : "zh-cn"; + } + + return culture.TwoLetterISOLanguageName; + } + } + + public bool IsHant(CultureInfo culture) + { + if (culture.Parent.Name == "zh") + { + return culture.Name == "zh-Hant"; + } + + return IsHant(culture.Parent); + } + + protected XgplayerJSObjectReference? XgplayerJSObjectReference { get; set; } + + protected override void OnInitialized() + { + base.OnInitialized(); + + Url.ThrowIfNull(ComponentName); + _prevUrl = Url; + } + + protected override async Task OnParametersSetAsync() + { + await base.OnParametersSetAsync(); + + if (XgplayerJSObjectReference == null) + { + return; + } + + if (_prevUrl != Url) + { + _prevUrl = Url; + + await XgplayerJSObjectReference.UpdateUrlAsync(Url); + } + } + + protected override async Task OnAfterRenderAsync(bool firstRender) + { + await base.OnAfterRenderAsync(firstRender); + + if (firstRender) + { + _hasFirstRender = true; + await InitAsync(); + } + } + + protected override void BuildRenderTree(RenderTreeBuilder builder) + { + builder.OpenElement(0, "div"); + builder.AddAttribute(1, "class", CssProvider.GetClass()); + builder.AddAttribute(2, "style", CssProvider.GetStyle()); + builder.AddElementReferenceCapture(3, elementReference => Ref = elementReference); + builder.AddContent(4, RenderChildContent); + builder.CloseElement(); + + void RenderChildContent(RenderTreeBuilder builder) + { + builder.OpenComponent>(0); + builder.AddAttribute(1, "Value", this); + builder.AddAttribute(2, "IsFixed", true); + builder.AddAttribute(3, "ChildContent", ChildContent); + builder.CloseComponent(); + } + } + + protected override void SetComponentCss() + { + base.SetComponentCss(); + + CssProvider.UseBem("m-xgplayer-music"); + } + + private async Task InitAsync() + { + _cancellationTokenSource?.Cancel(); + _cancellationTokenSource = new(); + + await RunTaskInMicrosecondsAsync( + async () => XgplayerJSObjectReference = await XgplayerJSModule.InitAsync(Ref.GetSelector(), Url, GenOptions()), + 100, + _cancellationTokenSource.Token); + } + + protected virtual XgplayerOptions GenOptions() + { + return new XgplayerOptions() + { + Width = Width.ToUnitOrNull(), + Height = Height.ToUnitOrNull(), + Autoplay = Autoplay, + AutoplayMuted = AutoplayMuted, + DefaultPlaybackRate = DefaultPlaybackRate, + Volume = Volume, + Loop = Loop, + StartTime = StartTime, + Lang = ComputedLang, + SeekedStatus = SeekedStatus, + ProgressDots = ProgressDots, + MarginControls = MarginControls, + Ignores = Ignores, + Music = new XgplayerMusic(), // indicate that this is a music player + Controls = _controls, + Play = _play, + Time = _time + }; + } + + public async Task ConfigPluginAsync(object plugin) + { + switch (plugin) + { + case IXgplayerControls controls: + _controls = controls; + break; + case IXgplayerPlay play: + _play = play; + break; + case IXgplayerTime time: + _time = time; + break; + } + + ConfigPluginCore(plugin); + + if (_hasFirstRender) + { + await InitAsync(); + } + } + + protected virtual void ConfigPluginCore(object plugin) + { + } + + [MasaApiPublicMethod] + public async Task GetPropsAndStatesAsync() + { + return await XgplayerJSObjectReference!.GetPropsAndStatesAsync(); + } + + protected override async ValueTask DisposeAsync(bool disposing) + { + if (XgplayerJSObjectReference != null) + { + try + { + await XgplayerJSObjectReference.DestroyAsync(); + await XgplayerJSObjectReference.DisposeAsync(); + } + catch (JSDisconnectedException) + { + // ignore + } + } + } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/MXgplayer.cs b/src/Masa.Blazor/Components/Xgplayer/MXgplayer.cs new file mode 100644 index 0000000000..7b5d7ab64c --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/MXgplayer.cs @@ -0,0 +1,180 @@ +using System.Collections; +using Masa.Blazor.Components.Xgplayer; +using Masa.Blazor.Components.Xgplayer.Plugins; +using Masa.Blazor.Components.Xgplayer.Plugins.Controls; +using Masa.Blazor.Components.Xgplayer.Plugins.Play; + +namespace Masa.Blazor; + +public class MXgplayer : MXgMusicPlayer +{ + /// + /// Loading media resource immediately after player initialized. + /// + [Parameter] [MasaApiParameter(true)] public bool VideoInit { get; set; } = true; + + /// + /// Enable inline playing mode, would set playsinline DOM attribute to media element. + /// For more details about inline playing mode see https://webkit.org/blog/6784/new-video-policies-for-ios/ + /// + [Parameter] [MasaApiParameter(true)] public bool Playsinline { get; set; } = true; + + /// + /// Post image of video + /// + [Parameter] public string? Poster { get; set; } + + /// + /// DOM attributes for media element, for more details + /// see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement + /// + [Parameter] public Dictionary? VideoAttributes { get; set; } + + /// + /// The fluid layout allows the player's width varies to follow the width of the parent element's change, + /// and the height varies according to the height and width proportion of the configuration item + /// (the player's width and height is the internal default value when width and height are not set). + /// + [Parameter] public bool Fluid { get; set; } + + /// + /// When video resource was playing, fit raw height、width of video resource to player's + /// + [Parameter] public FitVideoSize FitVideoSize { get; set; } + + /// + /// The fill mode of media resource + /// + [Parameter] public VideoFillMode VideoFillMode { get; set; } + + /// + /// Thumbnail for user to preview unplayed video content + /// + [Parameter] public Thumbnail? Thumbnail { get; set; } + + private IXgplayerControls? _controls; + private IXgplayerPlay? _play; + + protected override void SetComponentCss() + { + CssProvider.UseBem("m-xgplayer"); + } + + protected override XgplayerOptions GenOptions() + { + var options = base.GenOptions(); + + // indicate that this is a video player, not a music player + options.Music = null; + + // properties only for video player + options.VideoInit = VideoInit; + options.Playsinline = Playsinline; + options.Poster = Poster; + options.Fluid = Fluid; + options.FitVideoSize = FitVideoSize; + options.VideoFillMode = VideoFillMode; + options.Thumbnail = Thumbnail; + options.VideoAttributes = VideoAttributes; + + return options; + } + + protected override void ConfigPluginCore(object plugin) + { + } + + [MasaApiPublicMethod] + public async Task SwitchToMusicAsync(XgplayerUrl url) + { + await XgplayerJSObjectReference.SwitchToMusicAsync(url); + } + + [MasaApiPublicMethod] + public async Task SwitchToVideoAsync(XgplayerUrl url) + { + await XgplayerJSObjectReference.SwitchToVideoAsync(url); + } +} + +public class OneOrMore : OneOfBase>, IEnumerable +{ + protected OneOrMore(OneOf> input) : base(input) + { + } + + public IEnumerator GetEnumerator() + { + if (IsT0) + { + yield return AsT0; + } + else + { + foreach (var item in AsT1) + { + yield return item; + } + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public static implicit operator OneOrMore(T value) => new(value); + + public static implicit operator OneOrMore(T[] value) => new(value); + + public static implicit operator OneOrMore(List value) => new(value); +} + +public class XgplayerUrl : OneOfBase>, IEnumerable +{ + protected XgplayerUrl(OneOf> input) : base(input) + { + } + + public IEnumerator GetEnumerator() + { + if (IsT0) + { + yield return new MediaStreamUrl(AsT0); + } + else if (IsT1) + { + yield return AsT1; + } + else + { + foreach (var item in AsT2) + { + yield return item; + } + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + public static implicit operator XgplayerUrl(string _) => new(_); + + public static implicit operator XgplayerUrl(MediaStreamUrl _) => new(_); + + public static implicit operator XgplayerUrl(MediaStreamUrl[] _) => new(_); + + public static implicit operator XgplayerUrl(List _) => new(_); + + public static bool operator ==(XgplayerUrl left, XgplayerUrl right) + { + return left.AsEnumerable().SequenceEqual(right.AsEnumerable()); + } + + public static bool operator !=(XgplayerUrl left, XgplayerUrl right) + { + return !(left == right); + } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/MediaStreamUrl.cs b/src/Masa.Blazor/Components/Xgplayer/MediaStreamUrl.cs new file mode 100644 index 0000000000..8c2416e589 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/MediaStreamUrl.cs @@ -0,0 +1,18 @@ +namespace Masa.Blazor.Components.Xgplayer; + +public class MediaStreamUrl +{ + public string Src { get; set; } + + public string? Type { get; set; } + + public MediaStreamUrl(string src) + { + Src = src; + } + + public MediaStreamUrl(string src, string type) : this(src) + { + Type = type; + } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/Plugins/BuiltInPlugin.cs b/src/Masa.Blazor/Components/Xgplayer/Plugins/BuiltInPlugin.cs new file mode 100644 index 0000000000..ca4383e418 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/Plugins/BuiltInPlugin.cs @@ -0,0 +1,31 @@ +namespace Masa.Blazor.Components.Xgplayer.Plugins; + +public static class BuiltInPlugin +{ + public const string Controls = "controls"; + public const string Progress = "progress"; + public const string ProgressPreview = "progressPreview"; + public const string Mobile = "mobile"; + public const string PC = "pc"; + public const string Definition = "definition"; + public const string Error = "error"; + public const string Fullscreen = "fullscreen"; + public const string CssFullscreen = "cssFullscreen"; + public const string Loading = "loading"; + public const string Play = "play"; + public const string Poster = "poster"; + public const string Enter = "enter"; + public const string Replay = "replay"; + public const string Start = "start"; + public const string Volume = "volume"; + public const string Time = "time"; + public const string PlaybackRate = "playbackRate"; + public const string Pip = "pip"; + + public const string MusicBackward = "musicbackward"; + public const string MusicForward = "musicforward"; + public const string MusicPrev = "musicprev"; + public const string MusicNext = "musicnext"; + public const string MusicCover = "musiccover"; + public const string MusicMeta = "musicmeta"; +} diff --git a/src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/ControlsMode.cs b/src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/ControlsMode.cs new file mode 100644 index 0000000000..f287bce92e --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/ControlsMode.cs @@ -0,0 +1,10 @@ +namespace Masa.Blazor.Components.Xgplayer.Plugins.Controls; + +public enum ControlsMode +{ + Normal, + + Flex, + + Bottom +} diff --git a/src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/IXgplayerControls.cs b/src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/IXgplayerControls.cs new file mode 100644 index 0000000000..6ee3da7f19 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/IXgplayerControls.cs @@ -0,0 +1,23 @@ +using System.Text.Json.Serialization; + +namespace Masa.Blazor.Components.Xgplayer.Plugins.Controls; + +public interface IXgplayerControls +{ + /// + /// Whether to support automatic hiding, the default value is , + /// If the value is , it will stay resident + /// + bool AutoHide { get; } + + /// + /// The internal layout of the controlBar + /// + [JsonConverter(typeof(JsonCamelStringEnumConverter))] + ControlsMode Mode { get; } + + /// + /// Whether to show the control bar when the player is initialized + /// + bool InitShow { get; } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/MXgplayerControls.cs b/src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/MXgplayerControls.cs new file mode 100644 index 0000000000..3e97c213b9 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/Plugins/Controls/MXgplayerControls.cs @@ -0,0 +1,17 @@ +using Masa.Blazor.Components.Xgplayer.Plugins; +using Masa.Blazor.Components.Xgplayer.Plugins.Controls; + +namespace Masa.Blazor; + +public class MXgplayerControls : XgplayerPluginBase, IXgplayerControls +{ + // inherit + [Parameter] [MasaApiParameter(true)] public bool AutoHide { get; set; } = true; + + // inherit + [Parameter] [MasaApiParameter(nameof(ControlsMode.Normal))] + public ControlsMode Mode { get; set; } + + // inherit + [Parameter] public bool InitShow { get; set; } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/Plugins/Play/IXgplayerPlay.cs b/src/Masa.Blazor/Components/Xgplayer/Plugins/Play/IXgplayerPlay.cs new file mode 100644 index 0000000000..fda0f668ec --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/Plugins/Play/IXgplayerPlay.cs @@ -0,0 +1,17 @@ +using System.Text.Json.Serialization; + +namespace Masa.Blazor.Components.Xgplayer.Plugins.Play; + +public interface IXgplayerPlay +{ + /// + /// The order of plugin dom in the block. + /// + int Index { get; } + + /// + /// The position of the plugin dom. + /// + [JsonConverter(typeof(JsonCamelStringEnumConverter))] + PluginPosition Position { get; } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/Plugins/Play/MXgplayerPlay.cs b/src/Masa.Blazor/Components/Xgplayer/Plugins/Play/MXgplayerPlay.cs new file mode 100644 index 0000000000..854e8b34b1 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/Plugins/Play/MXgplayerPlay.cs @@ -0,0 +1,16 @@ +using System.Text.Json.Serialization; +using Masa.Blazor.Components.Xgplayer.Plugins; +using Masa.Blazor.Components.Xgplayer.Plugins.Play; + +namespace Masa.Blazor; + +public class MXgplayerPlay : XgplayerPluginBase, IXgplayerPlay +{ + // inherit + [Parameter] public int Index { get; set; } + + // inherit + [Parameter] + [MasaApiParameter(PluginPosition.ControlsLeft)] + public PluginPosition Position { get; set; } = PluginPosition.ControlsLeft; +} diff --git a/src/Masa.Blazor/Components/Xgplayer/Plugins/PluginPosition.cs b/src/Masa.Blazor/Components/Xgplayer/Plugins/PluginPosition.cs new file mode 100644 index 0000000000..ce511d2593 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/Plugins/PluginPosition.cs @@ -0,0 +1,16 @@ +namespace Masa.Blazor.Components.Xgplayer.Plugins; + +/// +/// The position of the plugin. +/// More details: https://h5player.bytedance.com/en/plugins/custom_plugin.html#reserved-config-position +/// +public enum PluginPosition +{ + Root, + RootLeft, + RootRight, + RootTop, + ControlsLeft, + ControlsRight, + ControlsCenter, +} diff --git a/src/Masa.Blazor/Components/Xgplayer/Plugins/Time/IXgplayerTime.cs b/src/Masa.Blazor/Components/Xgplayer/Plugins/Time/IXgplayerTime.cs new file mode 100644 index 0000000000..3797b928bf --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/Plugins/Time/IXgplayerTime.cs @@ -0,0 +1,15 @@ +namespace Masa.Blazor.Components.Xgplayer.Plugins.Time; + +public interface IXgplayerTime +{ + /// + /// The order of plugin dom in the block. + /// + int Index { get; } + + /// + /// The position of the plugin dom. + /// + [JsonConverter(typeof(JsonCamelStringEnumConverter))] + PluginPosition Position { get; } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/Plugins/Time/MXgplayerTime.cs b/src/Masa.Blazor/Components/Xgplayer/Plugins/Time/MXgplayerTime.cs new file mode 100644 index 0000000000..2da84a927c --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/Plugins/Time/MXgplayerTime.cs @@ -0,0 +1,17 @@ +using Masa.Blazor.Components.Xgplayer.Plugins; +using Masa.Blazor.Components.Xgplayer.Plugins.Time; + +namespace Masa.Blazor; + +public class MXgplayerTime : XgplayerPluginBase, IXgplayerTime +{ + // inherit + [Parameter] + [MasaApiParameter(2)] + public int Index { get; set; } = 2; + + // inherit + [Parameter] + [MasaApiParameter(PluginPosition.ControlsLeft)] + public PluginPosition Position { get; set; } = PluginPosition.ControlsLeft; +} diff --git a/src/Masa.Blazor/Components/Xgplayer/Plugins/XgplayerPluginBase.cs b/src/Masa.Blazor/Components/Xgplayer/Plugins/XgplayerPluginBase.cs new file mode 100644 index 0000000000..f16c6a6b7d --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/Plugins/XgplayerPluginBase.cs @@ -0,0 +1,33 @@ +namespace Masa.Blazor.Components.Xgplayer.Plugins; + +public class XgplayerPluginBase : IComponent +{ + [CascadingParameter] protected IXgplayer? Player { get; set; } + + private bool _initialized; + + public void Attach(RenderHandle renderHandle) + { + } + + public async Task SetParametersAsync(ParameterView parameters) + { + parameters.SetParameterProperties(this); + + if (!_initialized) + { + _initialized = true; + await OnInitializedAsync(); + } + } + + private async Task OnInitializedAsync() + { + if (Player == null) + { + return; + } + + await Player.ConfigPluginAsync(this); + } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/XgplayerJSModule.cs b/src/Masa.Blazor/Components/Xgplayer/XgplayerJSModule.cs new file mode 100644 index 0000000000..d42695f7d7 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/XgplayerJSModule.cs @@ -0,0 +1,22 @@ +namespace Masa.Blazor.Components.Xgplayer; + +public class XgplayerJSModule : JSModule +{ + public XgplayerJSModule(IJSRuntime js) : base(js, "./_content/Masa.Blazor/js/proxies/xgplayer-proxy.js") + { + } + + public async ValueTask InitAsync(string selector, string url, XgplayerOptions? options = null) + { + return await InitAsync(selector, new[] { new MediaStreamUrl(url) }, options); + } + + public async ValueTask InitAsync( + string selector, + IEnumerable urls, + XgplayerOptions? options = null) + { + var jsObjectReference = await InvokeAsync("init", selector, urls, options); + return new XgplayerJSObjectReference(jsObjectReference); + } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/XgplayerJSObjectReference.cs b/src/Masa.Blazor/Components/Xgplayer/XgplayerJSObjectReference.cs new file mode 100644 index 0000000000..148c9b0ef3 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/XgplayerJSObjectReference.cs @@ -0,0 +1,48 @@ +using Masa.Blazor.Components.Xgplayer; + +namespace Masa.Blazor; + +public class XgplayerJSObjectReference : IAsyncDisposable +{ + private readonly IJSObjectReference _jsObjectReference; + + public XgplayerJSObjectReference(IJSObjectReference jsObjectReference) + { + _jsObjectReference = jsObjectReference; + } + + public async ValueTask UpdateUrlAsync(XgplayerUrl url) + { + await InvokeVoidAsync("playNext", new { url }); + } + + public async ValueTask InvokeVoidAsync(string identity, params object[] args) + { + await _jsObjectReference.InvokeVoidAsync("invokeVoid", identity, args); + } + + public async ValueTask GetPropsAndStatesAsync() + { + return await _jsObjectReference.InvokeAsync("getPropsAndStates"); + } + + public async ValueTask SwitchToMusicAsync(XgplayerUrl url) + { + await _jsObjectReference.InvokeVoidAsync("switchMusic", url); + } + + public async ValueTask SwitchToVideoAsync(XgplayerUrl url) + { + await _jsObjectReference.InvokeVoidAsync("switchVideo", url); + } + + public async Task DestroyAsync() + { + await _jsObjectReference.InvokeVoidAsync("destroy"); + } + + public async ValueTask DisposeAsync() + { + await _jsObjectReference.DisposeAsync(); + } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/XgplayerMusic.cs b/src/Masa.Blazor/Components/Xgplayer/XgplayerMusic.cs new file mode 100644 index 0000000000..763c1ee194 --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/XgplayerMusic.cs @@ -0,0 +1,6 @@ +namespace Masa.Blazor.Components.Xgplayer; + +public class XgplayerMusic +{ + +} diff --git a/src/Masa.Blazor/Components/Xgplayer/XgplayerOptions.cs b/src/Masa.Blazor/Components/Xgplayer/XgplayerOptions.cs new file mode 100644 index 0000000000..061dc84c8e --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/XgplayerOptions.cs @@ -0,0 +1,229 @@ +using System.Text.Json.Serialization; +using Masa.Blazor.Components.Xgplayer.Plugins; +using Masa.Blazor.Components.Xgplayer.Plugins.Controls; +using Masa.Blazor.Components.Xgplayer.Plugins.Play; +using Masa.Blazor.Components.Xgplayer.Plugins.Time; + +namespace Masa.Blazor.Components.Xgplayer; + +public class XgplayerOptions +{ + public string? Width { get; set; } + + public string? Height { get; set; } + + /// + /// If set with value , player would invoke video.play() after enough media data loaded. + /// + /// + /// Notice In many cases, autoplay action was limited by browser policy, for more details see https://h5player.bytedance.com/guide/extends/aautoplay.html + /// + public bool Autoplay { get; set; } + + /// + /// Autoplay with video muted + /// + public bool AutoplayMuted { get; set; } + + /// + /// Loading media resource immediately after player initialized. + /// + public bool VideoInit { get; set; } = true; + + /// + /// Enable inline playing mode, would set playsinline DOM attribute to media element. + /// For more details about inline playing mode see https://webkit.org/blog/6784/new-video-policies-for-ios/ + /// + public bool Playsinline { get; set; } + + /// + /// Default playback rate for media element, reference values: 0.5, 0.75, 1, 1.5, 2 + /// + public float DefaultPlaybackRate { get; set; } = 1; + + /// + /// Default volume for media element, reference values: 0 ~ 1 + /// + public float Volume { get; set; } = 0.6f; + + /// + /// Determine whether to play in a loop + /// + public bool Loop { get; set; } + + /// + /// Post image of video + /// + public string? Poster { get; set; } + + /// + /// The second of video to start playing + /// + public double StartTime { get; set; } + + /// + /// DOM attributes for media element, for more details + /// see https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement + /// + public Dictionary? VideoAttributes { get; set; } + + /// + /// Player language + /// + public string? Lang { get; set; } + + /// + /// The fluid layout allows the player's width varies to follow the width of the parent element's change, + /// and the height varies according to the height and width proportion of the configuration item + /// (the player's width and height is the internal default value when width and height are not set). + /// + public bool Fluid { get; set; } + + /// + /// When video resource was playing, fit raw height、width of video resource to player's + /// + [JsonConverter(typeof(JsonCamelStringEnumConverter))] + public FitVideoSize FitVideoSize { get; set; } + + /// + /// The fill mode of media resource + /// + [JsonConverter(typeof(JsonCamelStringEnumConverter))] + public VideoFillMode VideoFillMode { get; set; } + + /// + /// Player status after seeking + /// + [JsonConverter(typeof(JsonCamelStringEnumConverter))] + public SeekedStatus SeekedStatus { get; set; } + + /// + /// Marks for progress bar + /// + [JsonPropertyName("progressDot")] + public IEnumerable? ProgressDots { get; set; } + + /// + /// Thumbnail for user to preview unplayed video content + /// + public Thumbnail? Thumbnail { get; set; } + + [JsonConverter(typeof(JsonCamelStringEnumConverter))] + public DomEventType DomEventType { get; set; } + + /// + /// Whether to enable the screen and control bar separation mode, + /// set to , the control bar will be resident + /// and will not overlap with the video screen. + /// + public bool MarginControls { get; set; } + + /// + /// A list of plugins to be ignored. + /// You can find all built-in plugins in . + /// + public IEnumerable? Ignores { get; set; } + + public XgplayerMusic? Music { get; set; } + + /// + /// The options for controls plugin + /// + public IXgplayerControls? Controls { get; set; } + + public IXgplayerPlay? Play { get; set; } + + public IXgplayerTime? Time { get; set; } +} + +public enum DomEventType +{ + Default, + Touch, + Mouse +} + +public enum FitVideoSize +{ + Fixed, + FixWidth, + FixHeight, + Auto +} + +public enum VideoFillMode +{ + Auto, + FillWidth, + FillHeight, + Fill, + Contain, +} + +public enum SeekedStatus +{ + Play, + Pause, + Auto +} + +public class ProgressDot +{ + /// + /// Id of progress dot + /// + public int Id { get; set; } + + /// + /// The dot position in progress bar + /// + public int Time { get; set; } + + /// + /// Text shown in progress dot when user hover on it + /// + public string? Text { get; set; } + + /// + /// The duration of fragment + /// + public int Duration { get; set; } + + /// + /// Style object for progress dot + /// + public Dictionary? Style { get; set; } +} + +public class Thumbnail +{ + /// + /// Thumbnail picture urls + /// + public IEnumerable? Urls { get; set; } + + /// + /// Total number for all thumbnail pictures + /// + public int PicNum { get; set; } + + /// + /// Row number in seperate thumbnail picture + /// + public int Row { get; set; } + + /// + /// Col number in seperate thumbnail picture + /// + public int Col { get; set; } + + /// + /// Height for video frame in seperate thumbnail picture by px + /// + public int Height { get; set; } + + /// + /// Width for video frame in seperate thumbnail picture by px + /// + public int Width { get; set; } +} diff --git a/src/Masa.Blazor/Components/Xgplayer/XgplayerPropsAndStates.cs b/src/Masa.Blazor/Components/Xgplayer/XgplayerPropsAndStates.cs new file mode 100644 index 0000000000..d4790d7ede --- /dev/null +++ b/src/Masa.Blazor/Components/Xgplayer/XgplayerPropsAndStates.cs @@ -0,0 +1,78 @@ +namespace Masa.Blazor.Components.Xgplayer; + +public class XgplayerPropsAndStates +{ + public bool Autoplay { get; init; } + + public string? CrossOrigin { get; init; } + + public string? CurrentSrc { get; init; } + + public double CurrentTime { get; init; } + + public double Duration { get; init; } + + public double CumulateTime { get; init; } + + public double Volume { get; init; } + + public bool Muted { get; init; } + + public bool DefaultMuted { get; init; } + + public double PlaybackRate { get; init; } + + public bool Loop { get; init; } + + public string? Src { get; init; } + + public string? Lang { get; init; } + + public string? Version { get; init; } + + public XgplayerState State { get; init; } + + public bool Ended { get; init; } + + public bool Paused { get; init; } + + public XgplayerNetworkState NetworkState { get; init; } + + public XgplayerReadyState ReadyState { get; init; } + + public bool IsFullscreen { get; init; } + + public bool IsCssFullscreen { get; init; } + + public bool IsSeeking { get; init; } +} + +public enum XgplayerState +{ + Error, + Initial, + Ready, + Attaching, + Attached, + NotAllow, + Running, + Ended, + Destroyed +} + +public enum XgplayerNetworkState +{ + NetworkEmpty, + NetworkIdle, + NetworkLoading, + NetworkNoSource +} + +public enum XgplayerReadyState +{ + HaveNothing, + HaveMetadata, + HaveCurrentData, + HaveFutureData, + HaveEnoughData +} diff --git a/src/Masa.Blazor/Extensions/DependencyInjection/ServiceCollectionExtensions.cs b/src/Masa.Blazor/Extensions/DependencyInjection/ServiceCollectionExtensions.cs index 3fc1d3f9f0..4b4a6e625d 100644 --- a/src/Masa.Blazor/Extensions/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Masa.Blazor/Extensions/DependencyInjection/ServiceCollectionExtensions.cs @@ -1,5 +1,6 @@ using Masa.Blazor; using Masa.Blazor.Components.Drawflow; +using Masa.Blazor.Components.Xgplayer; using Microsoft.Extensions.DependencyInjection.Extensions; namespace Microsoft.Extensions.DependencyInjection; @@ -51,6 +52,7 @@ private static IMasaBlazorBuilder AddMasaBlazorInternal(this IServiceCollection services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); + services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); services.TryAddScoped(); diff --git a/src/Masa.Blazor/_Imports.cs b/src/Masa.Blazor/_Imports.cs index 5acbf090b1..988a73b448 100644 --- a/src/Masa.Blazor/_Imports.cs +++ b/src/Masa.Blazor/_Imports.cs @@ -15,3 +15,5 @@ global using Microsoft.Extensions.Logging; global using OneOf; global using BemIt; +global using Microsoft.AspNetCore.Components.Rendering; +global using System.Text.Json.Serialization; \ No newline at end of file diff --git a/src/Masa.Blazor/wwwroot/js/proxies/xgplayer-proxy.js b/src/Masa.Blazor/wwwroot/js/proxies/xgplayer-proxy.js new file mode 100644 index 0000000000..49de672bab --- /dev/null +++ b/src/Masa.Blazor/wwwroot/js/proxies/xgplayer-proxy.js @@ -0,0 +1,2 @@ +function e(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function t(t){for(var i=1;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i-1,C={info:"color: #525252; background-color: #90ee90;",error:"color: #525252; background-color: red;",warn:"color: #525252; background-color: yellow; "},b="%c[xgplayer]",_={config:{debug:k?3:0},logInfo:function(e){for(var t,i=arguments.length,n=new Array(i>1?i-1:0),o=1;o=3&&(t=console).log.apply(t,[b,C.info,e].concat(n))},logWarn:function(e){for(var t,i=arguments.length,n=new Array(i>1?i-1:0),o=1;o=1&&(t=console).warn.apply(t,[b,C.warn,e].concat(n))},logError:function(e){var t;if(!(this.config.debug<1)){for(var i=this.config.debug>=2?"trace":"error",n=arguments.length,o=new Array(n>1?n-1:0),r=1;r=t||i<0||h&&e-c>=r}function y(){var e=Date.now();if(v(e))return m(e);a=g(y,function(e){var i=e-c,n=t-(e-l);return h?Math.min(n,r-i):n}(e))}function m(e){return a=void 0,d&&n?p(e):(n=o=void 0,s)}function k(){for(var e=Date.now(),i=v(e),r=arguments.length,d=new Array(r),f=0;f0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=document.createElement(e);return o.className=n,o.innerHTML=t,Object.keys(i).forEach((function(t){var n=t,r=i[t];"video"===e||"audio"===e||"live-video"===e?r&&o.setAttribute(n,r):o.setAttribute(n,r)})),o},x.createDomFromHtml=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";try{var n=document.createElement("div");n.innerHTML=e;var o=n.children;return n=null,o.length>0?(o=o[0],i&&x.addClass(o,i),t&&Object.keys(t).forEach((function(e){o.setAttribute(e,t[e])})),o):null}catch(e){return _.logError("util.createDomFromHtml",e),null}},x.hasClass=function(e,t){if(!e||!t)return!1;try{return Array.prototype.some.call(e.classList,(function(e){return e===t}))}catch(o){var n=e.className&&"object"===i(e.className)?e.getAttribute("class"):e.className;return n&&!!n.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}},x.addClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)}))}catch(n){x.hasClass(e,t)||(e.className&&"object"===i(e.className)?e.setAttribute("class",e.getAttribute("class")+" "+t):e.className+=" "+t)}},x.removeClass=function(e,t){if(e&&t)try{t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.remove(t)}))}catch(n){x.hasClass(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className&&"object"===i(e.className)?e.setAttribute("class",e.getAttribute("class").replace(n," ")):e.className=e.className.replace(n," ")}))}},x.toggleClass=function(e,t){e&&t.split(/\s+/g).forEach((function(t){x.hasClass(e,t)?x.removeClass(e,t):x.addClass(e,t)}))},x.classNames=function(){for(var e=arguments,t=[],i=function(i){"String"===x.typeOf(e[i])?t.push(e[i]):"Object"===x.typeOf(e[i])&&Object.keys(e[i]).map((function(n){e[i][n]&&t.push(n)}))},n=0;n0&&void 0!==arguments[0]?arguments[0]:document,i=arguments.length>1?arguments[1]:void 0;try{e=t.querySelector(i)}catch(n){_.logError("util.findDom",n),0===i.indexOf("#")&&(e=t.getElementById(i.slice(1)))}return e},x.getCss=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,!1)[t]},x.padStart=function(e,t,i){for(var n=String(i),o=t>>0,r=Math.ceil(o/n.length),s=[],a=String(e);r--;)s.push(n);return s.join("").substring(0,o-a.length)+a},x.format=function(e){if(window.isNaN(e))return"";e=Math.round(e);var t=x.padStart(Math.floor(e/3600),2,0),i=x.padStart(Math.floor((e-3600*t)/60),2,0),n=x.padStart(Math.floor(e-3600*t-60*i),2,0);return("00"===t?[i,n]:[t,i,n]).join(":")},x.event=function(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement},x.typeOf=function(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]},x.deepCopy=function(e,t){if("Object"===x.typeOf(t)&&"Object"===x.typeOf(e))return Object.keys(t).forEach((function(i){"Object"!==x.typeOf(t[i])||t[i]instanceof Node?"Array"===x.typeOf(t[i])?e[i]="Array"===x.typeOf(e[i])?e[i].concat(t[i]):t[i]:e[i]=t[i]:void 0===e[i]||void 0===e[i]?e[i]=t[i]:x.deepCopy(e[i],t[i])})),e},x.deepMerge=function(e,t){return Object.keys(t).map((function(i){var n;"Array"===x.typeOf(t[i])&&"Array"===x.typeOf(e[i])?"Array"===x.typeOf(e[i])&&(n=e[i]).push.apply(n,p(t[i])):x.typeOf(e[i])!==x.typeOf(t[i])||null===e[i]||"Object"!==x.typeOf(e[i])||t[i]instanceof window.Node?null!==t[i]&&(e[i]=t[i]):x.deepMerge(e[i],t[i])})),e},x.getBgImage=function(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var i=document.createElement("a");return i.href=t.replace(/url\("|"\)/g,""),i.href},x.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},x.setInterval=function(e,t,i,n){e._interval[t]||(e._interval[t]=window.setInterval(i.bind(e),n))},x.clearInterval=function(e,t){clearInterval(e._interval[t]),e._interval[t]=null},x.setTimeout=function(e,t,i){e._timers||(e._timers=[]);var n=setTimeout((function(){t(),x.clearTimeout(e,n)}),i);return e._timers.push(n),n},x.clearTimeout=function(e,t){var i=e._timers;if("Array"===x.typeOf(i)){for(var n=0;n-1&&n.indexOf(e)>-1)||(o=parseFloat(i.slice(0,i.indexOf(e)).trim()),r=parseFloat(n.slice(0,n.indexOf(e)).trim()),s=e,!1)})),a.style.width="".concat(o).concat(s),a.style.height="".concat(r).concat(s),a.style.backgroundSize="".concat(o).concat(s," ").concat(r).concat(s),a.style.margin="start"===e?"-".concat(r/2).concat(s," auto auto -").concat(o/2).concat(s):"auto 5px auto 5px");return a},x.Hex2RGBA=function(e,t){var i=[];if(/^\#[0-9A-F]{3}$/i.test(e)){var n="#";e.replace(/[0-9A-F]/gi,(function(e){n+=e+e})),e=n}return/^#[0-9A-F]{6}$/i.test(e)?(e.replace(/[0-9A-F]{2}/gi,(function(e){i.push(parseInt(e,16))})),"rgba(".concat(i.join(","),", ").concat(t,")")):"rgba(255, 255, 255, 0.1)"},x.getFullScreenEl=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},x.checkIsFunction=function(e){return e&&"function"==typeof e},x.checkIsObject=function(e){return null!==e&&"object"===i(e)},x.hide=function(e){e.style.display="none"},x.show=function(e,t){e.style.display=t||"block"},x.isUndefined=function(e){if(null==e)return!0},x.isNotNull=function(e){return!(null==e)},x.setStyleFromCsstext=function(e,t){t&&("String"===x.typeOf(t)?t.replace(/\s+/g,"").split(";").map((function(t){if(t){var i=t.split(":");i.length>1&&(e.style[i[0]]=i[1])}})):Object.keys(t).map((function(i){e.style[i]=t[i]})))},x.filterStyleFromText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["width","height","top","left","bottom","right","position","z-index","padding","margin","transform"],i=e.style.cssText;if(!i)return{};var n=i.replace(/\s+/g,"").split(";"),o={},r={};return n.map((function(e){if(e){var i=e.split(":");i.length>1&&(!function(e,t){for(var i=0,n=t.length;i-1)return!0;return!1}(i[0],t)?r[i[0]]=i[1]:o[i[0]]=i[1])}})),e.setAttribute("style",""),Object.keys(r).map((function(t){e.style[t]=r[t]})),o},x.getStyleFromCsstext=function(e){var t=e.style.cssText;if(!t)return{};var i=t.replace(/\s+/g,"").split(";"),n={};return i.map((function(e){if(e){var t=e.split(":");t.length>1&&(n[t[0]]=t[1])}})),n},x.preloadImg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){var n=new window.Image;n.onload=function(e){n=null,t&&t(e)},n.onerror=function(e){n=null,i&&i(e)},n.src=e}},x.stopPropagation=function(e){e&&e.stopPropagation()},x.scrollTop=function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0},x.scrollLeft=function(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0},x.checkTouchSupport=function(){return"ontouchstart"in window},x.getBuffered2=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,i=[],n=0;na&&(o[s-1].end=i[r].end):o.push(i[r])}else o.push(i[r])}else o=i;return new w(o)},x.getEventPos=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.touches&&e.touches.length>0&&(e=e.touches[0]),{x:e.x/t,y:e.y/t,clientX:e.clientX/t,clientY:e.clientY/t,offsetX:e.offsetX/t,offsetY:e.offsetY/t,pageX:e.pageX/t,pageY:e.pageY/t}},x.requestAnimationFrame=function(e){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(t)return t(e)},x.getHostFromUrl=function(e){if("String"!==x.typeOf(e))return"";var t=e.split("/"),i="";return t.length>3&&t[2]&&(i=t[2]),i},x.cancelAnimationFrame=function(e){var t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.cancelRequestAnimationFrame;t&&t(e)},x.isMSE=function(e){return!!(e&&e instanceof HTMLMediaElement)&&(/^blob/.test(e.currentSrc)||/^blob/.test(e.src))},x.isBlob=function(e){return/^blob/.test(e)},x.generateSessionId=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(new Date).getTime();try{e=parseInt(e)}catch(t){e=0}return t+=e,window.performance&&"function"==typeof window.performance.now&&(t+=parseInt(window.performance.now())),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?i:3&i|8).toString(16)}))},x.createEvent=function(e){var t;return"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),t},x.adjustTimeByDuration=function(e,t,i){return t&&e&&(e>t||i&&e0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0,scale:1,rotate:0},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i={scale:"".concat(e.scale||1),translate:"".concat(e.x||0,"%, ").concat(e.y||0,"%"),rotate:"".concat(e.rotate||0,"deg")};return Object.keys(i).forEach((function(e){var n=new RegExp("".concat(e,"\\([^\\(]+\\)"),"g"),o="".concat(e,"(").concat(i[e],")");n.test(t)?(n.lastIndex=-1,t=t.replace(n,o)):t+="".concat(o," ")})),t},x.convertDeg=function(e){return Math.abs(e)<=1?360*e:e%360},x.getIndexByTime=function(e,t){var i=t.length,n=-1;if(i<1)return n;if(e<=t[0].end||i<2)n=0;else if(e>t[i-1].end)n=i-1;else for(var o=1;ot[o-1].end&&e<=t[o].end){n=o;break}return n},x.getOffsetCurrentTime=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1,n=-1;if((n=i>=0&&i=s&&e<=a?e-c:e>a&&n>=o-1?a:-1},x.getCurrentTimeByOffset=function(e,t){var i=-1;if(!t||t.length<0)return e;for(var n=0;n=3){var n=i[2].split(".");return n.length>0?parseInt(n[0]):0}return 0},get isWeixin(){if("undefined"==typeof navigator)return!1;return!!/(micromessenger)\/([\d.]+)/.exec(navigator.userAgent.toLocaleLowerCase())},isSupportMP4:function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;if(this.supportResult)return this.supportResult;var t=document.createElement("video");return"function"==typeof t.canPlayType&&I.map((function(i){"probably"===t.canPlayType('video/mp4; codecs="'.concat(i,'"'))&&(e.isSupport=!0,e.mime+="||".concat(i))})),this.supportResult=e,t=null,e},isMSESupport:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';if("undefined"==typeof MediaSource||!MediaSource)return!1;try{return MediaSource.isTypeSupported(e)}catch(t){return this._logger.error(e,t),!1}},isHevcSupported:function(){return!("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)&&(MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))},probeConfigSupported:function(e){var t={supported:!1,smooth:!1,powerEfficient:!1};if(!e||"undefined"==typeof navigator)return Promise.resolve(t);if(navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo)return navigator.mediaCapabilities.decodingInfo(e);var i=e.video||{},n=e.audio||{};try{var o=MediaSource.isTypeSupported(i.contentType),r=MediaSource.isTypeSupported(n.contentType);return Promise.resolve({supported:o&&r,smooth:!1,powerEfficient:!1})}catch(e){return Promise.resolve(t)}}},O="3.0.10",A={1:"media",2:"media",3:"media",4:"media",5:"media",6:"media"},D={1:5101,2:5102,3:5103,4:5104,5:5105,6:5106},R=r((function e(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{errorType:"",errorCode:0,errorMessage:"",originError:"",ext:{},mediaError:null};n(this,e);var o=t&&t.i18n?t.i18n.ERROR_TYPES:null;if(t.media){var r=i.mediaError?i.mediaError:t.media.error||{},s=t.duration,a=t.currentTime,l=t.ended,c=t.src,u=t.currentSrc,h=t.media,d=h.readyState,f=h.networkState,p=i.errorCode||r.code;D[p]&&(p=D[p]);var g={playerVersion:O,currentTime:a,duration:s,ended:l,readyState:d,networkState:f,src:c||u,errorType:i.errorType,errorCode:p,message:i.errorMessage||r.message,mediaError:r,originError:i.originError?i.originError.stack:"",host:x.getHostFromUrl(c||u)};return i.ext&&Object.keys(i.ext).map((function(e){g[e]=i.ext[e]})),g}if(arguments.length>1){for(var v={playerVersion:O,domain:document.domain},y=["errorType","currentTime","duration","networkState","readyState","src","currentSrc","ended","errd","errorCode","mediaError"],m=0;m0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers||(this._evHandlers=Te.map((function(t){var i="on".concat(t.charAt(0).toUpperCase()).concat(t.slice(1));return"function"==typeof e[i]&&e.on(t,e[i]),s({},t,function(e,t){return function(i,n){var o={player:t,eventName:e,originalEvent:i,detail:i.detail||{},timeStamp:i.timeStamp,currentTime:t.currentTime,duration:t.duration,paused:t.paused,ended:t.ended,isInternalOp:!!t._internalOp[i.type],muted:t.muted,volume:t.volume,host:x.getHostFromUrl(t.currentSrc),vtype:t.vtype};if(t.removeInnerOP(i.type),"timeupdate"===e&&(t._currentTime=t.media&&t.media.currentTime),"ratechange"===e){var r=t.media?t.media.playbackRate:0;if(r&&t._rate===r)return;t._rate=t.media&&t.media.playbackRate}if("durationchange"===e&&(t._duration=t.media.duration),"volumechange"===e&&(o.isMutedChange=t._lastMuted!==t.muted,t._lastMuted=t.muted),"error"===e&&(o.error=n||t.video.error),t.mediaEventMiddleware[e]){var s=Ie.bind(t,e,o);try{t.mediaEventMiddleware[e].call(t,o,s)}catch(i){throw Ie.call(t,e,o),i}}else Ie.call(t,e,o)}}(t,e))}))),this._evHandlers.forEach((function(e){var i=Object.keys(e)[0];t.addEventListener(i,e[i],!1)}))}},{key:"detachVideoEvents",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.media;this._evHandlers.forEach((function(e){var i=Object.keys(e)[0];t.removeEventListener(i,e[i],!1)})),this._evHandlers.forEach((function(t){var i=Object.keys(t)[0],n="on".concat(i.charAt(0).toUpperCase()).concat(i.slice(1));"function"==typeof e[n]&&e.off(i,e[n])})),this._evHandlers=null}},{key:"_attachSourceEvents",value:function(e,t){var i=this;e.removeAttribute("src"),e.load(),t.forEach((function(e,t){i.media.appendChild(x.createDom("source","",{src:"".concat(e.src),type:"".concat(e.type||""),"data-index":t+1}))}));var n=e.children;if(n){this._videoSourceCount=n.length,this._videoSourceIndex=n.length,this._vLoadeddata=function(e){i.emit(xe,{src:e.target.currentSrc,host:x.getHostFromUrl(e.target.currentSrc)})};for(var o=null,r=0;r=i._videoSourceCount){var n={code:4,message:"sources_load_error"};o?o.error(e,n):i.errorHandler("error",n)}var r=A[4];i.emit(we,new R(i,{errorType:r,errorCode:4,errorMessage:"sources_load_error",mediaError:{code:4,message:"sources_load_error"},src:e.target.src}))});for(var s=0;s0;)e.removeChild(t[0]);this._vLoadeddata&&e.removeEventListener("loadeddata",this._vLoadeddata)}}},{key:"errorHandler",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.media&&(this.media.error||t)){var i=this.media.error||t,n=i.code?A[i.code]:"other";i.message;this.media.currentSrc||(i={code:6,message:"empty_src"}),this.emit(e,new R(this,{errorType:n,errorCode:i.code,errorMessage:i.message||"",mediaError:i}))}}},{key:"destroy",value:function(){for(var e in this.media&&(this.media.pause&&(this.media.pause(),this.media.muted=!0),this.media.removeAttribute("src"),this.media.load()),this._currentTime=0,this._duration=0,this.mediaConfig=null,this._interval)Object.prototype.hasOwnProperty.call(this._interval,e)&&(clearInterval(this._interval[e]),this._interval[e]=null);this.detachVideoEvents(),this.media=null,this.mediaEventMiddleware={},this.removeAllListeners()}},{key:"video",get:function(){return this.media},set:function(e){this.media=e}},{key:"play",value:function(){return this.media?this.media.play():null}},{key:"pause",value:function(){this.media&&this.media.pause()}},{key:"load",value:function(){this.media&&this.media.load()}},{key:"canPlayType",value:function(e){return!!this.media&&this.media.canPlayType(e)}},{key:"getBufferedRange",value:function(e){var t=[0,0];if(!this.media)return t;e||(e=this.media.buffered);var i=this.media.currentTime;if(e)for(var n=0,o=e.length;n=this.currentTime)return{start:t.start(i),end:t.end(i)};return e}},{key:"crossOrigin",get:function(){return this.media?this.media.crossOrigin:""},set:function(e){this.media&&(this.media.crossOrigin=e)}},{key:"currentSrc",get:function(){return this.media?this.media.currentSrc:""},set:function(e){this.media&&(this.media.currentSrc=e)}},{key:"currentTime",get:function(){return this.media?void 0!==this.media.currentTime?this.media.currentTime:this._currentTime:0},set:function(e){this.media&&(this.media.currentTime=e)}},{key:"defaultMuted",get:function(){return!!this.media&&this.media.defaultMuted},set:function(e){this.media&&(this.media.defaultMuted=e)}},{key:"duration",get:function(){return this._duration}},{key:"ended",get:function(){return!!this.media&&this.media.ended}},{key:"error",get:function(){return this.media.error}},{key:"errorNote",get:function(){if(!this.media.error)return"";return["MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED"][this.media.error.code-1]}},{key:"loop",get:function(){return!!this.media&&this.media.loop},set:function(e){this.media&&(this.media.loop=e)}},{key:"muted",get:function(){return!!this.media&&this.media.muted},set:function(e){this.media&&this.media.muted!==e&&(this._lastMuted=this.media.muted,this.media.muted=e)}},{key:"networkState",get:function(){return this.media.networkState}},{key:"paused",get:function(){return!this.media||this.media.paused}},{key:"playbackRate",get:function(){return this.media?this.media.playbackRate:0},set:function(e){this.media&&e!==1/0&&(this.media.defaultPlaybackRate=e,this.media.playbackRate=e)}},{key:"played",get:function(){return this.media?this.media.played:null}},{key:"preload",get:function(){return!!this.media&&this.media.preload},set:function(e){this.media&&(this.media.preload=e)}},{key:"readyState",get:function(){return this.media.readyState}},{key:"seekable",get:function(){return!!this.media&&this.media.seekable}},{key:"seeking",get:function(){return!!this.media&&this.media.seeking}},{key:"src",get:function(){return this.media?this.media.src:""},set:function(e){this.media&&(this.emit(ae,e),this.emit(G),this._currentTime=0,this._duration=0,x.isMSE(this.media)?this.onWaiting():(this._detachSourceEvents(this.media),"Array"===x.typeOf(e)?this._attachSourceEvents(this.media,e):e?this.media.src=e:this.media.removeAttribute("src"),this.load()))}},{key:"volume",get:function(){return this.media?this.media.volume:0},set:function(e){e!==1/0&&this.media&&(this.media.volume=e)}},{key:"addInnerOP",value:function(e){this._internalOp[e]=!0}},{key:"removeInnerOP",value:function(e){delete this._internalOp[e]}},{key:"emit",value:function(e,t){for(var n,o=arguments.length,r=new Array(o>2?o-2:0),s=2;s2?o-2:0),s=2;s2?o-2:0),s=2;s2?o-2:0),s=2;s0&&void 0!==arguments[0]?arguments[0]:{name:"xgplayer",version:1,db:null,ojstore:{name:"xg-m4a",keypath:"vid"}};n(this,e),this.indexedDB=window.indexedDB||window.webkitindexedDB,this.IDBKeyRange=window.IDBKeyRange||window.webkitIDBKeyRange,this.myDB=t}return r(e,[{key:"openDB",value:function(e){var t=this,i=this,n=this.myDB.version||1,o=i.indexedDB.open(i.myDB.name,n);o.onerror=function(e){},o.onsuccess=function(n){t.myDB.db=n.target.result,e.call(i)},o.onupgradeneeded=function(e){var t=e.target.result;e.target.transaction,t.objectStoreNames.contains(i.myDB.ojstore.name)||t.createObjectStore(i.myDB.ojstore.name,{keyPath:i.myDB.ojstore.keypath})}}},{key:"deletedb",value:function(){this.indexedDB.deleteDatabase(this.myDB.name)}},{key:"closeDB",value:function(){this.myDB.db.close()}},{key:"addData",value:function(e,t){for(var i,n=this.myDB.db.transaction(e,"readwrite").objectStore(e),o=0;o3?n-3:0),r=3;r2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return this.__hooks||(this.__hooks={}),!this.__hooks[e]&&(this.__hooks[e]=null),function(){var n=arguments,o=this;if(i.pre)try{var r;(r=i.pre).call.apply(r,[this].concat(Array.prototype.slice.call(arguments)))}catch(t){throw t.message="[pluginName: ".concat(this.pluginName,":").concat(e,":pre error] >> ").concat(t.message),t}if(this.__hooks&&this.__hooks[e])try{var s,a=(s=this.__hooks[e]).call.apply(s,[this,this].concat(Array.prototype.slice.call(arguments)));a?a.then?a.then((function(e){!1!==e&&Ne.apply(void 0,[o,t,i.next].concat(p(n)))})).catch((function(e){throw e})):Ne.apply(void 0,[this,t,i.next].concat(Array.prototype.slice.call(arguments))):void 0===a&&Ne.apply(void 0,[this,t,i.next].concat(Array.prototype.slice.call(arguments)))}catch(t){throw t.message="[pluginName: ".concat(this.pluginName,":").concat(e,"] >> ").concat(t.message),t}else Ne.apply(void 0,[this,t,i.next].concat(Array.prototype.slice.call(arguments)))}.bind(this)}function He(e,t){var i=this.__hooks;if(i)return i.hasOwnProperty(e)?(i&&(i[e]=t),!0):(console.warn("has no supported hook which name [".concat(e,"]")),!1)}function Be(e,t){var i=this.__hooks;i&&delete i[e]}function Ue(e){if(this.plugins&&this.plugins[e.toLowerCase()]){for(var t=this.plugins[e.toLowerCase()],i=arguments.length,n=new Array(i>1?i-1:0),o=1;o1?i-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:[];e.__hooks={},t&&t.map((function(t){e.__hooks[t]=null})),Object.defineProperty(e,"hooks",{get:function(){return e.__hooks&&Object.keys(e.__hooks).map((function(t){if(e.__hooks[t])return t}))}})}function Ge(e){e.__hooks=null}function We(e,t,i){for(var n=arguments.length,o=new Array(n>3?n-3:0),r=3;r1?i-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:{};if(this.player){var o=t(t({},n),{},{pluginName:this.pluginName});this.player.emitUserAction(e,i,o)}}},{key:"hook",value:function(e,t){return Fe.call.apply(Fe,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"useHooks",value:function(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),o=2;o2?i-2:0),o=2;o1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(this.player)return i&&(t.pluginName=i),this.player.registerPlugin({plugin:e,options:t})}},{key:"getPlugin",value:function(e){return this.player?this.player.getPlugin(e):null}},{key:"__destroy",value:function(){var e=this,t=this.player,i=this.pluginName;this.offAll(),x.clearAllTimers(this),x.checkIsFunction(this.destroy)&&this.destroy(),["player","playerConfig","pluginName","logger","__args","__hooks"].map((function(t){e[t]=null})),t.unRegisterPlugin(i),Ge(this)}}],[{key:"defineGetterOrSetter",value:function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&Object.defineProperty(e,i,t[i])}},{key:"defaultConfig",get:function(){return{}}},{key:"pluginName",get:function(){return"pluginName"}}]),e}(),Ye=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var Xe=Element.prototype;Xe.matches=Xe.matchesSelector||Xe.mozMatchesSelector||Xe.msMatchesSelector||Xe.oMatchesSelector||Xe.webkitMatchesSelector}var qe=function(e,t){for(;e&&e.nodeType!==Ye;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}};function Ze(e,t,i,n,o){var r=Je.apply(this,arguments);return e.addEventListener(i,r,o),{destroy:function(){e.removeEventListener(i,r,o)}}}function Je(e,t,i,n){return function(i){i.delegateTarget=qe(i.target,t),i.delegateTarget&&n.call(e,i)}}var $e=function(e,t,i,n,o){return"function"==typeof e.addEventListener?Ze.apply(null,arguments):"function"==typeof i?Ze.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return Ze(e,t,i,n,o)})))},Qe={CONTROLS:"controls",ROOT:"root"},et={ROOT:"root",ROOT_LEFT:"rootLeft",ROOT_RIGHT:"rootRight",ROOT_TOP:"rootTop",CONTROLS_LEFT:"controlsLeft",CONTROLS_RIGTH:"controlsRight",CONTROLS_RIGHT:"controlsRight",CONTROLS_CENTER:"controlsCenter",CONTROLS:"controls"};function tt(e){return!!e&&(e.indexOf&&/^(?:http|data:|\/)/.test(e))}function it(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=null;if(e instanceof window.Element)return x.addClass(e,i),Object.keys(n).map((function(t){e.setAttribute(t,n[t])})),e;if(tt(e)||tt(e.url))return n.src=tt(e)?e:e.url||"",r=x.createDom(e.tag||"img","",n,"xg-img ".concat(i));if("function"==typeof e)try{return(r=e())instanceof window.Element?(x.addClass(r,i),Object.keys(n).map((function(e){r.setAttribute(e,n[e])})),r):(_.logWarn("warn>>icons.".concat(t," in config of plugin named [").concat(o,"] is a function mast return an Element Object")),null)}catch(e){return _.logError("Plugin named [".concat(o,"]:createIcon"),e),null}return"string"==typeof e?x.createDomFromHtml(e,n,i):(_.logWarn("warn>>icons.".concat(t," in config of plugin named [").concat(o,"] is invalid")),null)}function nt(e,t){var n=t.config.icons||t.playerConfig.icons;Object.keys(e).map((function(o){var r=e[o],s=r&&r.class?r.class:"",a=r&&r.attr?r.attr:{},l=null;n&&n[o]&&(s=function(e,t){return"object"===i(e)&&e.class&&"string"==typeof e.class?"".concat(t," ").concat(e.class):t}(n[o],s),a=function(e,t){return"object"===i(e)&&e.attr&&"object"===i(e.attr)&&Object.keys(e.attr).map((function(i){t[i]=e.attr[i]})),t}(n[o],a),l=it(n[o],o,s,a,t.pluginName)),!l&&r&&(l=it(r.icon?r.icon:r,a,s,{},t.pluginName)),t.icons[o]=l}))}var ot=function(e){a(o,Ke);var t=d(o);function o(){var e,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,o),(e=t.call(this,i)).__delegates=[],e}return r(o,[{key:"__init",value:function(e){if(f(l(o.prototype),"__init",this).call(this,e),e.root){var t=e.root,i=null;this.icons={},this.root=null,this.parent=null,nt(this.registerIcons()||{},this),this.langText={};var n,r,s=this.registerLanguageTexts()||{};n=s,r=this,Object.keys(n).map((function(e){Object.defineProperty(r.langText,e,{get:function(){var t=r.lang,i=r.i18n;return i[e]?i[e]:n[e]&&n[e][t]||""}})}));var a="";try{a=this.render()}catch(e){throw _.logError("Plugin:".concat(this.pluginName,":render"),e),new Error("Plugin:".concat(this.pluginName,":render:").concat(e.message))}if(a)(i=o.insert(a,t,e.index)).setAttribute("data-index",e.index);else{if(!e.tag)return;(i=x.createDom(e.tag,"",e.attr,e.name)).setAttribute("data-index",e.index),t.appendChild(i)}this.root=i,this.parent=t;var c=this.config.attr||{},u=this.config.style||{};this.setAttr(c),this.setStyle(u),this.config.index&&this.root.setAttribute("data-index",this.config.index),this.__registerChildren()}}},{key:"__registerChildren",value:function(){var e=this;if(this.root){this._children=[];var t=this.children();t&&"object"===i(t)&&Object.keys(t).length>0&&Object.keys(t).map((function(n){var o,r,s=n,a=t[s],l={root:e.root};"function"==typeof a?(o=e.config[s]||{},r=a):"object"===i(a)&&"function"==typeof a.plugin&&(o=a.options?x.deepCopy(e.config[s]||{},a.options):e.config[s]||{},r=a.plugin),l.config=o,void 0!==o.index&&(l.index=o.index),o.root&&(l.root=o.root),e.registerPlugin(r,l,s)}))}}},{key:"updateLang",value:function(e){e||(e=this.lang);var t=this.root,i=this.i18n,n=this.langText;t&&function e(t,i){for(var n=0;n0?e(t.children[n],i):i(t.children[n])}(t,(function(t){var o=t.getAttribute&&t.getAttribute("lang-key");if(o){var r=i[o.toUpperCase()]||n[o];r&&(t.innerHTML="function"==typeof r?r(e):r)}}))}},{key:"lang",get:function(){return this.player.lang}},{key:"changeLangTextKey",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=this.i18n||{},n=this.langText;e.setAttribute&&e.setAttribute("lang-key",t);var o=i[t]||n[t]||"";o&&(e.innerHTML=o)}},{key:"plugins",value:function(){return this._children}},{key:"children",value:function(){return{}}},{key:"registerPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";t.root=t.root||this.root;var n=f(l(o.prototype),"registerPlugin",this).call(this,e,t,i);return this._children.push(n),n}},{key:"registerIcons",value:function(){return{}}},{key:"registerLanguageTexts",value:function(){return{}}},{key:"find",value:function(e){if(this.root)return this.root.querySelector(e)}},{key:"bind",value:function(e,t,i){var n=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){n.bindEL(e,t)})):this.bindEL(e,t);else{var r=o.delegate.call(this,this.root,e,t,i);this.__delegates=this.__delegates.concat(r)}}},{key:"unbind",value:function(e,t){var i=this;if(arguments.length<3&&"function"==typeof t)Array.isArray(e)?e.forEach((function(e){i.unbindEL(e,t)})):this.unbindEL(e,t);else for(var n="".concat(e,"_").concat(t),o=0;o2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.addEventListener(e,t,i)}},{key:"unbindEL",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.root&&"on".concat(e)in this.root&&"function"==typeof t&&this.root.removeEventListener(e,t,i)}},{key:"show",value:function(e){if(this.root)return this.root.style.display=void 0!==e?e:"block","none"===window.getComputedStyle(this.root,null).getPropertyValue("display")?this.root.style.display="block":void 0}},{key:"hide",value:function(){this.root&&(this.root.style.display="none")}},{key:"appendChild",value:function(e,t){if(!this.root)return null;if(arguments.length<2&&arguments[0]instanceof window.Element)return this.root.appendChild(arguments[0]);if(!(t&&t instanceof window.Element))return null;try{return"string"==typeof e?this.find(e).appendChild(t):e.appendChild(t)}catch(e){return _.logError("Plugin:appendChild",e),null}}},{key:"render",value:function(){return""}},{key:"destroy",value:function(){}},{key:"__destroy",value:function(){var e=this,t=this.player;this.__delegates.map((function(e){e.destroy()})),this.__delegates=[],this._children instanceof Array&&(this._children.map((function(e){t.unRegisterPlugin(e.pluginName)})),this._children=null),this.root&&(this.root.hasOwnProperty("remove")?this.root.remove():this.root.parentNode&&this.root.parentNode.removeChild(this.root)),f(l(o.prototype),"__destroy",this).call(this),this.icons={},["root","parent"].map((function(t){e[t]=null}))}}],[{key:"insert",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=t.children.length,o=Number(i),r=e instanceof window.Node;if(n){for(var s=0,a=null,l="";s=o){l="beforebegin";break}c4&&void 0!==arguments[4]&&arguments[4],r=[];if(e instanceof window.Node&&"function"==typeof n)if(Array.isArray(i))i.forEach((function(i){var s=$e(e,t,i,n,o);s.key="".concat(t,"_").concat(i),r.push(s)}));else{var s=$e(e,t,i,n,o);s.key="".concat(t,"_").concat(i),r.push(s)}return r}},{key:"ROOT_TYPES",get:function(){return Qe}},{key:"POSITIONS",get:function(){return et}}]),o}(),rt=function(){function e(){var t=this;if(n(this,e),s(this,"__trigger",(function(e){var i=(new Date).getTime();t.timeStamp=i;for(var n=0;n-1?this.__handlers[o].handler=t:this.__handlers.push({target:e,handler:t,playerId:i})}}},{key:"unObserver",value:function(e){var t=-1;this.__handlers.map((function(i,n){e===i.target&&(t=n)}));try{this.observer&&this.observer.unobserve(e)}catch(e){}this.observer&&this.observer.unobserve(e),t>-1&&this.__handlers.splice(t,1)}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(e){for(var t=this.__handlers,i=0;i2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&"function"==typeof t&&void 0!==t.prototype){var n=e._pluginInfoId;if(n&&this.pluginGroup[n]){this.pluginGroup[n]._plugins||(this.pluginGroup[n]._plugins={});var o=this.pluginGroup[n]._plugins,r=this.pluginGroup[n]._originalOptions;i.player=this.pluginGroup[n]._player;var s=i.pluginName||t.pluginName;if(!s)throw new Error("The property pluginName is necessary");if(!t.isSupported||t.isSupported(e.config.mediaType,e.config.codecType)){i.config||(i.config={});for(var a=Object.keys(r),l=0;l0&&this.setCurrentUserActive(c[c.length-1],!0)}}}},lt={DEFAULT:"xgplayer",DEFAULT_SKIN:"xgplayer-skin-default",ENTER:"xgplayer-is-enter",PAUSED:"xgplayer-pause",PLAYING:"xgplayer-playing",ENDED:"xgplayer-ended",CANPLAY:"xgplayer-canplay",LOADING:"xgplayer-isloading",ERROR:"xgplayer-is-error",REPLAY:"xgplayer-replay",NO_START:"xgplayer-nostart",ACTIVE:"xgplayer-active",INACTIVE:"xgplayer-inactive",FULLSCREEN:"xgplayer-is-fullscreen",CSS_FULLSCREEN:"xgplayer-is-cssfullscreen",ROTATE_FULLSCREEN:"xgplayer-rotate-fullscreen",PARENT_ROTATE_FULLSCREEN:"xgplayer-rotate-parent",PARENT_FULLSCREEN:"xgplayer-fullscreen-parent",INNER_FULLSCREEN:"xgplayer-fullscreen-inner",NO_CONTROLS:"no-controls",FLEX_CONTROLS:"flex-controls",CONTROLS_FOLLOW:"controls-follow",CONTROLS_AUTOHIDE:"controls-autohide",TOP_BAR_AUTOHIDE:"top-bar-autohide",NOT_ALLOW_AUTOPLAY:"not-allow-autoplay",SEEKING:"seeking",PC:"xgplayer-pc",MOBILE:"xgplayer-mobile",MINI:"xgplayer-mini"};function ct(){return{id:"",el:null,url:"",domEventType:"default",nullUrlStart:!1,width:600,height:337.5,fluid:!1,fitVideoSize:"fixed",videoFillMode:"auto",volume:.6,autoplay:!1,autoplayMuted:!1,loop:!1,isLive:!1,zoom:1,videoInit:!0,poster:"",isMobileSimulateMode:!1,defaultPlaybackRate:1,execBeforePluginsCall:null,allowSeekAfterEnded:!0,enableContextmenu:!0,closeVideoClick:!1,closeVideoDblclick:!1,closePlayerBlur:!1,closeDelayBlur:!1,leavePlayerTime:3e3,closePlayVideoFocus:!1,closePauseVideoFocus:!1,closeFocusVideoFocus:!0,closeControlsBlur:!0,topBarAutoHide:!0,videoAttributes:{},startTime:0,seekedStatus:"play",miniprogress:!1,disableSwipeHandler:function(){},enableSwipeHandler:function(){},preProcessUrl:null,ignores:[],whitelist:[],inactive:3e3,lang:(e=(document.documentElement.getAttribute("lang")||navigator.language||"zh-cn").toLocaleLowerCase(),"zh-cn"===e&&(e="zh"),e),controls:!0,marginControls:!1,fullscreenTarget:null,screenShot:!1,rotate:!1,pip:!1,download:!1,mini:!1,cssFullscreen:!0,keyShortcut:!0,presets:[],plugins:[],playbackRate:1,definition:{list:[]},playsinline:!0,customDuration:0,timeOffset:0,icons:{},i18n:[],tabindex:0,thumbnail:null,videoConfig:{},isHideTips:!1,minWaitDelay:200,commonStyle:{progressColor:"",playedColor:"",cachedColor:"",sliderBtnStyle:{},volumeColor:""}};var e}var ut=function(e){a(i,ot);var t=d(i);function i(){var e;n(this,i);for(var o=arguments.length,r=new Array(o),a=0;a1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(this.root){var o=e.defaultConfig||{};if(!t.root){switch(t.position?t.position:t.config&&t.config.position?t.config.position:o.position){case et.CONTROLS_LEFT:t.root=this.left;break;case et.CONTROLS_RIGHT:t.root=this.right;break;case et.CONTROLS_CENTER:t.root=this.center;break;case et.CONTROLS:t.root=this.root;break;default:t.root=this.left}return f(l(i.prototype),"registerPlugin",this).call(this,e,t,n)}}}},{key:"destroy",value:function(){"mobile"!==L.device&&(this.unbind("mouseenter",this.onMouseEnter),this.unbind("mouseleave",this.onMouseLeave))}},{key:"render",value:function(){var e=this.config,t=e.mode,i=e.autoHide,n=e.initShow;if(!e.disable){var o=x.classNames({"xgplayer-controls":!0},{"flex-controls":"flex"===t},{"bottom-controls":"bottom"===t},s({},lt.CONTROLS_AUTOHIDE,i),{"xgplayer-controls-initshow":n||!i});return'\n \n \n \n \n \n \n \n ')}}}],[{key:"pluginName",get:function(){return"controls"}},{key:"defaultConfig",get:function(){return{disable:!1,autoHide:!0,mode:"",initShow:!1}}}]),i}(),ht={lang:{},langKeys:[],textKeys:[]};function dt(e,t){return Object.keys(t).forEach((function(i){var n,o=x.typeOf(t[i]),r=x.typeOf(e[i]);"Array"===o?("Array"!==r&&(e[i]=[]),(n=e[i]).push.apply(n,p(t[i]))):"Object"===o?("Object"!==r&&(e[i]={}),dt(e[i],t[i])):e[i]=t[i]})),e}function ft(){Object.keys(ht.lang.en).map((function(e){ht.textKeys[e]=e}))}function pt(e,t){var i=e.LANG;if(t||(t=ht),t.lang){var n=e.TEXT||{};"zh"===i&&(i="zh-cn"),t.lang[i]?dt(t.lang[i],n):(t.langKeys.push(i),t.lang[i]=n),ft()}}pt({LANG:"en",TEXT:{ERROR_TYPES:{network:{code:1,msg:"video download error"},mse:{code:2,msg:"stream append error"},parse:{code:3,msg:"parsing error"},format:{code:4,msg:"wrong format"},decoder:{code:5,msg:"decoding error"},runtime:{code:6,msg:"grammatical errors"},timeout:{code:7,msg:"play timeout"},other:{code:8,msg:"other errors"}},HAVE_NOTHING:"There is no information on whether audio/video is ready",HAVE_METADATA:"Audio/video metadata is ready ",HAVE_CURRENT_DATA:"Data about the current play location is available, but there is not enough data to play the next frame/millisecond",HAVE_FUTURE_DATA:"Current and at least one frame of data is available",HAVE_ENOUGH_DATA:"The available data is sufficient to start playing",NETWORK_EMPTY:"Audio/video has not been initialized",NETWORK_IDLE:"Audio/video is active and has been selected for resources, but no network is used",NETWORK_LOADING:"The browser is downloading the data",NETWORK_NO_SOURCE:"No audio/video source was found",MEDIA_ERR_ABORTED:"The fetch process is aborted by the user",MEDIA_ERR_NETWORK:"An error occurred while downloading",MEDIA_ERR_DECODE:"An error occurred while decoding",MEDIA_ERR_SRC_NOT_SUPPORTED:"Audio/video is not supported",REPLAY:"Replay",ERROR:"Network is offline",PLAY_TIPS:"Play",PAUSE_TIPS:"Pause",PLAYNEXT_TIPS:"Play next",DOWNLOAD_TIPS:"Download",ROTATE_TIPS:"Rotate",RELOAD_TIPS:"Reload",FULLSCREEN_TIPS:"Fullscreen",EXITFULLSCREEN_TIPS:"Exit fullscreen",CSSFULLSCREEN_TIPS:"Cssfullscreen",EXITCSSFULLSCREEN_TIPS:"Exit cssfullscreen",TEXTTRACK:"Caption",PIP:"PIP",SCREENSHOT:"Screenshot",LIVE:"LIVE",OFF:"Off",OPEN:"Open",MINI_DRAG:"Click and hold to drag",MINISCREEN:"Miniscreen",REFRESH_TIPS:"Please Try",REFRESH:"Refresh",FORWARD:"forward",LIVE_TIP:"Live"}});var gt={get textKeys(){return ht.textKeys},get langKeys(){return ht.langKeys},get lang(){var e={};return ht.langKeys.map((function(t){e[t]=ht.lang[t]})),ht.lang["zh-cn"]&&(e.zh=ht.lang["zh-cn"]||{}),e},extend:function(e,t){var i=[];if(t||(t=ht),t.lang){i="Array"!==x.typeOf(e)?Object.keys(e).map((function(t){return{LANG:"zh"===t?"zh-cn":t,TEXT:e[t]}})):e;var n=t.lang;i.map((function(e){"zh"===e.LANG&&(e.LANG="zh-cn"),n[e.LANG]?dt(n[e.LANG]||{},e.TEXT||{}):pt(e,t)})),ft()}},use:pt,init:function(e){var t,i={lang:{},langKeys:[],textKeys:{},pId:e};return dt(i.lang,ht.lang),(t=i.langKeys).push.apply(t,p(ht.langKeys)),dt(i.textKeys,ht.textKeys),i}},vt=1,yt=2,mt=3,kt=4,Ct=5,bt=6,_t=7,wt=["ERROR","INITIAL","READY","ATTACHING","ATTACHED","NOTALLOW","RUNNING","ENDED","DESTROYED"],xt=["play","pause","replay","retry"],Tt=0,St=0,Et=function(e){a(o,Le);var i=d(o);function o(e){var t;n(this,o);var r,a=x.deepMerge(ct(),e);s(u(t=i.call(this,a)),"canPlayFunc",(function(){if(t.config){var e=t.config,i=e.autoplay,n=e.startTime,o=e.defaultPlaybackRate;_.logInfo("player","canPlayFunc, startTime",n),n&&(t.currentTime=n>t.duration?t.duration:n,t.config.startTime=0),t.playbackRate=o,(i||t._useAutoplay)&&t.mediaPlay(),t.off(W,t.canPlayFunc),t.removeClass(lt.ENTER)}})),s(u(t),"onFullscreenChange",(function(e,i){var n=function(){x.setTimeout(u(t),(function(){t.resize()}),100)},o=x.getFullScreenEl();t._fullActionFrom?t._fullActionFrom="":t.emit(be,{eventType:"system",action:"switch_fullscreen",pluginName:"player",currentTime:t.currentTime,duration:t.duration,props:[{prop:"fullscreen",from:!0,to:!1}]});var r=function(e,t,i){if(e){var n=e.getAttribute(i);return!(!n||n!==t||"VIDEO"!==e.tagName&&"AUDIO"!==e.tagName)}}(o,t.playerId,Me);if(i||o&&(o===t._fullscreenEl||r))n(),!t.config.closeFocusVideoFocus&&t.media.focus(),t.fullscreen=!0,t.changeFullStyle(t.root,o,lt.FULLSCREEN),t.emit(ce,!0,t._fullScreenOffset),t.cssfullscreen&&t.exitCssFullscreen();else if(t.fullscreen){n();var s=u(t),a=s._fullScreenOffset;s.config.needFullscreenScroll?(window.scrollTo(a.left,a.top),x.setTimeout(u(t),(function(){t.fullscreen=!1,t._fullScreenOffset=null}),100)):(!t.config.closeFocusVideoFocus&&t.media.focus(),t.fullscreen=!1,t._fullScreenOffset=null),t.cssfullscreen?t.removeClass(lt.FULLSCREEN):t.recoverFullStyle(t.root,t._fullscreenEl,lt.FULLSCREEN),t._fullscreenEl=null,t.emit(ce,!1)}})),s(u(t),"_onWebkitbeginfullscreen",(function(e){t._fullscreenEl=t.media,t.onFullscreenChange(e,!0)})),s(u(t),"_onWebkitendfullscreen",(function(e){t.onFullscreenChange(e,!1)})),Ve(u(t),xt),t.config=a,t._pluginInfoId=x.generateSessionId(),(r=u(t)).logInfo=_.logInfo.bind(r),r.logWarn=_.logWarn.bind(r),r.logError=_.logError.bind(r);var l=t.constructor.defaultPreset;if(t.config.presets.length){var c=t.config.presets.indexOf("default");c>=0&&l&&(t.config.presets[c]=l)}else l&&t.config.presets.push(l);if(t.userTimer=null,t.waitTimer=null,t._state=vt,t.isError=!1,t._hasStart=!1,t.isSeeking=!1,t.isCanplay=!1,t._useAutoplay=!1,t.rotateDeg=0,t.isActive=!1,t.fullscreen=!1,t.cssfullscreen=!1,t.isRotateFullscreen=!1,t._fullscreenEl=null,t.timeSegments=[],t._cssfullscreenEl=null,t.curDefinition=null,t._orgCss="",t._fullScreenOffset=null,t._videoHeight=0,t._videoWidth=0,t.videoPos={pi:1,scale:0,rotate:-1,x:0,y:0,h:-1,w:-1,vy:0,vx:0},t.sizeInfo={width:0,height:0,left:0,top:0},t._accPlayed={t:0,acc:0,loopAcc:0},t._offsetInfo={currentTime:-1,duration:0},t.innerContainer=null,t.controls=null,t.topBar=null,t.root=null,t.__i18n=gt.init(t._pluginInfoId),L.os.isAndroid&&L.osVersion>0&&L.osVersion<6&&(t.config.autoplay=!1),t.database=new Oe,t.isUserActive=!1,t._onceSeekCanplay=null,t._isPauseBeforeSeek=0,t.innerStates={isActiveLocked:!1},!t._initDOM())return console.error(new Error("can't find the dom which id is ".concat(t.config.id," or this.config.el does not exist"))),h(t);var d=t.config,f=d.definition,p=void 0===f?{}:f;if(!d.url&&p.list&&p.list.length>0){var g=p.list.find((function(e){return e.definition&&e.definition===p.defaultDefinition}));g||(p.defaultDefinition=p.list[0].definition,g=p.list[0]),t.config.url=g.url,t.curDefinition=g}return t._bindEvents(),t._registerPresets(),t._registerPlugins(),at.onPluginsReady(u(t)),t.getInitDefinition(),t.setState(yt),x.setTimeout(u(t),(function(){t.emit(ee)}),0),t.onReady&&t.onReady(),(t.config.videoInit||t.config.autoplay)&&(!t.hasStart||t.state0?this._attachSourceEvents(this.media,e):this.media.src&&this.media.src===e?e||this.media.removeAttribute("src"):this.media.src=e,"Number"===x.typeOf(this.config.volume)&&(this.volume=this.config.volume);var i=this.innerContainer?this.innerContainer:this.root;this.media instanceof window.Element&&!i.contains(this.media)&&i.insertBefore(this.media,i.firstChild);var n=this.media.readyState;_.logInfo("_startInit readyState",n),this.config.autoplay&&(!x.isMSE(this.media)&&this.load(),(L.os.isIpad||L.os.isPhone)&&this.mediaPlay()),n>=2?this.canPlayFunc():this.once(W,this.canPlayFunc),(!this.hasStart||this.state0&&void 0!==arguments[0])||arguments[0];this._loadingPlugins=[];var i=this.config.ignores||[],n=this.config.plugins||[],o=this.config.i18n||[];t&>.extend(o,this.__i18n);var r=i.join("||").toLowerCase().split("||"),s=this.plugins;n.forEach((function(i){try{var n=i.plugin?i.plugin.pluginName:i.pluginName;if(n&&r.indexOf(n.toLowerCase())>-1)return null;if(!t&&s[n.toLowerCase()])return;if(i.lazy&&i.loader){var o=at.lazyRegister(e,i);return void(i.forceBeforeInit&&(o.then((function(){e._loadingPlugins.splice(e._loadingPlugins.indexOf(o),1)})).catch((function(t){_.logError("_registerPlugins:loadingPlugin",t),e._loadingPlugins.splice(e._loadingPlugins.indexOf(o),1)})),e._loadingPlugins.push(o)))}return e.registerPlugin(i)}catch(e){_.logError("_registerPlugins:",e)}}))}},{key:"_registerPresets",value:function(){var e=this;this.config.presets.forEach((function(t){!function(e,t){var i,n,o=t.preset&&t.options?new t.preset(t.options,e.config):new t({},e.config),r=o.plugins,s=void 0===r?[]:r,a=o.ignores,l=void 0===a?[]:a,c=o.icons,u=void 0===c?{}:c,h=o.i18n,d=void 0===h?[]:h;e.config.plugins||(e.config.plugins=[]),e.config.ignores||(e.config.ignores=[]),(i=e.config.plugins).push.apply(i,p(s)),(n=e.config.ignores).push.apply(n,p(l)),Object.keys(u).map((function(t){e.config.icons[t]||(e.config.icons[t]=u[t])}));var f=e.config.i18n||[];d.push.apply(d,p(f)),e.config.i18n=d}(e,t)}))}},{key:"_getRootByPosition",value:function(e){var t=null;switch(e){case et.ROOT_RIGHT:this.rightBar||(this.rightBar=x.createPositionBar("xg-right-bar",this.root)),t=this.rightBar;break;case et.ROOT_LEFT:this.leftBar||(this.leftBar=x.createPositionBar("xg-left-bar",this.root)),t=this.leftBar;break;case et.ROOT_TOP:this.topBar||(this.topBar=x.createPositionBar("xg-top-bar",this.root),this.config.topBarAutoHide&&x.addClass(this.topBar,lt.TOP_BAR_AUTOHIDE)),t=this.topBar;break;default:t=this.innerContainer||this.root}return t}},{key:"registerPlugin",value:function(e,t){var i=at.formatPluginInfo(e,t),n=i.PLUFGIN,o=i.options,r=this.config.plugins;!at.checkPluginIfExits(n.pluginName,r)&&r.push(n);var s=at.getRootByConfig(n.pluginName,this.config);s.root&&(o.root=s.root),s.position&&(o.position=s.position);var a=o.position?o.position:o.config&&o.config.position||n.defaultConfig&&n.defaultConfig.position;return!o.root&&"string"==typeof a&&a.indexOf("controls")>-1?this.controls&&this.controls.registerPlugin(n,o,n.pluginName):(o.root||(o.root=this._getRootByPosition(a)),at.register(this,n,o))}},{key:"deregister",value:function(e){"string"==typeof e?at.unRegister(this,e):e instanceof Ke&&at.unRegister(this,e.pluginName)}},{key:"unRegisterPlugin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.deregister(e),t&&this.removePluginFromConfig(e)}},{key:"removePluginFromConfig",value:function(e){var t;if("string"==typeof e?t=e:e instanceof Ke&&(t=e.pluginName),t)for(var i=this.config.plugins.length-1;i>-1;i--){if(this.config.plugins[i].pluginName.toLowerCase()===t.toLowerCase()){this.config.plugins.splice(i,1);break}}}},{key:"plugins",get:function(){return at.getPlugins(this)}},{key:"getPlugin",value:function(e){var t=at.findPlugin(this,e);return t&&t.pluginName?t:null}},{key:"addClass",value:function(e){this.root&&(x.hasClass(this.root,e)||x.addClass(this.root,e))}},{key:"removeClass",value:function(e){this.root&&x.removeClass(this.root,e)}},{key:"hasClass",value:function(e){if(this.root)return x.hasClass(this.root,e)}},{key:"setAttribute",value:function(e,t){this.root&&this.root.setAttribute(e,t)}},{key:"removeAttribute",value:function(e,t){this.root&&this.root.removeAttribute(e,t)}},{key:"start",value:function(e){var t=this;if(!(this.state>mt))return e||this.config.url||this.getInitDefinition(),this.hasStart=!0,this.setState(mt),this._registerPlugins(!1),at.beforeInit(this).then((function(){if(t.config){e||(e=t.url||t.config.url);var i=t.preProcessUrl(e);return t._startInit(i.url)}})).catch((function(e){throw e.fileName="player",e.lineNumber="236",_.logError("start:beforeInit:",e),e}))}},{key:"switchURL",value:function(e,t){var i=this,n=e;"Object"===x.typeOf(e)&&(n=e.url),n=this.preProcessUrl(n).url;var o=this.currentTime,r=this.paused&&!this.isError;return this.src=n,new Promise((function(e,t){var s=function(e){i.off("timeupdate",a),i.off("canplay",a),t(e)},a=function(){i.currentTime=o,r&&i.pause(),i.off("error",s),e(!0)};i.once("error",s),n?(L.os.isAndroid?i.once("timeupdate",a):i.once("canplay",a),i.play()):i.errorHandler("error",{code:6,message:"empty_src"})}))}},{key:"videoPlay",value:function(){this.mediaPlay()}},{key:"mediaPlay",value:function(){var e=this;if(!this.hasStart&&this.state>>>playPromise.then"),e.setState(bt),e.emit(ie))})).catch((function(t){if(_.logWarn(">>>>playPromise.catch",t.name),e.media&&e.media.error)return e.onError(),void e.removeClass(lt.ENTER);"NotAllowedError"===t.name&&(e._errorTimer=x.setTimeout(e,(function(){e._errorTimer=null,e.emit(ne),e.addClass(lt.NOT_ALLOW_AUTOPLAY),e.removeClass(lt.ENTER),e.pause(),e.setState(Ct)}),0))})):(_.logWarn("video.play not return promise"),this.statethis.duration?parseInt(this.duration,10):e,!this._isPauseBeforeSeek&&(this._isPauseBeforeSeek=this.paused?2:1),this._onceSeekCanplay&&this.off(j,this._onceSeekCanplay),this._onceSeekCanplay=function(){switch(i.removeClass(lt.ENTER),i.isSeeking=!1,s){case"play":i.play();break;case"pause":i.pause();break;default:i._isPauseBeforeSeek>1||i.paused?i.pause():i.play()}i._isPauseBeforeSeek=0,i._onceSeekCanplay=null},this.once(j,this._onceSeekCanplay),this.state0&&i.defaultDefinition&&i.list.map((function(t){t.definition===i.defaultDefinition&&(e.config.url=t.url,e.curDefinition=t)}))}},{key:"changeDefinition",value:function(e,i){var n=this,o=this.config.definition;if(Array.isArray(null==o?void 0:o.list)&&o.list.forEach((function(t){(null==e?void 0:e.definition)===t.definition&&(n.curDefinition=t)})),null!=e&&e.bitrate&&"number"!=typeof e.bitrate&&(e.bitrate=parseInt(e.bitrate,10)||0),this.emit(de,{from:i,to:e}),this.hasStart){var r=this.switchURL(e.url,t({seamless:!1!==o.seamless&&"undefined"!=typeof MediaSource&&"function"==typeof MediaSource.isTypeSupported},e));r&&r.then?r.then((function(){n.emit(fe,{from:i,to:e})})):this.emit(fe,{from:i,to:e})}else this.config.url=e.url}},{key:"reload",value:function(){this.load(),this.reloadFunc=function(){this.play()},this.once(Y,this.reloadFunc)}},{key:"resetState",value:function(){var e=this,t=[lt.NOT_ALLOW_AUTOPLAY,lt.PLAYING,lt.NO_START,lt.PAUSED,lt.REPLAY,lt.ENTER,lt.ENDED,lt.ERROR,lt.LOADING];this.hasStart=!1,this.isError=!1,this._useAutoplay=!1,this.mediaPause(),this._accPlayed.acc=0,this._accPlayed.t=0,this._accPlayed.loopAcc=0,t.forEach((function(t){e.removeClass(t)})),this.addClass(lt.ENTER),this.emit(_e)}},{key:"reset",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0;if(this.resetState(),this.plugins&&(t.map((function(t){e.deregister(t)})),i)){var n=ct();Object.keys(this.config).keys((function(t){"undefined"===e.config[t]||"plugins"!==t&&"presets"!==t&&"el"!==t&&"id"!==t||(e.config[t]=n[t])}))}}},{key:"destroy",value:function(){var e=this,t=this.innerContainer,i=this.root,n=this.media;if(i&&n){if(this.hasStart=!1,this._useAutoplay=!1,i.removeAttribute(Me),this.updateAcc("destroy"),this._unbindEvents(),this._detachSourceEvents(this.media),x.clearAllTimers(this),this.emit(se),at.destroy(this),Ge(this),f(l(o.prototype),"destroy",this).call(this),this.fullscreen&&this._fullscreenEl===this.root&&this.exitFullscreen(),t)for(var r=t.children,s=0;s0?i.className=a.filter((function(e){return e.indexOf("xgplayer")<0})).join(" "):i.className="",this.removeAttribute("data-xgfill"),["isSeeking","isCanplay","isActive","cssfullscreen","fullscreen"].forEach((function(t){e[t]=!1}))}}},{key:"replay",value:function(){var e=this;this.removeClass(lt.ENDED),this.currentTime=0,this.isSeeking=!1,We(this,"replay",(function(){e.once(j,(function(){var t=e.mediaPlay();t&&t.catch&&t.catch((function(e){console.log(e)}))})),e.play(),e.emit(re),e.onPlay()}))}},{key:"retry",value:function(){var e=this;this.removeClass(lt.ERROR),this.addClass(lt.LOADING),We(this,"retry",(function(){var t=e.currentTime,i=e.config.url,n=x.isMSE(e.media)?{url:i}:e.preProcessUrl(i);e.src=n.url,!e.config.isLive&&(e.currentTime=t),e.once(W,(function(){e.mediaPlay()}))}))}},{key:"changeFullStyle",value:function(e,t,i,n){e&&(n||(n=lt.PARENT_FULLSCREEN),this._orgCss||(this._orgCss=x.filterStyleFromText(e)),x.addClass(e,i),t&&t!==e&&!this._orgPCss&&(this._orgPCss=x.filterStyleFromText(t),x.addClass(t,n),t.setAttribute(Me,this.playerId)))}},{key:"recoverFullStyle",value:function(e,t,i,n){n||(n=lt.PARENT_FULLSCREEN),this._orgCss&&(x.setStyleFromCsstext(e,this._orgCss),this._orgCss=""),x.removeClass(e,i),t&&t!==e&&this._orgPCss&&(x.setStyleFromCsstext(t,this._orgPCss),this._orgPCss="",x.removeClass(t,n),t.removeAttribute(Me))}},{key:"getFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget,t=this.root,i=this.media;if(e||(e=t),this._fullScreenOffset={top:x.scrollTop(),left:x.scrollLeft()},this._fullscreenEl=e,this._fullActionFrom="get",x.getFullScreenEl()===this._fullscreenEl)return this.onFullscreenChange(),Promise.resolve();try{for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.isRotateFullscreen?this.exitRotateFullscreen():this.fullscreen&&this.exitFullscreen();var t=e?"".concat(lt.INNER_FULLSCREEN," ").concat(lt.CSS_FULLSCREEN):lt.CSS_FULLSCREEN;this.changeFullStyle(this.root,e,t);var i=this.config.fullscreen,n=void 0===i?{}:i;(!0===n.useCssFullscreen||"function"==typeof n.useCssFullscreen&&n.useCssFullscreen())&&(this.fullscreen=!0,this.emit(ce,!0)),this._cssfullscreenEl=e,this.cssfullscreen=!0,this.emit(ue,!0)}},{key:"exitCssFullscreen",value:function(){var e=this._cssfullscreenEl?"".concat(lt.INNER_FULLSCREEN," ").concat(lt.CSS_FULLSCREEN):lt.CSS_FULLSCREEN;if(this.fullscreen){var t=this.config.fullscreen,i=void 0===t?{}:t;!0===i.useCssFullscreen||"function"==typeof i.useCssFullscreen&&i.useCssFullscreen()?(this.recoverFullStyle(this.root,this._cssfullscreenEl,e),this.fullscreen=!1,this.emit(ce,!1)):this.removeClass(e)}else this.recoverFullStyle(this.root,this._cssfullscreenEl,e);this._cssfullscreenEl=null,this.cssfullscreen=!1,this.emit(ue,!1)}},{key:"getRotateFullscreen",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.fullscreenTarget;this.cssfullscreen&&this.exitCssFullscreen(e);var t=e?"".concat(lt.INNER_FULLSCREEN," ").concat(lt.ROTATE_FULLSCREEN):lt.ROTATE_FULLSCREEN;this._fullscreenEl=e||this.root,this.changeFullStyle(this.root,e,t,lt.PARENT_ROTATE_FULLSCREEN),this.isRotateFullscreen=!0,this.fullscreen=!0,this.setRotateDeg(90),this._rootStyle=this.root.getAttribute("style"),this.root.style.width="".concat(window.innerHeight,"px"),this.emit(ce,!0)}},{key:"exitRotateFullscreen",value:function(e){var t=this._fullscreenEl!==this.root?"".concat(lt.INNER_FULLSCREEN," ").concat(lt.ROTATE_FULLSCREEN):lt.ROTATE_FULLSCREEN;this.recoverFullStyle(this.root,this._fullscreenEl,t,lt.PARENT_ROTATE_FULLSCREEN),this.isRotateFullscreen=!1,this.fullscreen=!1,this.setRotateDeg(0),this.emit(ce,!1),this._rootStyle&&(this.root.style.style=this._rootStyle,this._rootStyle=!1)}},{key:"setRotateDeg",value:function(e){90===window.orientation||-90===window.orientation?this.rotateDeg=0:this.rotateDeg=e}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autoHide:!this.config.closeDelayBlur,delay:this.config.inactive};this.isActive?this.onFocus(e):this.emit($,t({paused:this.paused,ended:this.ended},e))}},{key:"blur",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{ignorePaused:!1};this.isActive?this.emit(Q,t({paused:this.paused,ended:this.ended},e)):this.onBlur(e)}},{key:"onFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autoHide:!0,delay:3e3},i=this.innerStates;if(this.isActive=!0,this.removeClass(lt.INACTIVE),this.userTimer&&(x.clearTimeout(this,this.userTimer),this.userTimer=null),void 0!==t.isLock&&(i.isActiveLocked=t.isLock),!1===t.autoHide||!0===t.isLock||i.isActiveLocked)this.userTimer&&(x.clearTimeout(this,this.userTimer),this.userTimer=null);else{var n=t&&t.delay?t.delay:this.config.inactive;this.userTimer=x.setTimeout(this,(function(){e.userTimer=null,e.blur()}),n)}}},{key:"onBlur",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignorePaused,t=void 0!==e&&e;if(this.isActive&&!this.innerStates.isActiveLocked){var i=this.config.closePauseVideoFocus;this.isActive=!1,(t||i||!this.paused&&!this.ended)&&this.addClass(lt.INACTIVE)}}},{key:"onEmptied",value:function(){this.updateAcc("emptied")}},{key:"onCanplay",value:function(){this.removeClass(lt.ENTER),this.removeClass(lt.ERROR),this.removeClass(lt.LOADING),this.isCanplay=!0,this.waitTimer&&x.clearTimeout(this,this.waitTimer)}},{key:"onLoadeddata",value:function(){this.isError=!1,this.isSeeking=!1}},{key:"onLoadstart",value:function(){this.removeClass(lt.ERROR),this.isCanplay=!1}},{key:"onPlay",value:function(){this.state===_t&&this.setState(bt),this.removeClass(lt.PAUSED),this.ended&&this.removeClass(lt.ENDED),!this.config.closePlayVideoFocus&&this.focus()}},{key:"onPause",value:function(){this.addClass(lt.PAUSED),this.updateAcc("pause"),this.config.closePauseVideoFocus||(this.userTimer&&(x.clearTimeout(this,this.userTimer),this.userTimer=null),this.focus())}},{key:"onEnded",value:function(){this.updateAcc("ended"),this.addClass(lt.ENDED),this.setState(_t)}},{key:"onError",value:function(){this.isError=!0,this.updateAcc("error"),this.removeClass(lt.NOT_ALLOW_AUTOPLAY),this.removeClass(lt.NO_START),this.removeClass(lt.ENTER),this.removeClass(lt.LOADING),this.addClass(lt.ERROR)}},{key:"onSeeking",value:function(){this.isSeeking||this.updateAcc("seeking"),this.isSeeking=!0,this.addClass(lt.SEEKING)}},{key:"onSeeked",value:function(){this.isSeeking=!1,this.waitTimer&&x.clearTimeout(this,this.waitTimer),this.removeClass(lt.LOADING),this.removeClass(lt.SEEKING)}},{key:"onWaiting",value:function(){var e=this;this.waitTimer&&x.clearTimeout(this,this.waitTimer),this.updateAcc("waiting"),this.waitTimer=x.setTimeout(this,(function(){e.addClass(lt.LOADING),x.clearTimeout(e,e.waitTimer),e.waitTimer=null}),this.config.minWaitDelay)}},{key:"onPlaying",value:function(){var e=this;this.isError=!1,[lt.NO_START,lt.PAUSED,lt.ENDED,lt.ERROR,lt.REPLAY,lt.LOADING].forEach((function(t){e.removeClass(t)}))}},{key:"onTimeupdate",value:function(){!this._videoHeight&&this.media.videoHeight&&this.resize(),(this.waitTimer||this.hasClass(lt.LOADING))&&this.media.readyState>2&&(this.removeClass(lt.LOADING),x.clearTimeout(this,this.waitTimer),this.waitTimer=null),!this.paused&&this.statei)return!0;return!1}},{key:"resizePosition",value:function(){var e=this.videoPos,t=e.rotate,i=e.vy,n=e.vx,o=e.h,r=e.w;if(!(t<0)||i||n){var s=this.videoPos._pi;if(!s&&this.media.videoHeight&&(s=this.media.videoWidth/this.media.videoHeight*100),s){this.videoPos.pi=s;var a={rotate:t},l=0,c=0,u=1,h=Math.abs(t/90),d=this.root,f=this.innerContainer,p=d.offsetWidth,g=f?f.offsetHeight:d.offsetHeight,v=g,y=p;if(h%2==0)u=o>0?100/o:r>0?100/r:1,a.scale=u,l=i>0?(100-o)/2-i:0,a.y=2===h?0-l:l,c=n>0?(100-r)/2-n:0,a.x=2===h?0-c:c,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(v,"px");else if(h%2==1){v=p;var m=g-p;c=-m/2/(y=g)*100,a.x=3===h?c+i/2:c-i/2,l=m/2/v*100,a.y=3===h?l+n/2:l-n/2,a.scale=u,this.media.style.width="".concat(y,"px"),this.media.style.height="".concat(v,"px")}var k=x.getTransformStyle(a,this.media.style.transform||this.media.style.webkitTransform);this.media.style.transform=k,this.media.style.webkitTransform=k}}}},{key:"position",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{h:0,y:0,x:0,w:0};if(this.media&&e&&e.h){var t=this.videoPos;t.h=100*e.h||0,t.w=100*e.w||0,t.vx=100*e.x||0,t.vy=100*e.y||0,this.resizePosition()}}},{key:"setConfig",value:function(e){var t=this;e&&Object.keys(e).map((function(i){if("plugins"!==i){t.config[i]=e[i];var n=t.plugins[i.toLowerCase()];n&&"Function"===x.typeOf(n.setConfig)&&n.setConfig(e[i])}}))}},{key:"playNext",value:function(e){var t=this;this.resetState(),this.setConfig(e),this._currentTime=0,this._duration=0,We(this,"playnext",(function(){t.start(),t.emit(me,e)}))}},{key:"resize",value:function(){var e=this;if(this.media){var t=this.root.getBoundingClientRect();this.sizeInfo.width=t.width,this.sizeInfo.height=t.height,this.sizeInfo.left=t.left,this.sizeInfo.top=t.top;var i=this.media,n=i.videoWidth,o=i.videoHeight,r=this.config,s=r.fitVideoSize,a=r.videoFillMode;if("fill"!==a&&"cover"!==a&&"contain"!==a||this.setAttribute("data-xgfill",a),o&&n){this._videoHeight=o,this._videoWidth=n;var l=this.controls&&this.innerContainer?this.controls.root.getBoundingClientRect().height:0,c=t.width,u=t.height-l,h=parseInt(n/o*1e3,10),d=parseInt(c/u*1e3,10),f=c,p=u,g={};"auto"===s&&d>h||"fixWidth"===s?(p=c/h*1e3,this.config.fluid?g.paddingTop="".concat(100*p/f,"%"):g.height="".concat(p+l,"px")):("auto"===s&&dh)&&this.setAttribute("data-xgfill","cover");var v={videoScale:h,vWidth:f,vHeight:p,cWidth:f,cHeight:p+l};this.resizePosition(),this.emit(pe,v)}}}},{key:"updateObjectPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.media.updateObjectPosition?this.media.updateObjectPosition(e,t):this.media.style.objectPosition="".concat(100*e,"% ").concat(100*t,"%")}},{key:"setState",value:function(e){_.logInfo("setState","state from:".concat(wt[this.state]," to:").concat(wt[e])),this._state=e}},{key:"preProcessUrl",value:function(e,t){var i=this.config.preProcessUrl;return!x.isBlob(e)&&i&&"function"==typeof i?i(e,t):{url:e}}},{key:"state",get:function(){return this._state}},{key:"isFullscreen",get:function(){return this.fullscreen}},{key:"isCssfullScreen",get:function(){return this.cssfullscreen}},{key:"hasStart",get:function(){return this._hasStart},set:function(e){"boolean"==typeof e&&(this._hasStart=e,!1===e&&this.setState(yt),this.emit("hasstart"))}},{key:"isPlaying",get:function(){return this._state===bt||this._state===_t},set:function(e){e?this.setState(bt):this._state>=bt&&this.setState(kt)}},{key:"definitionList",get:function(){return this.config&&this.config.definition&&this.config.definition.list||[]},set:function(e){var t=this,i=this.config.definition,n=null,o=null;i.list=e,this.emit("resourceReady",e),e.forEach((function(e){var r;(null===(r=t.curDefinition)||void 0===r?void 0:r.definition)===e.definition&&(n=e),i.defaultDefinition===e.definition&&(o=e)})),!o&&e.length>0&&(o=e[0]),n?this.changeDefinition(n):o&&this.changeDefinition(o)}},{key:"videoFrameInfo",get:function(){var e={total:0,dropped:0,corrupted:0,droppedRate:0,droppedDuration:0};if(!this.media||!this.media.getVideoPlaybackQuality)return e;var t=this.media.getVideoPlaybackQuality();return e.dropped=t.droppedVideoFrames||0,e.total=t.totalVideoFrames||0,e.corrupted=t.corruptedVideoFrames||0,e.total>0&&(e.droppedRate=e.dropped/e.total*100,e.droppedDuration=parseInt(this.cumulateTime/e.total*e.dropped,0)),e}},{key:"lang",get:function(){return this.config.lang},set:function(e){0!==gt.langKeys.filter((function(t){return t===e})).length||"zh"===e?(this.config.lang=e,at.setLang(e,this)):console.error("Sorry, set lang fail, because the language [".concat(e,"] is not supported now, list of all supported languages is [").concat(gt.langKeys.join(),"] "))}},{key:"i18n",get:function(){var e=this.config.lang;return"zh"===e&&(e="zh-cn"),this.__i18n.lang[e]||this.__i18n.lang.en}},{key:"i18nKeys",get:function(){return this.__i18n.textKeys||{}}},{key:"version",get:function(){return O}},{key:"playerId",get:function(){return this._pluginInfoId}},{key:"url",get:function(){return this.__url||this.config.url},set:function(e){this.__url=e}},{key:"poster",get:function(){return this.plugins.poster?this.plugins.poster.config.poster:this.config.poster},set:function(e){this.plugins.poster&&this.plugins.poster.update(e)}},{key:"readyState",get:function(){return f(l(o.prototype),"readyState",this)}},{key:"error",get:function(){var e=f(l(o.prototype),"error",this);return this.i18n[e]||e}},{key:"networkState",get:function(){return f(l(o.prototype),"networkState",this)}},{key:"fullscreenChanging",get:function(){return!(null===this._fullScreenOffset)}},{key:"cumulateTime",get:function(){var e=this._accPlayed,t=e.acc,i=e.t;return i?(new Date).getTime()-i+t:t}},{key:"zoom",get:function(){return this.config.zoom},set:function(e){this.config.zoom=e}},{key:"videoRotateDeg",get:function(){return this.videoPos.rotate},set:function(e){(e=x.convertDeg(e))%90==0&&e!==this.videoPos.rotate&&(this.videoPos.rotate=e,this.resizePosition())}},{key:"avgSpeed",get:function(){return St},set:function(e){St=e}},{key:"realTimeSpeed",get:function(){return Tt},set:function(e){Tt=e}},{key:"offsetCurrentTime",get:function(){return this._offsetInfo.currentTime||0},set:function(e){this._offsetInfo.currentTime=e}},{key:"offsetDuration",get:function(){return this._offsetInfo.duration||0},set:function(e){this._offsetInfo.duration=e||0}},{key:"hook",value:function(e,t){return Fe.call.apply(Fe,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"useHooks",value:function(e,t){return He.call.apply(He,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"removeHooks",value:function(e,t){return Be.call.apply(Be,[this].concat(Array.prototype.slice.call(arguments)))}},{key:"usePluginHooks",value:function(e,t,i){for(var n=arguments.length,o=new Array(n>3?n-3:0),r=3;r3?n-3:0),r=3;r0&&i&&!n&&(_.logInfo("[xgLogger]".concat(this.player.playerId," emitLog_firstFrame"),e),this._state.isFFLoading=!1,this._state.isFFSend=!0,this.emitLog(Ot,{fvt:this.fvt,costTime:this.fvt,vt:this.vt,startCostTime:this.startCostTime,loadedCostTime:this.loadedCostTime}))}},{key:"_startWaitTimeout",value:function(){var e=this;this._waittTimer&&x.clearTimeout(this,this._waittTimer),this._waittTimer=x.setTimeout(this,(function(){e.suspendWaitingStatus("timeout"),x.clearTimeout(e,e._waittTimer),e._waittTimer=null}),this.config.waitTimeout)}},{key:"endState",value:function(e){this.suspendWaitingStatus(e),this.suspendSeekingStatus(e)}},{key:"suspendSeekingStatus",value:function(e){if(this.seekingStart){var t=Pt(),i=t-this.seekingStart;this.seekingStart=0,this.emitLog(Mt,{end:t,costTime:i,endType:e})}}},{key:"suspendWaitingStatus",value:function(e){if(this._waitTimer&&(x.clearTimeout(this,this._waitTimer),this._waitTimer=null),this._waittTimer&&(x.clearTimeout(this,this._waittTimer),this._waittTimer=null),this._isWaiting=!1,this.waitingStart){var t=Pt(),i=t-this.waitingStart,n=t-this.fixedWaitingStart,o=this.config.waitTimeout;this._isWaiting=!1,this.waitingStart=0,this.fixedWaitingStart=0,this.emitLog(Dt,{fixedCostTime:n>o?o:n,costTime:i>o?o:i,type:"loadeddata"===e?1:this._waitType,endType:2===this._waitType?"seek":e})}}},{key:"emitLog",value:function(e,i){var n=this.player;this.emit(Ce,t({t:Pt(),host:x.getHostFromUrl(n.currentSrc),vtype:n.vtype,eventType:e,currentTime:this.player.currentTime,readyState:n.video.readyState,networkState:n.video.networkState},i))}}],[{key:"pluginName",get:function(){return"xgLogger"}},{key:"defaultConfig",get:function(){return{waitTimeout:1e4}}}]),o}();function Ft(){return(new DOMParser).parseFromString('\n \n\n',"image/svg+xml").firstChild}var Ht=function(e){a(i,ot);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"registerIcons",value:function(){return{replay:Ft}}},{key:"afterCreate",value:function(){var e=this;ot.insert(this.icons.replay,this.root,0),this.__handleReplay=this.hook("replayClick",(function(){e.player.replay()}),{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(".xgplayer-replay",["click","touchend"],this.__handleReplay),this.on(F,(function(){if(e.playerConfig.loop||x.addClass(e.player.root,"replay"),!e.config.disable){e.show();var t=e.root.querySelector("path");if(t){var i=window.getComputedStyle(t).getPropertyValue("transform");if("string"==typeof i&&i.indexOf("none")>-1)return null;t.setAttribute("transform",i)}}})),this.on(M,(function(){e.hide()}))}},{key:"handleReplay",value:function(e){e.preventDefault(),e.stopPropagation(),this.player.replay(),x.removeClass(this.player.root,"replay")}},{key:"show",value:function(){this.config.disable||(this.root.style.display="flex")}},{key:"enable",value:function(){this.config.disable=!1}},{key:"disable",value:function(){this.config.disable=!0,this.hide()}},{key:"destroy",value:function(){this.unbind(".xgplayer-replay",["click","touchend"],this.__handleReplay)}},{key:"render",value:function(){return'\n ').concat(this.i18n.REPLAY,"\n ")}}],[{key:"pluginName",get:function(){return"replay"}},{key:"defaultConfig",get:function(){return{disable:!1}}}]),i}(),Bt=function(e){a(i,ot);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"isEndedShow",get:function(){return this.config.isEndedShow},set:function(e){this.config.isEndedShow=e}},{key:"hide",value:function(){x.addClass(this.root,"hide")}},{key:"show",value:function(){x.removeClass(this.root,"hide")}},{key:"beforeCreate",value:function(e){"string"==typeof e.player.config.poster&&(e.config.poster=e.player.config.poster)}},{key:"afterCreate",value:function(){var e=this;this.on(F,(function(){e.isEndedShow&&x.removeClass(e.root,"hide")})),this.config.hideCanplay?(this.once(V,(function(){e.onTimeUpdate()})),this.on(ae,(function(){x.removeClass(e.root,"hide"),x.addClass(e.root,"xg-showplay"),e.once(V,(function(){e.onTimeUpdate()}))}))):this.on(M,(function(){x.addClass(e.root,"hide")}))}},{key:"onTimeUpdate",value:function(){var e=this;this.player.currentTime?x.removeClass(this.root,"xg-showplay"):this.once(V,(function(){e.onTimeUpdate()}))}},{key:"update",value:function(e){e&&(this.config.poster=e,this.root.style.backgroundImage="url(".concat(e,")"))}},{key:"render",value:function(){var e=this.config,t=e.poster,i=e.hideCanplay,n=t?"background-image:url(".concat(t,");"):"";return'\n ')}}],[{key:"pluginName",get:function(){return"poster"}},{key:"defaultConfig",get:function(){return{isEndedShow:!0,hideCanplay:!1,poster:""}}}]),i}();function Ut(){return(new DOMParser).parseFromString('\n \n\n',"image/svg+xml").firstChild}function jt(){return(new DOMParser).parseFromString('\n \n\n',"image/svg+xml").firstChild}var Vt={};function Gt(e){e?window.clearTimeout(e):Object.keys(Vt).map((function(e){window.clearTimeout(Vt[e].id),delete Vt[e]}))}var Wt=function(e){a(i,ot);var t=d(i);function i(e){var o;return n(this,i),s(u(o=t.call(this,e)),"onPlayerReset",(function(){o.autoPlayStart=!1;var e="auto"===o.config.mode?"auto-hide":"hide";o.setAttr("data-state","play"),x.removeClass(o.root,e),o.show()})),s(u(o),"onAutoplayStart",(function(){if(!o.autoPlayStart){var e="auto"===o.config.mode?"auto-hide":"hide";x.addClass(o.root,e),o.autoPlayStart=!0,o.onPlayPause("play")}})),o.autoPlayStart=!1,o}return r(i,[{key:"afterCreate",value:function(){var e=this,t=this.player,i=this.playerConfig;this.initIcons(),this.once(ee,(function(){i&&(i.lang&&"en"===i.lang?x.addClass(t.root,"lang-is-en"):"jp"===i.lang&&x.addClass(t.root,"lang-is-jp"))})),this.on(ie,this.onAutoplayStart),i.autoplay||this.show(),this.on(ne,(function(){var t="auto"===e.config.mode?"auto-hide":"hide";e.setAttr("data-state","play"),x.removeClass(e.root,t),e.show()})),this.on(M,(function(){e.onPlayPause("play")})),this.on(H,(function(){e.onPlayPause("pause")})),this.on(_e,(function(){e.onPlayerReset()})),this.clickHandler=this.hook("startClick",this.switchPausePlay,{pre:function(t){t.cancelable&&t.preventDefault(),t.stopPropagation();var i=e.player.paused;e.emitUserAction(t,"switch_play_pause",{props:"paused",from:i,to:!i})}}),this.bind(["click","touchend"],this.clickHandler)}},{key:"registerIcons",value:function(){return{startPlay:{icon:Ut,class:"xg-icon-play"},startPause:{icon:jt,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild("xg-start-inner",e.startPlay),this.appendChild("xg-start-inner",e.startPause)}},{key:"hide",value:function(){x.addClass(this.root,"hide")}},{key:"show",value:function(){x.removeClass(this.root,"hide")}},{key:"focusHide",value:function(){x.addClass(this.root,"focus-hide")}},{key:"recover",value:function(){x.removeClass(this.root,"focus-hide")}},{key:"switchStatus",value:function(e){e?this.setAttr("data-state",this.player.paused?"pause":"play"):this.setAttr("data-state",this.player.paused?"play":"pause")}},{key:"animate",value:function(e){var t=this;this._animateId=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{start:null,end:null};return Vt[e]&&window.clearTimeout(Vt[e].id),Vt[e]={},i.start&&i.start(),Vt[e].id=window.setTimeout((function(){i.end&&i.end(),window.clearTimeout(Vt[e].id),delete Vt[e]}),t),Vt[e].id}("pauseplay",400,{start:function(){x.addClass(t.root,"interact"),t.show(),t.switchStatus(!0)},end:function(){x.removeClass(t.root,"interact"),!e&&t.hide(),t._animateId=null}})}},{key:"endAnimate",value:function(){x.removeClass(this.root,"interact"),Gt(this._animateId),this._animateId=null}},{key:"switchPausePlay",value:function(e){var t=this.player;(e.cancelable&&e.preventDefault(),e.stopPropagation(),t.state\n \n ')}}],[{key:"pluginName",get:function(){return"start"}},{key:"defaultConfig",get:function(){return{isShowPause:!1,isShowEnd:!1,disableAnimate:!1,mode:"hide"}}}]),i}(),zt=function(e){a(i,ot);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"render",value:function(){var e=this.config.innerHtml,t=x.createDom("xg-enter","",{},"xgplayer-enter");if(e&&e instanceof window.HTMLElement)t.appendChild(e);else if(e&&"string"==typeof e)t.innerHTML=e;else{for(var i="",n=1;n<=12;n++)i+='
');t.innerHTML='
'.concat(i,"
")}return t}}],[{key:"pluginName",get:function(){return"enter"}},{key:"defaultConfig",get:function(){return{innerHtml:"",logo:""}}}]),i}();function Kt(e,t,i){try{return'
\n ').concat(e.i18n[t],"\n
")}catch(e){return'
'}}var Yt=function(e){a(i,ot);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"afterCreate",value:function(){this.getMini=this.getMini.bind(this),this.exitMini=this.exitMini.bind(this),this.bind("click",this.getMini)}},{key:"getMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"exitMini",value:function(){this.config.onClick&&this.config.onClick()}},{key:"destroy",value:function(){this.unbind(["click","touchend"],this.getMini)}},{key:"render",value:function(){var e="MINISCREEN";return'\n \n
').concat(this.i18n[e],"
\n
")}}],[{key:"pluginName",get:function(){return"miniscreenIcon"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_RIGHT,index:10}}}]),i}();function Xt(e){var t=parseFloat(e);return-1===e.indexOf("%")&&!Number.isNaN(t)&&t}var qt=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],Zt=qt.length;function Jt(e){if("string"==typeof e&&(e=document.querySelector(e)),e&&"object"===i(e)&&e.nodeType){var t=function(e){return window.getComputedStyle(e)}(e);if("none"===t.display)return function(){for(var e={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},t=0;t1&&void 0!==arguments[1]?arguments[1]:{};return n(this,i),(o=t.call(this)).isEnabled=!0,o.isDragging=!1,o.isDown=!1,o.position={},o.downPoint={},o.dragPoint={x:0,y:0},o.startPos={x:0,y:0},o._root=e instanceof Element?e:document.querySelector(e),o._handlerDom=r.handle instanceof Element?r.handle:document.querySelector(r.handle),o._root&&o._handlerDom?(o._bindStartEvent(),o):h(o)}return r(i,[{key:"_bindStartEvent",value:function(){var e=this;"ontouchstart"in window?this._startKey="touchstart":this._startKey="mousedown",this["on".concat(this._startKey)]=this["on".concat(this._startKey)].bind(this),this._handlerDom.addEventListener(this._startKey,this["on".concat(this._startKey)]),ii[this._startKey].map((function(t){e["on".concat(t)]=e["on".concat(t)].bind(e)}))}},{key:"_unbindStartEvent",value:function(){this._handlerDom.removeEventListener(this._startKey,this["on".concat(this._startKey)])}},{key:"_bindPostStartEvents",value:function(e){var t=this;if(e){var i=ii[this._startKey];i.map((function(e){window.addEventListener(e,t["on".concat(e)])})),this._boundPointerEvents=i}}},{key:"_unbindPostStartEvents",value:function(){var e=this;this._boundPointerEvents&&(this._boundPointerEvents.map((function(t){window.removeEventListener(t,e["on".concat(t)])})),delete this._boundPointerEvents)}},{key:"enable",value:function(){this.isEnabled=!0}},{key:"disable",value:function(){this.isEnabled=!1,this.isDragging&&this.onUp()}},{key:"onDocUp",value:function(e){this.onUp()}},{key:"animate",value:function(){var e=this;this.isDragging&&(this.positionDrag(),window.requestAnimationFrame((function(){e.animate()})))}},{key:"positionDrag",value:function(){var e="translate3d(".concat(this.dragPoint.x,"px, ").concat(this.dragPoint.y,"px, 0)");this._root.style.transform=e,this._root.style.webKitTransform=e}},{key:"setLeftTop",value:function(){this._root.style.left=this.position.x+"px",this._root.style.top=this.position.y+"px"}},{key:"onmousedown",value:function(e){this.dragStart(e,e)}},{key:"onmousemove",value:function(e){this.dragMove(e,e)}},{key:"onmouseup",value:function(e){this.dragEnd(e,e)}},{key:"ontouchstart",value:function(e){var t=e.changedTouches[0];this.dragStart(e,t),this.touchIdentifier=void 0!==t.pointerId?t.pointerId:t.identifier,e.preventDefault()}},{key:"ontouchmove",value:function(e){var t=$t(e.changedTouches,this.touchIdentifier);t&&this.dragMove(e,t)}},{key:"ontouchend",value:function(e){var t=$t(e.changedTouches,this.touchIdentifier);t&&this.dragEnd(e,t),e.preventDefault()}},{key:"ontouchcancel",value:function(e){var t=$t(e.changedTouches,this.touchIdentifier);t&&this.dragCancel(e,t)}},{key:"dragStart",value:function(e,t){if(this._root&&!this.isDown&&this.isEnabled){this.downPoint=t,this.dragPoint.x=0,this.dragPoint.y=0,this._getPosition();var i=Jt(this._root);this.startPos.x=this.position.x,this.startPos.y=this.position.y,this.startPos.maxY=window.innerHeight-i.height,this.startPos.maxX=window.innerWidth-i.width,this.setLeftTop(),this.isDown=!0,this._bindPostStartEvents(e)}}},{key:"dragRealStart",value:function(e,t){this.isDragging=!0,this.animate(),this.emit(Qt,this.startPos)}},{key:"dragEnd",value:function(e,t){this._root&&(this._unbindPostStartEvents(),this.isDragging&&(this._root.style.transform="",this.setLeftTop(),this.emit(ti)),this.presetInfo())}},{key:"_dragPointerMove",value:function(e,t){var i={x:t.pageX-this.downPoint.pageX,y:t.pageY-this.downPoint.pageY};return!this.isDragging&&this.hasDragStarted(i)&&this.dragRealStart(e,t),i}},{key:"dragMove",value:function(e,t){if(e=e||window.event,this.isDown){var i=this.startPos,n=i.x,o=i.y,r=this._dragPointerMove(e,t),s=r.x,a=r.y;s=this.checkContain("x",s,n),a=this.checkContain("y",a,o),this.position.x=n+s,this.position.y=o+a,this.dragPoint.x=s,this.dragPoint.y=a,this.emit(ei,this.position)}}},{key:"dragCancel",value:function(e,t){this.dragEnd(e,t)}},{key:"presetInfo",value:function(){this.isDragging=!1,this.startPos={x:0,y:0},this.dragPoint={x:0,y:0},this.isDown=!1}},{key:"destroy",value:function(){this._unbindStartEvent(),this._unbindPostStartEvents(),this.isDragging&&this.dragEnd(),this.removeAllListeners(),this._handlerDom=null}},{key:"hasDragStarted",value:function(e){return Math.abs(e.x)>3||Math.abs(e.y)>3}},{key:"checkContain",value:function(e,t,i){return t+i<0?0-i:"x"===e&&t+i>this.startPos.maxX?this.startPos.maxX-i:"y"===e&&t+i>this.startPos.maxY?this.startPos.maxY-i:t}},{key:"_getPosition",value:function(){var e=window.getComputedStyle(this._root),t=this._getPositionCoord(e.left,"width"),i=this._getPositionCoord(e.top,"height");this.position.x=Number.isNaN(t)?0:t,this.position.y=Number.isNaN(i)?0:i,this._addTransformPosition(e)}},{key:"_addTransformPosition",value:function(e){var t=e.transform;if(0===t.indexOf("matrix")){var i=t.split(","),n=0===t.indexOf("matrix3d")?12:4,o=parseInt(i[n],10),r=parseInt(i[n+1],10);this.position.x+=o,this.position.y+=r}}},{key:"_getPositionCoord",value:function(e,t){if(-1!==e.indexOf("%")){var i=Jt(this._root.parentNode);return i?parseFloat(e)/100*i[t]:0}return parseInt(e,10)}}]),i}(),oi=function(e){a(i,ot);var t=d(i);function i(e){var o;n(this,i),s(u(o=t.call(this,e)),"onCancelClick",(function(e){o.exitMini(),o.isClose=!0})),s(u(o),"onCenterClick",(function(e){var t=u(o).player;t.paused?t.play():t.pause()})),s(u(o),"onScroll",(function(e){if(!(!window.scrollY&&0!==window.scrollY||Math.abs(window.scrollY-o.pos.scrollY)<50)){var t=parseInt(x.getCss(o.player.root,"height"));t+=o.config.scrollTop,o.pos.scrollY=window.scrollY,window.scrollY>t+5?!o.isMini&&!o.isClose&&o.getMini():window.scrollY<=t&&(o.isMini&&o.exitMini(),o.isClose=!1)}})),o.isMini=!1,o.isClose=!1;var r=u(o).config;return o.pos={left:r.left<0?window.innerWidth-r.width-20:r.left,top:r.top<0?window.innerHeight-r.height-20:r.top,height:o.config.height,width:o.config.width,scrollY:window.scrollY||0},o.lastStyle=null,o}return r(i,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.mini&&(e.config.isShowIcon=e.player.config.mini)}},{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.on(H,(function(){e.setAttr("data-state","pause")})),this.on(M,(function(){e.setAttr("data-state","play")}))}},{key:"onPluginsReady",value:function(){var e=this,t=this.player;if(!this.config.disable){if(this.config.isShowIcon){var i={config:{onClick:function(){e.getMini()}}};t.controls.registerPlugin(Yt,i,Yt.pluginName)}var n=x.checkTouchSupport()?"touchend":"click";this.bind(".mini-cancel-btn",n,this.onCancelClick),this.bind(".play-icon",n,this.onCenterClick),this.config.disableDrag||(this._draggabilly=new ni(this.player.root,{handle:this.root})),this.config.isScrollSwitch&&window.addEventListener("scroll",this.onScroll)}}},{key:"registerIcons",value:function(){return{play:{icon:Ut,class:"xg-icon-play"},pause:{icon:jt,class:"xg-icon-pause"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".play-icon",e.play),this.appendChild(".play-icon",e.pause)}},{key:"getMini",value:function(){var e=this;if(!this.isMini){var t=this.player,i=this.playerConfig,n=this.config.target||this.player.root;this.lastStyle={},x.addClass(t.root,"xgplayer-mini"),["width","height","top","left"].map((function(t){e.lastStyle[t]=n.style[t],n.style[t]="".concat(e.pos[t],"px")})),i.fluid&&(n.style["padding-top"]=""),this.emit(he,!0),t.isMini=this.isMini=!0}}},{key:"exitMini",value:function(){var e=this;if(!this.isMini)return!1;var t=this.player,i=this.playerConfig,n=this.config.target||this.player.root;x.removeClass(t.root,"xgplayer-mini"),this.lastStyle&&Object.keys(this.lastStyle).map((function(t){n.style[t]=e.lastStyle[t]})),this.lastStyle=null,i.fluid&&(t.root.style.width="100%",t.root.style.height="0",t.root.style["padding-top"]="".concat(100*i.height/i.width,"%")),this.emit(he,!1),this.isMini=t.isMini=!1}},{key:"destroy",value:function(){window.removeEventListener("scroll",this.onScroll);var e=x.checkTouchSupport()?"touchend":"click";this.unbind(".mini-cancel-btn",e,this.onCancelClick),this.unbind(".play-icon",e,this.onCenterClick),this._draggabilly&&this._draggabilly.destroy(),this._draggabilly=null,this.exitMini()}},{key:"render",value:function(){if(!this.config.disable)return'\n \n \n '.concat(Kt(this,"MINI_DRAG",this.playerConfig.isHideTips),'\n \n
\n \n \n \n
\n
\n
\n
')}}],[{key:"pluginName",get:function(){return"miniscreen"}},{key:"defaultConfig",get:function(){return{index:10,disable:!1,width:320,height:180,left:-1,top:-1,isShowIcon:!1,isScrollSwitch:!1,scrollTop:0,disableDrag:!1}}}]),i}(),ri={mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mousemove:"onMouseMove"},si=["videoClick","videoDbClick"],ai=function(e){a(i,Ke);var t=d(i);function i(){var e;n(this,i);for(var o=arguments.length,r=new Array(o),a=0;a0&&t.replay():t.paused?t.play():t.pause()}},{key:"onContextmenu",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.stopPropagation?e.stopPropagation():(e.returnValue=!1,e.cancelBubble=!0)}},{key:"destroy",value:function(){var e=this,t=this.player,i=t.video,n=t.root;this.clickTimer&&clearTimeout(this.clickTimer),n.removeEventListener("click",this.onVideoClick,!1),n.removeEventListener("dblclick",this.onVideoDblClick,!1),i.removeEventListener("contextmenu",this.onContextmenu,!1),Object.keys(ri).map((function(t){n.removeEventListener(t,e[ri[t]],!1)}))}}],[{key:"pluginName",get:function(){return"pc"}},{key:"defaultConfig",get:function(){return{}}}]),i}(),li="press",ci="pressend",ui="doubleclick",hi="click",di="touchmove",fi="touchstart",pi="touchend",gi={start:"touchstart",end:"touchend",move:"touchmove",cancel:"touchcancel"},vi={start:"mousedown",end:"mouseup",move:"mousemove",cancel:"mouseleave"};function yi(e){return e&&e.length>0?e[e.length-1]:null}var mi=function(){function e(t){var i=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{eventType:"touch"};n(this,e),s(this,"onTouchStart",(function(e){var t=i._pos,n=i.root,o=yi(e.touches);t.x=o?parseInt(o.pageX,10):e.pageX,t.y=o?parseInt(o.pageX,10):e.pageX,t.start=!0,i.__setPress(e),n.addEventListener(i.events.end,i.onTouchEnd),n.addEventListener(i.events.cancel,i.onTouchCancel),n.addEventListener(i.events.move,i.onTouchMove),i.trigger(fi,e)})),s(this,"onTouchCancel",(function(e){i.onTouchEnd(e)})),s(this,"onTouchEnd",(function(e){var t=i._pos,n=i.root;i.__clearPress(),n.removeEventListener(i.events.cancel,i.onTouchCancel),n.removeEventListener(i.events.end,i.onTouchEnd),n.removeEventListener(i.events.move,i.onTouchMove),e.moving=t.moving,e.press=t.press,t.press&&i.trigger(ci,e),i.trigger(pi,e),!t.press&&!t.moving&&i.__setDb(e),t.press=!1,t.start=!1,t.moving=!1})),s(this,"onTouchMove",(function(e){var t=i._pos,n=i.config,o=yi(e.touches),r=o?parseInt(o.pageX,10):e.pageX,s=o?parseInt(o.pageY,10):e.pageX,a=r-t.x,l=s-t.y;Math.abs(l)=0&&this.__handlers[e].splice(n,1)}}},{key:"trigger",value:function(e,t){this.__handlers[e]&&this.__handlers[e].map((function(i){try{i(t)}catch(t){console.error("trigger>>:".concat(e),t)}}))}},{key:"destroy",value:function(){var e=this,t={touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"};Object.keys(t).forEach((function(i){e.root.removeEventListener(i,e[t[i]])}))}}]),e}();function ki(){return(new DOMParser).parseFromString('\n \n \n',"image/svg+xml").firstChild}var Ci="auto",bi="seeking",_i="playbackrate",wi=["videoClick","videoDbClick"],xi=function(e){a(i,ot);var t=d(i);function i(e){var o;return n(this,i),s(u(o=t.call(this,e)),"onTouchStart",(function(e){var t=u(o),i=t.player,n=t.config,r=t.pos,s=t.playerConfig,a=o.getTouche(e);if(a&&!n.disableGesture&&o.duration>0&&!i.ended){r.isStart=!0,x.checkIsFunction(s.disableSwipeHandler)&&s.disableSwipeHandler(),o.find(".xg-dur").innerHTML=x.format(o.duration);var l=o.root.getBoundingClientRect();90===i.rotateDeg?(r.top=l.left,r.left=l.top,r.width=l.height,r.height=l.width):(r.top=l.top,r.left=l.left,r.width=l.width,r.height=l.height);var c=parseInt(a.pageX-r.left,10),h=parseInt(a.pageY-r.top,10);r.x=90===i.rotateDeg?h:c,r.y=90===i.rotateDeg?c:h,r.scopeL=n.scopeL*r.width,r.scopeR=(1-n.scopeR)*r.width,r.scopeM1=r.width*(1-n.scopeM)/2,r.scopeM2=r.width-r.scopeM1}})),s(u(o),"onTouchMove",(function(e){var t=o.getTouche(e),i=u(o),n=i.pos,r=i.config,s=i.player;if(t&&!r.disableGesture&&o.duration&&n.isStart){var a=r.miniMoveStep,l=r.hideControlsActive,c=parseInt(t.pageX-n.left,10),h=parseInt(t.pageY-n.top,10),d=90===s.rotateDeg?h:c,f=90===s.rotateDeg?c:h;if(Math.abs(d-n.x)>a||Math.abs(f-n.y)>a){var p=d-n.x,g=f-n.y,v=n.scope;if(-1===v&&(0===(v=o.checkScope(d,f,p,g,n))&&(l?s.blur():s.focus({autoHide:!1}),!n.time&&(n.time=parseInt(1e3*s.currentTime,10)+1e3*o.timeOffset)),n.scope=v),-1===v||v>0&&!r.gestureY||0===v&&!r.gestureX)return;e.cancelable&&e.preventDefault(),o.executeMove(p,g,v,n.width,n.height),n.x=d,n.y=f}}})),s(u(o),"onTouchEnd",(function(e){var t=u(o),i=t.player,n=t.pos,r=t.playerConfig;if(n.isStart){n.scope>-1&&e.cancelable&&e.preventDefault();var s=o.config,a=s.disableGesture,l=s.gestureX;!a&&l?(o.endLastMove(n.scope),setTimeout((function(){i.getPlugin("progress")&&i.getPlugin("progress").resetSeekState()}),10)):n.time=0,n.scope=-1,o.resetPos(),x.checkIsFunction(r.enableSwipeHandler)&&r.enableSwipeHandler(),o.changeAction(Ci)}})),s(u(o),"onRootTouchMove",(function(e){!o.config.disableGesture&&o.config.gestureX&&o.checkIsRootTarget(e)&&(e.stopPropagation(),o.pos.isStart?o.onTouchMove(e):o.onTouchStart(e))})),s(u(o),"onRootTouchEnd",(function(e){o.pos.isStart&&o.checkIsRootTarget(e)&&(e.stopPropagation(),o.onTouchEnd(e))})),o.pos={isStart:!1,x:0,y:0,time:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1},o.timer=null,o}return r(i,[{key:"duration",get:function(){return this.playerConfig.customDuration||this.player.duration}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"registerIcons",value:function(){return{seekTipIcon:{icon:ki,class:"xg-seek-pre"}}}},{key:"afterCreate",value:function(){var e=this;wi.map((function(t){e.__hooks[t]=null}));var t=this.playerConfig,i=this.config,n=this.player;!0===t.closeVideoDblclick&&(i.closedbClick=!0),this.resetPos(),x.isUndefined(t.disableGesture)||(i.disableGesture=!!t.disableGesture),this.appendChild(".xg-seek-icon",this.icons.seekTipIcon),this.xgMask=x.createDom("xg-mask","",{},"xgmask"),n.root.appendChild(this.xgMask),this.initCustomStyle(),this.registerThumbnail();var o="mouse"===this.domEventType?"mouse":"touch";this.touch=new mi(this.root,{eventType:o,needPreventDefault:!this.config.disableGesture}),this.root.addEventListener("contextmenu",(function(e){e.preventDefault()})),n.root.addEventListener("touchmove",this.onRootTouchMove,!0),n.root.addEventListener("touchend",this.onRootTouchEnd,!0),this.on(z,(function(){var t=e.player,i=e.config;1e3*t.duration0&&(e.pos.time=0)}));var r={touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",press:"onPress",pressend:"onPressEnd",click:"onClick",doubleclick:"onDbClick"};if(Object.keys(r).map((function(t){e.touch.on(t,(function(i){e[r[t]](i)}))})),!i.disableActive){var s=n.plugins.progress;s&&(s.addCallBack("dragmove",(function(t){e.activeSeekNote(t.currentTime,t.forward)})),s.addCallBack("dragend",(function(){e.changeAction(Ci)})))}}},{key:"registerThumbnail",value:function(){var e=this.player.plugins.thumbnail;if(e&&e.usable){this.thumbnail=e.createThumbnail(null,"mobile-thumbnail");var t=this.find(".time-preview");t.insertBefore(this.thumbnail,t.children[0])}}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle,t=e.playedColor,i=e.progressColor;t&&(this.find(".xg-curbar").style.backgroundColor=t,this.find(".xg-cur").style.color=t),i&&(this.find(".xg-bar").style.backgroundColor=i,this.find(".time-preview").style.color=i),this.config.disableTimeProgress&&x.addClass(this.find(".xg-timebar"),"hide")}},{key:"resetPos",value:function(){var e=this;this.pos?(this.pos.isStart=!1,this.pos.scope=-1,["x","y","width","height","scopeL","scopeR","scopeM1","scopeM2"].map((function(t){e.pos[t]=0}))):this.pos={isStart:!1,x:0,y:0,volume:0,rate:1,light:0,width:0,height:0,scopeL:0,scopeR:0,scopeM1:0,scopeM2:0,scope:-1,time:0}}},{key:"changeAction",value:function(e){var t=this.player;this.root.setAttribute("data-xg-action",e);var i=t.plugins.start;i&&i.recover()}},{key:"getTouche",value:function(e){this.player.rotateDeg;var t=e.touches&&e.touches.length>0?e.touches[e.touches.length-1]:e;return{pageX:t.pageX,pageY:t.pageY}}},{key:"checkScope",value:function(e,t,i,n,o){var r=o.width,s=-1;if(e<0||e>r)return s;var a=0===n?Math.abs(i):Math.abs(i/n);return Math.abs(i)>0&&a>=1.73&&e>o.scopeM1&&eo.scopeR?2:3),s}},{key:"executeMove",value:function(e,t,i,n,o){switch(i){case 0:this.updateTime(e/n*this.config.scopeM);break;case 1:this.updateBrightness(t/o);break;case 2:L.os.isIos||this.updateVolume(t/o)}}},{key:"endLastMove",value:function(e){var t=this,i=this.pos,n=this.player,o=this.config,r=(i.time-this.timeOffset)/1e3;if(0===e)n.seek(Number(r).toFixed(1)),o.hideControlsEnd?n.blur():n.focus(),this.timer=setTimeout((function(){t.pos.time=0}),500);this.changeAction(Ci)}},{key:"checkIsRootTarget",value:function(e){var t=this.player.plugins||{};return(!t.progress||!t.progress.root.contains(e.target))&&(t.start&&t.start.root.contains(e.target)||t.controls&&t.controls.root.contains(e.target))}},{key:"sendUseAction",value:function(e){var t=this.player.paused;this.emitUserAction(e,"switch_play_pause",{prop:"paused",from:t,to:!t})}},{key:"clickHandler",value:function(e){var t=this.player,i=this.config,n=this.playerConfig;t.state=bt&&(this.sendUseAction(x.createEvent("dblclick")),this.switchPlayPause())}},{key:"onClick",value:function(e){var t=this,i=this.player;We(this,wi[0],(function(e,i){t.clickHandler(i.e)}),{e:e,paused:i.paused})}},{key:"onDbClick",value:function(e){var t=this,i=this.player;We(this,wi[1],(function(e,i){t.dbClickHandler(i.e)}),{e:e,paused:i.paused})}},{key:"onPress",value:function(e){var t=this.pos,i=this.config,n=this.player;i.disablePress||(t.rate=this.player.playbackRate,this.emitUserAction("press","change_rate",{prop:"playbackRate",from:n.playbackRate,to:i.pressRate}),n.playbackRate=i.pressRate,this.changeAction(_i))}},{key:"onPressEnd",value:function(e){var t=this.pos,i=this.config,n=this.player;i.disablePress||(this.emitUserAction("pressend","change_rate",{prop:"playbackRate",from:n.playbackRate,to:t.rate}),n.playbackRate=t.rate,t.rate=1,this.changeAction(Ci))}},{key:"updateTime",value:function(e){var t=this.player,i=this.config,n=this.player.duration;e=Number(e.toFixed(4));var o=parseInt(e*i.moveDuration,10)+this.timeOffset;o=(o+=this.pos.time)<0?0:o>1e3*n?1e3*n-200:o,t.getPlugin("time")&&t.getPlugin("time").updateTime(o/1e3),t.getPlugin("progress")&&t.getPlugin("progress").updatePercent(o/1e3/this.duration,!0),this.activeSeekNote(o/1e3,e>0),i.isTouchingSeek&&t.seek(Number((o-this.timeOffset)/1e3).toFixed(1)),this.pos.time=o}},{key:"updateVolume",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.player,i=this.pos;if(e=parseInt(100*e,10),i.volume+=e,!(Math.abs(i.volume)<10)){var n=parseInt(10*t.volume,10)-parseInt(i.volume/10,10);n=n>10?10:n<1?0:n,t.volume=n/10,i.volume=0}}},{key:"updateBrightness",value:function(e){this.player.rotateDeg&&(e=-e);var t=this.pos,i=this.config,n=this.xgMask,o=t.light+.8*e;o=o>i.maxDarkness?i.maxDarkness:o<0?0:o,n&&(n.style.backgroundColor="rgba(0,0,0,".concat(o,")")),t.light=o}},{key:"activeSeekNote",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.player,n=this.config,o=!(this.duration!==1/0&&this.duration>0);if(e&&"number"==typeof e&&!o&&!n.disableActive){e<0?e=0:e>i.duration&&(e=i.duration-.2),this.changeAction(bi);var r=i.plugins.start;r&&r.focusHide(),this.find(".xg-dur").innerHTML=x.format(this.duration),this.find(".xg-cur").innerHTML=x.format(e),this.find(".xg-curbar").style.width="".concat(e/this.duration*100,"%"),t?x.removeClass(this.find(".xg-seek-show"),"xg-back"):x.addClass(this.find(".xg-seek-show"),"xg-back"),this.updateThumbnails(e)}}},{key:"updateThumbnails",value:function(e){var t=this.player.plugins.thumbnail;t&&t.usable&&this.thumbnail&&t.update(this.thumbnail,e,160,90)}},{key:"switchPlayPause",value:function(){var e=this.player;if(e.state\n
\n
\n
\n \n 00:00\n /\n 00:00\n
\n
\n
\n
\n
\n
\n ').concat(this.config.pressRate,"X").concat(this.i18n.FORWARD,"\n
\n \n ")}}],[{key:"pluginName",get:function(){return"mobile"}},{key:"defaultConfig",get:function(){return{index:0,disableGesture:!1,gestureX:!0,gestureY:!0,gradient:"normal",isTouchingSeek:!1,miniMoveStep:5,miniYPer:5,scopeL:.25,scopeR:.25,scopeM:.9,pressRate:2,darkness:!0,maxDarkness:.8,disableActive:!1,disableTimeProgress:!1,hideControlsActive:!1,hideControlsEnd:!1,moveDuration:36e4,closedbClick:!1,disablePress:!0,disableSeekIcon:!1,focusVideoClick:!1}}}]),i}();function Ti(e){var t=e.tagName;return!("INPUT"!==t&&"TEXTAREA"!==t&&!e.isContentEditable)}var Si=function(e){a(o,Ke);var i=d(o);function o(){var e;n(this,o);for(var t=arguments.length,r=new Array(t),a=0;a0&&n-o>.9*t)}},{key:"checkCode",value:function(e,t){var i=this,n=!1;return Object.keys(this.keyCodeMap).map((function(o){i.keyCodeMap[o]&&e===i.keyCodeMap[o].keyCode&&!i.keyCodeMap[o].disable&&(n=!t||t&&!i.keyCodeMap[o].noBodyTarget)})),n}},{key:"downVolume",value:function(e){var t=this.player;if(!(t.volume<=0)){var i=parseFloat((t.volume-.1).toFixed(1)),n={volume:{from:t.volume,to:i}};this.emitUserAction(e,"change_volume",{props:n}),t.volume=i>=0?i:0}}},{key:"upVolume",value:function(e){var t=this.player;if(!(t.volume>=1)){var i=parseFloat((t.volume+.1).toFixed(1)),n={volume:{from:t.volume,to:i}};this.emitUserAction(e,"change_volume",{props:n}),t.volume=i<=1?i:1}}},{key:"seek",value:function(e){var t=this.player,i=t.currentTime,n=t.offsetCurrentTime,o=t.duration,r=t.offsetDuration,s=t.timeSegments,a=n>-1?n:i,l=r||o,c=e.repeat&&this.seekStep>=4?parseInt(this.seekStep/2,10):this.seekStep;a+c<=l?a+=c:a=l;var u=x.getCurrentTimeByOffset(a,s),h={currentTime:{from:i,to:u}};this.emitUserAction(e,"seek",{props:h}),this.player.currentTime=u}},{key:"seekBack",value:function(e){var t=this.player,i=t.currentTime,n=t.offsetCurrentTime,o=t.timeSegments,r=(n>-1?n:i)-(e.repeat?parseInt(this.seekStep/2,10):this.seekStep);r<0&&(r=0);var s={currentTime:{from:i,to:r=x.getCurrentTimeByOffset(r,o)}};this.emitUserAction(e,"seek",{props:s}),this.player.currentTime=r}},{key:"changePlaybackRate",value:function(e){var t=this._keyState,i=this.config,n=this.player;0===t.playbackRate&&(t.playbackRate=n.playbackRate,n.playbackRate=i.playbackRate)}},{key:"playPause",value:function(e){var t=this.player;t&&(this.emitUserAction(e,"switch_play_pause"),t.paused?t.play():t.pause())}},{key:"exitFullscreen",value:function(e){var t=this.player,i=t.fullscreen,n=t.cssfullscreen;i&&(this.emitUserAction("keyup","switch_fullscreen",{prop:"fullscreen",from:i,to:!i}),t.exitFullscreen()),n&&(this.emitUserAction("keyup","switch_css_fullscreen",{prop:"cssfullscreen",from:n,to:!n}),t.exitCssFullscreen())}},{key:"handleKeyDown",value:function(e){var t=this._keyState;if(e.repeat){t.isPress=!0;var i=Date.now();if(i-t.tt<200)return;t.tt=i}!function(e){e.preventDefault(),e.returnValue=!1}(e),this.handleKeyCode(e.keyCode,e,t.isPress)}},{key:"handleKeyUp",value:function(e){var t=this._keyState;t.playbackRate>0&&(this.player.playbackRate=t.playbackRate,t.playbackRate=0),t.isKeyDown=!1,t.isPress=!1,t.tt=0}},{key:"handleKeyCode",value:function(e,i,n){for(var o=Object.keys(this.keyCodeMap),r=0;r\n \n\n',"image/svg+xml").firstChild}var Pi=function(e){a(i,ot);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"registerIcons",value:function(){return{loadingIcon:Ei}}},{key:"afterCreate",value:function(){this.appendChild("xg-loading-inner",this.icons.loadingIcon)}},{key:"render",value:function(){return'\n \n \n '}}],[{key:"pluginName",get:function(){return"loading"}},{key:"defaultConfig",get:function(){return{position:et.ROOT}}}]),i}(),Ii=[{tag:"xg-cache",className:"xgplayer-progress-cache",styleKey:"cachedColor"},{tag:"xg-played",className:"xgplayer-progress-played",styleKey:"playedColor"}],Li=function(){function e(t){n(this,e),this.fragments=t.fragments||[],0===this.fragments.length&&this.fragments.push({percent:1}),this._callBack=t.actionCallback,this.fragConfig={fragFocusClass:t.fragFocusClass||"inner-focus-point",fragAutoFocus:!!t.fragAutoFocus,fragClass:t.fragClass||""},this.style=t.style||{playedColor:"",cachedColor:"",progressColor:""},this.duration=0,this.cachedIndex=0,this.playedIndex=0,this.focusIndex=-1}return r(e,[{key:"updateDuration",value:function(e){var t=this;this.duration=e;var i=0,n=this.fragments;this.fragments=n.map((function(e){return e.start=parseInt(i,10),e.end=parseInt(i+e.percent*t.duration,10),e.duration=parseInt(e.percent*t.duration,10),i+=e.percent*t.duration,e}))}},{key:"updateProgress",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"played",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{newIndex:0,curIndex:0,millisecond:0},i=this.progressList,n=this.fragments;if(!(i.length<1)){var o=t.newIndex,r=t.curIndex,s=t.millisecond;o!==r&&i.map((function(t,i){io&&(t[e].style.width=0)}));var a=n[o],l=0===s?0:(s-a.start)/a.duration;i[o][e].style.width=l<0?0:"".concat(100*l,"%")}}},{key:"updateFocus",value:function(e){if(this.fragConfig.fragAutoFocus&&!(this.fragments.length<2))if(e){var t=this.findIndex(1e3*e.currentTime,this.focusIndex);if(t>=0&&t!==this.focusIndex){this.focusIndex>-1&&this.unHightLight(this.focusIndex),this.setHightLight(t);var i={index:t,preIndex:this.focusIndex,fragment:this.fragments[this.focusIndex]};this.focusIndex=t,this._callBack&&this._callBack(i)}}else if(this.focusIndex>-1){this.unHightLight(this.focusIndex);var n={index:-1,preIndex:this.focusIndex,fragment:null};this._callBack&&this._callBack(n),this.focusIndex=-1}}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},t=arguments.length>1?arguments[1]:void 0;if(!this.duration||parseInt(1e3*t,10)!==this.duration){if(!t&&0!==t)return;this.updateDuration(parseInt(1e3*t,10))}var i=this.playedIndex,n=this.cachedIndex;if("Undefined"!==x.typeOf(e.played)){var o=this.findIndex(1e3*e.played,i);if(o<0)return;this.updateProgress("played",{newIndex:o,curIndex:i,millisecond:parseInt(1e3*e.played,10)}),this.playedIndex=o}if("Undefined"!==x.typeOf(e.cached)){var r=this.findIndex(1e3*e.cached,n);if(r<0)return;this.updateProgress("cached",{newIndex:r,curIndex:n,millisecond:parseInt(1e3*e.cached,10)}),this.cachedIndex=r}}},{key:"findIndex",value:function(e,t){var i=this.fragments;if(!i||0===i.length)return-1;if(1===i.length)return 0;if(t>-1&&ti[t].start&&ei[i.length-1].start)return i.length-1;for(var n=0;ni[n].start&&e<=i[n].end){t=n;break}return t}},{key:"findHightLight",value:function(){for(var e=this.root.children,t=0;t=t.length?null:{dom:t[e],pos:t[e].getBoundingClientRect()}}},{key:"unHightLight",value:function(){for(var e=this.root.children,t=0;t0;)this.root.removeChild(i[0]);this.render()}}},{key:"render",value:function(){var e=this,t=this.style.progressColor;if(this.root||(this.root=x.createDom("xg-inners","",{},"progress-list")),this.fragments){var i=this.fragConfig,n=i.fragClass,o=i.fragFocusClass;this.progressList=this.fragments.map((function(i){var r=x.createDom("xg-inner","",{style:t?"background:".concat(t,"; flex: ").concat(i.percent):"flex: ".concat(i.percent)},"".concat(i.isFocus?o:""," xgplayer-progress-inner ").concat(n));return e.root.appendChild(r),Ii.forEach((function(t){r.appendChild(x.createDom(t.tag,"",{style:t.styleKey?"background: ".concat(e.style[t.styleKey],"; width:0;"):"width:0;"},t.className))})),{cached:r.children[0],played:r.children[1]}}))}return this.root}}]),e}(),Oi={POINT:"inner-focus-point",HIGHLIGHT:"inner-focus-highlight"},Ai=function(e){a(l,ot);var o=d(l);function l(e){var t;return n(this,l),s(u(t=o.call(this,e)),"onMoveOnly",(function(e,i){var n=u(t),o=n.pos,r=n.config,s=n.player,a=i;if(e){x.event(e);var l=x.getEventPos(e,s.zoom),c=90===s.rotateDeg?l.clientY:l.clientX;if(o.moving&&Math.abs(o.x-c)=0?t:i+this.timeOffset}},{key:"changeState",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.useable=e}},{key:"show",value:function(){this.root&&(this.root.style.display="flex")}},{key:"_initInner",value:function(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i&&0!==i.length||(i=[{percent:1}]);var o=t(t({fragments:i},n),{},{actionCallback:function(t){e.emitUserAction("fragment_focus","fragment_focus",t)}});this.innerList?this.innerList.reset(o):(this.innerList=new Li(o),this.outer.insertBefore(this.innerList.render(),this.outer.children[0]),["findHightLight","unHightLight","setHightLight","findFragment"].map((function(t){e[t]=e.innerList[t].bind(e.innerList)})))}},{key:"_updateInnerFocus",value:function(e){this.innerList&&this.innerList.updateFocus(e)}},{key:"afterCreate",value:function(){var e=this;if(!this.config.disable&&!this.playerConfig.isLive){this.pos={x:0,y:0,moving:!1,isDown:!1,isEnter:!1,isLocked:!1},this.outer=this.find("xg-outer");var t=this.config,i=t.fragFocusClass,n=t.fragAutoFocus,o=t.fragClass;this._initInner(this.config.fragments,{fragFocusClass:i,fragAutoFocus:n,fragClass:o,style:this.playerConfig.commonStyle||{}}),"mobile"===L.device&&(this.config.isDragingSeek=!1,this.isMobile=!0),this.progressBtn=this.find(".xgplayer-progress-btn"),this.on(z,(function(){e.onMouseLeave()})),this.on(V,(function(){e.onTimeupdate()})),this.on(j,(function(){e.onTimeupdate(),e.onCacheUpdate()})),this.on(q,(function(){e.onCacheUpdate()})),this.on(F,(function(){e.onCacheUpdate(!0),e.onTimeupdate(!0),e._state.now=0})),this.on(J,(function(){e.onReset()})),this.on(pe,(function(){e.onVideoResize()})),this.bindDomEvents(),this.initCustomStyle()}}},{key:"setConfig",value:function(e){var t=this,i=null;Object.keys(e).forEach((function(n){t.config[n]=e[n],"fragments"===n&&(i=e[n])})),i&&this._initInner(i,e)}},{key:"initCustomStyle",value:function(){var e=(this.playerConfig||{}).commonStyle.sliderBtnStyle,t=this.progressBtn;e&&("string"==typeof e?t.style.boxShadow=e:"object"===i(e)&&Object.keys(e).map((function(i){t.style[i]=e[i]})))}},{key:"triggerCallbacks",value:function(e,t,i){this.__dragCallBacks.length>0&&this.__dragCallBacks.map((function(n){if(n&&n.handler&&n.type===e)try{n.handler(t,i)}catch(e){console.error("[XGPLAYER][triggerCallbacks] ".concat(n," error"),e)}}))}},{key:"addCallBack",value:function(e,t){t&&"function"==typeof t&&this.__dragCallBacks.push({type:e,handler:t})}},{key:"removeCallBack",value:function(e,t){var i=this.__dragCallBacks,n=-1;i.map((function(i,o){i&&i.type===e&&i.handler===t&&(n=o)})),n>-1&&i.splice(n,1)}},{key:"unlock",value:function(){var e=this.player,t=this.pos;t.isEnter=!1,e.isMini||(this.unbind("mousemove",this.onMoveOnly),t.isDown?this.unbind("mouseleave",this.onMouseLeave):this.blur())}},{key:"bindDomEvents",value:function(){var e=this.player,t=e.controls,i=e.config;this._mouseDownHandlerHook=this.hook("dragstart",this._mouseDownHandler),this._mouseUpHandlerHook=this.hook("dragend",this._mouseUpHandler),this._mouseMoveHandlerHook=this.hook("drag",this._mouseMoveHandler),"touch"!==this.domEventType&&"compatible"!==this.domEventType||(this.root.addEventListener("touchstart",this.onMouseDown),t&&(t.root&&t.root.addEventListener("touchmove",x.stopPropagation),t.center&&t.center.addEventListener("touchend",x.stopPropagation))),"mouse"!==this.domEventType&&"compatible"!==this.domEventType||(this.bind("mousedown",this.onMouseDown),"mobile"!==i.isMobileSimulateMode&&this.bind("mouseenter",this.onMouseEnter),this.bind("mouseover",this.onMouseOver),this.bind("mouseout",this.onMouseOut),this.player.root.addEventListener("click",this.onBodyClick,!0))}},{key:"focus",value:function(){this.player.controls.pauseAutoHide(),x.addClass(this.root,"active")}},{key:"blur",value:function(){this._disableBlur||(this.player.controls.recoverAutoHide(),x.removeClass(this.root,"active"))}},{key:"disableBlur",value:function(){this._disableBlur=!0}},{key:"enableBlur",value:function(){this._disableBlur=!1}},{key:"updateWidth",value:function(e,t,i,n){var o=this.config,r=this.player;if(!o.isCloseClickSeek||0!==n){var s=t=t>=r.duration?r.duration-o.endedDiff:Number(t).toFixed(1);this.updatePercent(i),this.updateTime(e),(1!==n||o.isDragingSeek&&"audio"!==r.config.mediaType)&&(this._state.now=s,this._state.direc=s>r.currentTime?0:1,r.seek(s))}}},{key:"computeTime",value:function(e,t){var i,n,o=this.player,r=this.root.getBoundingClientRect(),s=r.width,a=r.height,l=r.top,c=r.left,u=t;90===o.rotateDeg?(i=a,n=l):(i=s,n=c);var h=u-n,d=(h=h>i?i:h<0?0:h)/i;d=d<0?0:d>1?1:d;var f=parseInt(d*this.offsetDuration*1e3,10)/1e3;return{percent:d,currentTime:f,seekTime:x.getCurrentTimeByOffset(f,o.timeSegments),offset:h,width:i,left:n,e:e}}},{key:"updateTime",value:function(e){var t=this.player,i=this.duration;e>i?e=i:e<0&&(e=0);var n=t.plugins.time;n&&n.updateTime(e)}},{key:"resetSeekState",value:function(){this.isProgressMoving=!1;var e=this.player.plugins.time;e&&e.resetActive()}},{key:"updatePercent",value:function(e,t){if(this.isProgressMoving=!0,!this.config.disable){e=e>1?1:e<0?0:e,this.progressBtn.style.left="".concat(100*e,"%"),this.innerList.update({played:e*this.offsetDuration},this.offsetDuration);var i=this.player.plugins.miniprogress;i&&i.update({played:e*this.offsetDuration},this.offsetDuration)}}},{key:"onTimeupdate",value:function(e){var t=this.player,i=this._state,n=this.offsetDuration;if(!t.isSeeking&&!this.isProgressMoving){if(i.now>-1){var o=parseInt(1e3*i.now,10)-parseInt(1e3*t.currentTime,10);if(0===i.direc&&o>300||1===i.direc&&o>-300)return void(i.now=-1);i.now=-1}var r=this.currentTime;r=x.adjustTimeByDuration(r,n,e),this.innerList.update({played:r},n),this.progressBtn.style.left="".concat(r/n*100,"%");var s=this.player.plugins.miniprogress;s&&s.update({played:r},n)}}},{key:"onCacheUpdate",value:function(e){var t=this.player,i=this.duration;if(t){var n=t.bufferedPoint.end;n=x.adjustTimeByDuration(n,i,e),this.innerList.update({cached:n},i);var o=this.player.plugins.miniprogress;o&&o.update({cached:n},i)}}},{key:"onReset",value:function(){this.innerList.update({played:0,cached:0},0);var e=this.player.plugins.miniprogress;e&&e.update({cached:0,played:0},0)}},{key:"destroy",value:function(){var e=this.player,t=e.controls;this.thumbnailPlugin=null,this.innerList.destroy(),this.innerList=null;var i=this.domEventType;"touch"!==i&&"compatible"!==i||(this.root.removeEventListener("touchstart",this.onMouseDown),this.root.removeEventListener("touchmove",this.onMouseMove),this.root.removeEventListener("touchend",this.onMouseUp),t&&(t.root&&t.root.removeEventListener("touchmove",x.stopPropagation),t.center&&t.center.removeEventListener("touchend",x.stopPropagation))),"mouse"!==i&&"compatible"!==i||(this.unbind("mousedown",this.onMouseDown),this.unbind("mouseenter",this.onMouseEnter),this.unbind("mousemove",this.onMoveOnly),this.unbind("mouseleave",this.onMouseLeave),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),e.root.removeEventListener("click",this.onBodyClick,!0))}},{key:"render",value:function(){if(!this.config.disable&&!this.playerConfig.isLive){var e=this.player.controls?this.player.controls.config.mode:"";return'\n \n \n \n \n \n ')}}}],[{key:"pluginName",get:function(){return"progress"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_CENTER,index:0,disable:!1,isDragingSeek:!0,closeMoveSeek:!1,isPauseMoving:!1,isCloseClickSeek:!1,fragments:[{percent:1}],fragFocusClass:Oi.POINT,fragClass:"",fragAutoFocus:!1,miniMoveStep:5,miniStartStep:2,onMoveStart:function(){},onMoveEnd:function(){},endedDiff:.2}}},{key:"FRAGMENT_FOCUS_CLASS",get:function(){return Oi}}]),l}(),Di=function(e){a(i,ot);var t=d(i);function i(){var e;n(this,i);for(var o=arguments.length,r=new Array(o),a=0;a\n
\n
\n '.concat(Kt(this,"PLAY_TIPS",this.playerConfig.isHideTips),"\n ")}}],[{key:"pluginName",get:function(){return"play"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_LEFT,index:0,disable:!1}}}]),i}();function Mi(){return(new DOMParser).parseFromString('\n \n \n \n',"image/svg+xml").firstChild}var Ni=function(e){a(i,ot);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"afterCreate",value:function(){var e=this;this.initIcons(),this.onClick=function(t){t.preventDefault(),t.stopPropagation(),e.config.onClick(t)},this.bind(["click","touchend"],this.onClick)}},{key:"registerIcons",value:function(){return{screenBack:{icon:Mi,class:"xg-fullscreen-back"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(this.root,e.screenBack)}},{key:"show",value:function(){x.addClass(this.root,"show")}},{key:"hide",value:function(){x.removeClass(this.root,"show")}},{key:"render",value:function(){return'\n '}}],[{key:"pluginName",get:function(){return"topbackicon"}},{key:"defaultConfig",get:function(){return{position:et.ROOT_TOP,index:0}}}]),i}();function Fi(){return(new DOMParser).parseFromString('\n \n\n',"image/svg+xml").firstChild}function Hi(){return(new DOMParser).parseFromString('\n \n\n',"image/svg+xml").firstChild}var Bi=function(e){a(i,Di);var t=d(i);function i(){var e;n(this,i);for(var o=arguments.length,r=new Array(o),a=0;a\n
\n
\n '.concat(Kt(this,"FULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n ")}}}],[{key:"pluginName",get:function(){return"fullscreen"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_RIGHT,index:0,useCssFullscreen:!1,rotateFullscreen:!1,switchCallback:null,target:null,disable:!1,needBackIcon:!1}}}]),i}(),Ui=function(e){a(i,ot);var t=d(i);function i(e){var o;return n(this,i),(o=t.call(this,e)).isActiving=!1,o}return r(i,[{key:"duration",get:function(){var e=this.player,t=e.offsetDuration,i=e.duration;return this.playerConfig.customDuration||t||i}},{key:"currentTime",get:function(){var e=this.player,t=e.offsetCurrentTime,i=e.currentTime;return t>=0?t:i}},{key:"timeOffset",get:function(){return this.playerConfig.timeOffset||0}},{key:"afterCreate",value:function(){var e=this,t=this.player.controls.config.mode;this.mode="flex"===t?"flex":"normal",this.config.disable||("flex"===this.mode&&(this.createCenterTime(),this.root.style.display="none"),this.durationDom=this.find(".time-duration"),this.timeDom=this.find(".time-current"),this.on([z,j,V],(function(){e.onTimeUpdate()})),this.on(F,(function(){e.onTimeUpdate(!0)})),this.on(J,(function(){e.onReset()})))}},{key:"show",value:function(){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="block"),void(this.centerDurDom&&(this.centerDurDom.style.display="block"));this.root.style.display="block"}},{key:"hide",value:function(){if("flex"===this.mode)return this.centerCurDom&&(this.centerCurDom.style.display="none"),void(this.centerDurDom&&(this.centerDurDom.style.display="none"));this.root.style.display="none"}},{key:"onTimeUpdate",value:function(e){var t=this.player,i=this.config,n=this.duration;if(!i.disable&&!this.isActiving&&t.hasStart){var o=this.currentTime+this.timeOffset;o=x.adjustTimeByDuration(o,n,e),"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(x.format(o)),n!==1/0&&n>0&&(this.centerDurDom.innerHTML=x.format(n))):(this.timeDom.innerHTML=this.minWidthTime(x.format(o)),n!==1/0&&n>0&&(this.durationDom.innerHTML=x.format(n)))}}},{key:"onReset",value:function(){"flex"===this.mode?(this.centerCurDom.innerHTML=this.minWidthTime(x.format(0)),this.centerDurDom.innerHTML=x.format(0)):(this.timeDom.innerHTML=this.minWidthTime(x.format(0)),this.durationDom.innerHTML=x.format(0))}},{key:"createCenterTime",value:function(){var e=this.player;if(e.controls&&e.controls.center){var t=e.controls.center;this.centerCurDom=x.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-left"),this.centerDurDom=x.createDom("xg-icon","00:00",{},"xgplayer-time xg-time-right"),t.children.length>0?t.insertBefore(this.centerCurDom,t.children[0]):t.appendChild(this.centerCurDom),t.appendChild(this.centerDurDom)}}},{key:"afterPlayerInit",value:function(){var e=this.config;this.duration===1/0||this.playerConfig.isLive?(x.hide(this.durationDom),x.hide(this.timeDom),x.hide(this.find(".time-separator")),x.show(this.find(".time-live-tag"))):x.hide(this.find(".time-live-tag")),e.hide?this.hide():this.show()}},{key:"changeLiveState",value:function(e){e?(x.hide(this.durationDom),x.hide(this.timeDom),x.hide(this.find(".time-separator")),x.show(this.find(".time-live-tag"))):(x.hide(this.find(".time-live-tag")),x.show(this.find(".time-separator")),x.show(this.durationDom),x.show(this.timeDom))}},{key:"updateTime",value:function(e){this.isActiving=!0,!e&&0!==e||e>this.duration||("flex"!==this.mode?this.timeDom.innerHTML=this.minWidthTime(x.format(e)):this.centerCurDom.innerHTML=this.minWidthTime(x.format(e)))}},{key:"minWidthTime",value:function(e){return e.split(":").map((function(e){return''.concat(e,"")})).join(":")}},{key:"resetActive",value:function(){var e=this,t=this.player,i=function(){e.isActiving=!1};this.off(j,i),t.isSeeking?this.once(j,i):this.isActiving=!1}},{key:"destroy",value:function(){var e=this.player.controls.center;this.centerCurDom&&e.removeChild(this.centerCurDom),this.centerCurDom=null,this.centerDurDom&&e.removeChild(this.centerDurDom),this.centerDurDom=null}},{key:"render",value:function(){if(!this.config.disable)return'\n 00:00\n /\n 00:00\n '.concat(this.i18n.LIVE_TIP,"\n ")}}],[{key:"pluginName",get:function(){return"time"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_LEFT,index:2,disable:!1}}}]),i}(),ji=function(e){a(i,Ke);var t=d(i);function i(){var e;n(this,i);for(var o=arguments.length,r=new Array(o),a=0;a0&&(e.player.currentTime=e.curPos.start)}})),s(u(e),"_onTimeupdate",(function(){var t=e.player,i=t.currentTime,n=t.timeSegments;if(e._checkIfEnabled(n)){var o=n.length;e.lastCurrentTime=i;var r=x.getIndexByTime(i,n);r!==e.curIndex&&e.changeIndex(r,n);var s=x.getOffsetCurrentTime(i,n,r);if(e.player.offsetCurrentTime=s,e.curPos){var a=e.curPos,l=a.start,c=a.end;ic&&r>=o-1&&e.player.pause()}}})),s(u(e),"_onSeeking",(function(){var t=e.player,i=t.currentTime,n=t.timeSegments;if(e._checkIfEnabled(n))if(in[n.length-1].end)e.player.currentTime=n[n.length-1].end;else{var o=x.getIndexByTime(i,n);if(o>=0){var r=e.getSeekTime(i,e.lastCurrentTime,o,n);r>=0&&(e.player.currentTime=r)}}})),s(u(e),"_onPlay",(function(){var t=e.player,i=t.currentTime,n=t.timeSegments;e._checkIfEnabled(n)&&i>=n[n.length-1].end&&(e.player.currentTime=n[0].start)})),e}return r(i,[{key:"afterCreate",value:function(){this.curIndex=-1,this.curPos=null,this.lastCurrentTime=0,this.updateSegments(),this.on(z,this._onDurationChange),this.on(Y,this._onLoadedData),this.on(V,this._onTimeupdate),this.on(U,this._onSeeking),this.on(M,this._onPlay)}},{key:"setConfig",value:function(e){var t=this;if(e){var i=Object.keys(e);i.length<1||(i.forEach((function(i){t.config[i]=e[i]})),this.updateSegments())}}},{key:"updateSegments",value:function(){var e=this.config,t=e.disable,i=e.segments,n=this.player;if(t||!i||0===i.length)n.timeSegments=[],n.offsetDuration=0,n.offsetCurrentTime=-1;else{var o=this.formatTimeSegments(i,n.duration);n.timeSegments=o,n.offsetDuration=o.length>0?o[o.length-1].duration:0}}},{key:"formatTimeSegments",value:function(e,t){var i=[];return e?(e.sort((function(e,t){return e.start-t.start})),e.forEach((function(e,n){var o={};if(o.start=e.start<0?0:e.start,o.end=t>0&&e.end>t?t:e.end,!(t>0&&o.start>t)){i.push(o);var r=o.end-o.start;if(0===n)o.offset=e.start,o.cTime=0,o.segDuration=r,o.duration=r;else{var s=i[n-1];o.offset=s.offset+(o.start-s.end),o.cTime=s.duration+s.cTime,o.segDuration=r,o.duration=s.duration+r}}})),i):[]}},{key:"getSeekTime",value:function(e,t,i,n){var o=-1,r=n[i],s=r.start,a=r.end;if(e>=s&&e<=a)return o;var l=e-t;if(l<0&&es?t-s:0;return o=i-1>=0?n[i-1].end+l+c:0}return-1}},{key:"_checkIfEnabled",value:function(e){return!(!e||e.length<1)}},{key:"changeIndex",value:function(e,t){this.curIndex=e,e>=0&&t.length>0?this.curPos=t[e]:this.curPos=null}}],[{key:"pluginName",get:function(){return"TimeSegmentsControls"}},{key:"defaultConfig",get:function(){return{disable:!0,segments:[]}}}]),i}();function Vi(){return(new DOMParser).parseFromString('\n \n \n\n',"image/svg+xml").firstChild}function Gi(){return(new DOMParser).parseFromString('\n \n \n\n',"image/svg+xml").firstChild}function Wi(){return(new DOMParser).parseFromString('\n \n \n\n',"image/svg+xml").firstChild}var zi=function(e){a(i,ot);var t=d(i);function i(){var e;n(this,i);for(var o=arguments.length,r=new Array(o),a=0;ao.barH||e.updateVolumePos(a,t)}})),s(u(e),"onBarMouseUp",(function(t){x.event(t),document.removeEventListener("mouseup",e.onBarMouseUp);var i=u(e)._d;i.isStart=!1,i.isMoving=!1})),s(u(e),"onMouseenter",(function(t){e._d.isActive=!0,e.focus(),e.emit("icon_mouseenter",{pluginName:e.pluginName})})),s(u(e),"onMouseleave",(function(t){e._d.isActive=!1,e.unFocus(100,!1,t),e.emit("icon_mouseleave",{pluginName:e.pluginName})})),s(u(e),"onVolumeChange",(function(t){if(e.player){var i=e.player,n=i.muted,o=i.volume;e._d.isMoving||(e.find(".xgplayer-drag").style.height=n||0===o?"4px":"".concat(100*o,"%"),e.config.showValueLabel&&e.updateVolumeValue()),e.animate(n,o)}})),e}return r(i,[{key:"registerIcons",value:function(){return{volumeSmall:{icon:Gi,class:"xg-volume-small"},volumeLarge:{icon:Vi,class:"xg-volume"},volumeMuted:{icon:Wi,class:"xg-volume-mute"}}}},{key:"afterCreate",value:function(){var e=this;if(this._timerId=null,this._d={isStart:!1,isMoving:!1,isActive:!1},!this.config.disable){this.initIcons();var t=this.playerConfig,i=t.commonStyle,n=t.volume;i.volumeColor&&(this.find(".xgplayer-drag").style.backgroundColor=i.volumeColor),this.changeMutedHandler=this.hook("mutedChange",(function(t){e.changeMuted(t)}),{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this._onMouseenterHandler=this.hook("mouseenter",this.onMouseenter),this._onMouseleaveHandler=this.hook("mouseleave",this.onMouseleave),"mobile"!==L.device&&"mobile"!==this.playerConfig.isMobileSimulateMode&&(this.bind("mouseenter",this._onMouseenterHandler),this.bind(["blur","mouseleave"],this._onMouseleaveHandler),this.bind(".xgplayer-slider","mousedown",this.onBarMousedown),this.bind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.bind(".xgplayer-slider","mouseup",this.onBarMouseUp)),this.bind(".xgplayer-icon",["touchend","click"],this.changeMutedHandler),this.on(K,this.onVolumeChange),this.once(Y,this.onVolumeChange),"Number"!==x.typeOf(n)&&(this.player.volume=this.config.default),this.onVolumeChange()}}},{key:"updateVolumePos",value:function(e,t){var i=this.player,n=this.find(".xgplayer-drag"),o=this.find(".xgplayer-bar");if(o&&n){var r=parseInt(e/o.getBoundingClientRect().height*1e3,10);n.style.height="".concat(e,"px");var s=Math.max(Math.min(r/1e3,1),0),a={volume:{from:i.volume,to:s}};i.muted&&(a.muted={from:!0,to:!1}),this.emitUserAction(t,"change_volume",{muted:i.muted,volume:i.volume,props:a}),i.volume=Math.max(Math.min(r/1e3,1),0),i.muted&&(i.muted=!1),this.config.showValueLabel&&this.updateVolumeValue()}}},{key:"updateVolumeValue",value:function(){var e=this.player,t=e.volume,i=e.muted,n=this.find(".xgplayer-value-label"),o=Math.max(Math.min(t,1),0);n.innerText=i?0:Math.ceil(100*o)}},{key:"focus",value:function(){this.player.focus({autoHide:!1}),this._timerId&&(x.clearTimeout(this,this._timerId),this._timerId=null),x.addClass(this.root,"slide-show")}},{key:"unFocus",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2?arguments[2]:void 0,o=this._d,r=this.player;o.isActive||(this._timerId&&(x.clearTimeout(this,this._timerId),this._timerId=null),this._timerId=x.setTimeout(this,(function(){o.isActive||(i?r.blur():r.focus(),x.removeClass(e.root,"slide-show"),o.isStart&&e.onBarMouseUp(n)),e._timerId=null}),t))}},{key:"changeMuted",value:function(e){e&&e.stopPropagation();var t=this.player;this._d.isStart&&this.onBarMouseUp(e),this.emitUserAction(e,"change_muted",{muted:t.muted,volume:t.volume,props:{muted:{from:t.muted,to:!t.muted}}}),t.volume>0&&(t.muted=!t.muted),t.volume<.01&&(t.volume=this.config.miniVolume)}},{key:"animate",value:function(e,t){e||0===t?this.setAttr("data-state","mute"):t<.5&&this.icons.volumeSmall?this.setAttr("data-state","small"):this.setAttr("data-state","normal")}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.volumeSmall),this.appendChild(".xgplayer-icon",e.volumeLarge),this.appendChild(".xgplayer-icon",e.volumeMuted)}},{key:"destroy",value:function(){this._timerId&&(x.clearTimeout(this,this._timerId),this._timerId=null),this.unbind("mouseenter",this.onMouseenter),this.unbind(["blur","mouseleave"],this.onMouseleave),this.unbind(".xgplayer-slider","mousedown",this.onBarMousedown),this.unbind(".xgplayer-slider","mousemove",this.onBarMouseMove),this.unbind(".xgplayer-slider","mouseup",this.onBarMouseUp),document.removeEventListener("mouseup",this.onBarMouseUp),this.unbind(".xgplayer-icon","mobile"===L.device?"touchend":"click",this.changeMutedHandler)}},{key:"render",value:function(){if(!this.config.disable){var e=this.config.default||this.player.volume,t=this.config.showValueLabel;return'\n \n
\n
\n \n '.concat(t?'
'.concat(100*e,"
"):"",'\n
\n \n
\n
\n
')}}}],[{key:"pluginName",get:function(){return"volume"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_RIGHT,index:1,disable:!1,showValueLabel:!1,default:.6,miniVolume:.2}}}]),i}();function Ki(){return(new DOMParser).parseFromString('\n \n \n \n \n \n \n \n \n \n\n',"image/svg+xml").firstChild}var Yi=function(e){a(i,Di);var t=d(i);function i(e){var o;return n(this,i),(o=t.call(this,e)).rotateDeg=o.config.rotateDeg||0,o}return r(i,[{key:"afterCreate",value:function(){var e=this;if(!this.config.disable){f(l(i.prototype),"afterCreate",this).call(this),this.appendChild(".xgplayer-icon",this.icons.rotate),this.onBtnClick=this.onBtnClick.bind(this),this.bind(".xgplayer-icon",["click","touchend"],this.onBtnClick),this.on(pe,(function(){e.rotateDeg&&e.config.innerRotate&&x.setTimeout(e,(function(){e.updateRotateDeg(e.rotateDeg,e.config.innerRotate)}),100)}));var t=this.player.root;this.rootWidth=t.style.width||t.offsetWidth||t.clientWidth,this.rootHeight=t.style.height||t.offsetHeight||t.clientHeight,this.rotateDeg&&this.updateRotateDeg(this.rotateDeg,this.config.innerRotate)}}},{key:"destroy",value:function(){f(l(i.prototype),"destroy",this).call(this),this.unbind(".xgplayer-icon",["click","touchend"],this.onBtnClick)}},{key:"onBtnClick",value:function(e){e.preventDefault(),e.stopPropagation(),this.emitUserAction(e,"rotate"),this.rotate(this.config.clockwise,this.config.innerRotate,1)}},{key:"updateRotateDeg",value:function(e,t){if(e||(e=0),t)this.player.videoRotateDeg=e;else{var i=this.player,n=this.rootWidth,o=this.rootHeight,r=i.root,s=i.innerContainer,a=i.media,l=r.offsetWidth,c=s&&t?s.offsetHeight:r.offsetHeight,u=n,h=o,d=0,f=0;.75!==e&&.25!==e||(u="".concat(c,"px"),h="".concat(l,"px"),d=-(c-l)/2,f=-(l-c)/2);var p="translate(".concat(d,"px,").concat(f,"px) rotate(").concat(e,"turn)"),g={transformOrigin:"center center",transform:p,webKitTransform:p,height:h,width:u},v=t?a:r,y=t?i.getPlugin("poster"):null;Object.keys(g).map((function(e){v.style[e]=g[e],y&&y.root&&(y.root.style[e]=g[e])}))}}},{key:"rotate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=this.player;this.rotateDeg||(this.rotateDeg=0);var o=e?1:-1;this.rotateDeg=(this.rotateDeg+1+.25*o*i)%1,this.updateRotateDeg(this.rotateDeg,t),n.emit(ve,360*this.rotateDeg)}},{key:"registerIcons",value:function(){return{rotate:Ki}}},{key:"render",value:function(){if(!this.config.disable)return'\n \n
\n
\n '.concat(Kt(this,"ROTATE_TIPS",this.playerConfig.isHideTips),"\n
")}}],[{key:"pluginName",get:function(){return"rotate"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_RIGHT,index:6,innerRotate:!0,clockwise:!1,rotateDeg:0,disable:!1}}}]),i}();function Xi(){return(new DOMParser).parseFromString('\n \n',"image/svg+xml").firstChild}function qi(){return(new DOMParser).parseFromString('\n \n \n',"image/svg+xml").firstChild}var Zi="picture-in-picture",Ji="inline",$i="fullscreen",Qi=function(e){a(i,Di);var t=d(i);function i(){var e;n(this,i);for(var o=arguments.length,r=new Array(o),a=0;a\n
\n
\n '.concat(Kt(this,"PIP",this.playerConfig.isHideTips),"\n ")}}],[{key:"pluginName",get:function(){return"pip"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_RIGHT,index:6,showIcon:!1}}},{key:"checkWebkitSetPresentationMode",value:function(e){return"function"==typeof e.webkitSetPresentationMode}}]),i}();function en(){return(new DOMParser).parseFromString('\n \n\n',"image/svg+xml").firstChild}var tn=function(e){a(i,ot);var t=d(i);function i(e){var o;return n(this,i),s(u(o=t.call(this,e)),"playNext",(function(e){var t=u(o).player;e.preventDefault(),e.stopPropagation(),o.idx+1\n
\n
\n '.concat(Kt(this,"PLAYNEXT_TIPS",this.playerConfig.isHideTips),"\n \n ")}}],[{key:"pluginName",get:function(){return"playNext"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_LEFT,index:1,url:null,urlList:[]}}}]),i}(),nn={};({get exports(){return nn},set exports(e){nn=e}}).exports=function e(t,i,n){var o,r,s=window,a="application/octet-stream",l=n||a,c=t,u=!i&&!n&&c,h=document.createElement("a"),d=function(e){return String(e)},f=s.Blob||s.MozBlob||s.WebKitBlob||d,p=i||"download";if(f=f.call?f.bind(s):Blob,"true"===String(this)&&(l=(c=[c,l])[0],c=c[1]),u&&u.length<2048&&(p=u.split("/").pop().split("?")[0],h.href=u,-1!==h.href.indexOf(u))){var g=new XMLHttpRequest;return g.open("GET",u,!0),g.responseType="blob",g.onload=function(t){e(t.target.response,p,a)},setTimeout((function(){g.send()}),0),g}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(c)){if(!(c.length>2096103.424&&f!==d))return navigator.msSaveBlob?navigator.msSaveBlob(k(c),p):C(c);l=(c=k(c)).type||a}else if(/([\x80-\xff])/.test(c)){for(var v=0,y=new Uint8Array(c.length),m=y.length;v\n \n \n \n \n \n \n \n \n \n \n \n \n\n',"image/svg+xml").firstChild}var sn=function(e){a(i,Di);var t=d(i);function i(e){var o;return n(this,i),s(u(o=t.call(this,e)),"download",(function(e){if(!o.isLock){o.emitUserAction(e,"download");var t=o.playerConfig.url,i="";"String"===x.typeOf(t)?i=t:"Array"===x.typeOf(t)&&t.length>0&&(i=t[0].src);var n=o.getAbsoluteURL(i);on(n),o.isLock=!0,o.timer=window.setTimeout((function(){o.isLock=!1,window.clearTimeout(o.timer),o.timer=null}),300)}})),o.timer=null,o.isLock=!1,o}return r(i,[{key:"afterCreate",value:function(){f(l(i.prototype),"afterCreate",this).call(this),this.config.disable||(this.appendChild(".xgplayer-icon",this.icons.download),this._handler=this.hook("click",this.download,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(["click","touchend"],this._handler))}},{key:"registerIcons",value:function(){return{download:rn}}},{key:"getAbsoluteURL",value:function(e){if(!e.match(/^https?:\/\//)){var t=document.createElement("div");t.innerHTML='x'),e=t.firstChild.href}return e}},{key:"destroy",value:function(){f(l(i.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.download),window.clearTimeout(this.timer),this.timer=null}},{key:"render",value:function(){if(!this.config.disable)return'\n
\n
\n '.concat(Kt(this,"DOWNLOAD_TIPS",this.playerConfig.isHideTips),"\n
")}}],[{key:"pluginName",get:function(){return"download"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_RIGHT,index:3,disable:!0}}}]),i}(),an=function(e){a(i,Di);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.screenShot&&(e.config.disable=!e.player.config.screenShot)}},{key:"afterCreate",value:function(){f(l(i.prototype),"afterCreate",this).call(this),this.appendChild(".xgplayer-icon",this.icons.screenshotIcon);var e=this.config;this.initSize=function(t){e.fitVideo&&(e.width=t.vWidth,e.height=t.vHeight)},this.once(pe,this.initSize)}},{key:"onPluginsReady",value:function(){this.show(),this.onClickBtn=this.onClickBtn.bind(this),this.bind(["click","touchend"],this.onClickBtn)}},{key:"saveScreenShot",value:function(e,t){var i=document.createElement("a");i.href=e,i.download=t;var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(n)}},{key:"createCanvas",value:function(e,t){var i=document.createElement("canvas"),n=i.getContext("2d");this.canvasCtx=n,this.canvas=i,i.width=e||this.config.width,i.height=t||this.config.height,n.imageSmoothingEnabled=!0,n.imageSmoothingEnabled&&(n.imageSmoothingQuality="high")}},{key:"onClickBtn",value:function(e){var t=this;e.preventDefault(),e.stopPropagation(),this.emitUserAction(e,"shot"),this.shot().then((function(e){t.emit(ye,e),t.saveScreenShot(e,t.config.name+t.config.format)}))}},{key:"shot",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{quality:.92,type:"image/png"},o=this.config,r=this.player,s=n.quality||o.quality,a=n.type||o.type;return new Promise((function(n,l){var c,u=null;if(r.media.canvas)u=r.media.canvas;else{i.canvas?(i.canvas.width=e||o.width,i.canvas.height=t||o.height):i.createCanvas(e,t),u=i.canvas,c=i.canvasCtx;var h,d,f,p,g=r.media.videoWidth/r.media.videoHeight,v=u.width/u.height,y=r.media.videoWidth,m=r.media.videoHeight;g>v?(f=u.width,p=u.width/g,h=0,d=Math.round((u.height-p)/2)):g===v?(f=u.width,p=u.height,h=0,d=0):g\n
\n ').concat(this.icons.screenshotIcon?"":'').concat(this.i18n[t],""),"\n
\n ")}}}],[{key:"pluginName",get:function(){return"screenShot"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_RIGHT,index:5,quality:.92,type:"image/png",format:".png",width:600,height:337,fitVideo:!0,disable:!1,name:"screenshot"}}}]),i}(),ln=function(){function e(t){n(this,e),this.config=t.config,this.parent=t.root,this.root=x.createDom("ul","",{},"xg-options-list xg-list-slide-scroll ".concat(this.config.className)),t.root.appendChild(this.root);var i=this.config.maxHeight;i&&this.setStyle({maxHeight:i}),this.onItemClick=this.onItemClick.bind(this),this.renderItemList();var o="mobile"===L.device?"touchend":"click";this._delegates=ot.delegate.call(this,this.root,"li",o,this.onItemClick)}return r(e,[{key:"renderItemList",value:function(e){var t=this,i=this.config,n=this.root;e?i.data=e:e=i.data,i.style&&Object.keys(i.style).map((function(e){n.style[e]=i[e]})),e.length>0&&(this.attrKeys=Object.keys(e[0])),this.root.innerHTML="",e.map((function(e,i){var n=e.selected?"option-item selected":"option-item";e["data-index"]=i,t.root.appendChild(x.createDom("li","".concat(e.showText,""),e,n))}))}},{key:"onItemClick",value:function(e){e.delegateTarget||(e.delegateTarget=e.target);var t=e.delegateTarget;if(t&&x.hasClass(t,"selected"))return!1;var i="function"==typeof this.config.onItemClick?this.config.onItemClick:null,n=this.root.querySelector(".selected");x.addClass(t,"selected"),n&&x.removeClass(n,"selected"),i(e,{from:n?this.getAttrObj(n,this.attrKeys):null,to:this.getAttrObj(t,this.attrKeys)})}},{key:"getAttrObj",value:function(e,t){if(!e||!t)return{};var i={};t.map((function(t){i[t]=e.getAttribute(t)}));var n=e.getAttribute("data-index");return n&&(i.index=Number(n)),i}},{key:"show",value:function(){x.removeClass(this.root,"hide"),x.addClass(this.root,"active")}},{key:"hide",value:function(){x.removeClass(this.root,"active"),x.addClass(this.root,"hide")}},{key:"setStyle",value:function(e){var t=this;Object.keys(e).forEach((function(i){t.root.style[i]=e[i]}))}},{key:"destroy",value:function(){this._delegates&&(this._delegates.map((function(e){e.destroy&&e.destroy()})),this._delegates=null),this.root.innerHTML=null,this.parent.removeChild(this.root),this.root=null}}]),e}(),cn={SIDE:"side",MIDDLE:"middle"},un="click",hn="hover";var dn="mobile"===L.device,fn=function(e){a(o,ot);var t=d(o);function o(e){var i;return n(this,o),s(u(i=t.call(this,e)),"onEnter",(function(e){e.stopPropagation(),i.emit("icon_mouseenter",{pluginName:i.pluginName}),i.switchActiveState(e)})),s(u(i),"switchActiveState",(function(e){e.stopPropagation(),i.config.toggleMode===un?i.toggle(!i.isActive):i.toggle(!0)})),s(u(i),"onLeave",(function(e){e.stopPropagation(),i.emit("icon_mouseleave",{pluginName:i.pluginName}),i.config.listType!==cn.SIDE&&i.isActive&&i.toggle(!1)})),s(u(i),"onListEnter",(function(e){i.enterType=2})),s(u(i),"onListLeave",(function(e){i.enterType=0,i.isActive&&i.toggle(!1)})),i.isIcons=!1,i.isActive=!1,i.curValue=null,i.curIndex=0,i}return r(o,[{key:"updateLang",value:function(e){this.renderItemList(this.config.list,this.curIndex)}},{key:"afterCreate",value:function(){var e=this,t=this.config;this.initIcons(),dn&&t.listType!==cn.MIDDLE&&(t.listType=cn.SIDE),t.hidePortrait&&x.addClass(this.root,"portrait"),this.on([pe,ce],(function(){e._resizeList()})),this.once(W,(function(){t.list&&t.list.length>0&&(e.renderItemList(t.list),e.show())})),dn&&this.on($,(function(){e.isActive&&(e.optionsList&&e.optionsList.hide(),e.isActive=!1)})),dn?(t.toggleMode=un,this.activeEvent="touchend"):this.activeEvent=t.toggleMode===un?"click":"mouseenter",t.toggleMode===un?this.bind(this.activeEvent,this.switchActiveState):(this.bind(this.activeEvent,this.onEnter),this.bind("mouseleave",this.onLeave)),this.isIcons&&this.bind("click",this.onIconClick)}},{key:"initIcons",value:function(){var e=this,t=this.icons,i=Object.keys(t),n=!1;i.length>0&&(i.forEach((function(i){e.appendChild(".xgplayer-icon",t[i]),!n&&(n=t[i])})),this.isIcons=n),n||(this.appendChild(".xgplayer-icon",x.createDom("span","",{},"icon-text")),x.addClass(this.find(".xgplayer-icon"),"btn-text"))}},{key:"show",value:function(){!this.config.list||this.config.list.length<2||x.addClass(this.root,"show")}},{key:"hide",value:function(){x.removeClass(this.root,"show")}},{key:"getTextByLang",value:function(e,t,n){if(void 0===e)return"";var o=this.config.list;!n&&(n=this.player.lang),t=!t||x.isUndefined(e[t])?"text":t,"number"==typeof e&&(e=o[e]);try{return"object"===i(e[t])?e[t][n]||e[t].en:e[t]}catch(e){return console.warn(e),""}}},{key:"toggle",value:function(e){if(e!==this.isActive){var t=this.player.controls,i=this.config.listType;e?(i===cn.SIDE?t.blur():t.focus(),this.optionsList&&this.optionsList.show()):(i===cn.SIDE?t.focus():t.focusAwhile(),this.optionsList&&this.optionsList.hide()),this.isActive=e}}},{key:"onItemClick",value:function(e,t){e.stopPropagation();var i=this.config,n=i.listType,o=i.list;this.curIndex=t.to.index,this.curItem=o[this.curIndex],this.changeCurrentText(),(this.config.isItemClickHide||dn||n===cn.SIDE)&&this.toggle(!1)}},{key:"onIconClick",value:function(e){}},{key:"changeCurrentText",value:function(){if(!this.isIcons){var e=this.config.list,t=e[this.curIndex\n
\n
\n ')}}],[{key:"pluginName",get:function(){return"optionsIcon"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_RIGHT,index:100,list:[],listType:"middle",listStyle:{},hidePortrait:!0,isShowIcon:!1,isItemClickHide:!0,toggleMode:hn}}}]),o}(),pn=function(e){a(o,fn);var i=d(o);function o(e){var t;return n(this,o),(t=i.call(this,e)).curTime=0,t.isPaused=!0,t}return r(o,[{key:"beforeCreate",value:function(e){var t=e.config.list;Array.isArray(t)&&t.length>0&&(e.config.list=t.map((function(e){return!e.text&&e.name&&(e.text=e.name),e.text||(e.text=e.definition),e})))}},{key:"afterCreate",value:function(){var e=this;f(l(o.prototype),"afterCreate",this).call(this),this.on("resourceReady",(function(t){e.changeDefinitionList(t)})),this.on(de,(function(t){e.renderItemList(e.config.list,t.to)})),this.player.definitionList.length<2&&this.hide()}},{key:"show",value:function(){!this.config.list||this.config.list.length<2||x.addClass(this.root,"show")}},{key:"initDefinition",value:function(){var e=this.config,t=e.list,i=e.defaultDefinition;if(t.length>0){var n=null;t.map((function(e){e.definition===i&&(n=e)})),n||(n=t[0]),this.changeDefinition(n)}}},{key:"renderItemList",value:function(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.config.list||[],n=arguments.length>1?arguments[1]:void 0,r=n&&n.definition?n.definition:this.config.defaultDefinition;n&&i.forEach((function(e){e.selected=!1}));var s=0,a=i.map((function(i,n){var o=t(t({},i),{},{showText:e.getTextByLang(i)||i.definition,selected:!1});return(i.selected||i.definition&&i.definition==r)&&(o.selected=!0,s=n),o}));f(l(o.prototype),"renderItemList",this).call(this,a,s)}},{key:"changeDefinitionList",value:function(e){Array.isArray(e)&&(this.config.list=e.map((function(e){return!e.text&&e.name&&(e.text=e.name),e.text||(e.text=e.definition),e})),this.renderItemList(),this.config.list.length<2?this.hide():this.show())}},{key:"changeDefinition",value:function(e,t){this.player.changeDefinition(e,t)}},{key:"onItemClick",value:function(e,t){var i=this.player.definitionList;f(l(o.prototype),"onItemClick",this).apply(this,arguments),this.emitUserAction(e,"change_definition",{from:t.from,to:t.to});for(var n=0;n\n \n\n',"image/svg+xml").firstChild}function yn(){return(new DOMParser).parseFromString('\n \n\n',"image/svg+xml").firstChild}var mn=function(e){a(i,Di);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"beforeCreate",value:function(e){"boolean"==typeof e.player.config.cssFullscreen&&(e.config.disable=!e.player.config.cssFullscreen)}},{key:"afterCreate",value:function(){var e=this;f(l(i.prototype),"afterCreate",this).call(this),this.config.disable||(this.config.target&&(this.playerConfig.fullscreenTarget=this.config.target),this.initIcons(),this.on(ue,(function(t){e.animate(t)})),this.btnClick=this.btnClick.bind(this),this.handleCssFullscreen=this.hook("cssFullscreen_change",this.btnClick,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.bind(["click","touchend"],this.handleCssFullscreen))}},{key:"initIcons",value:function(){var e=this.icons,t=this.find(".xgplayer-icon");t.appendChild(e.cssFullscreen),t.appendChild(e.exitCssFullscreen)}},{key:"btnClick",value:function(e){e.preventDefault(),e.stopPropagation();var t=this.player.isCssfullScreen;this.emitUserAction(e,"switch_cssfullscreen",{cssfullscreen:t}),t?this.player.exitCssFullscreen():this.player.getCssFullscreen()}},{key:"animate",value:function(e){this.root&&(e?this.setAttr("data-state","full"):this.setAttr("data-state","normal"),this.switchTips(e))}},{key:"switchTips",value:function(e){var t=this.i18nKeys,i=this.find(".xg-tips");i&&this.changeLangTextKey(i,e?t.EXITCSSFULLSCREEN_TIPS:t.CSSFULLSCREEN_TIPS)}},{key:"registerIcons",value:function(){return{cssFullscreen:{icon:vn,class:"xg-get-cssfull"},exitCssFullscreen:{icon:yn,class:"xg-exit-cssfull"}}}},{key:"destroy",value:function(){f(l(i.prototype),"destroy",this).call(this),this.unbind(["click","touchend"],this.btnClick)}},{key:"render",value:function(){if(!this.config.disable)return"\n
\n
\n ".concat(Kt(this,"CSSFULLSCREEN_TIPS",this.playerConfig.isHideTips),"\n
")}}],[{key:"pluginName",get:function(){return"cssFullscreen"}},{key:"defaultConfig",get:function(){return{position:et.CONTROLS_RIGHT,index:1,disable:!1,target:null}}}]),i}(),kn=function(e){a(i,ot);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"afterCreate",value:function(){var e=this;this.clickHandler=this.hook("errorRetry",this.errorRetry,{pre:function(e){e.preventDefault(),e.stopPropagation()}}),this.onError=this.hook("showError",this.handleError),this.bind(".xgplayer-error-refresh","click",this.clickHandler),this.on(B,(function(t){e.onError(t)}))}},{key:"errorRetry",value:function(e){this.emitUserAction(e,"error_retry",{}),this.player.retry()}},{key:"handleError",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.player,i=e.errorType,n=t.errorNote?this.i18n[t.errorNote]:"";if(!n)switch(i){case"decoder":n=this.i18n.MEDIA_ERR_DECODE;break;case"network":n=this.i18n.MEDIA_ERR_NETWORK;break;default:n=this.i18n.MEDIA_ERR_SRC_NOT_SUPPORTED}this.find(".xgplayer-error-text").innerHTML=n,this.find(".xgplayer-error-tips").innerHTML="".concat(this.i18n.REFRESH_TIPS,'').concat(this.i18n.REFRESH,"")}},{key:"destroy",value:function(){this.unbind(".xgplayer-error-refresh","click",this.clickHandler)}},{key:"render",value:function(){return'\n
\n \n \n
\n
'}}],[{key:"pluginName",get:function(){return"error"}}]),i}(),Cn=function(e){a(i,ot);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"afterCreate",value:function(){var e=this;this.intervalId=0,this.customConfig=null,this.bind(".highlight",["click","touchend"],(function(t){(e.config.onClick||e.customOnClick)&&(t.preventDefault(),t.stopPropagation(),e.customOnClick?e.customOnClick(t):e.config.onClick(t))})),this.player.showPrompt=function(){e.show.apply(e,arguments)},this.player.hidePrompt=function(){e.hide()}}},{key:"setStyle",value:function(e){var t=this;Object.keys(e).map((function(i){t.root.style[i]=e[i]}))}},{key:"show",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(e){this.customOnClick=n;var o=this.config.interval;if(this.intervalId&&(clearTimeout(this.intervalId),this.intervalId=null),x.addClass(this.root,"show"),"arrow"===i.mode&&x.addClass(this.root,"arrow"),this.find(".xgplayer-prompt-detail").innerHTML="string"==typeof e?e:"".concat(e.text||"")+"".concat(e.highlight?''.concat(e.highlight,""):""),i.style&&this.setStyle(i.style),"boolean"==typeof i.autoHide?i.autoHide:this.config.autoHide){var r=i.interval||o;this.intervalId=setTimeout((function(){t.hide()}),r)}}}},{key:"hide",value:function(){x.removeClass(this.root,"show"),x.removeClass(this.root,"arrow"),this.root.removeAttribute("style"),this.customOnClick=null}},{key:"render",value:function(){return'\n \n ')}}],[{key:"pluginName",get:function(){return"prompt"}},{key:"defaultConfig",get:function(){return{interval:3e3,style:{},mode:"arrow",autoHide:!0,detail:{text:"",highlight:""},onClick:function(){}}}}]),i}(),bn={time:0,text:"",id:1,duration:1,color:"#fff",style:{},width:6,height:6};function _n(e){Object.keys(bn).map((function(t){void 0===e[t]&&(e[t]=bn[t])}))}var wn={_updateDotDom:function(e,t){if(t){var i=this.calcuPosition(e.time,e.duration),n=e.style||{};n.left="".concat(i.left,"%"),n.width="".concat(i.width,"%"),t.setAttribute("data-text",e.text),t.setAttribute("data-time",e.time),i.isMini?x.addClass(t,"mini"):x.removeClass(t,"mini"),Object.keys(n).map((function(e){t.style[e]=n[e]}))}},initDots:function(){var e=this;this._ispots.map((function(t){e.createDot(t,!1)})),this.ispotsInit=!0},createDot:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.player.plugins.progress;if(i&&(t&&(_n(e),this._ispots.push(e)),this.ispotsInit||!t)){var n=this.calcuPosition(e.time,e.duration),o=e.style||{};o.left="".concat(n.left,"%"),o.width="".concat(n.width,"%");var r="xgspot_".concat(e.id," xgplayer-spot");n.isMini&&(r+=" mini");var s=e.template?'
'.concat(e.template,"
"):"",a=x.createDom("xg-spot",s,{"data-text":e.text,"data-time":e.time,"data-id":e.id},r);Object.keys(o).map((function(e){a.style[e]=o[e]})),i.outer&&i.outer.appendChild(a),this.positionDot(a,e.id)}},findDot:function(e){if(this.player.plugins.progress){var t=this._ispots.filter((function(t,i){return t.id===e}));return t.length>0?t[0]:null}},updateDot:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.player.plugins.progress;if(i){var n=this.findDot(e.id);if(n&&Object.keys(e).map((function(t){n[t]=e[t]})),this.ispotsInit){var o=i.find('xg-spot[data-id="'.concat(e.id,'"]'));o&&(this._updateDotDom(e,o),t&&this.showDot(e.id))}}},deleteDot:function(e){var t=this._ispots,i=this.player.plugins.progress;if(i){for(var n=[],o=0;o=0;r--)if(t.splice(n[r],1),this.ispotsInit){var s=i.find('xg-spot[data-id="'.concat(e,'"]'));s&&s.parentElement.removeChild(s)}}},deleteAllDots:function(){var e=this.player.plugins.progress;if(e)if(this.ispotsInit){for(var t=e.root.getElementsByTagName("xg-spot"),i=t.length-1;i>=0;i--)e.outer.removeChild(t[i]);this._ispots=[]}else this._ispots=[]},updateAllDots:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=this.player.plugins.progress;if(i)if(this.ispotsInit){this._ispots=[];var n=i.root.getElementsByTagName("xg-spot"),o=n.length;if(o>t.length)for(var r=o-1;r>t.length-1;r--)i.outer.removeChild(n[r]);t.forEach((function(t,i){i0&&o.hide();var i=o.player.plugins.progress;i&&i.disableBlur(),o._curDot.addEventListener("mouseleave",o.onDotMouseLeave)}})),o._ispots=[],o.videoPreview=null,o.videothumbnail=null,o.thumbnail=null,o.timeStr="",o._state={now:0,f:!1},o}return r(i,[{key:"beforeCreate",value:function(e){var t=e.player.plugins.progress;t&&(e.root=t.root)}},{key:"afterCreate",value:function(){var e=this;this._curDot=null,this.handlerSpotClick=this.hook("spotClick",(function(t,i){i.seekTime&&e.player.seek(i.seekTime)})),this.transformTimeHook=this.hook("transformTime",(function(t){e.setTimeContent(t)})),function(e){var t=e.config,i=e.player;Object.keys(wn).map((function(t){e[t]=wn[t].bind(e)}));var n=i.config.progressDot||t.ispots||[];e._ispots=n.map((function(e){return _n(e),e})),e.ispotsInit=!1,e.playerSize={left:i.sizeInfo.left,width:i.sizeInfo.width},e.on(z,(function(){e.ispotsInit?e.updateDuration():e.initDots()})),e.on(pe,(function(){e.positionDots()}))}(this),this.on(z,(function(){e.show()})),this.config.disable&&this.disable(),this.extTextRoot=this.find(".xg-spot-ext-text")}},{key:"setConfig",value:function(e){var t=this;e&&Object.keys(e).map((function(i){t.config[i]=e[i]}))}},{key:"onPluginsReady",value:function(){this.player.plugins.progress&&(this.previewLine=this.find(".xg-spot-line"),this.timePoint=this.find(".xgplayer-progress-point"),this.timeText=this.find(".xg-spot-time"),this.tipText=this.find(".spot-inner-text"),this._hasThumnail=!1,this.registerThumbnail(),this.bindEvents())}},{key:"bindEvents",value:function(){var e=this,t=this.player.plugins.progress;if(t&&(Object.keys(xn).map((function(i){e[xn[i]]=e[xn[i]].bind(e),t.addCallBack(i,e[xn[i]])})),"mobile"!==L.device)){this.bind(".xg-spot-info","mousemove",this.onMousemove),this.bind(".xg-spot-info","mousedown",this.onMousedown),this.bind(".xg-spot-info","mouseup",this.onMouseup);var i=this.hook("previewClick",(function(){}));this.handlerPreviewClick=function(t){t.stopPropagation(),i(parseInt(1e3*e._state.now,10)/1e3,t)},this.bind(".xg-spot-content","mouseup",this.handlerPreviewClick)}}},{key:"onProgressMove",value:function(e,t){!this.config.disable&&this.player.duration&&this.updatePosition(e.offset,e.width,e.currentTime,e.e)}},{key:"onProgressDragStart",value:function(e){!this.config.disable&&this.player.duration&&(this.isDrag=!0,this.videoPreview&&x.addClass(this.videoPreview,"show"))}},{key:"onProgressDragEnd",value:function(e){!this.config.disable&&this.player.duration&&(this.isDrag=!1,this.videoPreview&&x.removeClass(this.videoPreview,"show"))}},{key:"onProgressClick",value:function(e,t){this.config.disable||x.hasClass(t.target,"xgplayer-spot")&&(t.stopPropagation(),t.preventDefault(),["time","id","text"].map((function(i){e[i]=t.target.getAttribute("data-".concat(i))})),e.time&&(e.time=Number(e.time)),this.handlerSpotClick(t,e))}},{key:"updateLinePos",value:function(e,t){var i=this.root,n=this.previewLine,o=this.player,r=this.config,s="flex"===o.controls.mode,a=i.getBoundingClientRect().width;if(a||!this._hasThumnail){var l,c=e-(a=this._hasThumnail&&at-a&&!s?(l=c-(t-a),c=t-a):l=0,void 0!==l&&(n.style.transform="translateX(".concat(l.toFixed(2),"px)")),i.style.transform="translateX(".concat(c.toFixed(2),"px) translateZ(0)")}}},{key:"updateTimeText",value:function(e){var t=this.timeText,i=this.timePoint;t.innerHTML=e,!this.thumbnail&&(i.innerHTML=e)}},{key:"updatePosition",value:function(e,t,i,n){var o=this.root,r=this.config,s=this._state;if(o){s.now=i,this.transformTimeHook(i);var a=this.timeStr;n&&n.target&&x.hasClass(n.target,"xgplayer-spot")?(this.showTips(n.target.getAttribute("data-text"),!1,a),this.focusDot(n.target),s.f=!0,r.isFocusDots&&s.f&&(s.now=parseInt(n.target.getAttribute("data-time"),10))):r.defaultText?(s.f=!1,this.showTips(r.defaultText,!0,a)):(s.f=!1,this.hideTips("")),this.updateTimeText(a),this.updateThumbnails(s.now),this.updateLinePos(e,t)}}},{key:"setTimeContent",value:function(e){this.timeStr="".concat(x.format(e))}},{key:"updateThumbnails",value:function(e){var t=this.player,i=this.videoPreview,n=this.config,o=t.plugins.thumbnail;if(o&&o.usable){this.thumbnail&&o.update(this.thumbnail,e,n.width,n.height);var r=i&&i.getBoundingClientRect();this.videothumbnail&&o.update(this.videothumbnail,e,r.width,r.height)}}},{key:"registerThumbnail",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("mobile"!==L.device){var t=this.player,i=this.config,n=t.getPlugin("thumbnail");if(n&&n.setConfig(e),n&&n.usable&&i.isShowThumbnail){x.removeClass(this.root,"short-line no-thumbnail"),"short"===i.mode&&x.addClass(this.root,"short-line"),this._hasThumnail=!0;var o=this.find(".xg-spot-thumbnail");this.thumbnail=n.createThumbnail(o,"progress-thumbnail"),i.isShowCoverPreview&&(this.videoPreview=x.createDom("xg-video-preview","",{},"xgvideo-preview"),t.root.appendChild(this.videoPreview),this.videothumbnail=n.createThumbnail(this.videoPreview,"xgvideo-thumbnail")),this.updateThumbnails(0)}else x.addClass(this.root,"short-line no-thumbnail")}}},{key:"calcuPosition",value:function(e,t){var i=this.player.plugins.progress,n=this.player,o=i.root.getBoundingClientRect().width,r=n.duration/o*6;return e+t>n.duration&&(t=n.duration-e),n.duration,n.duration,{left:e/n.duration*100,width:t/n.duration*100,isMini:t2&&void 0!==arguments[2]?arguments[2]:"";x.addClass(this.root,"no-timepoint"),e&&(x.addClass(this.find(".xg-spot-content"),"show-text"),t&&"production"===this.config.mode?(x.addClass(this.root,"product"),this.tipText.textContent=e):(x.removeClass(this.root,"product"),this.tipText.textContent=this._hasThumnail?e:"".concat(i," ").concat(e)))}},{key:"hideTips",value:function(){x.removeClass(this.root,"no-timepoint"),this.tipText.textContent="",x.removeClass(this.find(".xg-spot-content"),"show-text"),x.removeClass(this.root,"product")}},{key:"hide",value:function(){x.addClass(this.root,"hide")}},{key:"show",value:function(){x.removeClass(this.root,"hide")}},{key:"enable",value:function(){var e=this.config,t=this.playerConfig;this.config.disable=!1,this.show(),!this.thumbnail&&e.isShowThumbnail&&this.registerThumbnail(t.thumbnail||{})}},{key:"disable",value:function(){this.config.disable=!0,this.hide()}},{key:"destroy",value:function(){var e=this,t=this.player.plugins.progress;t&&Object.keys(xn).map((function(i){t.removeCallBack(i,e[xn[i]])})),this.videothumbnail=null,this.thumbnail=null,this.videoPreview&&this.player.root.removeChild(this.videoPreview),this.unbind(".xg-spot-info","mousemove",this.onMousemove),this.unbind(".xg-spot-info","mousedown",this.onMousedown),this.unbind(".xg-spot-info","mouseup",this.onMouseup),this.unbind(".xg-spot-content","mouseup",this.handlerPreviewClick)}},{key:"render",value:function(){return"mobile"===L.device||"mobile"===this.playerConfig.isMobileSimulateMode?"":'
\n
\n
\n \n
\n
\n
\n
00:00
\n
\n
\n
')}}],[{key:"pluginName",get:function(){return"progresspreview"}},{key:"defaultConfig",get:function(){return{index:1,miniWidth:6,ispots:[],defaultText:"",isFocusDots:!0,isHideThumbnailHover:!0,isShowThumbnail:!0,isShowCoverPreview:!1,mode:"",disable:!1,width:160,height:90}}}]),i}(),Sn=function(e){a(i,ot);var t=d(i);function i(e){var o;return n(this,i),(o=t.call(this,e)).ratio=1,o.interval=null,o._preloadMark={},o}return r(i,[{key:"afterCreate",value:function(){var e=this;this.usable&&this.initThumbnail(),this.on([z],(function(){var t=e.config,i=t.pic_num,n=t.interval;e.usable&&(e.interval=n>0?n:Math.round(1e3*e.player.duration/i)/1e3)}))}},{key:"setConfig",value:function(e){var t=this;if(e){var i=Object.keys(e);i.length<1||(i.forEach((function(i){t.config[i]=e[i]})),this.usable&&this.initThumbnail())}}},{key:"usable",get:function(){var e=this.config,t=e.urls,i=e.pic_num;return t&&t.length>0&&i>0}},{key:"initThumbnail",value:function(){var e=this.config,t=e.width,i=e.height,n=e.pic_num,o=e.interval;this.ratio=t/i*100,this.interval=o||Math.round(this.player.duration/n),this._preloadMark={}}},{key:"getUrlByIndex",value:function(e){return e>=0&&e0&&o.push(e-1),o.push(e),e>0&&e=0&&e1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=this.config,o=n.pic_num,r=n.row,s=n.col,a=n.width,l=n.height;this.interval=Math.round(this.player.duration/o);var c=Math.ceil(e/this.interval),u=(c=c>o?o:c)0?Math.ceil(h/s)-1:0,f=h>0?h-d*s-1:0,p=0,g=0;t&&i?t/i2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",r=this.config,s=r.pic_num,a=r.urls;if(!(s<=0)&&a&&0!==a.length){var l=this.getPosition(t,i,n);this.preload(l.urlIndex),Object.keys(l.style).map((function(t){e.style[t]=l.style[t]})),Object.keys(o).map((function(t){e.style[t]=o[t]}))}}},{key:"changeConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setConfig(e)}},{key:"createThumbnail",value:function(e,t){var i=x.createDom("xg-thumbnail","",{},"thumbnail ".concat(t));return e&&e.appendChild(i),i}}],[{key:"pluginName",get:function(){return"thumbnail"}},{key:"defaultConfig",get:function(){return{isShow:!1,urls:[],pic_num:0,col:0,row:0,height:90,width:160,scale:1,className:"",hidePortrait:!1}}}]),i}(),En=function(e){a(i,ot);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"afterCreate",value:function(){}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{cached:0,played:0},t=arguments.length>1?arguments[1]:void 0;t&&this.root&&(e.cached&&(this.find("xg-mini-progress-cache").style.width="".concat(e.cached/t*100,"%")),e.played&&(this.find("xg-mini-progress-played").style.width="".concat(e.played/t*100,"%")))}},{key:"render",value:function(){if(this.playerConfig.progress&&this.playerConfig.miniprogress)return'\n \n \n '}}],[{key:"pluginName",get:function(){return"MiniProgress"}},{key:"defaultConfig",get:function(){return{}}}]),i}(),Pn="realtime",In="firstframe",Ln="poster";var On=null,An=function(e){a(i,ot);var t=d(i);function i(){var e;n(this,i);for(var o=arguments.length,r=new Array(o),a=0;a0?(e.renderOnce(),e._frameCount--):(e._isLoaded=!0,e.off(V,e.renderOnTimeupdate),!e.player.paused&&e._checkIfCanStart()&&e.start())})),s(u(e),"start",(function(){var t=e.player.media,i=function(){try{return parseInt(window.performance.now(),10)}catch(e){return(new Date).getTime()}}(),n=e.checkVideoIsSupport(t);n&&e.canvasCtx&&(e.stop(),t.videoWidth&&t.videoHeight&&(e.videoPI=t.videoHeight>0?parseInt(t.videoWidth/t.videoHeight*100,10):0,(e.config.mode===Pn||i-e.preTime>=e.interval)&&(t&&t.videoWidth&&e.update(n,e.videoPI),e.preTime=i)),e.frameId=x.requestAnimationFrame(e.start))})),s(u(e),"stop",(function(){e.frameId&&(x.cancelAnimationFrame(e.frameId),e.frameId=null)})),e}return r(i,[{key:"afterCreate",value:function(){var e=this;!0===this.playerConfig.dynamicBg&&(this.config.disable=!1),i.isSupport||(this.config.disable=!0);var t=this.config,n=t.disable,o=t.mode,r=t.frameRate;n||(this._pos={width:0,height:0,rwidth:0,rheight:0,x:0,y:0,pi:0},this.isStart=!1,this._isLoaded=!1,this.videoPI=0,this.preTime=0,this.interval=parseInt(1e3/r,10),this.canvas=null,this.canvasCtx=null,this._frameCount=0,this.once(oe,(function(){e.player&&(e.init(),e.player.paused||e.start())})),o!==Ln&&(o!==In&&(this.on(J,(function(){e.stop()})),this.on(M,(function(){e._checkIfCanStart()&&e.start()})),this.on(H,(function(){e.stop()}))),this.on(Y,this.onLoadedData),this.on(Z,(function(){e._isLoaded=!1,e.stop()}))))}},{key:"init",value:function(){var e=this.player,t=this.config;this.canvasFilter=i.supportCanvasFilter();try{var n=this.config.isInnerRender&&e.innerContainer||e.root;n.insertAdjacentHTML("afterbegin",'
\n
')),this.root=n.children[0],this.canvas=this.find("canvas"),this.canvasFilter||(this.canvas.style.filter=t.filter,this.canvas.style.webkitFilter=t.filter),this.mask=this.find("xgmask"),t.addMask&&(this.mask.style.background=t.maskBg),this.canvasCtx=this.canvas.getContext("2d"),this.renderByPoster()}catch(e){_.logError("plugin:DynamicBg",e)}}},{key:"checkVideoIsSupport",value:function(e){if(!e)return null;var t=e&&e instanceof window.HTMLVideoElement?e:e.canvas?e.canvas:e.flyVideo?e.flyVideo:null;if(t&&("safari"!==L.browser||!x.isMSE(t)))return t;var i=t?t.tagName.toLowerCase():"";return"canvas"===i||"img"===i?t:null}},{key:"renderByPoster",value:function(){var e=this.playerConfig.poster;if(e){var t="String"===x.typeOf(e)?e:"String"===x.typeOf(e.poster)?e.poster:null;this.updateImg(t)}}},{key:"_checkIfCanStart",value:function(){var e=this.config.mode;return this._isLoaded&&e!==In&&e!==Ln}},{key:"renderOnce",value:function(){var e=this.player.media;if(e.videoWidth&&e.videoHeight){this.videoPI=parseInt(e.videoWidth/e.videoHeight*100,10);var t=this.checkVideoIsSupport(e);t&&e.videoWidth&&this.update(t,this.videoPI)}}},{key:"updateImg",value:function(e){var t=this;if(e){var i=this.canvas.getBoundingClientRect(),n=i.width,o=i.height,r=new window.Image;r.onload=function(){if(t.canvas&&!t.frameId&&!t.isStart){t.canvas.height=o,t.canvas.width=n;var e=parseInt(n/o*100,10);t.update(r,e),r=null}},r.src=e}}},{key:"update",value:function(e,t){if(this.canvas&&this.canvasCtx&&t)try{var i=this._pos,n=this.config,o=this.canvas.getBoundingClientRect(),r=o.width,s=o.height;if(r!==i.width||s!==i.height||i.pi!==t){var a=parseInt(r/s*100,10);i.pi=t,i.width=this.canvas.width=r,i.height=this.canvas.height=s;var l=s,c=r;at&&(l=parseInt(100*r/t,10)),i.rwidth=c*n.multiple,i.rheight=l*n.multiple,i.x=(r-i.rwidth)/2,i.y=(s-i.rheight)/2}this.canvasFilter&&(this.canvasCtx.filter=n.filter),this.canvasCtx.drawImage(e,i.x,i.y,i.rwidth,i.rheight)}catch(e){_.logError("plugin:DynamicBg",e)}}},{key:"destroy",value:function(){this.stop(),this.canvasCtx=null,this.canvas=null}},{key:"render",value:function(){return""}}],[{key:"pluginName",get:function(){return"dynamicBg"}},{key:"defaultConfig",get:function(){return{isInnerRender:!1,disable:!0,index:-1,mode:"framerate",frameRate:10,filter:"blur(50px)",startFrameCount:2,addMask:!0,multiple:1.2,maskBg:"rgba(0,0,0,0.7)"}}},{key:"isSupport",get:function(){return"boolean"==typeof On?On:On=function(){try{return!!document.createElement("canvas").getContext}catch(e){return!1}}()}},{key:"supportCanvasFilter",value:function(){return!("safari"===L.browser||"firefox"===L.browser)}}]),i}(),Dn="info",Rn=Se,Mn=function(e){a(o,Ke);var i=d(o);function o(){var e;n(this,o);for(var r=arguments.length,a=new Array(r),l=0;ln.media.duration)){var d=h-l,f=d<=s;dt&&(0===r||n[r-1].end-t<=i)){o=r;break}}return o}},{key:"_getBuffered",value:function(e){if(!e)return[];for(var t=[],i=0;it.jumpCntMax||e.timer||!1===t.useWaitingTimeoutJump||(e.timer=setTimeout(e.onJump,1e3*t.waitingTime))})),s(u(e),"onJump",(function(){var t=u(e),i=t.player,n=t.config;if(clearTimeout(e.timer),e.timer=null,!(e.jumpCnt>n.jumpCntMax||!1===n.useWaitingTimeoutJump||i.media.paused&&0!==i.media.currentTime&&e.hasPlayed)){e.jumpSize=n.jumpSize*(e.jumpCnt+1),e.jumpCnt===n.jumpSize&&e.jumpSize<6&&(e.jumpSize=6);var o=i.currentTime+e.jumpSize;o>i.media.duration||(console.log("waitintTimeout, currentTime:",i.currentTime,", jumpTo:",o),e.jumpCnt++,i.currentTime=o)}})),e}return r(i,[{key:"afterCreate",value:function(){var e=this,t=this.config,i=t.useWaitingTimeoutJump,n=t.jumpSize;!1!==i&&(this.hasPlayed=!1,this.jumpCnt=0,this.timer=null,this.jumpSize=n,this.on(G,this.onWaiting),this.on([N,W],(function(){clearTimeout(e.timer),e.timer=null,e.jumpSize=e.config.jumpSize})),this.on(M,(function(){e.hasPlayed=!0})))}}],[{key:"pluginName",get:function(){return"waitingTimeoutJump"}},{key:"defaultConfig",get:function(){return{useWaitingTimeoutJump:!1,waitingTime:15,jumpSize:2,jumpCntMax:4}}}]),i}(),Hn="cdn",Bn=["cdn"],Un=function(e){a(i,ot);var t=d(i);function i(){var e;n(this,i);for(var o=arguments.length,r=new Array(o),a=0;a0&&void 0!==arguments[0]?arguments[0]:Hn;if(!e.speedListCache||!e.speedListCache[t])return 0;if(e.speedListCache[t].length<=0)return 0;var i=0;return e.speedListCache[t].map((function(e){i+=e})),Math.floor(i/e.speedListCache[t].length)})),s(u(e),"startTimer",(function(){x.isMSE(e.player.video)||(e.initSpeedList(),e.cnt=0,e.timer=setTimeout(e.testSpeed,e.config.testTimeStep))})),s(u(e),"initSpeedList",(function(){e.speedListCache={},Bn.forEach((function(t){e.speedListCache[t]=[]}))})),s(u(e),"_onRealSpeedChange",(function(t){t.speed&&e.appendList(t.speed,t.type||Hn)})),s(u(e),"testSpeed",(function(){if(clearTimeout(e.timer),e.timer=null,e.player&&e.config.openSpeed){var t=e.config,i=t.url,n=t.loadSize,o=t.testCnt,r=t.testTimeStep,s=i+(i.indexOf("?")<0?"?testst=":"&testst=")+Date.now();if(!(e.cnt>=o)){e.cnt++;try{var a=(new Date).getTime(),l=null,c=new XMLHttpRequest;e.xhr=c,c.open("GET",s);var u={},h=Math.floor(10*Math.random());u.Range="bytes="+h+"-"+(n+h),u&&Object.keys(u).forEach((function(e){c.setRequestHeader(e,u[e])})),c.onreadystatechange=function(){if(4===c.readyState){e.xhr=null,l=(new Date).getTime();var t=c.getResponseHeader("Content-Length")/1024*8,i=Math.round(1e3*t/(l-a));e.appendList(i),e.timer=setTimeout(e.testSpeed,r)}},c.send()}catch(e){console.error(e)}}}})),s(u(e),"appendList",(function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Hn;if(e.speedListCache&&e.speedListCache[i]){var n=e.config.saveSpeedMax;e.speedListCache[i].length>=n&&e.speedListCache[i].shift(),e.speedListCache[i].push(t);var o=u(e).player;o&&(i===Hn?o.realTimeSpeed=t:o[e.getSpeedName("realTime",i)]=t),e.updateSpeed(i)}})),s(u(e),"updateSpeed",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Hn,i=e.getSpeed(t),n=u(e).player;if(n)if(t===Hn)n.avgSpeed&&i===n.avgSpeed||(n.avgSpeed=i,n.emit(le,{speed:i,realTimeSpeed:n.realTimeSpeed}));else{var o=e.getSpeedName("avg",t);n[o]&&i===n[o]||(n[o]=i,n.emit(le,{speed:i,realTimeSpeed:n.realTimeSpeed}))}})),e}return r(i,[{key:"afterCreate",value:function(){var e=this.config,t=e.openSpeed,i=e.addSpeedTypeList;(null==i?void 0:i.length)>0&&Bn.push.apply(Bn,p(i)),this.initSpeedList(),this.on("real_time_speed",this._onRealSpeedChange),this.timer=null,this.cnt=0,this.xhr=null,t&&this.on([Y,re],this.startTimer)}},{key:"getSpeedName",value:function(e,t){return e+"Speed"+t.toUpperCase()}},{key:"openSpeed",get:function(){return this.config.openSpeed},set:function(e){if(this.config.openSpeed=e,!e&&this.timer)return clearTimeout(this.timer),void(this.timer=null);if(this.config.openSpeed){if(this.timer)return;this.timer=setTimeout(this.testSpeed,this.config.testTimeStep)}}},{key:"destroy",value:function(){var e=this;this.off("real_time_speed",this._onRealSpeedChange),this.off([Y,re],this.startTimer),Bn.forEach((function(t){e.speedListCache&&e.speedListCache[t]&&(e.speedListCache[t]=[])})),this.speedListCache&&(this.speedListCache={}),clearTimeout(this.timer),this.timer=null,this.xhr&&4!==this.xhr.readyState&&(this.xhr.cancel&&this.xhr.cancel(),this.xhr=null)}}],[{key:"pluginName",get:function(){return"testspeed"}},{key:"defaultConfig",get:function(){return{openSpeed:!1,testCnt:3,loadSize:204800,testTimeStep:3e3,url:"",saveSpeedMax:5,addSpeedTypeList:[]}}}]),i}(),jn=function(e){a(i,ot);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i,[{key:"afterCreate",value:function(){var e=this,t=this.player,i=this.config;(this.timer=null,this._lastDecodedFrames=0,this._currentStuckCount=0,this._lastCheckPoint=null,this._payload=[],i.disabled)||t.media.getVideoPlaybackQuality&&(this.on(M,(function(){e._startTick()})),this.on(H,(function(){e._stopTick()})),this.on(F,(function(){e._stopTick()})),this.on(J,(function(){e._stopTick()})))}},{key:"_startTick",value:function(){var e=this;this._stopTick(),this._timer=setTimeout((function(){e._checkDecodeFPS(),e._startTick()}),this.config.tick)}},{key:"_stopTick",value:function(){clearTimeout(this._timer),this._timer=null}},{key:"_checkStuck",value:function(e,t,i,n){var o=this.player.media,r=document.hidden,s=o.paused;if("boolean"==typeof r&&!r&&!s){for(var a=o.currentTime,l=o.buffered,c=!1,u=[],h=0;hthis.config.stuckCount?(this.emit(Ee,this._payload),this._reset()):e<=this.config.reportFrame?(this._currentStuckCount++,this._payload.push({bufs:u,currentTime:o.currentTime,curDecodedFrames:e,totalVideoFrames:t,droppedVideoFrames:i,checkInterval:n})):this._reset())}}},{key:"_reset",value:function(){this._payload=[],this._currentStuckCount=0}},{key:"_checkDecodeFPS",value:function(){if(this.player.media){var e=this.player.media.getVideoPlaybackQuality(),t=e.totalVideoFrames,i=e.droppedVideoFrames,n=performance.now();if(t&&this._lastCheckPoint){var o=t-this._lastDecodedFrames,r=n-this._lastCheckPoint;this._checkStuck(o,t,i,r)}this._lastDecodedFrames=t,this._lastCheckPoint=n}}},{key:"destroy",value:function(){this._stopTick()}}],[{key:"pluginName",get:function(){return"FpsDetect"}},{key:"defaultConfig",get:function(){return{disabled:!1,tick:1e3,stuckCount:3,reportFrame:0}}}]),i}();gt.use({LANG:"zh-cn",TEXT:{ERROR_TYPES:{network:{code:1,msg:"视频下载错误"},mse:{code:2,msg:"流追加错误"},parse:{code:3,msg:"解析错误"},format:{code:4,msg:"格式错误"},decoder:{code:5,msg:"解码错误"},runtime:{code:6,msg:"语法错误"},timeout:{code:7,msg:"播放超时"},other:{code:8,msg:"其他错误"}},HAVE_NOTHING:"没有关于音频/视频是否就绪的信息",HAVE_METADATA:"音频/视频的元数据已就绪",HAVE_CURRENT_DATA:"关于当前播放位置的数据是可用的,但没有足够的数据来播放下一帧/毫秒",HAVE_FUTURE_DATA:"当前及至少下一帧的数据是可用的",HAVE_ENOUGH_DATA:"可用数据足以开始播放",NETWORK_EMPTY:"音频/视频尚未初始化",NETWORK_IDLE:"音频/视频是活动的且已选取资源,但并未使用网络",NETWORK_LOADING:"浏览器正在下载数据",NETWORK_NO_SOURCE:"未找到音频/视频来源",MEDIA_ERR_ABORTED:"取回过程被用户中止",MEDIA_ERR_NETWORK:"网络错误",MEDIA_ERR_DECODE:"解码错误",MEDIA_ERR_SRC_NOT_SUPPORTED:"不支持的音频/视频格式",REPLAY:"重播",ERROR:"网络连接似乎出现了问题",PLAY_TIPS:"播放",PAUSE_TIPS:"暂停",PLAYNEXT_TIPS:"下一集",DOWNLOAD_TIPS:"下载",ROTATE_TIPS:"旋转",RELOAD_TIPS:"重新载入",FULLSCREEN_TIPS:"进入全屏",EXITFULLSCREEN_TIPS:"退出全屏",CSSFULLSCREEN_TIPS:"进入样式全屏",EXITCSSFULLSCREEN_TIPS:"退出样式全屏",TEXTTRACK:"字幕",PIP:"画中画",SCREENSHOT:"截图",LIVE:"正在直播",OFF:"关闭",OPEN:"开启",MINI_DRAG:"点击按住可拖动视频",MINISCREEN:"小屏幕",REFRESH_TIPS:"请试试",REFRESH:"刷新",FORWARD:"快进中",LIVE_TIP:"直播"}});var Vn=r((function e(t,i){var o,r,s;n(this,e);var a=i&&"mobile"===i.isMobileSimulateMode,l=i.isLive,c=[].concat(l?[]:[ji,Ai,En,Tn,Ui],[Ri,Bi,Yi,tn,pn,gn,sn,an,zi,Qi]),u=[Ht,Bt,Wt,Pi,zt,kn,Cn,Sn,oi];this.plugins=[Mn,Nt].concat(p(c),u,[Nn,Fn]);var h=a?"mobile":L.device;switch(h){case"pc":(o=this.plugins).push.apply(o,[Si,ai,mn,Un,jn]);break;case"mobile":(r=this.plugins).push.apply(r,[xi]);break;default:(s=this.plugins).push.apply(s,[Si,ai,mn])}(L.os.isIpad||"pc"===h)&&this.plugins.push(An),L.os.isIpad&&this.plugins.push(ai),this.ignores=[],this.i18n=[]})),Gn=function(e){a(i,Et);var t=d(i);function i(){return n(this,i),t.apply(this,arguments)}return r(i)}();function Wn(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function zn(e){for(var t=1;tt/2?t/=2:e=t/2,t-e>2?ro(e,t,i):n):n}var so=function(e){Zn(i,Ke);var t=eo(i);function i(){var e;Kn(this,i);for(var n=arguments.length,o=new Array(n),r=0;r=e.list.length)return e.player.pause(),void(e.player.currentTime=0);if(e.mode===no.SLOOP)e.change();else e.next()})),qn(Qn(e),"_onDurationChange",(function(){var t=e.config.abCycle;e._initABCycle(t,e.player)})),qn(Qn(e),"_onTimeUpdate",(function(){var t=Qn(e),i=t.config,n=t.player;if(!e.halfPass&&n.currentTime>n.duration/2&&e.confirmOrder(),i.abCycle){var o=i.abCycle,r=o.end>n.duration?n.duration:o.end;n.currentTime>=r?(o.loop||(n.pause(),e.emit("abCycle_ended")),n.currentTime=o.start||0):n.currentTime0),0!==this.list.length&&(!t.url&&this.list.length>0&&(t.url=this.list[0].src),t.poster||(t.poster=this.list[0].poster),t.title||(t.title=this.list[0].title||""),t.vid||(t.vid=this.list[0].vid||""),this._curInfo={src:t.url,poster:t.poster,title:t.title,vid:t.vid},this.index=0,this.on(V,this._onTimeUpdate),this.on(F,this._onEnded),this.on(z,this._onDurationChange),this.config.offline&&this.checkOffline(this._curInfo.src,this._curInfo.vid).then((function(i){0===i.code&&(t.url=i.url,e.state>=4&&(e.src=i.url))})).catch((function(e){})))}},{key:"destroy",value:function(){x.removeClass(this.player.root,oo)}},{key:"_nextCompute",value:function(){if(!this.disable)switch(this.mode){case no.SLOOP:case no.ORDER:case no.LOOP:this.index+1=0?this.prevIndex=this.index-1:this.prevIndex=this.list.length-1;break;default:this.prevIndex=ro(0,this.list.length,this.index)}}},{key:"_emitChange",value:function(){this.emit("change",this._curInfo)}},{key:"_initABCycle",value:function(e,t){var i=t.plugins.progresspreview;if(e&&t){var n=e.end>this.player.duration?this.player.duration:e.end,o=e.start>this.player.duration?0:e.start,r={id:t.playerId,time:e.start,duration:n-o,text:e.text,color:e.color};i.findDot(r.id)?i.updateDot(r):i.createDot(r)}else i.findDot(t.playerId)&&i.deleteDot(t.playerId)}},{key:"random",value:function(){if(this.list.length<0)return null;var e=ro(0,this.list.length,this.index);return this.list[e]}},{key:"next",value:function(){this.disable||(this.halfPass||(this.halfPass=!0,this._nextCompute()),this.index=this.nextIndex,this.change())}},{key:"prev",value:function(){this.disable||(this.halfPass||(this.halfPass=!0,this._prevCompute()),this.index=this.prevIndex,this.change())}},{key:"forward",value:function(){var e=this.player,t=this.config.timeScale;e.currentTime=e.currentTime+t0?e.currentTime-t:0}},{key:"add",value:function(e){this.list.push({src:e.src,title:e.title,vid:e.vid,poster:e.poster})}},{key:"remove",value:function(e){var t=-1;this.list.every((function(i,n){return i.vid!==e||(t=n,!1)})),t>-1&&this.list.splice(t,1)}},{key:"setAbCycle",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e&&"Object"===x.typeof(e)?this.config.abCycle=zn({},e):this.config.abCycle=zn({start:e||0,end:t||this.player.duration,loop:i},n),this._initABCycle(this.config.abCycle,this.player)}},{key:"removeAbCycle",value:function(){this.config.abCycle=null,this._initABCycle(null,this.player)}},{key:"updateList",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.removeAbCycle(),this.player.pause(),this.player.currentTime=0,this.list=e,this.nextIndex=0,this.index=0,this.change()}},{key:"setIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;e<0||e>=this.list.length||(this.nextIndex=e,this.index=e,this.change())}},{key:"change",value:function(){var e=this;if(!this.disable){var t=this.player,i=this.list,n=this.index,o=i[n].vid;this.halfPass=!1,this.checkOffline(i[n].src,o).then((function(i){e._curInfo={title:e.list[e.index].title||"",vid:e.list[e.index].vid,poster:e.list[e.index].poster||"",src:i.url},t.playNext({url:i.url,vid:e.list[e.index].vid||0,poster:e.list[e.index].poster||"",autoplay:!0}),t.off("timeupdate",e._emitChange),t.once("timeupdate",e._emitChange),t.play()}))}}},{key:"checkOffline",value:function(e,t){var i=this;return new Promise((function(n,o){i.config.offline&&!i.disable||n({url:e,code:-1,vid:t});var r=i.player.database;r.openDB((function(){r.getDataByKey(r.myDB.ojstore.name,t,(function(i){setTimeout((function(){r.closeDB()}),5e3),n(i?{url:URL.createObjectURL(i.blob),code:0,vid:i.vid}:{url:e,code:-2,vid:t})}))}))}))}},{key:"confirmOrder",value:function(){this.halfPass=!0,this._nextCompute(),this._prevCompute(),this.config.preloadNext&&this.preload(this.nextIndex)}},{key:"preload",value:function(e){if(!(e<0||e>=this.list.length)){var t=this.list[e],i=this.player;this.checkOffline(t.src,t.vid).then((function(e){if(-2===e.code){var n=t.vid;new io(t.src,(function(e){i.database.openDB((function(){i.database.addData(i.database.myDB.ojstore.name,[{vid:n,blob:new Blob([e],{type:'audio/mp4; codecs="mp4a.40.5"'})}]),setTimeout((function(){i.database.closeDB()}),5e3)}))}))}}))}}},{key:"timeScale",get:function(){return this.config.timeScale||15},set:function(e){this.config.timeScale=e}},{key:"mode",get:function(){return this.config.mode||no.RANDOM},set:function(e){this.config.mode=e}}],[{key:"pluginName",get:function(){return"music"}},{key:"defaultConfig",get:function(){return{offline:!1,preloadNext:!0,abCycle:null,timeScale:15,mode:no.ORDER,list:[]}}},{key:"ModeType",get:function(){return Object.keys(no).map((function(e){return no[e]}))}}]),i}(),ao=function(e){Zn(i,ot);var t=eo(i);function i(){return Kn(this,i),t.apply(this,arguments)}return Xn(i,[{key:"afterCreate",value:function(){var e=this;if(this.on("change",(function(t){if(t&&t.poster){if(e.find("img"))e.find("img").src=t.poster;else{var i=new Image;i.src=t.poster,e.appendChild(i)}e.find("img").src=t.poster,e.show()}else e.hide()})),this.playerConfig.poster){var t=new Image;t.src=this.playerConfig.poster,this.appendChild(t)}}},{key:"render",value:function(){return''}}],[{key:"pluginName",get:function(){return"musiccover"}},{key:"defaultConfig",get:function(){return{index:6,position:ot.POSITIONS.CONTROLS_LEFT}}}]),i}(),lo=function(e){Zn(i,ot);var t=eo(i);function i(){var e;Kn(this,i);for(var n=arguments.length,o=new Array(n),r=0;r\n \n ',class:"xg-icon-mbackward"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.musicBackward)}},{key:"destroy",value:function(){var e=this;["click","touchstart"].forEach((function(t){e.unbind(t,e.onClick)}))}},{key:"render",value:function(){return'\n
\n
\n
'}}],[{key:"pluginName",get:function(){return"musicbackward"}},{key:"defaultConfig",get:function(){return{index:1,position:ot.POSITIONS.CONTROLS_LEFT}}}]),i}(),co=function(e){Zn(i,ot);var t=eo(i);function i(){var e;Kn(this,i);for(var n=arguments.length,o=new Array(n),r=0;r\n \n ',class:"xg-icon-mprev"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.musicPrev)}},{key:"destroy",value:function(){var e=this;["click","touchstart"].forEach((function(t){e.unbind(t,e.onClick)}))}},{key:"render",value:function(){return'\n
\n
\n
'}}],[{key:"pluginName",get:function(){return"musicprev"}},{key:"defaultConfig",get:function(){return{index:2,position:ot.POSITIONS.CONTROLS_LEFT}}}]),i}(),uo=function(e){Zn(i,ot);var t=eo(i);function i(){var e;Kn(this,i);for(var n=arguments.length,o=new Array(n),r=0;r\n \n ',class:"xg-icon-mforward"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.musicForward)}},{key:"destroy",value:function(){var e=this;["click","touchstart"].forEach((function(t){e.unbind(t,e.onClick)}))}},{key:"render",value:function(){return'\n
\n
\n
'}}],[{key:"pluginName",get:function(){return"musicforward"}},{key:"defaultConfig",get:function(){return{index:5,position:ot.POSITIONS.CONTROLS_LEFT}}}]),i}(),ho=function(e){Zn(i,ot);var t=eo(i);function i(){var e;Kn(this,i);for(var n=arguments.length,o=new Array(n),r=0;r\n \n ',class:"xg-icon-mnext"}}}},{key:"initIcons",value:function(){var e=this.icons;this.appendChild(".xgplayer-icon",e.musicNext)}},{key:"destroy",value:function(){var e=this;["click","touchstart"].forEach((function(t){e.unbind(t,e.onClick)}))}},{key:"render",value:function(){return'\n
\n
\n
'}}],[{key:"pluginName",get:function(){return"musicnext"}},{key:"defaultConfig",get:function(){return{index:4,position:ot.POSITIONS.CONTROLS_LEFT}}}]),i}(),fo=function(e){Zn(i,ot);var t=eo(i);function i(){return Kn(this,i),t.apply(this,arguments)}return Xn(i,[{key:"beforeCreate",value:function(e){var t=e.player.plugins.progress;t&&(e.root=t.root)}},{key:"afterCreate",value:function(){var e=this;this.on("change",(function(t){t&&t.title?e.root.innerHTML="".concat(t.title):e.root.innerHTML=""}))}},{key:"render",value:function(){var e=this.playerConfig;return'\n '.concat(e.title||"","\n ")}}],[{key:"pluginName",get:function(){return"musicmeta"}},{key:"defaultConfig",get:function(){return{index:0}}}]),i}();var po=Xn((function e(t,i){Kn(this,e),console.log("config",t,i),console.log("playerConfig","Object"!==x.typeOf(i.controls)),function(e){if("Object"!==x.typeOf(e.controls))e.controls={mode:"flex",initShow:!0};else{var t=e.controls;e.controls=zn({mode:"flex",initShow:!0},t)}var i=e.play||{};e.play=zn({index:3},i),e.marginControls=!0,e.mediaType="audio"}(i),this.plugins=[so,lo,co,uo,ho,ao,fo],this.ignores=["start","cssFullScreen","fullscreen","pip","enter","replay","pc","loading","poster"]}));class go{constructor(e,t,i){const n=document.querySelector(e);if(!n)throw new Error("[Xgplayer] this selector of DOM node that player to mount on is required.");if(!t)throw new Error("[Xgplayer] this media resource url is required.");this.initOptions=i,this.el=n,this.init(t,i)}invokeVoid(e,t){this.player[e]&&"function"==typeof this.player[e]&&this.player[e](...t)}getPropsAndStates(){return{autoplay:this.player.autoplay,crossOrigin:this.player.crossOrigin,currentSrc:this.player.currentSrc,currentTime:this.player.currentTime,duration:this.player.duration,cumulateTime:this.player.cumulateTime,volume:this.player.volume,muted:this.player.muted,defaultMuted:this.player.defaultMuted,playbackRate:this.player.playbackRate,loop:this.player.loop,src:this.player.src,lang:this.player.lang,version:this.player.version,state:this.player.state,ended:this.player.ended,paused:this.player.paused,networkState:this.player.networkState,readyState:this.player.readyState,isFullscreen:this.player.isFullscreen,isCssFullscreen:this.player.isCssfullScreen,isSeeking:this.player.isSeeking,isActive:this.player.isActive}}init(e,t){let i={el:this.el,url:e};i=t.music?Object.assign(Object.assign(Object.assign({},i),{presets:[po],plugins:[xi,Ai,Ri,gn,Ui,zi]}),t):Object.assign(Object.assign({},i),t),window.MasaBlazor.xgplayerPlugins&&(i.plugins=[...i.plugins,...window.MasaBlazor.xgplayerPlugins],i=Object.assign(Object.assign({},i),window.MasaBlazor.xgplayerPluginOptions)),this.player=new Gn(i)}destroy(){this.player.destroy(),this.player=null}}function vo(e,t,i){return new go(e,t,i)}export{vo as init}; +//# sourceMappingURL=xgplayer-proxy.js.map diff --git a/src/Masa.Blazor/wwwroot/js/proxies/xgplayer-proxy.js.map b/src/Masa.Blazor/wwwroot/js/proxies/xgplayer-proxy.js.map new file mode 100644 index 0000000000..7add9ebfb3 --- /dev/null +++ b/src/Masa.Blazor/wwwroot/js/proxies/xgplayer-proxy.js.map @@ -0,0 +1 @@ +{"version":3,"file":"xgplayer-proxy.js","sources":["../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/eventemitter3/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/utils/debug.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/utils/xgplayerTimeRange.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/utils/util.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/utils/sniffer.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/version.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/error.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/events.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/mediaProxy.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/utils/database.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/constant.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugin/hooksDescriptor.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugin/basePlugin.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/delegate/src/closest.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/delegate/src/delegate.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugin/plugin.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugin/resizeObserver.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugin/pluginsManager.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/stateClassMap.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/defaultConfig.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugin/preset.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/controls/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/lang/i18n.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/lang/en.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/state.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/player.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/logger/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/replay.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/replay/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/poster/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/play.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/pause.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/start/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/enter/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/common/iconTools.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/utils/draggabilly.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/miniScreen/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/pc/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/mobile/touch.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/seekicon.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/mobile/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/keyboard/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/loading.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/loading/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/progress/innerList.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/progress/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/common/iconPlugin.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/play/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/back.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/fullscreen/backicon.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/requestFull.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/exitFull.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/fullscreen/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/time/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/time/timesegments.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/volumeLarge.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/volumeSmall.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/volumeMuted.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/volume/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/rotate.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/rotate/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/pipIcon.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/pipIconExit.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/pip/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/playNext.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/playNext/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/downloadjs/download.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/download.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/download/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/screenShot/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/common/optionList.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/common/optionsIcon.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/definition/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/playbackRate/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/requestCssFull.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/assets/exitCssFull.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/cssFullScreen/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/error/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/prompt/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/progressPreview/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/common/thumbnail.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/progress/miniProgress.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/dynamicBg/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/stats/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/gapJump/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/testspeed/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/plugins/fpsDetect/index.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/presets/default.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/lang/zh-cn.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer/es/index.umd.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer-music/es/_virtual/_rollupPluginBabelHelpers.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer-music/es/xhr.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer-music/es/music.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer-music/es/plugins/musicCover.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer-music/es/plugins/musicBackward.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer-music/es/plugins/musicPrev.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer-music/es/plugins/musicForward.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer-music/es/plugins/musicNext.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer-music/es/plugins/musicMeta.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/node_modules/xgplayer-music/es/preset.js","../../../../BlazorComponent/src/Component/BlazorComponent.Web/src/proxies/xgplayer/index.ts"],"sourcesContent":["function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), true).forEach(function(key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(obj2) {\n return typeof obj2;\n } : function(obj2) {\n return obj2 && \"function\" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? \"symbol\" : typeof obj2;\n }, _typeof(obj);\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps)\n _defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass)\n _setPrototypeOf(subClass, superClass);\n}\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {\n return o2.__proto__ || Object.getPrototypeOf(o2);\n };\n return _getPrototypeOf(o);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {\n o2.__proto__ = p2;\n return o2;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct)\n return false;\n if (Reflect.construct.sham)\n return false;\n if (typeof Proxy === \"function\")\n return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {\n }));\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return _assertThisInitialized(self);\n}\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived), result;\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null)\n break;\n }\n return object;\n}\nfunction _get() {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get.bind();\n } else {\n _get = function _get2(target, property, receiver) {\n var base = _superPropBase(target, property);\n if (!base)\n return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n if (desc.get) {\n return desc.get.call(arguments.length < 3 ? target : receiver);\n }\n return desc.value;\n };\n }\n return _get.apply(this, arguments);\n}\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr))\n return _arrayLikeToArray(arr);\n}\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null)\n return Array.from(iter);\n}\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o)\n return;\n if (typeof o === \"string\")\n return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor)\n n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\")\n return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))\n return _arrayLikeToArray(o, minLen);\n}\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length)\n len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++)\n arr2[i] = arr[i];\n return arr2;\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null)\n return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== void 0) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\")\n return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\nexport { _arrayLikeToArray as arrayLikeToArray, _arrayWithoutHoles as arrayWithoutHoles, _assertThisInitialized as assertThisInitialized, _classCallCheck as classCallCheck, _createClass as createClass, _createSuper as createSuper, _defineProperty as defineProperty, _get as get, _getPrototypeOf as getPrototypeOf, _inherits as inherits, _isNativeReflectConstruct as isNativeReflectConstruct, _iterableToArray as iterableToArray, _nonIterableSpread as nonIterableSpread, _objectSpread2 as objectSpread2, _possibleConstructorReturn as possibleConstructorReturn, _setPrototypeOf as setPrototypeOf, _superPropBase as superPropBase, _toConsumableArray as toConsumableArray, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey, _typeof as typeof, _unsupportedIterableToArray as unsupportedIterableToArray };\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif ('undefined' !== typeof module) {\n module.exports = EventEmitter;\n}\n","var XG_DEBUG_OPEN = typeof window !== \"undefined\" && window.location && window.location.href.indexOf(\"xgplayerdebugger=1\") > -1;\nvar STYLE = {\n info: \"color: #525252; background-color: #90ee90;\",\n error: \"color: #525252; background-color: red;\",\n warn: \"color: #525252; background-color: yellow; \"\n};\nvar XGTAG = \"%c[xgplayer]\";\nvar XG_DEBUG = {\n config: {\n debug: XG_DEBUG_OPEN ? 3 : 0\n },\n logInfo: function logInfo(message) {\n var _console;\n for (var _len = arguments.length, optionalParams = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n optionalParams[_key - 1] = arguments[_key];\n }\n this.config.debug >= 3 && (_console = console).log.apply(_console, [XGTAG, STYLE.info, message].concat(optionalParams));\n },\n logWarn: function logWarn(message) {\n var _console2;\n for (var _len2 = arguments.length, optionalParams = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n optionalParams[_key2 - 1] = arguments[_key2];\n }\n this.config.debug >= 1 && (_console2 = console).warn.apply(_console2, [XGTAG, STYLE.warn, message].concat(optionalParams));\n },\n logError: function logError(message) {\n var _console3;\n if (this.config.debug < 1) {\n return;\n }\n var _fun = this.config.debug >= 2 ? \"trace\" : \"error\";\n for (var _len3 = arguments.length, optionalParams = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n optionalParams[_key3 - 1] = arguments[_key3];\n }\n (_console3 = console)[_fun].apply(_console3, [XGTAG, STYLE.error, message].concat(optionalParams));\n }\n};\nfunction bindDebug(player) {\n player.logInfo = XG_DEBUG.logInfo.bind(player);\n player.logWarn = XG_DEBUG.logWarn.bind(player);\n player.logError = XG_DEBUG.logError.bind(player);\n}\nexport { bindDebug, XG_DEBUG as default };\n","import { createClass as _createClass, classCallCheck as _classCallCheck } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nvar XgplayerTimeRange = /* @__PURE__ */ function() {\n function XgplayerTimeRange2(bufferedList) {\n _classCallCheck(this, XgplayerTimeRange2);\n this.bufferedList = bufferedList;\n }\n _createClass(XgplayerTimeRange2, [{\n key: \"start\",\n value: function start(index) {\n return this.bufferedList[index].start;\n }\n }, {\n key: \"end\",\n value: function end(index) {\n return this.bufferedList[index].end;\n }\n }, {\n key: \"length\",\n get: function get() {\n return this.bufferedList.length;\n }\n }]);\n return XgplayerTimeRange2;\n}();\nexport { XgplayerTimeRange as default };\n","import { typeof as _typeof, toConsumableArray as _toConsumableArray } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport XG_DEBUG from \"./debug.js\";\nimport XgplayerTimeRange from \"./xgplayerTimeRange.js\";\nvar util = {};\nutil.createDom = function() {\n var el = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"div\";\n var tpl = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n var attrs = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n var cname = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : \"\";\n var dom = document.createElement(el);\n dom.className = cname;\n dom.innerHTML = tpl;\n Object.keys(attrs).forEach(function(item) {\n var key = item;\n var value = attrs[item];\n if (el === \"video\" || el === \"audio\" || el === \"live-video\") {\n if (value) {\n dom.setAttribute(key, value);\n }\n } else {\n dom.setAttribute(key, value);\n }\n });\n return dom;\n};\nutil.createDomFromHtml = function(html) {\n var attrs = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var classname = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : \"\";\n try {\n var doc = document.createElement(\"div\");\n doc.innerHTML = html;\n var dom = doc.children;\n doc = null;\n if (dom.length > 0) {\n dom = dom[0];\n classname && util.addClass(dom, classname);\n if (attrs) {\n Object.keys(attrs).forEach(function(key) {\n dom.setAttribute(key, attrs[key]);\n });\n }\n return dom;\n }\n return null;\n } catch (err) {\n XG_DEBUG.logError(\"util.createDomFromHtml\", err);\n return null;\n }\n};\nutil.hasClass = function(el, className) {\n if (!el || !className) {\n return false;\n }\n try {\n return Array.prototype.some.call(el.classList, function(item) {\n return item === className;\n });\n } catch (e) {\n var orgClassName = el.className && _typeof(el.className) === \"object\" ? el.getAttribute(\"class\") : el.className;\n return orgClassName && !!orgClassName.match(new RegExp(\"(\\\\s|^)\" + className + \"(\\\\s|$)\"));\n }\n};\nutil.addClass = function(el, className) {\n if (!el || !className) {\n return;\n }\n try {\n className.replace(/(^\\s+|\\s+$)/g, \"\").split(/\\s+/g).forEach(function(item) {\n item && el.classList.add(item);\n });\n } catch (e) {\n if (!util.hasClass(el, className)) {\n if (el.className && _typeof(el.className) === \"object\") {\n el.setAttribute(\"class\", el.getAttribute(\"class\") + \" \" + className);\n } else {\n el.className += \" \" + className;\n }\n }\n }\n};\nutil.removeClass = function(el, className) {\n if (!el || !className) {\n return;\n }\n try {\n className.replace(/(^\\s+|\\s+$)/g, \"\").split(/\\s+/g).forEach(function(item) {\n item && el.classList.remove(item);\n });\n } catch (e) {\n if (util.hasClass(el, className)) {\n className.split(/\\s+/g).forEach(function(item) {\n var reg = new RegExp(\"(\\\\s|^)\" + item + \"(\\\\s|$)\");\n if (el.className && _typeof(el.className) === \"object\") {\n el.setAttribute(\"class\", el.getAttribute(\"class\").replace(reg, \" \"));\n } else {\n el.className = el.className.replace(reg, \" \");\n }\n });\n }\n }\n};\nutil.toggleClass = function(el, className) {\n if (!el) {\n return;\n }\n className.split(/\\s+/g).forEach(function(item) {\n if (util.hasClass(el, item)) {\n util.removeClass(el, item);\n } else {\n util.addClass(el, item);\n }\n });\n};\nutil.classNames = function() {\n var _arguments = arguments;\n var classname = [];\n var _loop = function _loop2(i2) {\n if (util.typeOf(_arguments[i2]) === \"String\") {\n classname.push(_arguments[i2]);\n } else if (util.typeOf(_arguments[i2]) === \"Object\") {\n Object.keys(_arguments[i2]).map(function(key) {\n if (_arguments[i2][key]) {\n classname.push(key);\n }\n });\n }\n };\n for (var i = 0; i < arguments.length; i++) {\n _loop(i);\n }\n return classname.join(\" \");\n};\nutil.findDom = function() {\n var el = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;\n var sel = arguments.length > 1 ? arguments[1] : void 0;\n var dom;\n try {\n dom = el.querySelector(sel);\n } catch (e) {\n XG_DEBUG.logError(\"util.findDom\", e);\n if (sel.indexOf(\"#\") === 0) {\n dom = el.getElementById(sel.slice(1));\n }\n }\n return dom;\n};\nutil.getCss = function(dom, key) {\n return dom.currentStyle ? dom.currentStyle[key] : document.defaultView.getComputedStyle(dom, false)[key];\n};\nutil.padStart = function(str, length, pad) {\n var charstr = String(pad);\n var len = length >> 0;\n var maxlen = Math.ceil(len / charstr.length);\n var chars = [];\n var r = String(str);\n while (maxlen--) {\n chars.push(charstr);\n }\n return chars.join(\"\").substring(0, len - r.length) + r;\n};\nutil.format = function(time) {\n if (window.isNaN(time)) {\n return \"\";\n }\n time = Math.round(time);\n var hour = util.padStart(Math.floor(time / 3600), 2, 0);\n var minute = util.padStart(Math.floor((time - hour * 3600) / 60), 2, 0);\n var second = util.padStart(Math.floor(time - hour * 3600 - minute * 60), 2, 0);\n return (hour === \"00\" ? [minute, second] : [hour, minute, second]).join(\":\");\n};\nutil.event = function(e) {\n if (e.touches) {\n var touch = e.touches[0] || e.changedTouches[0];\n e.clientX = touch.clientX || 0;\n e.clientY = touch.clientY || 0;\n e.offsetX = touch.pageX - touch.target.offsetLeft;\n e.offsetY = touch.pageY - touch.target.offsetTop;\n }\n e._target = e.target || e.srcElement;\n};\nutil.typeOf = function(obj) {\n return Object.prototype.toString.call(obj).match(/([^\\s.*]+)(?=]$)/g)[0];\n};\nutil.deepCopy = function(dst, src) {\n if (util.typeOf(src) === \"Object\" && util.typeOf(dst) === \"Object\") {\n Object.keys(src).forEach(function(key) {\n if (util.typeOf(src[key]) === \"Object\" && !(src[key] instanceof Node)) {\n if (dst[key] === void 0 || dst[key] === void 0) {\n dst[key] = src[key];\n } else {\n util.deepCopy(dst[key], src[key]);\n }\n } else if (util.typeOf(src[key]) === \"Array\") {\n dst[key] = util.typeOf(dst[key]) === \"Array\" ? dst[key].concat(src[key]) : src[key];\n } else {\n dst[key] = src[key];\n }\n });\n return dst;\n }\n};\nutil.deepMerge = function(dst, src) {\n Object.keys(src).map(function(key) {\n if (util.typeOf(src[key]) === \"Array\" && util.typeOf(dst[key]) === \"Array\") {\n if (util.typeOf(dst[key]) === \"Array\") {\n var _dst$key;\n (_dst$key = dst[key]).push.apply(_dst$key, _toConsumableArray(src[key]));\n }\n } else if (util.typeOf(dst[key]) === util.typeOf(src[key]) && dst[key] !== null && util.typeOf(dst[key]) === \"Object\" && !(src[key] instanceof window.Node)) {\n util.deepMerge(dst[key], src[key]);\n } else {\n src[key] !== null && (dst[key] = src[key]);\n }\n });\n return dst;\n};\nutil.getBgImage = function(el) {\n var url = (el.currentStyle || window.getComputedStyle(el, null)).backgroundImage;\n if (!url || url === \"none\") {\n return \"\";\n }\n var a = document.createElement(\"a\");\n a.href = url.replace(/url\\(\"|\"\\)/g, \"\");\n return a.href;\n};\nutil.copyDom = function(dom) {\n if (dom && dom.nodeType === 1) {\n var back = document.createElement(dom.tagName);\n Array.prototype.forEach.call(dom.attributes, function(node) {\n back.setAttribute(node.name, node.value);\n });\n if (dom.innerHTML) {\n back.innerHTML = dom.innerHTML;\n }\n return back;\n } else {\n return \"\";\n }\n};\nutil.setInterval = function(context, eventName, intervalFunc, frequency) {\n if (!context._interval[eventName]) {\n context._interval[eventName] = window.setInterval(intervalFunc.bind(context), frequency);\n }\n};\nutil.clearInterval = function(context, eventName) {\n clearInterval(context._interval[eventName]);\n context._interval[eventName] = null;\n};\nutil.setTimeout = function(context, fun, time) {\n if (!context._timers) {\n context._timers = [];\n }\n var id = setTimeout(function() {\n fun();\n util.clearTimeout(context, id);\n }, time);\n context._timers.push(id);\n return id;\n};\nutil.clearTimeout = function(context, id) {\n var _timers = context._timers;\n if (util.typeOf(_timers) === \"Array\") {\n for (var i = 0; i < _timers.length; i++) {\n if (_timers[i] === id) {\n _timers.splice(i, 1);\n clearTimeout(id);\n break;\n }\n }\n } else {\n clearTimeout(id);\n }\n};\nutil.clearAllTimers = function(context) {\n var _timers = context._timers;\n if (util.typeOf(_timers) === \"Array\") {\n _timers.map(function(item) {\n clearTimeout(item);\n });\n context._timerIds = [];\n }\n};\nutil.createImgBtn = function(name, imgUrl, width, height) {\n var btn = util.createDom(\"xg-\".concat(name), \"\", {}, \"xgplayer-\".concat(name, \"-img\"));\n btn.style.backgroundImage = 'url(\"'.concat(imgUrl, '\")');\n if (width && height) {\n var w, h, unit;\n [\"px\", \"rem\", \"em\", \"pt\", \"dp\", \"vw\", \"vh\", \"vm\", \"%\"].every(function(item) {\n if (width.indexOf(item) > -1 && height.indexOf(item) > -1) {\n w = parseFloat(width.slice(0, width.indexOf(item)).trim());\n h = parseFloat(height.slice(0, height.indexOf(item)).trim());\n unit = item;\n return false;\n } else {\n return true;\n }\n });\n btn.style.width = \"\".concat(w).concat(unit);\n btn.style.height = \"\".concat(h).concat(unit);\n btn.style.backgroundSize = \"\".concat(w).concat(unit, \" \").concat(h).concat(unit);\n if (name === \"start\") {\n btn.style.margin = \"-\".concat(h / 2).concat(unit, \" auto auto -\").concat(w / 2).concat(unit);\n } else {\n btn.style.margin = \"auto 5px auto 5px\";\n }\n }\n return btn;\n};\nutil.Hex2RGBA = function(hex, alpha) {\n var rgb = [];\n if (/^\\#[0-9A-F]{3}$/i.test(hex)) {\n var sixHex = \"#\";\n hex.replace(/[0-9A-F]/ig, function(kw) {\n sixHex += kw + kw;\n });\n hex = sixHex;\n }\n if (/^#[0-9A-F]{6}$/i.test(hex)) {\n hex.replace(/[0-9A-F]{2}/ig, function(kw) {\n rgb.push(parseInt(kw, 16));\n });\n return \"rgba(\".concat(rgb.join(\",\"), \", \").concat(alpha, \")\");\n } else {\n return \"rgba(255, 255, 255, 0.1)\";\n }\n};\nutil.getFullScreenEl = function() {\n return document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement;\n};\nutil.checkIsFunction = function(fun) {\n return fun && typeof fun === \"function\";\n};\nutil.checkIsObject = function(obj) {\n return obj !== null && _typeof(obj) === \"object\";\n};\nutil.hide = function(dom) {\n dom.style.display = \"none\";\n};\nutil.show = function(dom, display) {\n dom.style.display = display || \"block\";\n};\nutil.isUndefined = function(val) {\n if (typeof val === \"undefined\" || val === null) {\n return true;\n }\n};\nutil.isNotNull = function(val) {\n return !(val === void 0 || val === null);\n};\nutil.setStyleFromCsstext = function(dom, text) {\n if (!text) {\n return;\n }\n if (util.typeOf(text) === \"String\") {\n var styleArr = text.replace(/\\s+/g, \"\").split(\";\");\n styleArr.map(function(item) {\n if (item) {\n var arr = item.split(\":\");\n if (arr.length > 1) {\n dom.style[arr[0]] = arr[1];\n }\n }\n });\n } else {\n Object.keys(text).map(function(key) {\n dom.style[key] = text[key];\n });\n }\n};\nfunction checkIsIn(key, list) {\n for (var i = 0, len = list.length; i < len; i++) {\n if (key.indexOf(list[i]) > -1) {\n return true;\n }\n }\n return false;\n}\nutil.filterStyleFromText = function(dom) {\n var list = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [\"width\", \"height\", \"top\", \"left\", \"bottom\", \"right\", \"position\", \"z-index\", \"padding\", \"margin\", \"transform\"];\n var _cssText = dom.style.cssText;\n if (!_cssText) {\n return {};\n }\n var styleArr = _cssText.replace(/\\s+/g, \"\").split(\";\");\n var ret = {};\n var remain = {};\n styleArr.map(function(item) {\n if (item) {\n var arr = item.split(\":\");\n if (arr.length > 1) {\n if (checkIsIn(arr[0], list)) {\n ret[arr[0]] = arr[1];\n } else {\n remain[arr[0]] = arr[1];\n }\n }\n }\n });\n dom.setAttribute(\"style\", \"\");\n Object.keys(remain).map(function(key) {\n dom.style[key] = remain[key];\n });\n return ret;\n};\nutil.getStyleFromCsstext = function(dom) {\n var _cssText = dom.style.cssText;\n if (!_cssText) {\n return {};\n }\n var styleArr = _cssText.replace(/\\s+/g, \"\").split(\";\");\n var ret = {};\n styleArr.map(function(item) {\n if (item) {\n var arr = item.split(\":\");\n if (arr.length > 1) {\n ret[arr[0]] = arr[1];\n }\n }\n });\n return ret;\n};\nutil.preloadImg = function(url) {\n var onload = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {\n };\n var onerror = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {\n };\n if (!url) {\n return;\n }\n var img = new window.Image();\n img.onload = function(e) {\n img = null;\n onload && onload(e);\n };\n img.onerror = function(e) {\n img = null;\n onerror && onerror(e);\n };\n img.src = url;\n};\nutil.stopPropagation = function(e) {\n if (e) {\n e.stopPropagation();\n }\n};\nutil.scrollTop = function() {\n return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;\n};\nutil.scrollLeft = function() {\n return window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;\n};\nutil.checkTouchSupport = function() {\n return \"ontouchstart\" in window;\n};\nutil.getBuffered2 = function(vbuffered) {\n var maxHoleDuration = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0.5;\n var buffered = [];\n for (var i = 0; i < vbuffered.length; i++) {\n buffered.push({\n start: vbuffered.start(i) < 0.5 ? 0 : vbuffered.start(i),\n end: vbuffered.end(i)\n });\n }\n buffered.sort(function(a, b) {\n var diff = a.start - b.start;\n if (diff) {\n return diff;\n } else {\n return b.end - a.end;\n }\n });\n var buffered2 = [];\n if (maxHoleDuration) {\n for (var _i = 0; _i < buffered.length; _i++) {\n var buf2len = buffered2.length;\n if (buf2len) {\n var buf2end = buffered2[buf2len - 1].end;\n if (buffered[_i].start - buf2end < maxHoleDuration) {\n if (buffered[_i].end > buf2end) {\n buffered2[buf2len - 1].end = buffered[_i].end;\n }\n } else {\n buffered2.push(buffered[_i]);\n }\n } else {\n buffered2.push(buffered[_i]);\n }\n }\n } else {\n buffered2 = buffered;\n }\n return new XgplayerTimeRange(buffered2);\n};\nutil.getEventPos = function(e) {\n var zoom = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;\n if (e.touches && e.touches.length > 0) {\n e = e.touches[0];\n }\n return {\n x: e.x / zoom,\n y: e.y / zoom,\n clientX: e.clientX / zoom,\n clientY: e.clientY / zoom,\n offsetX: e.offsetX / zoom,\n offsetY: e.offsetY / zoom,\n pageX: e.pageX / zoom,\n pageY: e.pageY / zoom\n };\n};\nutil.requestAnimationFrame = function(callback) {\n var _fun = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;\n if (_fun) {\n return _fun(callback);\n }\n};\nutil.getHostFromUrl = function(url) {\n if (util.typeOf(url) !== \"String\") {\n return \"\";\n }\n var results = url.split(\"/\");\n var domain = \"\";\n if (results.length > 3 && results[2]) {\n domain = results[2];\n }\n return domain;\n};\nutil.cancelAnimationFrame = function(frameId) {\n var _fun = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.cancelRequestAnimationFrame;\n _fun && _fun(frameId);\n};\nutil.isMSE = function(video) {\n if (!video || !(video instanceof HTMLMediaElement)) {\n return false;\n }\n return /^blob/.test(video.currentSrc) || /^blob/.test(video.src);\n};\nutil.isBlob = function(url) {\n return /^blob/.test(url);\n};\nutil.generateSessionId = function() {\n var did = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;\n var d = new Date().getTime();\n try {\n did = parseInt(did);\n } catch (e) {\n did = 0;\n }\n d += did;\n if (window.performance && typeof window.performance.now === \"function\") {\n d += parseInt(window.performance.now());\n }\n var uuid = \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function(c) {\n var r = (d + Math.random() * 16) % 16 | 0;\n d = Math.floor(d / 16);\n return (c === \"x\" ? r : r & 3 | 8).toString(16);\n });\n return uuid;\n};\nutil.createEvent = function(eventName) {\n var event;\n if (typeof window.Event === \"function\") {\n event = new Event(eventName);\n } else {\n event = document.createEvent(\"Event\");\n event.initEvent(eventName, true, true);\n }\n return event;\n};\nutil.adjustTimeByDuration = function(time, duration, isEnded) {\n if (!duration || !time) {\n return time;\n }\n if (time > duration || isEnded && time < duration) {\n return duration;\n }\n return time;\n};\nutil.createPositionBar = function(className, root) {\n var dom = util.createDom(\"xg-bar\", \"\", {\n \"data-index\": -1\n }, className);\n root.appendChild(dom);\n return dom;\n};\nutil.getTransformStyle = function() {\n var pos = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {\n x: 0,\n y: 0,\n scale: 1,\n rotate: 0\n };\n var transformValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n var styles = {\n scale: \"\".concat(pos.scale || 1),\n translate: \"\".concat(pos.x || 0, \"%, \").concat(pos.y || 0, \"%\"),\n rotate: \"\".concat(pos.rotate || 0, \"deg\")\n };\n var stylesKeys = Object.keys(styles);\n stylesKeys.forEach(function(key) {\n var reg = new RegExp(\"\".concat(key, \"\\\\([^\\\\(]+\\\\)\"), \"g\");\n var fn = \"\".concat(key, \"(\").concat(styles[key], \")\");\n if (reg.test(transformValue)) {\n reg.lastIndex = -1;\n transformValue = transformValue.replace(reg, fn);\n } else {\n transformValue += \"\".concat(fn, \" \");\n }\n });\n return transformValue;\n};\nutil.convertDeg = function(val) {\n if (Math.abs(val) <= 1) {\n return val * 360;\n }\n return val % 360;\n};\nutil.getIndexByTime = function(time, segments) {\n var _len = segments.length;\n var _index = -1;\n if (_len < 1) {\n return _index;\n }\n if (time <= segments[0].end || _len < 2) {\n _index = 0;\n } else if (time > segments[_len - 1].end) {\n _index = _len - 1;\n } else {\n for (var i = 1; i < _len; i++) {\n if (time > segments[i - 1].end && time <= segments[i].end) {\n _index = i;\n break;\n }\n }\n }\n return _index;\n};\nutil.getOffsetCurrentTime = function(currentTime, segments) {\n var index = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1;\n var _index = -1;\n if (index >= 0 && index < segments.length) {\n _index = index;\n } else {\n _index = util.getIndexByTime(currentTime, segments);\n }\n if (_index < 0) {\n return -1;\n }\n var _len = segments.length;\n var _segments$_index = segments[_index], start = _segments$_index.start, end = _segments$_index.end, cTime = _segments$_index.cTime, offset = _segments$_index.offset;\n if (currentTime < start) {\n return cTime;\n } else if (currentTime >= start && currentTime <= end) {\n return currentTime - offset;\n } else if (currentTime > end && _index >= _len - 1) {\n return end;\n }\n return -1;\n};\nutil.getCurrentTimeByOffset = function(offsetTime, segments) {\n var _index = -1;\n if (!segments || segments.length < 0) {\n return offsetTime;\n }\n for (var i = 0; i < segments.length; i++) {\n if (offsetTime <= segments[i].duration) {\n _index = i;\n break;\n }\n }\n if (_index !== -1) {\n var start = segments[_index].start;\n if (_index - 1 < 0) {\n return start + offsetTime;\n } else {\n return start + (offsetTime - segments[_index - 1].duration);\n }\n }\n return offsetTime;\n};\nfunction isObject(value) {\n var type = _typeof(value);\n return value !== null && (type === \"object\" || type === \"function\");\n}\nfunction debounce(func, wait, options) {\n var lastArgs, lastThis, maxWait, result, timerId, lastCallTime;\n var lastInvokeTime = 0;\n var leading = false;\n var maxing = false;\n var trailing = true;\n var useRAF = !wait && wait !== 0 && typeof window.requestAnimationFrame === \"function\";\n if (typeof func !== \"function\") {\n throw new TypeError(\"Expected a function\");\n }\n wait = +wait || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = \"maxWait\" in options;\n maxWait = maxing ? Math.max(+options.maxWait || 0, wait) : maxWait;\n trailing = \"trailing\" in options ? !!options.trailing : trailing;\n }\n function invokeFunc(time) {\n var args = lastArgs;\n var thisArg = lastThis;\n lastArgs = lastThis = void 0;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n function startTimer(pendingFunc, wait2) {\n if (useRAF) {\n window.cancelAnimationFrame(timerId);\n return window.requestAnimationFrame(pendingFunc);\n }\n return setTimeout(pendingFunc, wait2);\n }\n function cancelTimer(id) {\n if (useRAF) {\n return window.cancelAnimationFrame(id);\n }\n clearTimeout(id);\n }\n function leadingEdge(time) {\n lastInvokeTime = time;\n timerId = startTimer(timerExpired, wait);\n return leading ? invokeFunc(time) : result;\n }\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime;\n var timeSinceLastInvoke = time - lastInvokeTime;\n var timeWaiting = wait - timeSinceLastCall;\n return maxing ? Math.min(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;\n }\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime;\n var timeSinceLastInvoke = time - lastInvokeTime;\n return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;\n }\n function timerExpired() {\n var time = Date.now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n timerId = startTimer(timerExpired, remainingWait(time));\n }\n function trailingEdge(time) {\n timerId = void 0;\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = void 0;\n return result;\n }\n function cancel() {\n if (timerId !== void 0) {\n cancelTimer(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = void 0;\n }\n function flush() {\n return timerId === void 0 ? result : trailingEdge(Date.now());\n }\n function pending() {\n return timerId !== void 0;\n }\n function debounced() {\n var time = Date.now();\n var isInvoking = shouldInvoke(time);\n for (var _len2 = arguments.length, args = new Array(_len2), _key = 0; _key < _len2; _key++) {\n args[_key] = arguments[_key];\n }\n lastArgs = args;\n lastThis = this;\n lastCallTime = time;\n if (isInvoking) {\n if (timerId === void 0) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n timerId = startTimer(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === void 0) {\n timerId = startTimer(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n debounced.pending = pending;\n return debounced;\n}\nfunction throttle(func, wait, options) {\n var leading = true;\n var trailing = true;\n if (typeof func !== \"function\") {\n throw new TypeError(\"Expected a function\");\n }\n if (isObject(options)) {\n leading = \"leading\" in options ? !!options.leading : leading;\n trailing = \"trailing\" in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n leading,\n trailing,\n maxWait: wait\n });\n}\nfunction getLang() {\n var lang = (document.documentElement.getAttribute(\"lang\") || navigator.language || \"zh-cn\").toLocaleLowerCase();\n if (lang === \"zh-cn\") {\n lang = \"zh\";\n }\n return lang;\n}\nfunction checkIsCurrentVideo(element, playerId, key) {\n if (!element) {\n return;\n }\n var pid = element.getAttribute(key);\n if (pid && pid === playerId && (element.tagName === \"VIDEO\" || element.tagName === \"AUDIO\")) {\n return true;\n }\n return false;\n}\nexport { checkIsCurrentVideo, debounce, util as default, getLang, throttle };\n","var VERSION_REG = {\n android: /(Android)\\s([\\d.]+)/,\n ios: /(Version)\\/([\\d.]+)/\n};\nvar H264_MIMETYPES = [\"avc1.42E01E, mp4a.40.2\", \"avc1.58A01E, mp4a.40.2\", \"avc1.4D401E, mp4a.40.2\", \"avc1.64001E, mp4a.40.2\", \"avc1.42E01E\", \"mp4v.20.8\", \"avc1.42E01E, mp4a.40.2\", \"avc1.58A01E, mp4a.40.2\", \"avc1.4D401E, mp4a.40.2\", \"avc1.64001E, mp4a.40.2\", \"mp4v.20.8, mp4a.40.2\", \"mp4v.20.240, mp4a.40.2\"];\nvar sniffer = {\n get device() {\n var r = sniffer.os;\n return r.isPc ? \"pc\" : \"mobile\";\n },\n get browser() {\n if (typeof navigator === \"undefined\") {\n return \"\";\n }\n var ua = navigator.userAgent.toLowerCase();\n var reg = {\n ie: /rv:([\\d.]+)\\) like gecko/,\n firefox: /firefox\\/([\\d.]+)/,\n chrome: /chrome\\/([\\d.]+)/,\n opera: /opera.([\\d.]+)/,\n safari: /version\\/([\\d.]+).*safari/\n };\n return [].concat(Object.keys(reg).filter(function(key) {\n return reg[key].test(ua);\n }))[0];\n },\n get os() {\n if (typeof navigator === \"undefined\") {\n return {};\n }\n var ua = navigator.userAgent;\n var isWindowsPhone = /(?:Windows Phone)/.test(ua);\n var isSymbian = /(?:SymbianOS)/.test(ua) || isWindowsPhone;\n var isAndroid = /(?:Android)/.test(ua);\n var isFireFox = /(?:Firefox)/.test(ua);\n var isTablet = /(?:iPad|PlayBook)/.test(ua) || isAndroid && !/(?:Mobile)/.test(ua) || isFireFox && /(?:Tablet)/.test(ua);\n var isPhone = /(?:iPhone)/.test(ua) && !isTablet;\n var isPc = !isPhone && !isAndroid && !isSymbian && !isTablet;\n var isIpad = /(?:iPad|PlayBook)/.test(ua);\n return {\n isTablet,\n isPhone,\n isIpad,\n isIos: isPhone || isIpad,\n isAndroid,\n isPc,\n isSymbian,\n isWindowsPhone,\n isFireFox\n };\n },\n get osVersion() {\n if (typeof navigator === \"undefined\") {\n return 0;\n }\n var ua = navigator.userAgent;\n var reg = \"\";\n if (/(?:iPhone)|(?:iPad|PlayBook)/.test(ua)) {\n reg = VERSION_REG.ios;\n } else {\n reg = VERSION_REG.android;\n }\n var _match = reg ? reg.exec(ua) : [];\n if (_match && _match.length >= 3) {\n var version = _match[2].split(\".\");\n return version.length > 0 ? parseInt(version[0]) : 0;\n }\n return 0;\n },\n get isWeixin() {\n if (typeof navigator === \"undefined\") {\n return false;\n }\n var reg = /(micromessenger)\\/([\\d.]+)/;\n var match = reg.exec(navigator.userAgent.toLocaleLowerCase());\n if (match) {\n return true;\n }\n return false;\n },\n isSupportMP4: function isSupportMP4() {\n var result = {\n isSupport: false,\n mime: \"\"\n };\n if (typeof document === \"undefined\") {\n return result;\n }\n if (this.supportResult) {\n return this.supportResult;\n }\n var a = document.createElement(\"video\");\n if (typeof a.canPlayType === \"function\") {\n H264_MIMETYPES.map(function(key) {\n if (a.canPlayType('video/mp4; codecs=\"'.concat(key, '\"')) === \"probably\") {\n result.isSupport = true;\n result.mime += \"||\".concat(key);\n }\n });\n }\n this.supportResult = result;\n a = null;\n return result;\n },\n isMSESupport: function isMSESupport() {\n var mime = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'video/mp4; codecs=\"avc1.42E01E,mp4a.40.2\"';\n if (typeof MediaSource === \"undefined\" || !MediaSource)\n return false;\n try {\n return MediaSource.isTypeSupported(mime);\n } catch (error) {\n this._logger.error(mime, error);\n return false;\n }\n },\n isHevcSupported: function isHevcSupported() {\n if (typeof MediaSource === \"undefined\" || !MediaSource.isTypeSupported) {\n return false;\n }\n return MediaSource.isTypeSupported('video/mp4;codecs=\"hev1.1.6.L120.90\"') || MediaSource.isTypeSupported('video/mp4;codecs=\"hev1.2.4.L120.90\"') || MediaSource.isTypeSupported('video/mp4;codecs=\"hev1.3.E.L120.90\"') || MediaSource.isTypeSupported('video/mp4;codecs=\"hev1.4.10.L120.90\"');\n },\n probeConfigSupported: function probeConfigSupported(info) {\n var defaults = {\n supported: false,\n smooth: false,\n powerEfficient: false\n };\n if (!info || typeof navigator === \"undefined\") {\n return Promise.resolve(defaults);\n }\n if (navigator.mediaCapabilities && navigator.mediaCapabilities.decodingInfo) {\n return navigator.mediaCapabilities.decodingInfo(info);\n } else {\n var videoConfig = info.video || {};\n var audioConfig = info.audio || {};\n try {\n var videoSupported = MediaSource.isTypeSupported(videoConfig.contentType);\n var audioSupported = MediaSource.isTypeSupported(audioConfig.contentType);\n return Promise.resolve({\n supported: videoSupported && audioSupported,\n smooth: false,\n powerEfficient: false\n });\n } catch (e) {\n return Promise.resolve(defaults);\n }\n }\n }\n};\nexport { sniffer as default };\n","var version = \"3.0.10\";\nexport { version as default };\n","import { createClass as _createClass, classCallCheck as _classCallCheck } from \"./_virtual/_rollupPluginBabelHelpers.js\";\nimport version from \"./version.js\";\nimport util from \"./utils/util.js\";\nvar ERROR_TYPE_MAP = {\n 1: \"media\",\n 2: \"media\",\n 3: \"media\",\n 4: \"media\",\n 5: \"media\",\n 6: \"media\"\n};\nvar ERROR_MAP = {\n 1: 5101,\n 2: 5102,\n 3: 5103,\n 4: 5104,\n 5: 5105,\n 6: 5106\n};\nvar Errors = /* @__PURE__ */ _createClass(\n function Errors2(player) {\n var errorInfo = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {\n errorType: \"\",\n errorCode: 0,\n errorMessage: \"\",\n originError: \"\",\n ext: {},\n mediaError: null\n };\n _classCallCheck(this, Errors2);\n var ERROR_TYPES = player && player.i18n ? player.i18n.ERROR_TYPES : null;\n if (player.media) {\n var mediaError = errorInfo.mediaError ? errorInfo.mediaError : player.media.error || {};\n var duration = player.duration, currentTime = player.currentTime, ended = player.ended, src = player.src, currentSrc = player.currentSrc;\n var _player$media = player.media, readyState = _player$media.readyState, networkState = _player$media.networkState;\n var _errc = errorInfo.errorCode || mediaError.code;\n if (ERROR_MAP[_errc]) {\n _errc = ERROR_MAP[_errc];\n }\n var r = {\n playerVersion: version,\n currentTime,\n duration,\n ended,\n readyState,\n networkState,\n src: src || currentSrc,\n errorType: errorInfo.errorType,\n errorCode: _errc,\n message: errorInfo.errorMessage || mediaError.message,\n mediaError,\n originError: errorInfo.originError ? errorInfo.originError.stack : \"\",\n host: util.getHostFromUrl(src || currentSrc)\n };\n errorInfo.ext && Object.keys(errorInfo.ext).map(function(key) {\n r[key] = errorInfo.ext[key];\n });\n return r;\n } else {\n if (arguments.length > 1) {\n var _r = {\n playerVersion: version,\n domain: document.domain\n };\n var arr = [\"errorType\", \"currentTime\", \"duration\", \"networkState\", \"readyState\", \"src\", \"currentSrc\", \"ended\", \"errd\", \"errorCode\", \"mediaError\"];\n for (var i = 0; i < arguments.length; i++) {\n _r[arr[i]] = arguments[i];\n }\n _r.ex = ERROR_TYPES ? (ERROR_TYPES[arguments[0]] || {}).msg : \"\";\n return _r;\n }\n }\n }\n);\nexport { ERROR_TYPE_MAP, Errors as default };\n","var PLAY = \"play\";\nvar PLAYING = \"playing\";\nvar ENDED = \"ended\";\nvar PAUSE = \"pause\";\nvar ERROR = \"error\";\nvar SEEKING = \"seeking\";\nvar SEEKED = \"seeked\";\nvar TIME_UPDATE = \"timeupdate\";\nvar WAITING = \"waiting\";\nvar CANPLAY = \"canplay\";\nvar CANPLAY_THROUGH = \"canplaythrough\";\nvar DURATION_CHANGE = \"durationchange\";\nvar VOLUME_CHANGE = \"volumechange\";\nvar LOADED_DATA = \"loadeddata\";\nvar LOADED_METADATA = \"loadedmetadata\";\nvar RATE_CHANGE = \"ratechange\";\nvar PROGRESS = \"progress\";\nvar LOAD_START = \"loadstart\";\nvar EMPTIED = \"emptied\";\nvar STALLED = \"stalled\";\nvar SUSPEND = \"suspend\";\nvar ABORT = \"abort\";\nvar BUFFER_CHANGE = \"bufferedChange\";\nvar PLAYER_FOCUS = \"focus\";\nvar PLAYER_BLUR = \"blur\";\nvar READY = \"ready\";\nvar URL_NULL = \"urlNull\";\nvar AUTOPLAY_STARTED = \"autoplay_started\";\nvar AUTOPLAY_PREVENTED = \"autoplay_was_prevented\";\nvar COMPLETE = \"complete\";\nvar REPLAY = \"replay\";\nvar DESTROY = \"destroy\";\nvar URL_CHANGE = \"urlchange\";\nvar DOWNLOAD_SPEED_CHANGE = \"download_speed_change\";\nvar FULLSCREEN_CHANGE = \"fullscreen_change\";\nvar CSS_FULLSCREEN_CHANGE = \"cssFullscreen_change\";\nvar MINI_STATE_CHANGE = \"mini_state_change\";\nvar DEFINITION_CHANGE = \"definition_change\";\nvar BEFORE_DEFINITION_CHANGE = \"before_definition_change\";\nvar AFTER_DEFINITION_CHANGE = \"after_definition_change\";\nvar SEI_PARSED = \"SEI_PARSED\";\nvar RETRY = \"retry\";\nvar VIDEO_RESIZE = \"video_resize\";\nvar PIP_CHANGE = \"pip_change\";\nvar ROTATE = \"rotate\";\nvar SCREEN_SHOT = \"screenShot\";\nvar PLAYNEXT = \"playnext\";\nvar SHORTCUT = \"shortcut\";\nvar XGLOG = \"xglog\";\nvar USER_ACTION = \"user_action\";\nvar RESET = \"reset\";\nvar SOURCE_ERROR = \"source_error\";\nvar SOURCE_SUCCESS = \"source_success\";\nvar SWITCH_SUBTITLE = \"switch_subtitle\";\nvar VIDEO_EVENTS = [\"play\", \"playing\", \"ended\", \"pause\", \"error\", \"seeking\", \"seeked\", \"timeupdate\", \"waiting\", \"canplay\", \"canplaythrough\", \"durationchange\", \"volumechange\", \"loadeddata\", \"loadedmetadata\", \"ratechange\", \"progress\", \"loadstart\", \"emptied\", \"stalled\", \"suspend\", \"abort\", \"lowdecode\"];\nvar STATS_EVENTS = {\n STATS_INFO: \"stats_info\",\n STATS_DOWNLOAD: \"stats_download\",\n STATS_RESET: \"stats_reset\"\n};\nvar FPS_STUCK = \"fps_stuck\";\nexport { ABORT, AFTER_DEFINITION_CHANGE, AUTOPLAY_PREVENTED, AUTOPLAY_STARTED, BEFORE_DEFINITION_CHANGE, BUFFER_CHANGE, CANPLAY, CANPLAY_THROUGH, COMPLETE, CSS_FULLSCREEN_CHANGE, DEFINITION_CHANGE, DESTROY, DOWNLOAD_SPEED_CHANGE, DURATION_CHANGE, EMPTIED, ENDED, ERROR, FPS_STUCK, FULLSCREEN_CHANGE, LOADED_DATA, LOADED_METADATA, LOAD_START, MINI_STATE_CHANGE, PAUSE, PIP_CHANGE, PLAY, PLAYER_BLUR, PLAYER_FOCUS, PLAYING, PLAYNEXT, PROGRESS, RATE_CHANGE, READY, REPLAY, RESET, RETRY, ROTATE, SCREEN_SHOT, SEEKED, SEEKING, SEI_PARSED, SHORTCUT, SOURCE_ERROR, SOURCE_SUCCESS, STALLED, STATS_EVENTS, SUSPEND, SWITCH_SUBTITLE, TIME_UPDATE, URL_CHANGE, URL_NULL, USER_ACTION, VIDEO_EVENTS, VIDEO_RESIZE, VOLUME_CHANGE, WAITING, XGLOG };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, defineProperty as _defineProperty, get as _get, getPrototypeOf as _getPrototypeOf } from \"./_virtual/_rollupPluginBabelHelpers.js\";\nimport EventEmitter from \"eventemitter3\";\nimport util from \"./utils/util.js\";\nimport sniffer from \"./utils/sniffer.js\";\nimport Errors, { ERROR_TYPE_MAP } from \"./error.js\";\nimport { VIDEO_EVENTS, SOURCE_SUCCESS, SOURCE_ERROR, URL_CHANGE, WAITING } from \"./events.js\";\nfunction emitVideoEvent(eventKey, e) {\n if (!this || !this.emit) {\n return;\n }\n if (eventKey === \"error\") {\n this.errorHandler(eventKey, e.error);\n } else {\n this.emit(eventKey, e);\n }\n}\nfunction getVideoEventHandler(eventKey, player) {\n return function(e, _err) {\n var eData = {\n player,\n eventName: eventKey,\n originalEvent: e,\n detail: e.detail || {},\n timeStamp: e.timeStamp,\n currentTime: player.currentTime,\n duration: player.duration,\n paused: player.paused,\n ended: player.ended,\n isInternalOp: !!player._internalOp[e.type],\n muted: player.muted,\n volume: player.volume,\n host: util.getHostFromUrl(player.currentSrc),\n vtype: player.vtype\n };\n player.removeInnerOP(e.type);\n if (eventKey === \"timeupdate\") {\n player._currentTime = player.media && player.media.currentTime;\n }\n if (eventKey === \"ratechange\") {\n var _rate = player.media ? player.media.playbackRate : 0;\n if (_rate && player._rate === _rate) {\n return;\n }\n player._rate = player.media && player.media.playbackRate;\n }\n if (eventKey === \"durationchange\") {\n player._duration = player.media.duration;\n }\n if (eventKey === \"volumechange\") {\n eData.isMutedChange = player._lastMuted !== player.muted;\n player._lastMuted = player.muted;\n }\n if (eventKey === \"error\") {\n eData.error = _err || player.video.error;\n }\n if (player.mediaEventMiddleware[eventKey]) {\n var callback = emitVideoEvent.bind(player, eventKey, eData);\n try {\n player.mediaEventMiddleware[eventKey].call(player, eData, callback);\n } catch (err) {\n emitVideoEvent.call(player, eventKey, eData);\n throw err;\n }\n } else {\n emitVideoEvent.call(player, eventKey, eData);\n }\n };\n}\nvar MediaProxy = /* @__PURE__ */ function(_EventEmitter) {\n _inherits(MediaProxy2, _EventEmitter);\n var _super = _createSuper(MediaProxy2);\n function MediaProxy2(options) {\n var _this;\n _classCallCheck(this, MediaProxy2);\n _this = _super.call(this, options);\n _this._hasStart = false;\n _this._currentTime = 0;\n _this._duration = 0;\n _this._internalOp = {};\n _this._lastMuted = false;\n _this.vtype = \"MP4\";\n _this._rate = -1;\n _this.mediaConfig = Object.assign({}, {\n controls: false,\n autoplay: options.autoplay,\n playsinline: options.playsinline,\n \"x5-playsinline\": options.playsinline,\n \"webkit-playsinline\": options.playsinline,\n \"x5-video-player-fullscreen\": options[\"x5-video-player-fullscreen\"] || options.x5VideoPlayerFullscreen,\n \"x5-video-orientation\": options[\"x5-video-orientation\"] || options.x5VideoOrientation,\n airplay: options.airplay,\n \"webkit-airplay\": options.airplay,\n tabindex: options.tabindex | 0,\n mediaType: options.mediaType || \"video\",\n \"data-index\": -1\n }, options.videoConfig, options.videoAttributes);\n var playerType = options[\"x5-video-player-type\"] || options.x5VideoPlayerType;\n if (sniffer.isWeixin && sniffer.os.isAndroid && playerType) {\n _this.mediaConfig[\"x5-video-player-type\"] = playerType;\n delete _this.mediaConfig.playsinline;\n delete _this.mediaConfig[\"webkit-playsinline\"];\n delete _this.mediaConfig[\"x5-playsinline\"];\n }\n if (options.loop) {\n _this.mediaConfig.loop = \"loop\";\n }\n if (options.autoplayMuted && !Object.prototype.hasOwnProperty.call(_this.mediaConfig, \"muted\")) {\n _this.mediaConfig.muted = true;\n }\n _this.media = util.createDom(_this.mediaConfig.mediaType, \"\", _this.mediaConfig, \"\");\n if (options.defaultPlaybackRate) {\n _this.media.defaultPlaybackRate = _this.media.playbackRate = options.defaultPlaybackRate;\n }\n if (util.typeOf(options.volume) === \"Number\") {\n _this.volume = options.volume;\n }\n if (options.autoplayMuted) {\n _this.media.muted = true;\n _this._lastMuted = true;\n }\n if (options.autoplay) {\n _this.media.autoplay = true;\n }\n _this._interval = {};\n _this.mediaEventMiddleware = {};\n _this.attachVideoEvents();\n return _this;\n }\n _createClass(MediaProxy2, [{\n key: \"setEventsMiddleware\",\n value: function setEventsMiddleware(middlewares) {\n var _this2 = this;\n Object.keys(middlewares).map(function(key) {\n _this2.mediaEventMiddleware[key] = middlewares[key];\n });\n }\n }, {\n key: \"removeEventsMiddleware\",\n value: function removeEventsMiddleware(middlewares) {\n var _this3 = this;\n Object.keys(middlewares).map(function(key) {\n delete _this3.mediaEventMiddleware[key];\n });\n }\n }, {\n key: \"attachVideoEvents\",\n value: function attachVideoEvents() {\n var _this4 = this;\n var media = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.media;\n if (!this._evHandlers) {\n this._evHandlers = VIDEO_EVENTS.map(function(eventKey) {\n var funName = \"on\".concat(eventKey.charAt(0).toUpperCase()).concat(eventKey.slice(1));\n if (typeof _this4[funName] === \"function\") {\n _this4.on(eventKey, _this4[funName]);\n }\n return _defineProperty({}, eventKey, getVideoEventHandler(eventKey, _this4));\n });\n }\n this._evHandlers.forEach(function(item) {\n var eventKey = Object.keys(item)[0];\n media.addEventListener(eventKey, item[eventKey], false);\n });\n }\n }, {\n key: \"detachVideoEvents\",\n value: function detachVideoEvents() {\n var _this5 = this;\n var media = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.media;\n this._evHandlers.forEach(function(item) {\n var eventKey = Object.keys(item)[0];\n media.removeEventListener(eventKey, item[eventKey], false);\n });\n this._evHandlers.forEach(function(item) {\n var eventKey = Object.keys(item)[0];\n var funName = \"on\".concat(eventKey.charAt(0).toUpperCase()).concat(eventKey.slice(1));\n if (typeof _this5[funName] === \"function\") {\n _this5.off(eventKey, _this5[funName]);\n }\n });\n this._evHandlers = null;\n }\n }, {\n key: \"_attachSourceEvents\",\n value: function _attachSourceEvents(video, urls) {\n var _this6 = this;\n video.removeAttribute(\"src\");\n video.load();\n urls.forEach(function(item, index) {\n _this6.media.appendChild(util.createDom(\"source\", \"\", {\n src: \"\".concat(item.src),\n type: \"\".concat(item.type || \"\"),\n \"data-index\": index + 1\n }));\n });\n var _c = video.children;\n if (!_c) {\n return;\n }\n this._videoSourceCount = _c.length;\n this._videoSourceIndex = _c.length;\n this._vLoadeddata = function(e) {\n _this6.emit(SOURCE_SUCCESS, {\n src: e.target.currentSrc,\n host: util.getHostFromUrl(e.target.currentSrc)\n });\n };\n var _eHandler = null;\n for (var i = 0; i < this._evHandlers.length; i++) {\n if (Object.keys(this._evHandlers[i])[0] === \"error\") {\n _eHandler = this._evHandlers[i];\n break;\n }\n }\n !this._sourceError && (this._sourceError = function(e) {\n var _dIndex = parseInt(e.target.getAttribute(\"data-index\"), 10);\n _this6._videoSourceIndex--;\n if (_this6._videoSourceIndex === 0 || _dIndex >= _this6._videoSourceCount) {\n var _err = {\n code: 4,\n message: \"sources_load_error\"\n };\n _eHandler ? _eHandler.error(e, _err) : _this6.errorHandler(\"error\", _err);\n }\n var type = ERROR_TYPE_MAP[4];\n _this6.emit(SOURCE_ERROR, new Errors(_this6, {\n errorType: type,\n errorCode: 4,\n errorMessage: \"sources_load_error\",\n mediaError: {\n code: 4,\n message: \"sources_load_error\"\n },\n src: e.target.src\n }));\n });\n for (var _i = 0; _i < _c.length; _i++) {\n _c[_i].addEventListener(\"error\", this._sourceError);\n }\n video.addEventListener(\"loadeddata\", this._vLoadeddata);\n }\n }, {\n key: \"_detachSourceEvents\",\n value: function _detachSourceEvents(video) {\n var _c = video.children;\n if (!_c || _c.length === 0 || !this._sourceError) {\n return;\n }\n for (var i = 0; i < _c.length; i++) {\n _c[i].removeEventListener(\"error\", this._sourceError);\n }\n while (_c.length > 0) {\n video.removeChild(_c[0]);\n }\n this._vLoadeddata && video.removeEventListener(\"loadeddata\", this._vLoadeddata);\n }\n }, {\n key: \"errorHandler\",\n value: function errorHandler(name) {\n var error = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;\n if (this.media && (this.media.error || error)) {\n var _e = this.media.error || error;\n var type = _e.code ? ERROR_TYPE_MAP[_e.code] : \"other\";\n var message = _e.message;\n if (!this.media.currentSrc) {\n message = \"empty_src\";\n _e = {\n code: 6,\n message\n };\n }\n this.emit(name, new Errors(this, {\n errorType: type,\n errorCode: _e.code,\n errorMessage: _e.message || \"\",\n mediaError: _e\n }));\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.media) {\n if (this.media.pause) {\n this.media.pause();\n this.media.muted = true;\n }\n this.media.removeAttribute(\"src\");\n this.media.load();\n }\n this._currentTime = 0;\n this._duration = 0;\n this.mediaConfig = null;\n for (var k in this._interval) {\n if (Object.prototype.hasOwnProperty.call(this._interval, k)) {\n clearInterval(this._interval[k]);\n this._interval[k] = null;\n }\n }\n this.detachVideoEvents();\n this.media = null;\n this.mediaEventMiddleware = {};\n this.removeAllListeners();\n }\n }, {\n key: \"video\",\n get: function get() {\n return this.media;\n },\n set: function set(media) {\n this.media = media;\n }\n }, {\n key: \"play\",\n value: function play() {\n var ret = this.media ? this.media.play() : null;\n return ret;\n }\n }, {\n key: \"pause\",\n value: function pause() {\n this.media && this.media.pause();\n }\n }, {\n key: \"load\",\n value: function load() {\n this.media && this.media.load();\n }\n }, {\n key: \"canPlayType\",\n value: function canPlayType(type) {\n return this.media ? this.media.canPlayType(type) : false;\n }\n }, {\n key: \"getBufferedRange\",\n value: function getBufferedRange(buffered) {\n var range = [0, 0];\n if (!this.media) {\n return range;\n }\n if (!buffered) {\n buffered = this.media.buffered;\n }\n var currentTime = this.media.currentTime;\n if (buffered) {\n for (var i = 0, len = buffered.length; i < len; i++) {\n range[0] = buffered.start(i);\n range[1] = buffered.end(i);\n if (range[0] <= currentTime && currentTime <= range[1]) {\n break;\n }\n }\n }\n if (range[0] - currentTime <= 0 && currentTime - range[1] <= 0) {\n return range;\n } else {\n return [0, 0];\n }\n }\n }, {\n key: \"autoplay\",\n get: function get() {\n return this.media ? this.media.autoplay : false;\n },\n set: function set(isTrue) {\n this.media && (this.media.autoplay = isTrue);\n }\n }, {\n key: \"buffered\",\n get: function get() {\n return this.media ? this.media.buffered : null;\n }\n }, {\n key: \"buffered2\",\n get: function get() {\n return this.media && this.media.buffered ? util.getBuffered2(this.media.buffered) : null;\n }\n }, {\n key: \"bufferedPoint\",\n get: function get() {\n var ret = {\n start: 0,\n end: 0\n };\n if (!this.media) {\n return ret;\n }\n var _buffered = this.media.buffered;\n if (!_buffered || _buffered.length === 0) {\n return ret;\n }\n for (var i = 0; i < _buffered.length; i++) {\n if ((_buffered.start(i) <= this.currentTime || _buffered.start(i) < 0.1) && _buffered.end(i) >= this.currentTime) {\n return {\n start: _buffered.start(i),\n end: _buffered.end(i)\n };\n }\n }\n return ret;\n }\n }, {\n key: \"crossOrigin\",\n get: function get() {\n return this.media ? this.media.crossOrigin : \"\";\n },\n set: function set(isTrue) {\n this.media && (this.media.crossOrigin = isTrue);\n }\n }, {\n key: \"currentSrc\",\n get: function get() {\n return this.media ? this.media.currentSrc : \"\";\n },\n set: function set(src) {\n this.media && (this.media.currentSrc = src);\n }\n }, {\n key: \"currentTime\",\n get: function get() {\n if (!this.media) {\n return 0;\n }\n return this.media.currentTime !== void 0 ? this.media.currentTime : this._currentTime;\n },\n set: function set(time) {\n this.media && (this.media.currentTime = time);\n }\n }, {\n key: \"defaultMuted\",\n get: function get() {\n return this.media ? this.media.defaultMuted : false;\n },\n set: function set(isTrue) {\n this.media && (this.media.defaultMuted = isTrue);\n }\n }, {\n key: \"duration\",\n get: function get() {\n return this._duration;\n }\n }, {\n key: \"ended\",\n get: function get() {\n return this.media ? this.media.ended : false;\n }\n }, {\n key: \"error\",\n get: function get() {\n return this.media.error;\n }\n }, {\n key: \"errorNote\",\n get: function get() {\n var err = this.media.error;\n if (!err) {\n return \"\";\n }\n var status = [\"MEDIA_ERR_ABORTED\", \"MEDIA_ERR_NETWORK\", \"MEDIA_ERR_DECODE\", \"MEDIA_ERR_SRC_NOT_SUPPORTED\"];\n return status[this.media.error.code - 1];\n }\n }, {\n key: \"loop\",\n get: function get() {\n return this.media ? this.media.loop : false;\n },\n set: function set(isTrue) {\n this.media && (this.media.loop = isTrue);\n }\n }, {\n key: \"muted\",\n get: function get() {\n return this.media ? this.media.muted : false;\n },\n set: function set(isTrue) {\n if (!this.media || this.media.muted === isTrue) {\n return;\n }\n this._lastMuted = this.media.muted;\n this.media.muted = isTrue;\n }\n }, {\n key: \"networkState\",\n get: function get() {\n return this.media.networkState;\n }\n }, {\n key: \"paused\",\n get: function get() {\n return this.media ? this.media.paused : true;\n }\n }, {\n key: \"playbackRate\",\n get: function get() {\n return this.media ? this.media.playbackRate : 0;\n },\n set: function set(rate) {\n if (!this.media || rate === Infinity) {\n return;\n }\n this.media.defaultPlaybackRate = rate;\n this.media.playbackRate = rate;\n }\n }, {\n key: \"played\",\n get: function get() {\n return this.media ? this.media.played : null;\n }\n }, {\n key: \"preload\",\n get: function get() {\n return this.media ? this.media.preload : false;\n },\n set: function set(isTrue) {\n this.media && (this.media.preload = isTrue);\n }\n }, {\n key: \"readyState\",\n get: function get() {\n return this.media.readyState;\n }\n }, {\n key: \"seekable\",\n get: function get() {\n return this.media ? this.media.seekable : false;\n }\n }, {\n key: \"seeking\",\n get: function get() {\n return this.media ? this.media.seeking : false;\n }\n }, {\n key: \"src\",\n get: function get() {\n return this.media ? this.media.src : \"\";\n },\n set: function set(url) {\n if (!this.media) {\n return;\n }\n this.emit(URL_CHANGE, url);\n this.emit(WAITING);\n this._currentTime = 0;\n this._duration = 0;\n if (util.isMSE(this.media)) {\n this.onWaiting();\n return;\n }\n this._detachSourceEvents(this.media);\n if (util.typeOf(url) === \"Array\") {\n this._attachSourceEvents(this.media, url);\n } else if (url) {\n this.media.src = url;\n } else {\n this.media.removeAttribute(\"src\");\n }\n this.load();\n }\n }, {\n key: \"volume\",\n get: function get() {\n return this.media ? this.media.volume : 0;\n },\n set: function set(vol) {\n if (vol === Infinity || !this.media) {\n return;\n }\n this.media.volume = vol;\n }\n }, {\n key: \"addInnerOP\",\n value: function addInnerOP(event) {\n this._internalOp[event] = true;\n }\n }, {\n key: \"removeInnerOP\",\n value: function removeInnerOP(event) {\n delete this._internalOp[event];\n }\n }, {\n key: \"emit\",\n value: function emit(event, data) {\n var _get2;\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n (_get2 = _get(_getPrototypeOf(MediaProxy2.prototype), \"emit\", this)).call.apply(_get2, [this, event, data].concat(args));\n }\n }, {\n key: \"on\",\n value: function on(event, callback) {\n var _get3;\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n (_get3 = _get(_getPrototypeOf(MediaProxy2.prototype), \"on\", this)).call.apply(_get3, [this, event, callback].concat(args));\n }\n }, {\n key: \"once\",\n value: function once(event, callback) {\n var _get4;\n for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n args[_key3 - 2] = arguments[_key3];\n }\n (_get4 = _get(_getPrototypeOf(MediaProxy2.prototype), \"once\", this)).call.apply(_get4, [this, event, callback].concat(args));\n }\n }, {\n key: \"off\",\n value: function off(event, callback) {\n var _get5;\n for (var _len4 = arguments.length, args = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {\n args[_key4 - 2] = arguments[_key4];\n }\n (_get5 = _get(_getPrototypeOf(MediaProxy2.prototype), \"off\", this)).call.apply(_get5, [this, event, callback].concat(args));\n }\n }, {\n key: \"offAll\",\n value: function offAll() {\n _get(_getPrototypeOf(MediaProxy2.prototype), \"removeAllListeners\", this).call(this);\n }\n }]);\n return MediaProxy2;\n}(EventEmitter);\nexport { MediaProxy as default };\n","import { createClass as _createClass, classCallCheck as _classCallCheck } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nvar INDEXDB = /* @__PURE__ */ function() {\n function INDEXDB2() {\n var mydb = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {\n name: \"xgplayer\",\n version: 1,\n db: null,\n ojstore: {\n name: \"xg-m4a\",\n keypath: \"vid\"\n }\n };\n _classCallCheck(this, INDEXDB2);\n this.indexedDB = window.indexedDB || window.webkitindexedDB;\n this.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange;\n this.myDB = mydb;\n }\n _createClass(INDEXDB2, [{\n key: \"openDB\",\n value: function openDB(callback) {\n var _this = this;\n var self = this;\n var version = this.myDB.version || 1;\n var request = self.indexedDB.open(self.myDB.name, version);\n request.onerror = function(e) {\n };\n request.onsuccess = function(e) {\n _this.myDB.db = e.target.result;\n callback.call(self);\n };\n request.onupgradeneeded = function(e) {\n var db = e.target.result;\n e.target.transaction;\n if (!db.objectStoreNames.contains(self.myDB.ojstore.name)) {\n db.createObjectStore(self.myDB.ojstore.name, {\n keyPath: self.myDB.ojstore.keypath\n });\n }\n };\n }\n }, {\n key: \"deletedb\",\n value: function deletedb() {\n var self = this;\n self.indexedDB.deleteDatabase(this.myDB.name);\n }\n }, {\n key: \"closeDB\",\n value: function closeDB() {\n this.myDB.db.close();\n }\n }, {\n key: \"addData\",\n value: function addData(storename, data) {\n var store = this.myDB.db.transaction(storename, \"readwrite\").objectStore(storename);\n var request;\n for (var i = 0; i < data.length; i++) {\n request = store.add(data[i]);\n request.onerror = function() {\n };\n request.onsuccess = function() {\n };\n }\n }\n }, {\n key: \"putData\",\n value: function putData(storename, data) {\n var store = this.myDB.db.transaction(storename, \"readwrite\").objectStore(storename);\n var request;\n for (var i = 0; i < data.length; i++) {\n request = store.put(data[i]);\n request.onerror = function() {\n };\n request.onsuccess = function() {\n };\n }\n }\n }, {\n key: \"getDataByKey\",\n value: function getDataByKey(storename, key, callback) {\n var self = this;\n var store = this.myDB.db.transaction(storename, \"readwrite\").objectStore(storename);\n var request = store.get(key);\n request.onerror = function() {\n callback.call(self, null);\n };\n request.onsuccess = function(e) {\n var result = e.target.result;\n callback.call(self, result);\n };\n }\n }, {\n key: \"deleteData\",\n value: function deleteData(storename, key) {\n var store = this.myDB.db.transaction(storename, \"readwrite\").objectStore(storename);\n store.delete(key);\n }\n }, {\n key: \"clearData\",\n value: function clearData(storename) {\n var store = this.myDB.db.transaction(storename, \"readwrite\").objectStore(storename);\n store.clear();\n }\n }]);\n return INDEXDB2;\n}();\nexport { INDEXDB as default };\n","var FULLSCREEN_EVENTS = [\"fullscreenchange\", \"webkitfullscreenchange\", \"mozfullscreenchange\", \"MSFullscreenChange\"];\nvar GET_FULLSCREEN_API = [\"requestFullscreen\", \"webkitRequestFullscreen\", \"mozRequestFullScreen\", \"msRequestFullscreen\"];\nvar EXIT_FULLSCREEN_API = [\"exitFullscreen\", \"webkitExitFullscreen\", \"mozCancelFullScreen\", \"msExitFullscreen\"];\nvar PLATER_ID = \"data-xgplayerid\";\nexport { EXIT_FULLSCREEN_API, FULLSCREEN_EVENTS, GET_FULLSCREEN_API, PLATER_ID };\n","import { toConsumableArray as _toConsumableArray } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nfunction callHandler(obj, handler, next) {\n for (var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n args[_key - 3] = arguments[_key];\n }\n var ret = handler.call.apply(handler, [obj].concat(args));\n if (!next || typeof next !== \"function\") {\n return;\n }\n if (ret && ret.then) {\n ret.then(function() {\n for (var _len2 = arguments.length, args2 = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args2[_key2] = arguments[_key2];\n }\n next.call.apply(next, [obj].concat(args2));\n });\n } else {\n next.call.apply(next, [obj].concat(args));\n }\n}\nfunction hook(hookName, handler) {\n var preset = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {\n pre: null,\n next: null\n };\n if (!this.__hooks) {\n this.__hooks = {};\n }\n !this.__hooks[hookName] && (this.__hooks[hookName] = null);\n return function() {\n var _arguments = arguments, _this = this;\n if (preset.pre) {\n try {\n var _preset$pre;\n (_preset$pre = preset.pre).call.apply(_preset$pre, [this].concat(Array.prototype.slice.call(arguments)));\n } catch (e) {\n e.message = \"[pluginName: \".concat(this.pluginName, \":\").concat(hookName, \":pre error] >> \").concat(e.message);\n throw e;\n }\n }\n if (this.__hooks && this.__hooks[hookName]) {\n try {\n var _this$__hooks$hookNam;\n var preRet = (_this$__hooks$hookNam = this.__hooks[hookName]).call.apply(_this$__hooks$hookNam, [this, this].concat(Array.prototype.slice.call(arguments)));\n if (preRet) {\n if (preRet.then) {\n preRet.then(function(isContinue) {\n if (isContinue !== false) {\n callHandler.apply(void 0, [_this, handler, preset.next].concat(_toConsumableArray(_arguments)));\n }\n }).catch(function(e) {\n throw e;\n });\n } else {\n callHandler.apply(void 0, [this, handler, preset.next].concat(Array.prototype.slice.call(arguments)));\n }\n } else if (preRet === void 0) {\n callHandler.apply(void 0, [this, handler, preset.next].concat(Array.prototype.slice.call(arguments)));\n }\n } catch (e) {\n e.message = \"[pluginName: \".concat(this.pluginName, \":\").concat(hookName, \"] >> \").concat(e.message);\n throw e;\n }\n } else {\n callHandler.apply(void 0, [this, handler, preset.next].concat(Array.prototype.slice.call(arguments)));\n }\n }.bind(this);\n}\nfunction useHooks(hookName, handler) {\n var __hooks = this.__hooks;\n if (!__hooks) {\n return;\n }\n if (!__hooks.hasOwnProperty(hookName)) {\n console.warn(\"has no supported hook which name [\".concat(hookName, \"]\"));\n return false;\n }\n __hooks && (__hooks[hookName] = handler);\n return true;\n}\nfunction removeHooks(hookName, handler) {\n var __hooks = this.__hooks;\n if (!__hooks) {\n return;\n }\n delete __hooks[hookName];\n}\nfunction usePluginHooks(pluginName) {\n if (!this.plugins || !this.plugins[pluginName.toLowerCase()]) {\n return;\n }\n var plugin = this.plugins[pluginName.toLowerCase()];\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n return plugin.useHooks && plugin.useHooks.apply(plugin, args);\n}\nfunction removePluginHooks(pluginName) {\n if (!this.plugins || !this.plugins[pluginName.toLowerCase()]) {\n return;\n }\n var plugin = this.plugins[pluginName.toLowerCase()];\n if (plugin) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n return plugin.removeHooks && plugin.removeHooks.apply(plugin, args);\n }\n}\nfunction hooksDescriptor(instance) {\n var presetHooks = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];\n instance.__hooks = {};\n presetHooks && presetHooks.map(function(item) {\n instance.__hooks[item] = null;\n });\n Object.defineProperty(instance, \"hooks\", {\n get: function get() {\n return instance.__hooks && Object.keys(instance.__hooks).map(function(key) {\n if (instance.__hooks[key]) {\n return key;\n }\n });\n }\n });\n}\nfunction delHooksDescriptor(instance) {\n instance.__hooks = null;\n}\nfunction runHooks(obj, hookName, handler) {\n for (var _len5 = arguments.length, args = new Array(_len5 > 3 ? _len5 - 3 : 0), _key5 = 3; _key5 < _len5; _key5++) {\n args[_key5 - 3] = arguments[_key5];\n }\n if (obj.__hooks && obj.__hooks[hookName]) {\n var _obj$__hooks$hookName;\n var ret = (_obj$__hooks$hookName = obj.__hooks[hookName]).call.apply(_obj$__hooks$hookName, [obj, obj].concat(args));\n if (ret && ret.then) {\n ret.then(function(data) {\n return data === false ? null : handler.call.apply(handler, [obj, obj].concat(args));\n }).catch(function(e) {\n console.warn(\"[runHooks]\".concat(hookName, \" reject\"), e.message);\n });\n } else if (ret !== false) {\n return handler.call.apply(handler, [obj, obj].concat(args));\n }\n } else {\n return handler.call.apply(handler, [obj, obj].concat(args));\n }\n}\nexport { hooksDescriptor as default, delHooksDescriptor, hook, removeHooks, removePluginHooks, runHooks, useHooks, usePluginHooks };\n","import { createClass as _createClass, classCallCheck as _classCallCheck, objectSpread2 as _objectSpread2 } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../utils/util.js\";\nexport { default as Util } from \"../utils/util.js\";\nimport XG_DEBUG from \"../utils/debug.js\";\nexport { default as XG_DEBUG } from \"../utils/debug.js\";\nimport hooksDescriptor, { hook, useHooks, removeHooks, delHooksDescriptor } from \"./hooksDescriptor.js\";\nfunction showErrorMsg(pluginName, msg) {\n XG_DEBUG.logError(\"[\".concat(pluginName, \"] event or callback cant be undefined or null when call \").concat(msg));\n}\nvar BasePlugin = /* @__PURE__ */ function() {\n function BasePlugin2(args) {\n _classCallCheck(this, BasePlugin2);\n if (util.checkIsFunction(this.beforeCreate)) {\n this.beforeCreate(args);\n }\n hooksDescriptor(this);\n this.__args = args;\n this.__events = {};\n this.__onceEvents = {};\n this.config = args.config || {};\n this.player = null;\n this.playerConfig = {};\n this.pluginName = \"\";\n this.__init(args);\n }\n _createClass(BasePlugin2, [{\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n }\n }, {\n key: \"beforePlayerInit\",\n value: function beforePlayerInit() {\n }\n }, {\n key: \"onPluginsReady\",\n value: function onPluginsReady() {\n }\n }, {\n key: \"afterPlayerInit\",\n value: function afterPlayerInit() {\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n }\n }, {\n key: \"__init\",\n value: function __init(args) {\n this.player = args.player;\n this.playerConfig = args.player && args.player.config;\n this.pluginName = args.pluginName ? args.pluginName.toLowerCase() : this.constructor.pluginName.toLowerCase();\n this.logger = args.player && args.player.logger;\n }\n }, {\n key: \"updateLang\",\n value: function updateLang(lang) {\n if (!lang) {\n lang = this.lang;\n }\n }\n }, {\n key: \"lang\",\n get: function get() {\n return this.player.lang;\n }\n }, {\n key: \"i18n\",\n get: function get() {\n return this.player.i18n;\n }\n }, {\n key: \"i18nKeys\",\n get: function get() {\n return this.player.i18nKeys;\n }\n }, {\n key: \"domEventType\",\n get: function get() {\n var _e = util.checkTouchSupport() ? \"touch\" : \"mouse\";\n if (this.playerConfig && (this.playerConfig.domEventType === \"touch\" || this.playerConfig.domEventType === \"mouse\")) {\n _e = this.playerConfig.domEventType;\n }\n return _e;\n }\n }, {\n key: \"on\",\n value: function on(event, callback) {\n var _this = this;\n if (!event || !callback || !this.player) {\n showErrorMsg(this.pluginName, \"plugin.on(event, callback)\");\n return;\n }\n if (typeof event === \"string\") {\n this.__events[event] = callback;\n this.player.on(event, callback);\n } else if (Array.isArray(event)) {\n event.forEach(function(item) {\n _this.__events[item] = callback;\n _this.player.on(item, callback);\n });\n }\n }\n }, {\n key: \"once\",\n value: function once(event, callback) {\n var _this2 = this;\n if (!event || !callback || !this.player) {\n showErrorMsg(this.pluginName, \"plugin.once(event, callback)\");\n return;\n }\n if (typeof event === \"string\") {\n this.__onceEvents[event] = callback;\n this.player.once(event, callback);\n } else if (Array.isArray(event)) {\n event.forEach(function(item) {\n _this2.__onceEvents[item] = callback;\n _this2.player.once(event, callback);\n });\n }\n }\n }, {\n key: \"off\",\n value: function off(event, callback) {\n var _this3 = this;\n if (!event || !callback || !this.player) {\n showErrorMsg(this.pluginName, \"plugin.off(event, callback)\");\n return;\n }\n if (typeof event === \"string\") {\n delete this.__events[event];\n this.player.off(event, callback);\n } else if (Array.isArray(event)) {\n event.forEach(function(item) {\n delete _this3.__events[event];\n _this3.player.off(item, callback);\n });\n }\n }\n }, {\n key: \"offAll\",\n value: function offAll() {\n var _this4 = this;\n [\"__events\", \"__onceEvents\"].forEach(function(key) {\n Object.keys(_this4[key]).forEach(function(item) {\n _this4[key][item] && _this4.off(item, _this4[key][item]);\n item && delete _this4[key][item];\n });\n });\n this.__events = {};\n this.__onceEvents = {};\n }\n }, {\n key: \"emit\",\n value: function emit(event) {\n var _this$player;\n if (!this.player) {\n return;\n }\n for (var _len = arguments.length, res = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n res[_key - 1] = arguments[_key];\n }\n (_this$player = this.player).emit.apply(_this$player, [event].concat(res));\n }\n }, {\n key: \"emitUserAction\",\n value: function emitUserAction(event, action) {\n var params = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n if (!this.player) {\n return;\n }\n var nParams = _objectSpread2(_objectSpread2({}, params), {}, {\n pluginName: this.pluginName\n });\n this.player.emitUserAction(event, action, nParams);\n }\n }, {\n key: \"hook\",\n value: function hook$1(hookName, handler) {\n return hook.call.apply(hook, [this].concat(Array.prototype.slice.call(arguments)));\n }\n }, {\n key: \"useHooks\",\n value: function useHooks$1(hookName, handler) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n return useHooks.call.apply(useHooks, [this].concat(Array.prototype.slice.call(arguments)));\n }\n }, {\n key: \"removeHooks\",\n value: function removeHooks$1(hookName, handler) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n args[_key3 - 2] = arguments[_key3];\n }\n return removeHooks.call.apply(removeHooks, [this].concat(Array.prototype.slice.call(arguments)));\n }\n }, {\n key: \"registerPlugin\",\n value: function registerPlugin(plugin) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var name = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : \"\";\n if (!this.player) {\n return;\n }\n name && (options.pluginName = name);\n return this.player.registerPlugin({\n plugin,\n options\n });\n }\n }, {\n key: \"getPlugin\",\n value: function getPlugin(name) {\n return this.player ? this.player.getPlugin(name) : null;\n }\n }, {\n key: \"__destroy\",\n value: function __destroy() {\n var _this5 = this;\n var player = this.player;\n var pluginName = this.pluginName;\n this.offAll();\n util.clearAllTimers(this);\n if (util.checkIsFunction(this.destroy)) {\n this.destroy();\n }\n [\"player\", \"playerConfig\", \"pluginName\", \"logger\", \"__args\", \"__hooks\"].map(function(item) {\n _this5[item] = null;\n });\n player.unRegisterPlugin(pluginName);\n delHooksDescriptor(this);\n }\n }], [{\n key: \"defineGetterOrSetter\",\n value: function defineGetterOrSetter(Obj, map) {\n for (var key in map) {\n if (Object.prototype.hasOwnProperty.call(map, key)) {\n Object.defineProperty(Obj, key, map[key]);\n }\n }\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {};\n }\n }, {\n key: \"pluginName\",\n get: function get() {\n return \"pluginName\";\n }\n }]);\n return BasePlugin2;\n}();\nexport { BasePlugin as default };\n","var DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' &&\n element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n","var closest = require('./closest');\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n","import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, get as _get, getPrototypeOf as _getPrototypeOf, typeof as _typeof } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport BasePlugin from \"./basePlugin.js\";\nimport _delegate from \"delegate\";\nimport XG_DEBUG from \"../utils/debug.js\";\nimport util from \"../utils/util.js\";\nvar ROOT_TYPES = {\n CONTROLS: \"controls\",\n ROOT: \"root\"\n};\nvar POSITIONS = {\n ROOT: \"root\",\n ROOT_LEFT: \"rootLeft\",\n ROOT_RIGHT: \"rootRight\",\n ROOT_TOP: \"rootTop\",\n CONTROLS_LEFT: \"controlsLeft\",\n CONTROLS_RIGTH: \"controlsRight\",\n CONTROLS_RIGHT: \"controlsRight\",\n CONTROLS_CENTER: \"controlsCenter\",\n CONTROLS: \"controls\"\n};\nfunction isUrl(str) {\n if (!str) {\n return false;\n }\n return str.indexOf && /^(?:http|data:|\\/)/.test(str);\n}\nfunction mergeIconClass(icon, classname) {\n if (_typeof(icon) === \"object\" && icon.class && typeof icon.class === \"string\") {\n return \"\".concat(classname, \" \").concat(icon.class);\n }\n return classname;\n}\nfunction mergeIconAttr(icon, attr) {\n if (_typeof(icon) === \"object\" && icon.attr && _typeof(icon.attr) === \"object\") {\n Object.keys(icon.attr).map(function(key) {\n attr[key] = icon.attr[key];\n });\n }\n return attr;\n}\nfunction createIcon(icon, key) {\n var classname = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : \"\";\n var attr = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};\n var pluginName = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : \"\";\n var newIcon = null;\n if (icon instanceof window.Element) {\n util.addClass(icon, classname);\n Object.keys(attr).map(function(key2) {\n icon.setAttribute(key2, attr[key2]);\n });\n return icon;\n }\n if (isUrl(icon) || isUrl(icon.url)) {\n attr.src = isUrl(icon) ? icon : icon.url || \"\";\n newIcon = util.createDom(icon.tag || \"img\", \"\", attr, \"xg-img \".concat(classname));\n return newIcon;\n }\n if (typeof icon === \"function\") {\n try {\n newIcon = icon();\n if (newIcon instanceof window.Element) {\n util.addClass(newIcon, classname);\n Object.keys(attr).map(function(key2) {\n newIcon.setAttribute(key2, attr[key2]);\n });\n return newIcon;\n } else {\n XG_DEBUG.logWarn(\"warn>>icons.\".concat(key, \" in config of plugin named [\").concat(pluginName, \"] is a function mast return an Element Object\"));\n }\n return null;\n } catch (e) {\n XG_DEBUG.logError(\"Plugin named [\".concat(pluginName, \"]:createIcon\"), e);\n return null;\n }\n }\n if (typeof icon === \"string\") {\n return util.createDomFromHtml(icon, attr, classname);\n }\n XG_DEBUG.logWarn(\"warn>>icons.\".concat(key, \" in config of plugin named [\").concat(pluginName, \"] is invalid\"));\n return null;\n}\nfunction registerIconsObj(iconsConfig, plugin) {\n var _icons = plugin.config.icons || plugin.playerConfig.icons;\n Object.keys(iconsConfig).map(function(key) {\n var orgIcon = iconsConfig[key];\n var classname = orgIcon && orgIcon.class ? orgIcon.class : \"\";\n var attr = orgIcon && orgIcon.attr ? orgIcon.attr : {};\n var newIcon = null;\n if (_icons && _icons[key]) {\n classname = mergeIconClass(_icons[key], classname);\n attr = mergeIconAttr(_icons[key], attr);\n newIcon = createIcon(_icons[key], key, classname, attr, plugin.pluginName);\n }\n if (!newIcon && orgIcon) {\n newIcon = createIcon(orgIcon.icon ? orgIcon.icon : orgIcon, attr, classname, {}, plugin.pluginName);\n }\n plugin.icons[key] = newIcon;\n });\n}\nfunction registerTextObj(textConfig, plugin) {\n Object.keys(textConfig).map(function(key) {\n Object.defineProperty(plugin.langText, key, {\n get: function get() {\n var lang = plugin.lang, i18n = plugin.i18n;\n if (i18n[key]) {\n return i18n[key];\n } else {\n return textConfig[key] ? textConfig[key][lang] || \"\" : \"\";\n }\n }\n });\n });\n}\nvar Plugin = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(Plugin2, _BasePlugin);\n var _super = _createSuper(Plugin2);\n function Plugin2() {\n var _this;\n var args = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n _classCallCheck(this, Plugin2);\n _this = _super.call(this, args);\n _this.__delegates = [];\n return _this;\n }\n _createClass(Plugin2, [{\n key: \"__init\",\n value: function __init(args) {\n _get(_getPrototypeOf(Plugin2.prototype), \"__init\", this).call(this, args);\n if (!args.root) {\n return;\n }\n var _parent = args.root;\n var _el = null;\n this.icons = {};\n this.root = null;\n this.parent = null;\n var _orgicons = this.registerIcons() || {};\n registerIconsObj(_orgicons, this);\n this.langText = {};\n var defaultTexConfig = this.registerLanguageTexts() || {};\n registerTextObj(defaultTexConfig, this);\n var renderStr = \"\";\n try {\n renderStr = this.render();\n } catch (e) {\n XG_DEBUG.logError(\"Plugin:\".concat(this.pluginName, \":render\"), e);\n throw new Error(\"Plugin:\".concat(this.pluginName, \":render:\").concat(e.message));\n }\n if (renderStr) {\n _el = Plugin2.insert(renderStr, _parent, args.index);\n _el.setAttribute(\"data-index\", args.index);\n } else if (args.tag) {\n _el = util.createDom(args.tag, \"\", args.attr, args.name);\n _el.setAttribute(\"data-index\", args.index);\n _parent.appendChild(_el);\n } else {\n return;\n }\n this.root = _el;\n this.parent = _parent;\n var attr = this.config.attr || {};\n var style = this.config.style || {};\n this.setAttr(attr);\n this.setStyle(style);\n if (this.config.index) {\n this.root.setAttribute(\"data-index\", this.config.index);\n }\n this.__registerChildren();\n }\n }, {\n key: \"__registerChildren\",\n value: function __registerChildren() {\n var _this2 = this;\n if (!this.root) {\n return;\n }\n this._children = [];\n var children = this.children();\n if (children && _typeof(children) === \"object\") {\n if (Object.keys(children).length > 0) {\n Object.keys(children).map(function(item) {\n var name = item;\n var _plugin = children[name];\n var options = {\n root: _this2.root\n };\n var config, _Plugin;\n if (typeof _plugin === \"function\") {\n config = _this2.config[name] || {};\n _Plugin = _plugin;\n } else if (_typeof(_plugin) === \"object\" && typeof _plugin.plugin === \"function\") {\n config = _plugin.options ? util.deepCopy(_this2.config[name] || {}, _plugin.options) : _this2.config[name] || {};\n _Plugin = _plugin.plugin;\n }\n options.config = config;\n config.index !== void 0 && (options.index = config.index);\n config.root && (options.root = config.root);\n _this2.registerPlugin(_Plugin, options, name);\n });\n }\n }\n }\n }, {\n key: \"updateLang\",\n value: function updateLang(lang) {\n if (!lang) {\n lang = this.lang;\n }\n function checkChildren(node, callback) {\n for (var i = 0; i < node.children.length; i++) {\n if (node.children[i].children.length > 0) {\n checkChildren(node.children[i], callback);\n } else {\n callback(node.children[i]);\n }\n }\n }\n var root = this.root, i18n = this.i18n, langText = this.langText;\n if (root) {\n checkChildren(root, function(node) {\n var langKey = node.getAttribute && node.getAttribute(\"lang-key\");\n if (!langKey) {\n return;\n }\n var langTextShow = i18n[langKey.toUpperCase()] || langText[langKey];\n if (langTextShow) {\n node.innerHTML = typeof langTextShow === \"function\" ? langTextShow(lang) : langTextShow;\n }\n });\n }\n }\n }, {\n key: \"lang\",\n get: function get() {\n return this.player.lang;\n }\n }, {\n key: \"changeLangTextKey\",\n value: function changeLangTextKey(dom) {\n var key = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"\";\n var i18n = this.i18n || {};\n var langText = this.langText;\n dom.setAttribute && dom.setAttribute(\"lang-key\", key);\n var text = i18n[key] || langText[key] || \"\";\n if (text) {\n dom.innerHTML = text;\n }\n }\n }, {\n key: \"plugins\",\n value: function plugins() {\n return this._children;\n }\n }, {\n key: \"children\",\n value: function children() {\n return {};\n }\n }, {\n key: \"registerPlugin\",\n value: function registerPlugin(plugin) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var name = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : \"\";\n options.root = options.root || this.root;\n var _c = _get(_getPrototypeOf(Plugin2.prototype), \"registerPlugin\", this).call(this, plugin, options, name);\n this._children.push(_c);\n return _c;\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {};\n }\n }, {\n key: \"registerLanguageTexts\",\n value: function registerLanguageTexts() {\n return {};\n }\n }, {\n key: \"find\",\n value: function find(qs) {\n if (!this.root) {\n return;\n }\n return this.root.querySelector(qs);\n }\n }, {\n key: \"bind\",\n value: function bind(querySelector, eventType, callback) {\n var _this3 = this;\n if (arguments.length < 3 && typeof eventType === \"function\") {\n if (Array.isArray(querySelector)) {\n querySelector.forEach(function(item) {\n _this3.bindEL(item, eventType);\n });\n } else {\n this.bindEL(querySelector, eventType);\n }\n } else {\n var ret = Plugin2.delegate.call(this, this.root, querySelector, eventType, callback);\n this.__delegates = this.__delegates.concat(ret);\n }\n }\n }, {\n key: \"unbind\",\n value: function unbind(querySelector, eventType) {\n var _this4 = this;\n if (arguments.length < 3 && typeof eventType === \"function\") {\n if (Array.isArray(querySelector)) {\n querySelector.forEach(function(item) {\n _this4.unbindEL(item, eventType);\n });\n } else {\n this.unbindEL(querySelector, eventType);\n }\n } else {\n var key = \"\".concat(querySelector, \"_\").concat(eventType);\n for (var i = 0; i < this.__delegates.length; i++) {\n if (this.__delegates[i].key === key) {\n this.__delegates[i].destroy();\n this.__delegates.splice(i, 1);\n break;\n }\n }\n }\n }\n }, {\n key: \"setStyle\",\n value: function setStyle(name, value) {\n var _this5 = this;\n if (!this.root) {\n return;\n }\n if (util.typeOf(name) === \"String\") {\n return this.root.style[name] = value;\n } else if (util.typeOf(name) === \"Object\") {\n Object.keys(name).map(function(key) {\n _this5.root.style[key] = name[key];\n });\n }\n }\n }, {\n key: \"setAttr\",\n value: function setAttr(name, value) {\n var _this6 = this;\n if (!this.root) {\n return;\n }\n if (util.typeOf(name) === \"String\") {\n return this.root.setAttribute(name, value);\n } else if (util.typeOf(name) === \"Object\") {\n Object.keys(name).map(function(key) {\n _this6.root.setAttribute(key, name[key]);\n });\n }\n }\n }, {\n key: \"setHtml\",\n value: function setHtml(htmlStr, callback) {\n if (!this.root) {\n return;\n }\n this.root.innerHTML = htmlStr;\n if (typeof callback === \"function\") {\n callback();\n }\n }\n }, {\n key: \"bindEL\",\n value: function bindEL(event, eventHandle) {\n var isBubble = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n if (!this.root) {\n return;\n }\n if (\"on\".concat(event) in this.root && typeof eventHandle === \"function\") {\n this.root.addEventListener(event, eventHandle, isBubble);\n }\n }\n }, {\n key: \"unbindEL\",\n value: function unbindEL(event, eventHandle) {\n var isBubble = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n if (!this.root) {\n return;\n }\n if (\"on\".concat(event) in this.root && typeof eventHandle === \"function\") {\n this.root.removeEventListener(event, eventHandle, isBubble);\n }\n }\n }, {\n key: \"show\",\n value: function show(value) {\n if (!this.root) {\n return;\n }\n this.root.style.display = value !== void 0 ? value : \"block\";\n var cs = window.getComputedStyle(this.root, null);\n var cssDisplayValue = cs.getPropertyValue(\"display\");\n if (cssDisplayValue === \"none\") {\n return this.root.style.display = \"block\";\n }\n }\n }, {\n key: \"hide\",\n value: function hide() {\n this.root && (this.root.style.display = \"none\");\n }\n }, {\n key: \"appendChild\",\n value: function appendChild(pdom, child) {\n if (!this.root) {\n return null;\n }\n if (arguments.length < 2 && arguments[0] instanceof window.Element) {\n return this.root.appendChild(arguments[0]);\n }\n if (!child || !(child instanceof window.Element)) {\n return null;\n }\n try {\n if (typeof pdom === \"string\") {\n return this.find(pdom).appendChild(child);\n } else {\n return pdom.appendChild(child);\n }\n } catch (err) {\n XG_DEBUG.logError(\"Plugin:appendChild\", err);\n return null;\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return \"\";\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n }\n }, {\n key: \"__destroy\",\n value: function __destroy() {\n var _this7 = this;\n var player = this.player;\n this.__delegates.map(function(item) {\n item.destroy();\n });\n this.__delegates = [];\n if (this._children instanceof Array) {\n this._children.map(function(item) {\n player.unRegisterPlugin(item.pluginName);\n });\n this._children = null;\n }\n if (this.root) {\n if (this.root.hasOwnProperty(\"remove\")) {\n this.root.remove();\n } else if (this.root.parentNode) {\n this.root.parentNode.removeChild(this.root);\n }\n }\n _get(_getPrototypeOf(Plugin2.prototype), \"__destroy\", this).call(this);\n this.icons = {};\n [\"root\", \"parent\"].map(function(item) {\n _this7[item] = null;\n });\n }\n }], [{\n key: \"insert\",\n value: function insert(html, parent) {\n var index = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;\n var len = parent.children.length;\n var insertIdx = Number(index);\n var isDomElement = html instanceof window.Node;\n if (len) {\n var i = 0;\n var coordinate = null;\n var mode = \"\";\n for (; i < len; i++) {\n coordinate = parent.children[i];\n var curIdx = Number(coordinate.getAttribute(\"data-index\"));\n if (curIdx >= insertIdx) {\n mode = \"beforebegin\";\n break;\n } else if (curIdx < insertIdx) {\n mode = \"afterend\";\n }\n }\n if (isDomElement) {\n if (mode === \"afterend\") {\n parent.appendChild(html);\n } else {\n parent.insertBefore(html, coordinate);\n }\n } else {\n coordinate.insertAdjacentHTML(mode, html);\n }\n return mode === \"afterend\" ? parent.children[parent.children.length - 1] : parent.children[i];\n } else {\n isDomElement ? parent.appendChild(html) : parent.insertAdjacentHTML(\"beforeend\", html);\n return parent.children[parent.children.length - 1];\n }\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {};\n }\n }, {\n key: \"delegate\",\n value: function delegate(root, querySelector, eventType, callback) {\n var capture = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false;\n var dels = [];\n if (root instanceof window.Node && typeof callback === \"function\") {\n if (Array.isArray(eventType)) {\n eventType.forEach(function(item) {\n var ret2 = _delegate(root, querySelector, item, callback, capture);\n ret2.key = \"\".concat(querySelector, \"_\").concat(item);\n dels.push(ret2);\n });\n } else {\n var ret = _delegate(root, querySelector, eventType, callback, capture);\n ret.key = \"\".concat(querySelector, \"_\").concat(eventType);\n dels.push(ret);\n }\n }\n return dels;\n }\n }, {\n key: \"ROOT_TYPES\",\n get: function get() {\n return ROOT_TYPES;\n }\n }, {\n key: \"POSITIONS\",\n get: function get() {\n return POSITIONS;\n }\n }]);\n return Plugin2;\n}(BasePlugin);\nexport { POSITIONS, ROOT_TYPES, Plugin as default };\n","import { createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport { throttle } from \"../utils/util.js\";\nimport { PLATER_ID } from \"../constant.js\";\nvar ResizeObserver = /* @__PURE__ */ function() {\n function ResizeObserver2() {\n var _this = this;\n _classCallCheck(this, ResizeObserver2);\n _defineProperty(this, \"__trigger\", function(entries) {\n var t = new Date().getTime();\n _this.timeStamp = t;\n for (var i = 0; i < entries.length; i++) {\n _this.__runHandler(entries[i].target);\n }\n });\n this.__handlers = [];\n this.timeStamp = 0;\n this.observer = null;\n if (!window.ResizeObserver) {\n return;\n }\n try {\n this.observer = new window.ResizeObserver(throttle(this.__trigger, 100, {\n trailing: true\n }));\n this.timeStamp = new Date().getTime();\n } catch (e) {\n console.error(e);\n }\n }\n _createClass(ResizeObserver2, [{\n key: \"addObserver\",\n value: function addObserver2(target, handler) {\n if (!this.observer) {\n return;\n }\n this.observer && this.observer.observe(target);\n var _pid = target.getAttribute(PLATER_ID);\n var __handlers = this.__handlers;\n var index = -1;\n for (var i = 0; i < __handlers.length; i++) {\n if (__handlers[i] && target === __handlers[i].target) {\n index = i;\n }\n }\n if (index > -1) {\n this.__handlers[index].handler = handler;\n } else {\n this.__handlers.push({\n target,\n handler,\n playerId: _pid\n });\n }\n }\n }, {\n key: \"unObserver\",\n value: function unObserver2(target) {\n var i = -1;\n this.__handlers.map(function(item, index) {\n if (target === item.target) {\n i = index;\n }\n });\n try {\n this.observer && this.observer.unobserve(target);\n } catch (e) {\n }\n this.observer && this.observer.unobserve(target);\n i > -1 && this.__handlers.splice(i, 1);\n }\n }, {\n key: \"destroyObserver\",\n value: function destroyObserver() {\n this.observer && this.observer.disconnect();\n this.observer = null;\n this.__handlers = null;\n }\n }, {\n key: \"__runHandler\",\n value: function __runHandler(target) {\n var __handlers = this.__handlers;\n for (var i = 0; i < __handlers.length; i++) {\n if (__handlers[i] && target === __handlers[i].target) {\n try {\n __handlers[i].handler(target);\n } catch (error) {\n console.error(error);\n }\n return true;\n }\n }\n return false;\n }\n }]);\n return ResizeObserver2;\n}();\nvar resizeObserver = null;\nfunction addObserver(target, handler) {\n if (!resizeObserver) {\n resizeObserver = new ResizeObserver();\n }\n resizeObserver.addObserver(target, handler);\n return resizeObserver;\n}\nfunction unObserver(target, handler) {\n resizeObserver.unObserver(target, handler);\n}\nexport { addObserver, unObserver };\n","import { addObserver, unObserver } from \"./resizeObserver.js\";\nimport util from \"../utils/util.js\";\nvar pluginsManager = {\n pluginGroup: {},\n init: function init(player) {\n var cgid = player._pluginInfoId;\n if (!cgid) {\n cgid = new Date().getTime();\n player._pluginInfoId = cgid;\n }\n !player.config.closeResizeObserver && addObserver(player.root, function() {\n player.resize();\n });\n if (Object.keys(this.pluginGroup).length === 0) {\n player.isUserActive = true;\n }\n this.pluginGroup[cgid] = {\n _player: player,\n _originalOptions: player.config || {},\n _plugins: {}\n };\n },\n checkPlayerRoot: function checkPlayerRoot(root) {\n if (this.pluginGroup) {\n var _keys = Object.keys(this.pluginGroup);\n for (var i = 0; i < _keys.length; i++) {\n var _p = this.pluginGroup[_keys[i]]._player;\n if (_p.root === root) {\n return _p;\n }\n }\n return null;\n }\n return null;\n },\n formatPluginInfo: function formatPluginInfo(plugin, config) {\n var PLUFGIN = null;\n var options = null;\n if (plugin.plugin && typeof plugin.plugin === \"function\") {\n PLUFGIN = plugin.plugin;\n options = plugin.options;\n } else {\n PLUFGIN = plugin;\n options = {};\n }\n if (config) {\n options.config = config || {};\n }\n return {\n PLUFGIN,\n options\n };\n },\n checkPluginIfExits: function checkPluginIfExits(pluginName, plugins) {\n for (var i = 0; i < plugins.length; i++) {\n if (pluginName.toLowerCase() === plugins[i].pluginName.toLowerCase()) {\n return true;\n }\n }\n return false;\n },\n getRootByConfig: function getRootByConfig(pluginName, playerConfig) {\n var keys = Object.keys(playerConfig);\n var _pConfig = null;\n for (var i = 0; i < keys.length; i++) {\n if (pluginName.toLowerCase() === keys[i].toLowerCase()) {\n _pConfig = playerConfig[keys[i]];\n break;\n }\n }\n if (util.typeOf(_pConfig) === \"Object\") {\n return {\n root: _pConfig.root,\n position: _pConfig.position\n };\n }\n return {};\n },\n lazyRegister: function lazyRegister(player, lazyPlugin) {\n var _this = this;\n var timeout = lazyPlugin.timeout || 1500;\n return Promise.race([lazyPlugin.loader().then(function(plugin) {\n var result;\n if (plugin && plugin.__esModule) {\n result = plugin.default;\n } else {\n result = plugin;\n }\n _this.register(player, result, plugin.options);\n }), new Promise(function(resolve, reject) {\n setTimeout(function() {\n reject(new Error(\"timeout\"));\n }, timeout);\n })]);\n },\n register: function register(player, plugin) {\n var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n if (!player || !plugin || typeof plugin !== \"function\" || plugin.prototype === void 0) {\n return;\n }\n var cgid = player._pluginInfoId;\n if (!cgid || !this.pluginGroup[cgid]) {\n return;\n }\n if (!this.pluginGroup[cgid]._plugins) {\n this.pluginGroup[cgid]._plugins = {};\n }\n var plugins = this.pluginGroup[cgid]._plugins;\n var originalOptions = this.pluginGroup[cgid]._originalOptions;\n options.player = this.pluginGroup[cgid]._player;\n var pluginName = options.pluginName || plugin.pluginName;\n if (!pluginName) {\n throw new Error(\"The property pluginName is necessary\");\n }\n if (plugin.isSupported && !plugin.isSupported(player.config.mediaType, player.config.codecType)) {\n console.warn(\"not supported plugin [\".concat(pluginName, \"]\"));\n return;\n }\n if (!options.config) {\n options.config = {};\n }\n var keys = Object.keys(originalOptions);\n for (var i = 0; i < keys.length; i++) {\n if (pluginName.toLowerCase() === keys[i].toLowerCase()) {\n var config = originalOptions[keys[i]];\n if (util.typeOf(config) === \"Object\") {\n options.config = Object.assign({}, options.config, originalOptions[keys[i]]);\n } else if (util.typeOf(config) === \"Boolean\") {\n options.config.disable = !config;\n }\n break;\n }\n }\n if (plugin.defaultConfig) {\n Object.keys(plugin.defaultConfig).forEach(function(key) {\n if (typeof options.config[key] === \"undefined\") {\n options.config[key] = plugin.defaultConfig[key];\n }\n });\n }\n if (!options.root) {\n options.root = player.root;\n } else if (typeof options.root === \"string\") {\n options.root = player[options.root];\n }\n options.index = options.config.index || 0;\n try {\n if (plugins[pluginName.toLowerCase()]) {\n this.unRegister(cgid, pluginName.toLowerCase());\n console.warn(\"the is one plugin with same pluginName [\".concat(pluginName, \"] exist, destroy the old instance\"));\n }\n var _instance = new plugin(options);\n plugins[pluginName.toLowerCase()] = _instance;\n plugins[pluginName.toLowerCase()].func = plugin;\n if (_instance && typeof _instance.afterCreate === \"function\") {\n _instance.afterCreate();\n }\n return _instance;\n } catch (err) {\n console.error(err);\n throw err;\n }\n },\n unRegister: function unRegister(cgid, name) {\n if (cgid._pluginInfoId) {\n cgid = cgid._pluginInfoId;\n }\n name = name.toLowerCase();\n try {\n var plugin = this.pluginGroup[cgid]._plugins[name];\n if (plugin) {\n plugin.pluginName && plugin.__destroy();\n delete this.pluginGroup[cgid]._plugins[name];\n }\n } catch (e) {\n console.error(\"[unRegister:\".concat(name, \"] cgid:[\").concat(cgid, \"] error\"), e);\n }\n },\n deletePlugin: function deletePlugin(player, name) {\n var cgid = player._pluginInfoId;\n if (cgid && this.pluginGroup[cgid] && this.pluginGroup[cgid]._plugins) {\n delete this.pluginGroup[cgid]._plugins[name];\n }\n },\n getPlugins: function getPlugins(player) {\n var cgid = player._pluginInfoId;\n return cgid && this.pluginGroup[cgid] ? this.pluginGroup[cgid]._plugins : {};\n },\n findPlugin: function findPlugin(player, name) {\n var cgid = player._pluginInfoId;\n if (!cgid || !this.pluginGroup[cgid]) {\n return null;\n }\n var cName = name.toLowerCase();\n return this.pluginGroup[cgid]._plugins[cName];\n },\n beforeInit: function beforeInit(player) {\n var _this2 = this;\n function retPromise(fun) {\n if (!fun || !fun.then) {\n return new Promise(function(resolve) {\n resolve();\n });\n } else {\n return fun;\n }\n }\n return new Promise(function(resolve) {\n if (!_this2.pluginGroup) {\n return;\n }\n var prevTask;\n if (player._loadingPlugins && player._loadingPlugins.length) {\n prevTask = Promise.all(player._loadingPlugins);\n } else {\n prevTask = Promise.resolve();\n }\n return prevTask.then(function() {\n var cgid = player._pluginInfoId;\n if (!_this2.pluginGroup[cgid]) {\n resolve();\n return;\n }\n var plugins = _this2.pluginGroup[cgid]._plugins;\n var pluginsRet = [];\n Object.keys(plugins).forEach(function(pName) {\n if (plugins[pName] && plugins[pName].beforePlayerInit) {\n try {\n var ret = plugins[pName].beforePlayerInit();\n pluginsRet.push(retPromise(ret));\n } catch (e) {\n pluginsRet.push(retPromise(null));\n throw e;\n }\n }\n });\n Promise.all([].concat(pluginsRet)).then(function() {\n resolve();\n }).catch(function(e) {\n console.error(e);\n resolve();\n });\n });\n });\n },\n afterInit: function afterInit(player) {\n var cgid = player._pluginInfoId;\n if (!cgid || !this.pluginGroup[cgid]) {\n return;\n }\n var plugins = this.pluginGroup[cgid]._plugins;\n Object.keys(plugins).forEach(function(pName) {\n if (plugins[pName] && plugins[pName].afterPlayerInit) {\n plugins[pName].afterPlayerInit();\n }\n });\n },\n setLang: function setLang(lang, player) {\n var cgid = player._pluginInfoId;\n if (!cgid || !this.pluginGroup[cgid]) {\n return;\n }\n var plugins = this.pluginGroup[cgid]._plugins;\n Object.keys(plugins).forEach(function(item) {\n if (plugins[item].updateLang) {\n plugins[item].updateLang(lang);\n } else {\n try {\n plugins[item].lang = lang;\n } catch (error) {\n console.warn(\"\".concat(item, \" setLang\"));\n }\n }\n });\n },\n reRender: function reRender(player) {\n var _this3 = this;\n var cgid = player._pluginInfoId;\n if (!cgid || !this.pluginGroup[cgid]) {\n return;\n }\n var _pList = [];\n var plugins = this.pluginGroup[cgid]._plugins;\n Object.keys(plugins).forEach(function(pName) {\n if (pName !== \"controls\" && plugins[pName]) {\n _pList.push({\n plugin: plugins[pName].func,\n options: plugins[pName].__args\n });\n _this3.unRegister(cgid, pName);\n }\n });\n _pList.forEach(function(item) {\n _this3.register(player, item.plugin, item.options);\n });\n },\n onPluginsReady: function onPluginsReady(player) {\n var cgid = player._pluginInfoId;\n if (!cgid || !this.pluginGroup[cgid]) {\n return;\n }\n var plugins = this.pluginGroup[cgid]._plugins || {};\n Object.keys(plugins).forEach(function(key) {\n if (plugins[key].onPluginsReady && typeof plugins[key].onPluginsReady === \"function\") {\n plugins[key].onPluginsReady();\n }\n });\n },\n setCurrentUserActive: function setCurrentUserActive(playerId, isActive) {\n if (!this.pluginGroup[playerId]) {\n return;\n }\n if (!isActive) {\n this.pluginGroup[playerId]._player.isUserActive = isActive;\n return playerId;\n }\n var keys = Object.keys(this.pluginGroup);\n for (var i = 0; i < keys.length; i++) {\n var c = this.pluginGroup[keys[i]];\n if (c && c._player) {\n this.pluginGroup[keys[i]]._player.isUserActive = false;\n }\n }\n this.pluginGroup[playerId]._player.isUserActive = isActive;\n return playerId;\n },\n getCurrentUseActiveId: function getCurrentUseActiveId() {\n if (!this.pluginGroup) {\n return;\n }\n var keys = Object.keys(this.pluginGroup);\n for (var i = 0; i < keys.length; i++) {\n var c = this.pluginGroup[keys[i]];\n if (c && c._player && c._player.isUserActive) {\n return keys[i];\n }\n }\n return null;\n },\n destroy: function destroy(player) {\n var cgid = player._pluginInfoId;\n if (!this.pluginGroup[cgid]) {\n return;\n }\n unObserver(player.root);\n var plugins = this.pluginGroup[cgid]._plugins;\n for (var _i = 0, _Object$keys = Object.keys(plugins); _i < _Object$keys.length; _i++) {\n var item = _Object$keys[_i];\n this.unRegister(cgid, item);\n }\n var _isUseActive = player.isUseActive;\n delete this.pluginGroup[cgid];\n delete player._pluginInfoId;\n if (_isUseActive) {\n var keys = Object.keys(this.pluginGroup);\n if (keys.length > 0) {\n this.setCurrentUserActive(keys[keys.length - 1], true);\n }\n }\n }\n};\nexport { pluginsManager as default };\n","var STATE_CLASS = {\n DEFAULT: \"xgplayer\",\n DEFAULT_SKIN: \"xgplayer-skin-default\",\n ENTER: \"xgplayer-is-enter\",\n PAUSED: \"xgplayer-pause\",\n PLAYING: \"xgplayer-playing\",\n ENDED: \"xgplayer-ended\",\n CANPLAY: \"xgplayer-canplay\",\n LOADING: \"xgplayer-isloading\",\n ERROR: \"xgplayer-is-error\",\n REPLAY: \"xgplayer-replay\",\n NO_START: \"xgplayer-nostart\",\n ACTIVE: \"xgplayer-active\",\n INACTIVE: \"xgplayer-inactive\",\n FULLSCREEN: \"xgplayer-is-fullscreen\",\n CSS_FULLSCREEN: \"xgplayer-is-cssfullscreen\",\n ROTATE_FULLSCREEN: \"xgplayer-rotate-fullscreen\",\n PARENT_ROTATE_FULLSCREEN: \"xgplayer-rotate-parent\",\n PARENT_FULLSCREEN: \"xgplayer-fullscreen-parent\",\n INNER_FULLSCREEN: \"xgplayer-fullscreen-inner\",\n NO_CONTROLS: \"no-controls\",\n FLEX_CONTROLS: \"flex-controls\",\n CONTROLS_FOLLOW: \"controls-follow\",\n CONTROLS_AUTOHIDE: \"controls-autohide\",\n TOP_BAR_AUTOHIDE: \"top-bar-autohide\",\n NOT_ALLOW_AUTOPLAY: \"not-allow-autoplay\",\n SEEKING: \"seeking\",\n PC: \"xgplayer-pc\",\n MOBILE: \"xgplayer-mobile\",\n MINI: \"xgplayer-mini\"\n};\nexport { STATE_CLASS as default };\n","import { getLang } from \"./utils/util.js\";\nfunction getDefaultConfig() {\n return {\n id: \"\",\n el: null,\n url: \"\",\n domEventType: \"default\",\n nullUrlStart: false,\n width: 600,\n height: 337.5,\n fluid: false,\n fitVideoSize: \"fixed\",\n videoFillMode: \"auto\",\n volume: 0.6,\n autoplay: false,\n autoplayMuted: false,\n loop: false,\n isLive: false,\n zoom: 1,\n videoInit: true,\n poster: \"\",\n isMobileSimulateMode: false,\n defaultPlaybackRate: 1,\n execBeforePluginsCall: null,\n allowSeekAfterEnded: true,\n enableContextmenu: true,\n closeVideoClick: false,\n closeVideoDblclick: false,\n closePlayerBlur: false,\n closeDelayBlur: false,\n leavePlayerTime: 3e3,\n closePlayVideoFocus: false,\n closePauseVideoFocus: false,\n closeFocusVideoFocus: true,\n closeControlsBlur: true,\n topBarAutoHide: true,\n videoAttributes: {},\n startTime: 0,\n seekedStatus: \"play\",\n miniprogress: false,\n disableSwipeHandler: function disableSwipeHandler() {\n },\n enableSwipeHandler: function enableSwipeHandler() {\n },\n preProcessUrl: null,\n ignores: [],\n whitelist: [],\n inactive: 3e3,\n lang: getLang(),\n controls: true,\n marginControls: false,\n fullscreenTarget: null,\n screenShot: false,\n rotate: false,\n pip: false,\n download: false,\n mini: false,\n cssFullscreen: true,\n keyShortcut: true,\n presets: [],\n plugins: [],\n playbackRate: 1,\n definition: {\n list: []\n },\n playsinline: true,\n customDuration: 0,\n timeOffset: 0,\n icons: {},\n i18n: [],\n tabindex: 0,\n thumbnail: null,\n videoConfig: {},\n isHideTips: false,\n minWaitDelay: 200,\n commonStyle: {\n progressColor: \"\",\n playedColor: \"\",\n cachedColor: \"\",\n sliderBtnStyle: {},\n volumeColor: \"\"\n }\n };\n}\nexport { getDefaultConfig as default };\n","import { toConsumableArray as _toConsumableArray } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nvar usePreset = function usePreset2(player, Preset) {\n var _player$config$plugin, _player$config$ignore;\n var presetInst;\n if (Preset.preset && Preset.options) {\n presetInst = new Preset.preset(Preset.options, player.config);\n } else {\n presetInst = new Preset({}, player.config);\n }\n var _presetInst = presetInst, _presetInst$plugins = _presetInst.plugins, plugins = _presetInst$plugins === void 0 ? [] : _presetInst$plugins, _presetInst$ignores = _presetInst.ignores, ignores = _presetInst$ignores === void 0 ? [] : _presetInst$ignores, _presetInst$icons = _presetInst.icons, icons = _presetInst$icons === void 0 ? {} : _presetInst$icons, _presetInst$i18n = _presetInst.i18n, i18n = _presetInst$i18n === void 0 ? [] : _presetInst$i18n;\n if (!player.config.plugins) {\n player.config.plugins = [];\n }\n if (!player.config.ignores) {\n player.config.ignores = [];\n }\n (_player$config$plugin = player.config.plugins).push.apply(_player$config$plugin, _toConsumableArray(plugins));\n (_player$config$ignore = player.config.ignores).push.apply(_player$config$ignore, _toConsumableArray(ignores));\n Object.keys(icons).map(function(key) {\n if (!player.config.icons[key]) {\n player.config.icons[key] = icons[key];\n }\n });\n var _ci18n = player.config.i18n || [];\n i18n.push.apply(i18n, _toConsumableArray(_ci18n));\n player.config.i18n = i18n;\n};\nexport { usePreset };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, get as _get, getPrototypeOf as _getPrototypeOf } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport { MINI_STATE_CHANGE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin, { POSITIONS } from \"../../plugin/plugin.js\";\nimport STATE_CLASS from \"../../stateClassMap.js\";\nvar Controls = /* @__PURE__ */ function(_Plugin) {\n _inherits(Controls2, _Plugin);\n var _super = _createSuper(Controls2);\n function Controls2() {\n var _this;\n _classCallCheck(this, Controls2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onMouseEnter\", function(e) {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player, playerConfig = _assertThisInitialize.playerConfig;\n playerConfig.closeControlsBlur && player.focus({\n autoHide: false\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseLeave\", function(e) {\n var _assertThisInitialize2 = _assertThisInitialized(_this), player = _assertThisInitialize2.player;\n player.focus();\n });\n return _this;\n }\n _createClass(Controls2, [{\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n if (!args.config.mode && sniffer.device === \"mobile\") {\n args.config.mode = \"flex\";\n }\n if (args.player.config.marginControls) {\n args.config.autoHide = false;\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n var _this$config = this.config, disable = _this$config.disable, height = _this$config.height, mode = _this$config.mode;\n if (disable) {\n return;\n }\n mode === \"flex\" && this.player.addClass(STATE_CLASS.FLEX_CONTROLS);\n var style = {\n height: \"\".concat(height, \"px\")\n };\n Object.keys(style).map(function(key) {\n _this2.root.style[key] = style[key];\n });\n this.left = this.find(\"xg-left-grid\");\n this.center = this.find(\"xg-center-grid\");\n this.right = this.find(\"xg-right-grid\");\n this.innerRoot = this.find(\"xg-inner-controls\");\n this.on(MINI_STATE_CHANGE, function(isMini) {\n isMini ? util.addClass(_this2.root, \"mini-controls\") : util.removeClass(_this2.root, \"mini-controls\");\n });\n var isMobileSimulateMode = this.playerConfig.isMobileSimulateMode;\n if (sniffer.device !== \"mobile\" && isMobileSimulateMode !== \"mobile\") {\n this.bind(\"mouseenter\", this.onMouseEnter);\n this.bind(\"mouseleave\", this.onMouseLeave);\n }\n }\n }, {\n key: \"focus\",\n value: function focus() {\n this.player.focus({\n autoHide: false\n });\n }\n }, {\n key: \"focusAwhile\",\n value: function focusAwhile() {\n this.player.focus({\n autoHide: true\n });\n }\n }, {\n key: \"blur\",\n value: function blur() {\n this.player.blur({\n ignorePaused: true\n });\n }\n }, {\n key: \"recoverAutoHide\",\n value: function recoverAutoHide() {\n this.config.autoHide && util.addClass(this.root, STATE_CLASS.CONTROLS_AUTOHIDE);\n }\n }, {\n key: \"pauseAutoHide\",\n value: function pauseAutoHide() {\n util.removeClass(this.root, STATE_CLASS.CONTROLS_AUTOHIDE);\n }\n }, {\n key: \"show\",\n value: function show() {\n this.root.style.display = \"\";\n this.player.focus();\n }\n }, {\n key: \"hide\",\n value: function hide() {\n this.root.style.display = \"none\";\n }\n }, {\n key: \"mode\",\n get: function get() {\n return this.config.mode;\n }\n }, {\n key: \"registerPlugin\",\n value: function registerPlugin(plugin) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var name = arguments.length > 2 ? arguments[2] : void 0;\n if (!this.root) {\n return;\n }\n var defaultConfig = plugin.defaultConfig || {};\n if (!options.root) {\n var position = options.position ? options.position : options.config && options.config.position ? options.config.position : defaultConfig.position;\n switch (position) {\n case POSITIONS.CONTROLS_LEFT:\n options.root = this.left;\n break;\n case POSITIONS.CONTROLS_RIGHT:\n options.root = this.right;\n break;\n case POSITIONS.CONTROLS_CENTER:\n options.root = this.center;\n break;\n case POSITIONS.CONTROLS:\n options.root = this.root;\n break;\n default:\n options.root = this.left;\n }\n return _get(_getPrototypeOf(Controls2.prototype), \"registerPlugin\", this).call(this, plugin, options, name);\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (sniffer.device !== \"mobile\") {\n this.unbind(\"mouseenter\", this.onMouseEnter);\n this.unbind(\"mouseleave\", this.onMouseLeave);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$config2 = this.config, mode = _this$config2.mode, autoHide = _this$config2.autoHide, initShow = _this$config2.initShow, disable = _this$config2.disable;\n if (disable) {\n return;\n }\n var className = util.classNames({\n \"xgplayer-controls\": true\n }, {\n \"flex-controls\": mode === \"flex\"\n }, {\n \"bottom-controls\": mode === \"bottom\"\n }, _defineProperty({}, STATE_CLASS.CONTROLS_AUTOHIDE, autoHide), {\n \"xgplayer-controls-initshow\": initShow || !autoHide\n });\n return '\\n \\n \\n \\n \\n \\n \\n \\n ');\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"controls\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n disable: false,\n autoHide: true,\n mode: \"\",\n initShow: false\n };\n }\n }]);\n return Controls2;\n}(Plugin);\nexport { Controls as default };\n","import { toConsumableArray as _toConsumableArray } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../utils/util.js\";\nimport EN from \"./en.js\";\nvar XGI18nLang = {\n lang: {},\n langKeys: [],\n textKeys: []\n};\nfunction deepMerge(dst, src) {\n Object.keys(src).forEach(function(key) {\n var _s = util.typeOf(src[key]);\n var _t = util.typeOf(dst[key]);\n if (_s === \"Array\") {\n var _dst$key;\n if (_t !== \"Array\") {\n dst[key] = [];\n }\n (_dst$key = dst[key]).push.apply(_dst$key, _toConsumableArray(src[key]));\n } else if (_s === \"Object\") {\n if (_t !== \"Object\") {\n dst[key] = {};\n }\n deepMerge(dst[key], src[key]);\n } else {\n dst[key] = src[key];\n }\n });\n return dst;\n}\nfunction updateKeys() {\n Object.keys(XGI18nLang.lang.en).map(function(key) {\n XGI18nLang.textKeys[key] = key;\n });\n}\nfunction extend(i18nTextList, i18nLangs) {\n var ext = [];\n if (!i18nLangs) {\n i18nLangs = XGI18nLang;\n }\n if (!i18nLangs.lang) {\n return;\n }\n if (util.typeOf(i18nTextList) !== \"Array\") {\n ext = Object.keys(i18nTextList).map(function(lang2) {\n var keyLang = lang2 === \"zh\" ? \"zh-cn\" : lang2;\n return {\n LANG: keyLang,\n TEXT: i18nTextList[lang2]\n };\n });\n } else {\n ext = i18nTextList;\n }\n var _i18nLangs = i18nLangs, lang = _i18nLangs.lang;\n ext.map(function(item) {\n if (item.LANG === \"zh\") {\n item.LANG = \"zh-cn\";\n }\n if (!lang[item.LANG]) {\n use(item, i18nLangs);\n } else {\n deepMerge(lang[item.LANG] || {}, item.TEXT || {});\n }\n });\n updateKeys();\n}\nfunction use(langData, i18nLangs) {\n var _clang = langData.LANG;\n if (!i18nLangs) {\n i18nLangs = XGI18nLang;\n }\n if (!i18nLangs.lang) {\n return;\n }\n var texts = langData.TEXT || {};\n if (_clang === \"zh\") {\n _clang = \"zh-cn\";\n }\n if (!i18nLangs.lang[_clang]) {\n i18nLangs.langKeys.push(_clang);\n i18nLangs.lang[_clang] = texts;\n } else {\n deepMerge(i18nLangs.lang[_clang], texts);\n }\n updateKeys();\n}\nfunction init(id) {\n var _ret$langKeys;\n var ret = {\n lang: {},\n langKeys: [],\n textKeys: {},\n pId: id\n };\n deepMerge(ret.lang, XGI18nLang.lang);\n (_ret$langKeys = ret.langKeys).push.apply(_ret$langKeys, _toConsumableArray(XGI18nLang.langKeys));\n deepMerge(ret.textKeys, XGI18nLang.textKeys);\n return ret;\n}\nuse(EN);\nvar I18N = {\n get textKeys() {\n return XGI18nLang.textKeys;\n },\n get langKeys() {\n return XGI18nLang.langKeys;\n },\n get lang() {\n var ret = {};\n XGI18nLang.langKeys.map(function(key) {\n ret[key] = XGI18nLang.lang[key];\n });\n if (XGI18nLang.lang[\"zh-cn\"]) {\n ret.zh = XGI18nLang.lang[\"zh-cn\"] || {};\n }\n return ret;\n },\n extend,\n use,\n init\n};\nexport { I18N as default };\n","var EN = {\n LANG: \"en\",\n TEXT: {\n ERROR_TYPES: {\n network: {\n code: 1,\n msg: \"video download error\"\n },\n mse: {\n code: 2,\n msg: \"stream append error\"\n },\n parse: {\n code: 3,\n msg: \"parsing error\"\n },\n format: {\n code: 4,\n msg: \"wrong format\"\n },\n decoder: {\n code: 5,\n msg: \"decoding error\"\n },\n runtime: {\n code: 6,\n msg: \"grammatical errors\"\n },\n timeout: {\n code: 7,\n msg: \"play timeout\"\n },\n other: {\n code: 8,\n msg: \"other errors\"\n }\n },\n HAVE_NOTHING: \"There is no information on whether audio/video is ready\",\n HAVE_METADATA: \"Audio/video metadata is ready \",\n HAVE_CURRENT_DATA: \"Data about the current play location is available, but there is not enough data to play the next frame/millisecond\",\n HAVE_FUTURE_DATA: \"Current and at least one frame of data is available\",\n HAVE_ENOUGH_DATA: \"The available data is sufficient to start playing\",\n NETWORK_EMPTY: \"Audio/video has not been initialized\",\n NETWORK_IDLE: \"Audio/video is active and has been selected for resources, but no network is used\",\n NETWORK_LOADING: \"The browser is downloading the data\",\n NETWORK_NO_SOURCE: \"No audio/video source was found\",\n MEDIA_ERR_ABORTED: \"The fetch process is aborted by the user\",\n MEDIA_ERR_NETWORK: \"An error occurred while downloading\",\n MEDIA_ERR_DECODE: \"An error occurred while decoding\",\n MEDIA_ERR_SRC_NOT_SUPPORTED: \"Audio/video is not supported\",\n REPLAY: \"Replay\",\n ERROR: \"Network is offline\",\n PLAY_TIPS: \"Play\",\n PAUSE_TIPS: \"Pause\",\n PLAYNEXT_TIPS: \"Play next\",\n DOWNLOAD_TIPS: \"Download\",\n ROTATE_TIPS: \"Rotate\",\n RELOAD_TIPS: \"Reload\",\n FULLSCREEN_TIPS: \"Fullscreen\",\n EXITFULLSCREEN_TIPS: \"Exit fullscreen\",\n CSSFULLSCREEN_TIPS: \"Cssfullscreen\",\n EXITCSSFULLSCREEN_TIPS: \"Exit cssfullscreen\",\n TEXTTRACK: \"Caption\",\n PIP: \"PIP\",\n SCREENSHOT: \"Screenshot\",\n LIVE: \"LIVE\",\n OFF: \"Off\",\n OPEN: \"Open\",\n MINI_DRAG: \"Click and hold to drag\",\n MINISCREEN: \"Miniscreen\",\n REFRESH_TIPS: \"Please Try\",\n REFRESH: \"Refresh\",\n FORWARD: \"forward\",\n LIVE_TIP: \"Live\"\n }\n};\nexport { EN as default };\n","var STATES = {\n INITIAL: 1,\n READY: 2,\n ATTACHING: 3,\n ATTACHED: 4,\n NOTALLOW: 5,\n RUNNING: 6,\n ENDED: 7,\n DESTROYED: 8\n};\nvar STATE_ARRAY = [\"ERROR\", \"INITIAL\", \"READY\", \"ATTACHING\", \"ATTACHED\", \"NOTALLOW\", \"RUNNING\", \"ENDED\", \"DESTROYED\"];\nexport { STATES, STATE_ARRAY };\n","import { defineProperty as _defineProperty, inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, assertThisInitialized as _assertThisInitialized, possibleConstructorReturn as _possibleConstructorReturn, get as _get, getPrototypeOf as _getPrototypeOf, objectSpread2 as _objectSpread2 } from \"./_virtual/_rollupPluginBabelHelpers.js\";\nimport MediaProxy from \"./mediaProxy.js\";\nimport util, { checkIsCurrentVideo } from \"./utils/util.js\";\nexport { default as Util } from \"./utils/util.js\";\nimport sniffer from \"./utils/sniffer.js\";\nexport { default as Sniffer } from \"./utils/sniffer.js\";\nimport INDEXDB from \"./utils/database.js\";\nimport Errors from \"./error.js\";\nexport { default as Errors } from \"./error.js\";\nimport { CANPLAY, USER_ACTION, FULLSCREEN_CHANGE, READY, ERROR, LOADED_DATA, PLAY, URL_NULL, COMPLETE, AUTOPLAY_STARTED, AUTOPLAY_PREVENTED, SEEKED, DEFINITION_CHANGE, AFTER_DEFINITION_CHANGE, RESET, DESTROY, CSS_FULLSCREEN_CHANGE, PLAYER_FOCUS, PLAYER_BLUR, VIDEO_RESIZE, REPLAY, PLAYNEXT } from \"./events.js\";\nimport * as events from \"./events.js\";\nexport { events as Events };\nimport { PLATER_ID, FULLSCREEN_EVENTS, GET_FULLSCREEN_API, EXIT_FULLSCREEN_API } from \"./constant.js\";\nimport { POSITIONS } from \"./plugin/plugin.js\";\nexport { default as Plugin } from \"./plugin/plugin.js\";\nimport BasePlugin from \"./plugin/basePlugin.js\";\nexport { default as BasePlugin } from \"./plugin/basePlugin.js\";\nimport pluginsManager from \"./plugin/pluginsManager.js\";\nimport STATE_CLASS from \"./stateClassMap.js\";\nexport { default as STATE_CLASS } from \"./stateClassMap.js\";\nimport getDefaultConfig from \"./defaultConfig.js\";\nimport { usePreset } from \"./plugin/preset.js\";\nimport hooksDescriptor, { runHooks, delHooksDescriptor, hook, useHooks, removeHooks, usePluginHooks, removePluginHooks } from \"./plugin/hooksDescriptor.js\";\nimport Controls from \"./plugins/controls/index.js\";\nimport XG_DEBUG, { bindDebug } from \"./utils/debug.js\";\nimport I18N from \"./lang/i18n.js\";\nexport { default as I18N } from \"./lang/i18n.js\";\nimport version from \"./version.js\";\nimport { STATES, STATE_ARRAY } from \"./state.js\";\nvar PlAYER_HOOKS = [\"play\", \"pause\", \"replay\", \"retry\"];\nvar REAL_TIME_SPEED = 0;\nvar AVG_SPEED = 0;\nvar Player = /* @__PURE__ */ function(_MediaProxy) {\n _inherits(Player2, _MediaProxy);\n var _super = _createSuper(Player2);\n function Player2(options) {\n var _this;\n _classCallCheck(this, Player2);\n var _config = util.deepMerge(getDefaultConfig(), options);\n _this = _super.call(this, _config);\n _defineProperty(_assertThisInitialized(_this), \"canPlayFunc\", function() {\n if (!_this.config) {\n return;\n }\n var _this$config = _this.config, autoplay = _this$config.autoplay, startTime = _this$config.startTime, defaultPlaybackRate = _this$config.defaultPlaybackRate;\n XG_DEBUG.logInfo(\"player\", \"canPlayFunc, startTime\", startTime);\n if (startTime) {\n _this.currentTime = startTime > _this.duration ? _this.duration : startTime;\n _this.config.startTime = 0;\n }\n _this.playbackRate = defaultPlaybackRate;\n (autoplay || _this._useAutoplay) && _this.mediaPlay();\n _this.off(CANPLAY, _this.canPlayFunc);\n _this.removeClass(STATE_CLASS.ENTER);\n });\n _defineProperty(_assertThisInitialized(_this), \"onFullscreenChange\", function(event, isFullScreen) {\n var delayResize = function delayResize2() {\n util.setTimeout(_assertThisInitialized(_this), function() {\n _this.resize();\n }, 100);\n };\n var fullEl = util.getFullScreenEl();\n if (_this._fullActionFrom) {\n _this._fullActionFrom = \"\";\n } else {\n _this.emit(USER_ACTION, {\n eventType: \"system\",\n action: \"switch_fullscreen\",\n pluginName: \"player\",\n currentTime: _this.currentTime,\n duration: _this.duration,\n props: [{\n prop: \"fullscreen\",\n from: true,\n to: false\n }]\n });\n }\n var isVideo = checkIsCurrentVideo(fullEl, _this.playerId, PLATER_ID);\n if (isFullScreen || fullEl && (fullEl === _this._fullscreenEl || isVideo)) {\n delayResize();\n !_this.config.closeFocusVideoFocus && _this.media.focus();\n _this.fullscreen = true;\n _this.changeFullStyle(_this.root, fullEl, STATE_CLASS.FULLSCREEN);\n _this.emit(FULLSCREEN_CHANGE, true, _this._fullScreenOffset);\n if (_this.cssfullscreen) {\n _this.exitCssFullscreen();\n }\n } else if (_this.fullscreen) {\n delayResize();\n var _assertThisInitialize = _assertThisInitialized(_this), _fullScreenOffset = _assertThisInitialize._fullScreenOffset, config = _assertThisInitialize.config;\n if (config.needFullscreenScroll) {\n window.scrollTo(_fullScreenOffset.left, _fullScreenOffset.top);\n util.setTimeout(_assertThisInitialized(_this), function() {\n _this.fullscreen = false;\n _this._fullScreenOffset = null;\n }, 100);\n } else {\n !_this.config.closeFocusVideoFocus && _this.media.focus();\n _this.fullscreen = false;\n _this._fullScreenOffset = null;\n }\n if (!_this.cssfullscreen) {\n _this.recoverFullStyle(_this.root, _this._fullscreenEl, STATE_CLASS.FULLSCREEN);\n } else {\n _this.removeClass(STATE_CLASS.FULLSCREEN);\n }\n _this._fullscreenEl = null;\n _this.emit(FULLSCREEN_CHANGE, false);\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"_onWebkitbeginfullscreen\", function(e) {\n _this._fullscreenEl = _this.media;\n _this.onFullscreenChange(e, true);\n });\n _defineProperty(_assertThisInitialized(_this), \"_onWebkitendfullscreen\", function(e) {\n _this.onFullscreenChange(e, false);\n });\n hooksDescriptor(_assertThisInitialized(_this), PlAYER_HOOKS);\n _this.config = _config;\n _this._pluginInfoId = util.generateSessionId();\n bindDebug(_assertThisInitialized(_this));\n var defaultPreset = _this.constructor.defaultPreset;\n if (_this.config.presets.length) {\n var defaultIdx = _this.config.presets.indexOf(\"default\");\n if (defaultIdx >= 0 && defaultPreset) {\n _this.config.presets[defaultIdx] = defaultPreset;\n }\n } else if (defaultPreset) {\n _this.config.presets.push(defaultPreset);\n }\n _this.userTimer = null;\n _this.waitTimer = null;\n _this._state = STATES.INITIAL;\n _this.isError = false;\n _this._hasStart = false;\n _this.isSeeking = false;\n _this.isCanplay = false;\n _this._useAutoplay = false;\n _this.rotateDeg = 0;\n _this.isActive = false;\n _this.fullscreen = false;\n _this.cssfullscreen = false;\n _this.isRotateFullscreen = false;\n _this._fullscreenEl = null;\n _this.timeSegments = [];\n _this._cssfullscreenEl = null;\n _this.curDefinition = null;\n _this._orgCss = \"\";\n _this._fullScreenOffset = null;\n _this._videoHeight = 0;\n _this._videoWidth = 0;\n _this.videoPos = {\n pi: 1,\n scale: 0,\n rotate: -1,\n x: 0,\n y: 0,\n h: -1,\n w: -1,\n vy: 0,\n vx: 0\n };\n _this.sizeInfo = {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n };\n _this._accPlayed = {\n t: 0,\n acc: 0,\n loopAcc: 0\n };\n _this._offsetInfo = {\n currentTime: -1,\n duration: 0\n };\n _this.innerContainer = null;\n _this.controls = null;\n _this.topBar = null;\n _this.root = null;\n _this.__i18n = I18N.init(_this._pluginInfoId);\n if (sniffer.os.isAndroid && sniffer.osVersion > 0 && sniffer.osVersion < 6) {\n _this.config.autoplay = false;\n }\n _this.database = new INDEXDB();\n _this.isUserActive = false;\n _this._onceSeekCanplay = null;\n _this._isPauseBeforeSeek = 0;\n _this.innerStates = {\n isActiveLocked: false\n };\n var rootInit = _this._initDOM();\n if (!rootInit) {\n console.error(new Error(\"can't find the dom which id is \".concat(_this.config.id, \" or this.config.el does not exist\")));\n return _possibleConstructorReturn(_this);\n }\n var _this$config2 = _this.config, _this$config2$definit = _this$config2.definition, definition = _this$config2$definit === void 0 ? {} : _this$config2$definit, url = _this$config2.url;\n if (!url && definition.list && definition.list.length > 0) {\n var defaultDefinitionObj = definition.list.find(function(e) {\n return e.definition && e.definition === definition.defaultDefinition;\n });\n if (!defaultDefinitionObj) {\n definition.defaultDefinition = definition.list[0].definition;\n defaultDefinitionObj = definition.list[0];\n }\n _this.config.url = defaultDefinitionObj.url;\n _this.curDefinition = defaultDefinitionObj;\n }\n _this._bindEvents();\n _this._registerPresets();\n _this._registerPlugins();\n pluginsManager.onPluginsReady(_assertThisInitialized(_this));\n _this.getInitDefinition();\n _this.setState(STATES.READY);\n util.setTimeout(_assertThisInitialized(_this), function() {\n _this.emit(READY);\n }, 0);\n _this.onReady && _this.onReady();\n if (_this.config.videoInit || _this.config.autoplay) {\n if (!_this.hasStart || _this.state < STATES.ATTACHED) {\n _this.start();\n }\n }\n return _this;\n }\n _createClass(Player2, [{\n key: \"_initDOM\",\n value: function _initDOM() {\n var _this2 = this;\n this.root = this.config.id ? document.getElementById(this.config.id) : null;\n if (!this.root) {\n var el = this.config.el;\n if (el && el.nodeType === 1) {\n this.root = el;\n } else {\n this.emit(ERROR, new Errors(\"use\", this.config.vid, {\n line: 32,\n handle: \"Constructor\",\n msg: \"container id can't be empty\"\n }));\n console.error(\"this.confg.id or this.config.el can't be empty\");\n return false;\n }\n }\n var ret = pluginsManager.checkPlayerRoot(this.root);\n if (ret) {\n XG_DEBUG.logWarn(\"The is an Player instance already exists in this.root, destroy it and reinitialize\");\n ret.destroy();\n }\n this.root.setAttribute(PLATER_ID, this.playerId);\n pluginsManager.init(this);\n this._initBaseDoms();\n var XgVideoProxy = this.constructor.XgVideoProxy;\n if (XgVideoProxy && this.mediaConfig.mediaType === XgVideoProxy.mediaType) {\n var _el = this.innerContainer || this.root;\n this.detachVideoEvents(this.media);\n var _nVideo = new XgVideoProxy(_el, this.config, this.mediaConfig);\n this.attachVideoEvents(_nVideo);\n this.media = _nVideo;\n }\n this.media.setAttribute(PLATER_ID, this.playerId);\n if (this.config.controls) {\n var _root = this.config.controls.root || null;\n var controls = pluginsManager.register(this, Controls, {\n root: _root\n });\n this.controls = controls;\n }\n var device = this.config.isMobileSimulateMode === \"mobile\" ? \"mobile\" : sniffer.device;\n this.addClass(\"\".concat(STATE_CLASS.DEFAULT, \" \").concat(STATE_CLASS.INACTIVE, \" xgplayer-\").concat(device, \" \").concat(this.config.controls ? \"\" : STATE_CLASS.NO_CONTROLS));\n if (this.config.autoplay) {\n this.addClass(STATE_CLASS.ENTER);\n } else {\n this.addClass(STATE_CLASS.NO_START);\n }\n if (this.config.fluid) {\n var _this$config3 = this.config, _width = _this$config3.width, _height = _this$config3.height;\n if (typeof _width !== \"number\" || typeof _height !== \"number\") {\n _width = 600;\n _height = 337.5;\n }\n var style = {\n width: \"100%\",\n height: \"0\",\n \"max-width\": \"100%\",\n \"padding-top\": \"\".concat(_height * 100 / _width, \"%\")\n };\n Object.keys(style).forEach(function(key) {\n _this2.root.style[key] = style[key];\n });\n } else {\n [\"width\", \"height\"].forEach(function(key) {\n if (_this2.config[key]) {\n if (typeof _this2.config[key] !== \"number\") {\n _this2.root.style[key] = _this2.config[key];\n } else {\n _this2.root.style[key] = \"\".concat(_this2.config[key], \"px\");\n }\n }\n });\n }\n var _this$root$getBoundin = this.root.getBoundingClientRect(), width = _this$root$getBoundin.width, height = _this$root$getBoundin.height, left = _this$root$getBoundin.left, top = _this$root$getBoundin.top;\n this.sizeInfo.width = width;\n this.sizeInfo.height = height;\n this.sizeInfo.left = left;\n this.sizeInfo.top = top;\n return true;\n }\n }, {\n key: \"_initBaseDoms\",\n value: function _initBaseDoms() {\n this.topBar = null;\n this.leftBar = null;\n this.rightBar = null;\n if (this.config.marginControls) {\n this.innerContainer = util.createDom(\"xg-video-container\", \"\", {\n \"data-index\": -1\n }, \"xg-video-container\");\n this.root.appendChild(this.innerContainer);\n }\n }\n }, {\n key: \"_bindEvents\",\n value: function _bindEvents() {\n var _this3 = this;\n [\"focus\", \"blur\"].forEach(function(item) {\n _this3.on(item, _this3[\"on\" + item.charAt(0).toUpperCase() + item.slice(1)]);\n });\n FULLSCREEN_EVENTS.forEach(function(item) {\n document && document.addEventListener(item, _this3.onFullscreenChange);\n });\n if (sniffer.os.isIos) {\n this.media.addEventListener(\"webkitbeginfullscreen\", this._onWebkitbeginfullscreen);\n this.media.addEventListener(\"webkitendfullscreen\", this._onWebkitendfullscreen);\n }\n this.once(LOADED_DATA, this.resize);\n this.playFunc = function() {\n if (!_this3.config.closeFocusVideoFocus) {\n _this3.media.focus();\n }\n };\n this.once(PLAY, this.playFunc);\n }\n }, {\n key: \"_unbindEvents\",\n value: function _unbindEvents() {\n var _this4 = this;\n this.root.removeEventListener(\"mousemove\", this.mousemoveFunc);\n FULLSCREEN_EVENTS.forEach(function(item) {\n document.removeEventListener(item, _this4.onFullscreenChange);\n });\n this.playFunc && this.off(PLAY, this.playFunc);\n this.off(CANPLAY, this.canPlayFunc);\n this.media.removeEventListener(\"webkitbeginfullscreen\", this._onWebkitbeginfullscreen);\n this.media.removeEventListener(\"webkitendfullscreen\", this._onWebkitendfullscreen);\n }\n }, {\n key: \"_startInit\",\n value: function _startInit(url) {\n var _this5 = this;\n if (!this.media) {\n return;\n }\n if (!url || url === \"\" || util.typeOf(url) === \"Array\" && url.length === 0) {\n url = \"\";\n this.emit(URL_NULL);\n XG_DEBUG.logWarn(\"config.url is null, please get url and run player._startInit(url)\");\n if (this.config.nullUrlStart) {\n return;\n }\n }\n this._detachSourceEvents(this.media);\n if (util.typeOf(url) === \"Array\" && url.length > 0) {\n this._attachSourceEvents(this.media, url);\n } else if (!this.media.src || this.media.src !== url) {\n this.media.src = url;\n } else if (!url) {\n this.media.removeAttribute(\"src\");\n }\n if (util.typeOf(this.config.volume) === \"Number\") {\n this.volume = this.config.volume;\n }\n var _root = this.innerContainer ? this.innerContainer : this.root;\n if (this.media instanceof window.Element && !_root.contains(this.media)) {\n _root.insertBefore(this.media, _root.firstChild);\n }\n var readyState = this.media.readyState;\n XG_DEBUG.logInfo(\"_startInit readyState\", readyState);\n if (this.config.autoplay) {\n !util.isMSE(this.media) && this.load();\n (sniffer.os.isIpad || sniffer.os.isPhone) && this.mediaPlay();\n }\n if (readyState >= 2) {\n this.canPlayFunc();\n } else {\n this.once(CANPLAY, this.canPlayFunc);\n }\n if (!this.hasStart || this.state < STATES.ATTACHED) {\n pluginsManager.afterInit(this);\n }\n this.hasStart = true;\n this.setState(STATES.ATTACHED);\n util.setTimeout(this, function() {\n _this5.emit(COMPLETE);\n }, 0);\n }\n }, {\n key: \"_registerPlugins\",\n value: function _registerPlugins() {\n var _this6 = this;\n var isInit = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;\n this._loadingPlugins = [];\n var ignores = this.config.ignores || [];\n var plugins = this.config.plugins || [];\n var i18n = this.config.i18n || [];\n isInit && I18N.extend(i18n, this.__i18n);\n var ignoresStr = ignores.join(\"||\").toLowerCase().split(\"||\");\n var cuPlugins = this.plugins;\n plugins.forEach(function(plugin) {\n try {\n var pluginName = plugin.plugin ? plugin.plugin.pluginName : plugin.pluginName;\n if (pluginName && ignoresStr.indexOf(pluginName.toLowerCase()) > -1) {\n return null;\n }\n if (!isInit && cuPlugins[pluginName.toLowerCase()]) {\n return;\n }\n if (plugin.lazy && plugin.loader) {\n var loadingPlugin = pluginsManager.lazyRegister(_this6, plugin);\n if (plugin.forceBeforeInit) {\n loadingPlugin.then(function() {\n _this6._loadingPlugins.splice(_this6._loadingPlugins.indexOf(loadingPlugin), 1);\n }).catch(function(e) {\n XG_DEBUG.logError(\"_registerPlugins:loadingPlugin\", e);\n _this6._loadingPlugins.splice(_this6._loadingPlugins.indexOf(loadingPlugin), 1);\n });\n _this6._loadingPlugins.push(loadingPlugin);\n }\n return;\n }\n return _this6.registerPlugin(plugin);\n } catch (err) {\n XG_DEBUG.logError(\"_registerPlugins:\", err);\n }\n });\n }\n }, {\n key: \"_registerPresets\",\n value: function _registerPresets() {\n var _this7 = this;\n this.config.presets.forEach(function(preset) {\n usePreset(_this7, preset);\n });\n }\n }, {\n key: \"_getRootByPosition\",\n value: function _getRootByPosition(position) {\n var _root = null;\n switch (position) {\n case POSITIONS.ROOT_RIGHT:\n if (!this.rightBar) {\n this.rightBar = util.createPositionBar(\"xg-right-bar\", this.root);\n }\n _root = this.rightBar;\n break;\n case POSITIONS.ROOT_LEFT:\n if (!this.leftBar) {\n this.leftBar = util.createPositionBar(\"xg-left-bar\", this.root);\n }\n _root = this.leftBar;\n break;\n case POSITIONS.ROOT_TOP:\n if (!this.topBar) {\n this.topBar = util.createPositionBar(\"xg-top-bar\", this.root);\n if (this.config.topBarAutoHide) {\n util.addClass(this.topBar, STATE_CLASS.TOP_BAR_AUTOHIDE);\n }\n }\n _root = this.topBar;\n break;\n default:\n _root = this.innerContainer || this.root;\n break;\n }\n return _root;\n }\n }, {\n key: \"registerPlugin\",\n value: function registerPlugin(plugin, config) {\n var _retPlugin = pluginsManager.formatPluginInfo(plugin, config);\n var PLUFGIN = _retPlugin.PLUFGIN, options = _retPlugin.options;\n var plugins = this.config.plugins;\n var exits = pluginsManager.checkPluginIfExits(PLUFGIN.pluginName, plugins);\n !exits && plugins.push(PLUFGIN);\n var _pConfig = pluginsManager.getRootByConfig(PLUFGIN.pluginName, this.config);\n _pConfig.root && (options.root = _pConfig.root);\n _pConfig.position && (options.position = _pConfig.position);\n var position = options.position ? options.position : options.config && options.config.position || PLUFGIN.defaultConfig && PLUFGIN.defaultConfig.position;\n if (!options.root && typeof position === \"string\" && position.indexOf(\"controls\") > -1) {\n return this.controls && this.controls.registerPlugin(PLUFGIN, options, PLUFGIN.pluginName);\n }\n if (!options.root) {\n options.root = this._getRootByPosition(position);\n }\n return pluginsManager.register(this, PLUFGIN, options);\n }\n }, {\n key: \"deregister\",\n value: function deregister(plugin) {\n if (typeof plugin === \"string\") {\n pluginsManager.unRegister(this, plugin);\n } else if (plugin instanceof BasePlugin) {\n pluginsManager.unRegister(this, plugin.pluginName);\n }\n }\n }, {\n key: \"unRegisterPlugin\",\n value: function unRegisterPlugin(plugin) {\n var removedFromConfig = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n this.deregister(plugin);\n if (removedFromConfig) {\n this.removePluginFromConfig(plugin);\n }\n }\n }, {\n key: \"removePluginFromConfig\",\n value: function removePluginFromConfig(plugin) {\n var pluginName;\n if (typeof plugin === \"string\") {\n pluginName = plugin;\n } else if (plugin instanceof BasePlugin) {\n pluginName = plugin.pluginName;\n }\n if (!pluginName) {\n return;\n }\n for (var i = this.config.plugins.length - 1; i > -1; i--) {\n var _plugin = this.config.plugins[i];\n if (_plugin.pluginName.toLowerCase() === pluginName.toLowerCase()) {\n this.config.plugins.splice(i, 1);\n break;\n }\n }\n }\n }, {\n key: \"plugins\",\n get: function get() {\n return pluginsManager.getPlugins(this);\n }\n }, {\n key: \"getPlugin\",\n value: function getPlugin(pluginName) {\n var plugin = pluginsManager.findPlugin(this, pluginName);\n return plugin && plugin.pluginName ? plugin : null;\n }\n }, {\n key: \"addClass\",\n value: function addClass(className) {\n if (!this.root) {\n return;\n }\n if (!util.hasClass(this.root, className)) {\n util.addClass(this.root, className);\n }\n }\n }, {\n key: \"removeClass\",\n value: function removeClass(className) {\n if (!this.root) {\n return;\n }\n util.removeClass(this.root, className);\n }\n }, {\n key: \"hasClass\",\n value: function hasClass(className) {\n if (!this.root) {\n return;\n }\n return util.hasClass(this.root, className);\n }\n }, {\n key: \"setAttribute\",\n value: function setAttribute(key, value) {\n if (!this.root) {\n return;\n }\n this.root.setAttribute(key, value);\n }\n }, {\n key: \"removeAttribute\",\n value: function removeAttribute(key, value) {\n if (!this.root) {\n return;\n }\n this.root.removeAttribute(key, value);\n }\n }, {\n key: \"start\",\n value: function start(url) {\n var _this8 = this;\n if (this.state > STATES.ATTACHING) {\n return;\n }\n if (!url && !this.config.url) {\n this.getInitDefinition();\n }\n this.hasStart = true;\n this.setState(STATES.ATTACHING);\n this._registerPlugins(false);\n return pluginsManager.beforeInit(this).then(function() {\n if (!_this8.config) {\n return;\n }\n if (!url) {\n url = _this8.url || _this8.config.url;\n }\n var _furl = _this8.preProcessUrl(url);\n var ret = _this8._startInit(_furl.url);\n return ret;\n }).catch(function(e) {\n e.fileName = \"player\";\n e.lineNumber = \"236\";\n XG_DEBUG.logError(\"start:beforeInit:\", e);\n throw e;\n });\n }\n }, {\n key: \"switchURL\",\n value: function switchURL(url, options) {\n var _this9 = this;\n var _src = url;\n if (util.typeOf(url) === \"Object\") {\n _src = url.url;\n }\n _src = this.preProcessUrl(_src).url;\n var curTime = this.currentTime;\n var isPaused = this.paused && !this.isError;\n this.src = _src;\n return new Promise(function(resolve, reject) {\n var _error = function _error2(e) {\n _this9.off(\"timeupdate\", _canplay);\n _this9.off(\"canplay\", _canplay);\n reject(e);\n };\n var _canplay = function _canplay2() {\n _this9.currentTime = curTime;\n if (isPaused) {\n _this9.pause();\n }\n _this9.off(\"error\", _error);\n resolve(true);\n };\n _this9.once(\"error\", _error);\n if (!_src) {\n _this9.errorHandler(\"error\", {\n code: 6,\n message: \"empty_src\"\n });\n return;\n }\n if (sniffer.os.isAndroid) {\n _this9.once(\"timeupdate\", _canplay);\n } else {\n _this9.once(\"canplay\", _canplay);\n }\n _this9.play();\n });\n }\n }, {\n key: \"videoPlay\",\n value: function videoPlay() {\n this.mediaPlay();\n }\n }, {\n key: \"mediaPlay\",\n value: function mediaPlay() {\n var _this10 = this;\n if (!this.hasStart && this.state < STATES.ATTACHED) {\n this.removeClass(STATE_CLASS.NO_START);\n this.addClass(STATE_CLASS.ENTER);\n this.start();\n this._useAutoplay = true;\n return;\n }\n if (this.state < STATES.RUNNING) {\n this.removeClass(STATE_CLASS.NO_START);\n !this.isCanplay && this.addClass(STATE_CLASS.ENTER);\n }\n var playPromise = _get(_getPrototypeOf(Player2.prototype), \"play\", this).call(this);\n if (playPromise !== void 0 && playPromise && playPromise.then) {\n playPromise.then(function() {\n _this10.removeClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY);\n _this10.addClass(STATE_CLASS.PLAYING);\n if (_this10.state < STATES.RUNNING) {\n XG_DEBUG.logInfo(\">>>>playPromise.then\");\n _this10.setState(STATES.RUNNING);\n _this10.emit(AUTOPLAY_STARTED);\n }\n }).catch(function(e) {\n XG_DEBUG.logWarn(\">>>>playPromise.catch\", e.name);\n if (_this10.media && _this10.media.error) {\n _this10.onError();\n _this10.removeClass(STATE_CLASS.ENTER);\n return;\n }\n if (e.name === \"NotAllowedError\") {\n _this10._errorTimer = util.setTimeout(_this10, function() {\n _this10._errorTimer = null;\n _this10.emit(AUTOPLAY_PREVENTED);\n _this10.addClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY);\n _this10.removeClass(STATE_CLASS.ENTER);\n _this10.pause();\n _this10.setState(STATES.NOTALLOW);\n }, 0);\n }\n });\n } else {\n XG_DEBUG.logWarn(\"video.play not return promise\");\n if (this.state < STATES.RUNNING) {\n this.setState(STATES.RUNNING);\n this.removeClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY);\n this.removeClass(STATE_CLASS.NO_START);\n this.removeClass(STATE_CLASS.ENTER);\n this.addClass(STATE_CLASS.PLAYING);\n this.emit(AUTOPLAY_STARTED);\n }\n }\n return playPromise;\n }\n }, {\n key: \"mediaPause\",\n value: function mediaPause() {\n _get(_getPrototypeOf(Player2.prototype), \"pause\", this).call(this);\n }\n }, {\n key: \"videoPause\",\n value: function videoPause() {\n _get(_getPrototypeOf(Player2.prototype), \"pause\", this).call(this);\n }\n }, {\n key: \"play\",\n value: function play() {\n var _this11 = this;\n this.removeClass(STATE_CLASS.PAUSED);\n return runHooks(this, \"play\", function() {\n return _this11.mediaPlay();\n });\n }\n }, {\n key: \"pause\",\n value: function pause() {\n var _this12 = this;\n runHooks(this, \"pause\", function() {\n _get(_getPrototypeOf(Player2.prototype), \"pause\", _this12).call(_this12);\n });\n }\n }, {\n key: \"seek\",\n value: function seek(time, status) {\n var _this13 = this;\n if (!this.media || Number.isNaN(Number(time)) || !this.hasStart) {\n return;\n }\n var _this$config4 = this.config, isSeekedPlay = _this$config4.isSeekedPlay, seekedStatus = _this$config4.seekedStatus;\n var _status = status || (isSeekedPlay ? \"play\" : seekedStatus);\n time = time < 0 ? 0 : time > this.duration ? parseInt(this.duration, 10) : time;\n !this._isPauseBeforeSeek && (this._isPauseBeforeSeek = this.paused ? 2 : 1);\n this._onceSeekCanplay && this.off(SEEKED, this._onceSeekCanplay);\n this._onceSeekCanplay = function() {\n _this13.removeClass(STATE_CLASS.ENTER);\n _this13.isSeeking = false;\n switch (_status) {\n case \"play\":\n _this13.play();\n break;\n case \"pause\":\n _this13.pause();\n break;\n default:\n _this13._isPauseBeforeSeek > 1 || _this13.paused ? _this13.pause() : _this13.play();\n }\n _this13._isPauseBeforeSeek = 0;\n _this13._onceSeekCanplay = null;\n };\n this.once(SEEKED, this._onceSeekCanplay);\n if (this.state < STATES.RUNNING) {\n this.removeClass(STATE_CLASS.NO_START);\n this.currentTime = time;\n this.play();\n } else {\n this.currentTime = time;\n }\n }\n }, {\n key: \"getInitDefinition\",\n value: function getInitDefinition() {\n var _this14 = this;\n var _this$config5 = this.config, definition = _this$config5.definition, url = _this$config5.url;\n if (!url && definition && definition.list && definition.list.length > 0 && definition.defaultDefinition) {\n definition.list.map(function(item) {\n if (item.definition === definition.defaultDefinition) {\n _this14.config.url = item.url;\n _this14.curDefinition = item;\n }\n });\n }\n }\n }, {\n key: \"changeDefinition\",\n value: function changeDefinition(to, from) {\n var _this15 = this;\n var definition = this.config.definition;\n if (Array.isArray(definition === null || definition === void 0 ? void 0 : definition.list)) {\n definition.list.forEach(function(item) {\n if ((to === null || to === void 0 ? void 0 : to.definition) === item.definition) {\n _this15.curDefinition = item;\n }\n });\n }\n if (to !== null && to !== void 0 && to.bitrate && typeof to.bitrate !== \"number\") {\n to.bitrate = parseInt(to.bitrate, 10) || 0;\n }\n this.emit(DEFINITION_CHANGE, {\n from,\n to\n });\n if (!this.hasStart) {\n this.config.url = to.url;\n return;\n }\n var ret = this.switchURL(to.url, _objectSpread2({\n seamless: definition.seamless !== false && typeof MediaSource !== \"undefined\" && typeof MediaSource.isTypeSupported === \"function\"\n }, to));\n if (ret && ret.then) {\n ret.then(function() {\n _this15.emit(AFTER_DEFINITION_CHANGE, {\n from,\n to\n });\n });\n } else {\n this.emit(AFTER_DEFINITION_CHANGE, {\n from,\n to\n });\n }\n }\n }, {\n key: \"reload\",\n value: function reload() {\n this.load();\n this.reloadFunc = function() {\n this.play();\n };\n this.once(LOADED_DATA, this.reloadFunc);\n }\n }, {\n key: \"resetState\",\n value: function resetState() {\n var _this16 = this;\n var NOT_ALLOW_AUTOPLAY = STATE_CLASS.NOT_ALLOW_AUTOPLAY, PLAYING = STATE_CLASS.PLAYING, NO_START = STATE_CLASS.NO_START, PAUSED = STATE_CLASS.PAUSED, REPLAY2 = STATE_CLASS.REPLAY, ENTER = STATE_CLASS.ENTER, ENDED = STATE_CLASS.ENDED, ERROR2 = STATE_CLASS.ERROR, LOADING = STATE_CLASS.LOADING;\n var clsList = [NOT_ALLOW_AUTOPLAY, PLAYING, NO_START, PAUSED, REPLAY2, ENTER, ENDED, ERROR2, LOADING];\n this.hasStart = false;\n this.isError = false;\n this._useAutoplay = false;\n this.mediaPause();\n this._accPlayed.acc = 0;\n this._accPlayed.t = 0;\n this._accPlayed.loopAcc = 0;\n clsList.forEach(function(cls) {\n _this16.removeClass(cls);\n });\n this.addClass(STATE_CLASS.ENTER);\n this.emit(RESET);\n }\n }, {\n key: \"reset\",\n value: function reset() {\n var _this17 = this;\n var unregisterPlugins = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];\n var isResetConfig = arguments.length > 1 ? arguments[1] : void 0;\n this.resetState();\n var plugins = this.plugins;\n if (!plugins) {\n return;\n }\n unregisterPlugins.map(function(pn) {\n _this17.deregister(pn);\n });\n if (isResetConfig) {\n var de = getDefaultConfig();\n Object.keys(this.config).keys(function(k) {\n if (_this17.config[k] !== \"undefined\" && (k === \"plugins\" || k === \"presets\" || k === \"el\" || k === \"id\")) {\n _this17.config[k] = de[k];\n }\n });\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this18 = this;\n var innerContainer = this.innerContainer, root = this.root, media = this.media;\n if (!root || !media) {\n return;\n }\n this.hasStart = false;\n this._useAutoplay = false;\n root.removeAttribute(PLATER_ID);\n this.updateAcc(\"destroy\");\n this._unbindEvents();\n this._detachSourceEvents(this.media);\n util.clearAllTimers(this);\n this.emit(DESTROY);\n pluginsManager.destroy(this);\n delHooksDescriptor(this);\n _get(_getPrototypeOf(Player2.prototype), \"destroy\", this).call(this);\n if (this.fullscreen && this._fullscreenEl === this.root) {\n this.exitFullscreen();\n }\n if (innerContainer) {\n var _c = innerContainer.children;\n for (var i = 0; i < _c.length; i++) {\n innerContainer.removeChild(_c[i]);\n }\n }\n !innerContainer && media instanceof window.Node && root.contains(media) && root.removeChild(media);\n [\"topBar\", \"leftBar\", \"rightBar\", \"innerContainer\"].map(function(item) {\n _this18[item] && root.removeChild(_this18[item]);\n _this18[item] = null;\n });\n var cList = root.className.split(\" \");\n if (cList.length > 0) {\n root.className = cList.filter(function(name) {\n return name.indexOf(\"xgplayer\") < 0;\n }).join(\" \");\n } else {\n root.className = \"\";\n }\n this.removeAttribute(\"data-xgfill\");\n [\"isSeeking\", \"isCanplay\", \"isActive\", \"cssfullscreen\", \"fullscreen\"].forEach(function(key) {\n _this18[key] = false;\n });\n }\n }, {\n key: \"replay\",\n value: function replay() {\n var _this19 = this;\n this.removeClass(STATE_CLASS.ENDED);\n this.currentTime = 0;\n this.isSeeking = false;\n runHooks(this, \"replay\", function() {\n _this19.once(SEEKED, function() {\n var playPromise = _this19.mediaPlay();\n if (playPromise && playPromise.catch) {\n playPromise.catch(function(err) {\n console.log(err);\n });\n }\n });\n _this19.play();\n _this19.emit(REPLAY);\n _this19.onPlay();\n });\n }\n }, {\n key: \"retry\",\n value: function retry() {\n var _this20 = this;\n this.removeClass(STATE_CLASS.ERROR);\n this.addClass(STATE_CLASS.LOADING);\n runHooks(this, \"retry\", function() {\n var cur = _this20.currentTime;\n var url = _this20.config.url;\n var _srcRet = !util.isMSE(_this20.media) ? _this20.preProcessUrl(url) : {\n url\n };\n _this20.src = _srcRet.url;\n !_this20.config.isLive && (_this20.currentTime = cur);\n _this20.once(CANPLAY, function() {\n _this20.mediaPlay();\n });\n });\n }\n }, {\n key: \"changeFullStyle\",\n value: function changeFullStyle(root, el, rootClass, pClassName) {\n if (!root) {\n return;\n }\n if (!pClassName) {\n pClassName = STATE_CLASS.PARENT_FULLSCREEN;\n }\n if (!this._orgCss) {\n this._orgCss = util.filterStyleFromText(root);\n }\n util.addClass(root, rootClass);\n if (el && el !== root && !this._orgPCss) {\n this._orgPCss = util.filterStyleFromText(el);\n util.addClass(el, pClassName);\n el.setAttribute(PLATER_ID, this.playerId);\n }\n }\n }, {\n key: \"recoverFullStyle\",\n value: function recoverFullStyle(root, el, rootClass, pClassName) {\n if (!pClassName) {\n pClassName = STATE_CLASS.PARENT_FULLSCREEN;\n }\n if (this._orgCss) {\n util.setStyleFromCsstext(root, this._orgCss);\n this._orgCss = \"\";\n }\n util.removeClass(root, rootClass);\n if (el && el !== root && this._orgPCss) {\n util.setStyleFromCsstext(el, this._orgPCss);\n this._orgPCss = \"\";\n util.removeClass(el, pClassName);\n el.removeAttribute(PLATER_ID);\n }\n }\n }, {\n key: \"getFullscreen\",\n value: function getFullscreen() {\n var el = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;\n var root = this.root, media = this.media;\n if (!el) {\n el = root;\n }\n this._fullScreenOffset = {\n top: util.scrollTop(),\n left: util.scrollLeft()\n };\n this._fullscreenEl = el;\n this._fullActionFrom = \"get\";\n var fullEl = util.getFullScreenEl();\n if (fullEl === this._fullscreenEl) {\n this.onFullscreenChange();\n return Promise.resolve();\n }\n try {\n for (var i = 0; i < GET_FULLSCREEN_API.length; i++) {\n var key = GET_FULLSCREEN_API[i];\n if (el[key]) {\n var ret = key === \"webkitRequestFullscreen\" ? el.webkitRequestFullscreen(window.Element.ALLOW_KEYBOARD_INPUT) : el[key]();\n if (ret && ret.then) {\n return ret;\n } else {\n return Promise.resolve();\n }\n }\n }\n if (media.fullscreenEnabled || media.webkitSupportsFullscreen) {\n media.webkitEnterFullscreen();\n return Promise.resolve();\n }\n return Promise.reject(new Error(\"call getFullscreen fail\"));\n } catch (err) {\n return Promise.reject(new Error(\"call getFullscreen fail\"));\n }\n }\n }, {\n key: \"exitFullscreen\",\n value: function exitFullscreen(el) {\n if (this.isRotateFullscreen) {\n this.exitRotateFullscreen();\n }\n if (!this._fullscreenEl && !util.getFullScreenEl()) {\n return;\n }\n this.root;\n var media = this.media;\n this._fullActionFrom = \"exit\";\n try {\n for (var i = 0; i < EXIT_FULLSCREEN_API.length; i++) {\n var key = EXIT_FULLSCREEN_API[i];\n if (document[key]) {\n var ret = document[key]();\n if (ret && ret.then) {\n return ret;\n } else {\n return Promise.resolve();\n }\n }\n }\n if (media && media.webkitSupportsFullscreen) {\n media.webkitExitFullScreen();\n return Promise.resolve();\n }\n return Promise.reject(new Error(\"call exitFullscreen fail\"));\n } catch (err) {\n return Promise.reject(new Error(\"call exitFullscreen fail\"));\n }\n }\n }, {\n key: \"getCssFullscreen\",\n value: function getCssFullscreen() {\n var el = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;\n if (this.isRotateFullscreen) {\n this.exitRotateFullscreen();\n } else if (this.fullscreen) {\n this.exitFullscreen();\n }\n var _class = el ? \"\".concat(STATE_CLASS.INNER_FULLSCREEN, \" \").concat(STATE_CLASS.CSS_FULLSCREEN) : STATE_CLASS.CSS_FULLSCREEN;\n this.changeFullStyle(this.root, el, _class);\n var _this$config$fullscre = this.config.fullscreen, fullscreen = _this$config$fullscre === void 0 ? {} : _this$config$fullscre;\n var useCssFullscreen = fullscreen.useCssFullscreen === true || typeof fullscreen.useCssFullscreen === \"function\" && fullscreen.useCssFullscreen();\n if (useCssFullscreen) {\n this.fullscreen = true;\n this.emit(FULLSCREEN_CHANGE, true);\n }\n this._cssfullscreenEl = el;\n this.cssfullscreen = true;\n this.emit(CSS_FULLSCREEN_CHANGE, true);\n }\n }, {\n key: \"exitCssFullscreen\",\n value: function exitCssFullscreen() {\n var _class = this._cssfullscreenEl ? \"\".concat(STATE_CLASS.INNER_FULLSCREEN, \" \").concat(STATE_CLASS.CSS_FULLSCREEN) : STATE_CLASS.CSS_FULLSCREEN;\n if (!this.fullscreen) {\n this.recoverFullStyle(this.root, this._cssfullscreenEl, _class);\n } else {\n var _this$config$fullscre2 = this.config.fullscreen, fullscreen = _this$config$fullscre2 === void 0 ? {} : _this$config$fullscre2;\n var useCssFullscreen = fullscreen.useCssFullscreen === true || typeof fullscreen.useCssFullscreen === \"function\" && fullscreen.useCssFullscreen();\n if (useCssFullscreen) {\n this.recoverFullStyle(this.root, this._cssfullscreenEl, _class);\n this.fullscreen = false;\n this.emit(FULLSCREEN_CHANGE, false);\n } else {\n this.removeClass(_class);\n }\n }\n this._cssfullscreenEl = null;\n this.cssfullscreen = false;\n this.emit(CSS_FULLSCREEN_CHANGE, false);\n }\n }, {\n key: \"getRotateFullscreen\",\n value: function getRotateFullscreen() {\n var el = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.fullscreenTarget;\n if (this.cssfullscreen) {\n this.exitCssFullscreen(el);\n }\n var _class = el ? \"\".concat(STATE_CLASS.INNER_FULLSCREEN, \" \").concat(STATE_CLASS.ROTATE_FULLSCREEN) : STATE_CLASS.ROTATE_FULLSCREEN;\n this._fullscreenEl = el || this.root;\n this.changeFullStyle(this.root, el, _class, STATE_CLASS.PARENT_ROTATE_FULLSCREEN);\n this.isRotateFullscreen = true;\n this.fullscreen = true;\n this.setRotateDeg(90);\n this._rootStyle = this.root.getAttribute(\"style\");\n this.root.style.width = \"\".concat(window.innerHeight, \"px\");\n this.emit(FULLSCREEN_CHANGE, true);\n }\n }, {\n key: \"exitRotateFullscreen\",\n value: function exitRotateFullscreen(el) {\n var _class = this._fullscreenEl !== this.root ? \"\".concat(STATE_CLASS.INNER_FULLSCREEN, \" \").concat(STATE_CLASS.ROTATE_FULLSCREEN) : STATE_CLASS.ROTATE_FULLSCREEN;\n this.recoverFullStyle(this.root, this._fullscreenEl, _class, STATE_CLASS.PARENT_ROTATE_FULLSCREEN);\n this.isRotateFullscreen = false;\n this.fullscreen = false;\n this.setRotateDeg(0);\n this.emit(FULLSCREEN_CHANGE, false);\n if (this._rootStyle) {\n this.root.style.style = this._rootStyle;\n this._rootStyle = false;\n }\n }\n }, {\n key: \"setRotateDeg\",\n value: function setRotateDeg(deg) {\n if (window.orientation === 90 || window.orientation === -90) {\n this.rotateDeg = 0;\n } else {\n this.rotateDeg = deg;\n }\n }\n }, {\n key: \"focus\",\n value: function focus() {\n var data = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {\n autoHide: !this.config.closeDelayBlur,\n delay: this.config.inactive\n };\n if (this.isActive) {\n this.onFocus(data);\n return;\n }\n this.emit(PLAYER_FOCUS, _objectSpread2({\n paused: this.paused,\n ended: this.ended\n }, data));\n }\n }, {\n key: \"blur\",\n value: function blur() {\n var data = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {\n ignorePaused: false\n };\n if (!this.isActive) {\n this.onBlur(data);\n return;\n }\n this.emit(PLAYER_BLUR, _objectSpread2({\n paused: this.paused,\n ended: this.ended\n }, data));\n }\n }, {\n key: \"onFocus\",\n value: function onFocus() {\n var _this21 = this;\n var data = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {\n autoHide: true,\n delay: 3e3\n };\n var innerStates = this.innerStates;\n this.isActive = true;\n this.removeClass(STATE_CLASS.INACTIVE);\n if (this.userTimer) {\n util.clearTimeout(this, this.userTimer);\n this.userTimer = null;\n }\n if (data.isLock !== void 0) {\n innerStates.isActiveLocked = data.isLock;\n }\n if (data.autoHide === false || data.isLock === true || innerStates.isActiveLocked) {\n if (this.userTimer) {\n util.clearTimeout(this, this.userTimer);\n this.userTimer = null;\n }\n return;\n }\n var time = data && data.delay ? data.delay : this.config.inactive;\n this.userTimer = util.setTimeout(this, function() {\n _this21.userTimer = null;\n _this21.blur();\n }, time);\n }\n }, {\n key: \"onBlur\",\n value: function onBlur() {\n var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref$ignorePaused = _ref.ignorePaused, ignorePaused = _ref$ignorePaused === void 0 ? false : _ref$ignorePaused;\n if (!this.isActive || this.innerStates.isActiveLocked) {\n return;\n }\n var closePauseVideoFocus = this.config.closePauseVideoFocus;\n this.isActive = false;\n if (ignorePaused || closePauseVideoFocus || !this.paused && !this.ended) {\n this.addClass(STATE_CLASS.INACTIVE);\n }\n }\n }, {\n key: \"onEmptied\",\n value: function onEmptied() {\n this.updateAcc(\"emptied\");\n }\n }, {\n key: \"onCanplay\",\n value: function onCanplay() {\n this.removeClass(STATE_CLASS.ENTER);\n this.removeClass(STATE_CLASS.ERROR);\n this.removeClass(STATE_CLASS.LOADING);\n this.isCanplay = true;\n this.waitTimer && util.clearTimeout(this, this.waitTimer);\n }\n }, {\n key: \"onLoadeddata\",\n value: function onLoadeddata() {\n this.isError = false;\n this.isSeeking = false;\n }\n }, {\n key: \"onLoadstart\",\n value: function onLoadstart() {\n this.removeClass(STATE_CLASS.ERROR);\n this.isCanplay = false;\n }\n }, {\n key: \"onPlay\",\n value: function onPlay() {\n if (this.state === STATES.ENDED) {\n this.setState(STATES.RUNNING);\n }\n this.removeClass(STATE_CLASS.PAUSED);\n this.ended && this.removeClass(STATE_CLASS.ENDED);\n !this.config.closePlayVideoFocus && this.focus();\n }\n }, {\n key: \"onPause\",\n value: function onPause() {\n this.addClass(STATE_CLASS.PAUSED);\n this.updateAcc(\"pause\");\n if (!this.config.closePauseVideoFocus) {\n if (this.userTimer) {\n util.clearTimeout(this, this.userTimer);\n this.userTimer = null;\n }\n this.focus();\n }\n }\n }, {\n key: \"onEnded\",\n value: function onEnded() {\n this.updateAcc(\"ended\");\n this.addClass(STATE_CLASS.ENDED);\n this.setState(STATES.ENDED);\n }\n }, {\n key: \"onError\",\n value: function onError() {\n this.isError = true;\n this.updateAcc(\"error\");\n this.removeClass(STATE_CLASS.NOT_ALLOW_AUTOPLAY);\n this.removeClass(STATE_CLASS.NO_START);\n this.removeClass(STATE_CLASS.ENTER);\n this.removeClass(STATE_CLASS.LOADING);\n this.addClass(STATE_CLASS.ERROR);\n }\n }, {\n key: \"onSeeking\",\n value: function onSeeking() {\n if (!this.isSeeking) {\n this.updateAcc(\"seeking\");\n }\n this.isSeeking = true;\n this.addClass(STATE_CLASS.SEEKING);\n }\n }, {\n key: \"onSeeked\",\n value: function onSeeked() {\n this.isSeeking = false;\n if (this.waitTimer) {\n util.clearTimeout(this, this.waitTimer);\n }\n this.removeClass(STATE_CLASS.LOADING);\n this.removeClass(STATE_CLASS.SEEKING);\n }\n }, {\n key: \"onWaiting\",\n value: function onWaiting() {\n var _this22 = this;\n if (this.waitTimer) {\n util.clearTimeout(this, this.waitTimer);\n }\n this.updateAcc(\"waiting\");\n this.waitTimer = util.setTimeout(this, function() {\n _this22.addClass(STATE_CLASS.LOADING);\n util.clearTimeout(_this22, _this22.waitTimer);\n _this22.waitTimer = null;\n }, this.config.minWaitDelay);\n }\n }, {\n key: \"onPlaying\",\n value: function onPlaying() {\n var _this23 = this;\n this.isError = false;\n var NO_START = STATE_CLASS.NO_START, PAUSED = STATE_CLASS.PAUSED, ENDED = STATE_CLASS.ENDED, ERROR2 = STATE_CLASS.ERROR, REPLAY2 = STATE_CLASS.REPLAY, LOADING = STATE_CLASS.LOADING;\n var clsList = [NO_START, PAUSED, ENDED, ERROR2, REPLAY2, LOADING];\n clsList.forEach(function(cls) {\n _this23.removeClass(cls);\n });\n }\n }, {\n key: \"onTimeupdate\",\n value: function onTimeupdate() {\n !this._videoHeight && this.media.videoHeight && this.resize();\n if ((this.waitTimer || this.hasClass(STATE_CLASS.LOADING)) && this.media.readyState > 2) {\n this.removeClass(STATE_CLASS.LOADING);\n util.clearTimeout(this, this.waitTimer);\n this.waitTimer = null;\n }\n if (!this.paused && this.state < STATES.RUNNING && this.duration) {\n this.setState(STATES.RUNNING);\n this.emit(AUTOPLAY_STARTED);\n }\n if (!this._accPlayed.t && !this.paused && !this.ended) {\n this._accPlayed.t = new Date().getTime();\n }\n }\n }, {\n key: \"onVolumechange\",\n value: function onVolumechange() {\n util.typeOf(this.config.volume) === \"Number\" && (this.config.volume = this.volume);\n }\n }, {\n key: \"onRatechange\",\n value: function onRatechange() {\n this.config.defaultPlaybackRate = this.playbackRate;\n }\n }, {\n key: \"emitUserAction\",\n value: function emitUserAction(event, action, params) {\n if (!this.media || !action || !event) {\n return;\n }\n var eventType = util.typeOf(event) === \"String\" ? event : event.type || \"\";\n if (params.props && util.typeOf(params.props) !== \"Array\") {\n params.props = [params.props];\n }\n this.emit(USER_ACTION, _objectSpread2({\n eventType,\n action,\n currentTime: this.currentTime,\n duration: this.duration,\n ended: this.ended,\n event\n }, params));\n }\n }, {\n key: \"updateAcc\",\n value: function updateAcc(endType) {\n if (this._accPlayed.t) {\n var _at = new Date().getTime() - this._accPlayed.t;\n this._accPlayed.acc += _at;\n this._accPlayed.t = 0;\n if (endType === \"ended\" || this.ended) {\n this._accPlayed.loopAcc = this._accPlayed.acc;\n }\n }\n }\n }, {\n key: \"checkBuffer\",\n value: function checkBuffer(time) {\n var buffered = this.media.buffered;\n if (!buffered || buffered.length === 0 || !this.duration) {\n return true;\n }\n var currentTime = time || this.media.currentTime || 0.2;\n var len = buffered.length;\n for (var i = 0; i < len; i++) {\n if (buffered.start(i) <= currentTime && buffered.end(i) > currentTime) {\n return true;\n }\n }\n return false;\n }\n }, {\n key: \"resizePosition\",\n value: function resizePosition() {\n var _this$videoPos = this.videoPos, rotate = _this$videoPos.rotate, vy = _this$videoPos.vy, vx = _this$videoPos.vx, h = _this$videoPos.h, w = _this$videoPos.w;\n if (rotate < 0 && !vy && !vx) {\n return;\n }\n var _pi = this.videoPos._pi;\n if (!_pi && this.media.videoHeight) {\n _pi = this.media.videoWidth / this.media.videoHeight * 100;\n }\n if (!_pi) {\n return;\n }\n this.videoPos.pi = _pi;\n var _pos = {\n rotate\n };\n var offsetY = 0;\n var offsetX = 0;\n var scale = 1;\n var _t = Math.abs(rotate / 90);\n var root = this.root, innerContainer = this.innerContainer;\n var width = root.offsetWidth;\n var height = innerContainer ? innerContainer.offsetHeight : root.offsetHeight;\n var rHeight = height;\n var rWidth = width;\n if (_t % 2 === 0) {\n scale = h > 0 ? 100 / h : w > 0 ? 100 / w : 1;\n _pos.scale = scale;\n offsetY = vy > 0 ? (100 - h) / 2 - vy : 0;\n _pos.y = _t === 2 ? 0 - offsetY : offsetY;\n offsetX = vx > 0 ? (100 - w) / 2 - vx : 0;\n _pos.x = _t === 2 ? 0 - offsetX : offsetX;\n this.media.style.width = \"\".concat(rWidth, \"px\");\n this.media.style.height = \"\".concat(rHeight, \"px\");\n } else if (_t % 2 === 1) {\n rWidth = height;\n rHeight = width;\n var offset = height - width;\n offsetX = -offset / 2 / rWidth * 100;\n _pos.x = _t === 3 ? offsetX + vy / 2 : offsetX - vy / 2;\n offsetY = offset / 2 / rHeight * 100;\n _pos.y = _t === 3 ? offsetY + vx / 2 : offsetY - vx / 2;\n _pos.scale = scale;\n this.media.style.width = \"\".concat(rWidth, \"px\");\n this.media.style.height = \"\".concat(rHeight, \"px\");\n }\n var formStyle = util.getTransformStyle(_pos, this.media.style.transform || this.media.style.webkitTransform);\n this.media.style.transform = formStyle;\n this.media.style.webkitTransform = formStyle;\n }\n }, {\n key: \"position\",\n value: function position() {\n var pos = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {\n h: 0,\n y: 0,\n x: 0,\n w: 0\n };\n if (!this.media || !pos || !pos.h) {\n return;\n }\n var videoPos = this.videoPos;\n videoPos.h = pos.h * 100 || 0;\n videoPos.w = pos.w * 100 || 0;\n videoPos.vx = pos.x * 100 || 0;\n videoPos.vy = pos.y * 100 || 0;\n this.resizePosition();\n }\n }, {\n key: \"setConfig\",\n value: function setConfig(config) {\n var _this24 = this;\n if (!config) {\n return;\n }\n Object.keys(config).map(function(key) {\n if (key !== \"plugins\") {\n _this24.config[key] = config[key];\n var plugin = _this24.plugins[key.toLowerCase()];\n if (plugin && util.typeOf(plugin.setConfig) === \"Function\") {\n plugin.setConfig(config[key]);\n }\n }\n });\n }\n }, {\n key: \"playNext\",\n value: function playNext(config) {\n var _this25 = this;\n this.resetState();\n this.setConfig(config);\n this._currentTime = 0;\n this._duration = 0;\n runHooks(this, \"playnext\", function() {\n _this25.start();\n _this25.emit(PLAYNEXT, config);\n });\n }\n }, {\n key: \"resize\",\n value: function resize() {\n var _this26 = this;\n if (!this.media) {\n return;\n }\n var containerSize = this.root.getBoundingClientRect();\n this.sizeInfo.width = containerSize.width;\n this.sizeInfo.height = containerSize.height;\n this.sizeInfo.left = containerSize.left;\n this.sizeInfo.top = containerSize.top;\n var _this$media = this.media, videoWidth = _this$media.videoWidth, videoHeight = _this$media.videoHeight;\n var _this$config6 = this.config, fitVideoSize = _this$config6.fitVideoSize, videoFillMode = _this$config6.videoFillMode;\n if (videoFillMode === \"fill\" || videoFillMode === \"cover\" || videoFillMode === \"contain\") {\n this.setAttribute(\"data-xgfill\", videoFillMode);\n }\n if (!videoHeight || !videoWidth) {\n return;\n }\n this._videoHeight = videoHeight;\n this._videoWidth = videoWidth;\n var controlsHeight = this.controls && this.innerContainer ? this.controls.root.getBoundingClientRect().height : 0;\n var width = containerSize.width;\n var height = containerSize.height - controlsHeight;\n var videoFit = parseInt(videoWidth / videoHeight * 1e3, 10);\n var fit = parseInt(width / height * 1e3, 10);\n var rWidth = width;\n var rHeight = height;\n var _style = {};\n if (fitVideoSize === \"auto\" && fit > videoFit || fitVideoSize === \"fixWidth\") {\n rHeight = width / videoFit * 1e3;\n if (this.config.fluid) {\n _style.paddingTop = \"\".concat(rHeight * 100 / rWidth, \"%\");\n } else {\n _style.height = \"\".concat(rHeight + controlsHeight, \"px\");\n }\n } else if (fitVideoSize === \"auto\" && fit < videoFit || fitVideoSize === \"fixHeight\") {\n rWidth = videoFit * height / 1e3;\n _style.width = \"\".concat(rWidth, \"px\");\n }\n if (!this.fullscreen && !this.cssfullscreen) {\n Object.keys(_style).forEach(function(key) {\n _this26.root.style[key] = _style[key];\n });\n }\n if (videoFillMode === \"fillHeight\" && fit < videoFit || videoFillMode === \"fillWidth\" && fit > videoFit) {\n this.setAttribute(\"data-xgfill\", \"cover\");\n }\n var data = {\n videoScale: videoFit,\n vWidth: rWidth,\n vHeight: rHeight,\n cWidth: rWidth,\n cHeight: rHeight + controlsHeight\n };\n this.resizePosition();\n this.emit(VIDEO_RESIZE, data);\n }\n }, {\n key: \"updateObjectPosition\",\n value: function updateObjectPosition() {\n var left = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;\n var top = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n if (this.media.updateObjectPosition) {\n this.media.updateObjectPosition(left, top);\n return;\n }\n this.media.style.objectPosition = \"\".concat(left * 100, \"% \").concat(top * 100, \"%\");\n }\n }, {\n key: \"setState\",\n value: function setState(newState) {\n XG_DEBUG.logInfo(\"setState\", \"state from:\".concat(STATE_ARRAY[this.state], \" to:\").concat(STATE_ARRAY[newState]));\n this._state = newState;\n }\n }, {\n key: \"preProcessUrl\",\n value: function preProcessUrl(url, ext) {\n var preProcessUrl2 = this.config.preProcessUrl;\n return !util.isBlob(url) && preProcessUrl2 && typeof preProcessUrl2 === \"function\" ? preProcessUrl2(url, ext) : {\n url\n };\n }\n }, {\n key: \"state\",\n get: function get() {\n return this._state;\n }\n }, {\n key: \"isFullscreen\",\n get: function get() {\n return this.fullscreen;\n }\n }, {\n key: \"isCssfullScreen\",\n get: function get() {\n return this.cssfullscreen;\n }\n }, {\n key: \"hasStart\",\n get: function get() {\n return this._hasStart;\n },\n set: function set(bool) {\n if (typeof bool === \"boolean\") {\n this._hasStart = bool;\n if (bool === false) {\n this.setState(STATES.READY);\n }\n this.emit(\"hasstart\");\n }\n }\n }, {\n key: \"isPlaying\",\n get: function get() {\n return this._state === STATES.RUNNING || this._state === STATES.ENDED;\n },\n set: function set(value) {\n if (value) {\n this.setState(STATES.RUNNING);\n } else {\n this._state >= STATES.RUNNING && this.setState(STATES.ATTACHED);\n }\n }\n }, {\n key: \"definitionList\",\n get: function get() {\n if (!this.config || !this.config.definition) {\n return [];\n }\n return this.config.definition.list || [];\n },\n set: function set(list) {\n var _this27 = this;\n var definition = this.config.definition;\n var curDef = null;\n var targetDef = null;\n definition.list = list;\n this.emit(\"resourceReady\", list);\n list.forEach(function(item) {\n var _this27$curDefinition;\n if (((_this27$curDefinition = _this27.curDefinition) === null || _this27$curDefinition === void 0 ? void 0 : _this27$curDefinition.definition) === item.definition) {\n curDef = item;\n }\n if (definition.defaultDefinition === item.definition) {\n targetDef = item;\n }\n });\n if (!targetDef && list.length > 0) {\n targetDef = list[0];\n }\n curDef ? this.changeDefinition(curDef) : targetDef && this.changeDefinition(targetDef);\n }\n }, {\n key: \"videoFrameInfo\",\n get: function get() {\n var ret = {\n total: 0,\n dropped: 0,\n corrupted: 0,\n droppedRate: 0,\n droppedDuration: 0\n };\n if (!this.media || !this.media.getVideoPlaybackQuality) {\n return ret;\n }\n var _quality = this.media.getVideoPlaybackQuality();\n ret.dropped = _quality.droppedVideoFrames || 0;\n ret.total = _quality.totalVideoFrames || 0;\n ret.corrupted = _quality.corruptedVideoFrames || 0;\n if (ret.total > 0) {\n ret.droppedRate = ret.dropped / ret.total * 100;\n ret.droppedDuration = parseInt(this.cumulateTime / ret.total * ret.dropped, 0);\n }\n return ret;\n }\n }, {\n key: \"lang\",\n get: function get() {\n return this.config.lang;\n },\n set: function set(lang) {\n var result = I18N.langKeys.filter(function(key) {\n return key === lang;\n });\n if (result.length === 0 && lang !== \"zh\") {\n console.error(\"Sorry, set lang fail, because the language [\".concat(lang, \"] is not supported now, list of all supported languages is [\").concat(I18N.langKeys.join(), \"] \"));\n return;\n }\n this.config.lang = lang;\n pluginsManager.setLang(lang, this);\n }\n }, {\n key: \"i18n\",\n get: function get() {\n var _l = this.config.lang;\n if (_l === \"zh\") {\n _l = \"zh-cn\";\n }\n return this.__i18n.lang[_l] || this.__i18n.lang.en;\n }\n }, {\n key: \"i18nKeys\",\n get: function get() {\n return this.__i18n.textKeys || {};\n }\n }, {\n key: \"version\",\n get: function get() {\n return version;\n }\n }, {\n key: \"playerId\",\n get: function get() {\n return this._pluginInfoId;\n }\n }, {\n key: \"url\",\n get: function get() {\n return this.__url || this.config.url;\n },\n set: function set(url) {\n this.__url = url;\n }\n }, {\n key: \"poster\",\n get: function get() {\n return this.plugins.poster ? this.plugins.poster.config.poster : this.config.poster;\n },\n set: function set(posterUrl) {\n this.plugins.poster && this.plugins.poster.update(posterUrl);\n }\n }, {\n key: \"readyState\",\n get: function get() {\n return _get(_getPrototypeOf(Player2.prototype), \"readyState\", this);\n }\n }, {\n key: \"error\",\n get: function get() {\n var key = _get(_getPrototypeOf(Player2.prototype), \"error\", this);\n return this.i18n[key] || key;\n }\n }, {\n key: \"networkState\",\n get: function get() {\n return _get(_getPrototypeOf(Player2.prototype), \"networkState\", this);\n }\n }, {\n key: \"fullscreenChanging\",\n get: function get() {\n return !(this._fullScreenOffset === null);\n }\n }, {\n key: \"cumulateTime\",\n get: function get() {\n var _this$_accPlayed = this._accPlayed, acc = _this$_accPlayed.acc, t = _this$_accPlayed.t;\n return t ? new Date().getTime() - t + acc : acc;\n }\n }, {\n key: \"zoom\",\n get: function get() {\n return this.config.zoom;\n },\n set: function set(value) {\n this.config.zoom = value;\n }\n }, {\n key: \"videoRotateDeg\",\n get: function get() {\n return this.videoPos.rotate;\n },\n set: function set(val) {\n val = util.convertDeg(val);\n if (val % 90 !== 0 || val === this.videoPos.rotate) {\n return;\n }\n this.videoPos.rotate = val;\n this.resizePosition();\n }\n }, {\n key: \"avgSpeed\",\n get: function get() {\n return AVG_SPEED;\n },\n set: function set(val) {\n AVG_SPEED = val;\n }\n }, {\n key: \"realTimeSpeed\",\n get: function get() {\n return REAL_TIME_SPEED;\n },\n set: function set(val) {\n REAL_TIME_SPEED = val;\n }\n }, {\n key: \"offsetCurrentTime\",\n get: function get() {\n return this._offsetInfo.currentTime || 0;\n },\n set: function set(val) {\n this._offsetInfo.currentTime = val;\n }\n }, {\n key: \"offsetDuration\",\n get: function get() {\n return this._offsetInfo.duration || 0;\n },\n set: function set(val) {\n this._offsetInfo.duration = val || 0;\n }\n }, {\n key: \"hook\",\n value: function hook$1(hookName, handler) {\n return hook.call.apply(hook, [this].concat(Array.prototype.slice.call(arguments)));\n }\n }, {\n key: \"useHooks\",\n value: function useHooks$1(hookName, handler) {\n return useHooks.call.apply(useHooks, [this].concat(Array.prototype.slice.call(arguments)));\n }\n }, {\n key: \"removeHooks\",\n value: function removeHooks$1(hookName, handler) {\n return removeHooks.call.apply(removeHooks, [this].concat(Array.prototype.slice.call(arguments)));\n }\n }, {\n key: \"usePluginHooks\",\n value: function usePluginHooks$1(pluginName, hookName, handler) {\n for (var _len = arguments.length, args = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n args[_key - 3] = arguments[_key];\n }\n return usePluginHooks.call.apply(usePluginHooks, [this].concat(Array.prototype.slice.call(arguments)));\n }\n }, {\n key: \"removePluginHooks\",\n value: function removePluginHooks$1(pluginName, hookName, handler) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) {\n args[_key2 - 3] = arguments[_key2];\n }\n return removePluginHooks.call.apply(removePluginHooks, [this].concat(Array.prototype.slice.call(arguments)));\n }\n }, {\n key: \"setUserActive\",\n value: function setUserActive(isActive, isMuted) {\n if (typeof isMuted === \"boolean\" && isMuted !== this.muted) {\n this.addInnerOP(\"volumechange\");\n this.muted = isMuted;\n }\n pluginsManager.setCurrentUserActive(this.playerId, isActive);\n }\n }], [{\n key: \"debugger\",\n get: function get() {\n return XG_DEBUG.config.debug;\n },\n set: function set(value) {\n XG_DEBUG.config.debug = value;\n }\n }, {\n key: \"getCurrentUserActivePlayerId\",\n value: function getCurrentUserActivePlayerId() {\n return pluginsManager.getCurrentUseActiveId();\n }\n }, {\n key: \"setCurrentUserActive\",\n value: function setCurrentUserActive(playerId, isActive) {\n pluginsManager.setCurrentUserActive(playerId, isActive);\n }\n }, {\n key: \"isHevcSupported\",\n value: function isHevcSupported() {\n return sniffer.isHevcSupported();\n }\n }, {\n key: \"probeConfigSupported\",\n value: function probeConfigSupported(info) {\n return sniffer.probeConfigSupported(info);\n }\n }, {\n key: \"install\",\n value: function install(name, descriptor) {\n if (!Player2.plugins) {\n Player2.plugins = {};\n }\n if (!Player2.plugins[name]) {\n Player2.plugins[name] = descriptor;\n }\n }\n }, {\n key: \"use\",\n value: function use(name, descriptor) {\n if (!Player2.plugins) {\n Player2.plugins = {};\n }\n Player2.plugins[name] = descriptor;\n }\n }]);\n return Player2;\n}(MediaProxy);\n_defineProperty(Player, \"defaultPreset\", null);\n_defineProperty(Player, \"XgVideoProxy\", null);\nexport { Player as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, objectSpread2 as _objectSpread2 } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { LOAD_START, LOADED_DATA, SEEKING, SEEKED, DESTROY, URL_CHANGE, PLAYING, CANPLAY, WAITING, ERROR, RESET, AUTOPLAY_STARTED, TIME_UPDATE, XGLOG } from \"../../events.js\";\nimport XG_DEBUG from \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nfunction now() {\n return new Date().getTime();\n}\nvar LOG_TYPES = {\n LOAD_START: \"loadstart\",\n LOADED_DATA: \"loadeddata\",\n FIRST_FRAME: \"firstFrame\",\n WAIT_START: \"waitingStart\",\n WAIT_END: \"waitingEnd\",\n SEEK_START: \"seekStart\",\n SEEK_END: \"seekEnd\"\n};\nvar XGLogger = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(XGLogger2, _BasePlugin);\n var _super = _createSuper(XGLogger2);\n function XGLogger2() {\n var _this;\n _classCallCheck(this, XGLogger2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"_onTimeupdate\", function() {\n _this._state.isTimeUpdate = true;\n if (_this._state.autoplayStart) {\n XG_DEBUG.logInfo(\"[xgLogger]\".concat(_this.player.playerId, \" _onTimeupdate\"));\n _this._sendFF(\"onTimeupdate\");\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"_onAutoplayStart\", function() {\n XG_DEBUG.logInfo(\"[xgLogger]\".concat(_this.player.playerId, \" _onAutoplayStart\"));\n _this._state.autoplayStart = true;\n _this.vt && _this._sendFF(\"onAutoplayStart\");\n });\n _defineProperty(_assertThisInitialized(_this), \"_onReset\", function() {\n _this._state = {\n autoplayStart: false,\n isFFLoading: false,\n isTimeUpdate: false,\n isFFSend: false,\n isLs: false\n };\n _this.vt = 0;\n _this.pt = 0;\n _this.fvt = 0;\n _this.newPointTime = now();\n _this.loadedCostTime = 0;\n _this.startCostTime = 0;\n _this._isSeeking = false;\n _this.seekingStart = 0;\n _this.waitingStart = 0;\n _this.fixedWaitingStart = 0;\n _this._isWaiting = false;\n _this._waitTimer && util.clearTimeout(_assertThisInitialized(_this), _this._waitTimer);\n _this._waittTimer && util.clearTimeout(_assertThisInitialized(_this), _this._waittTimer);\n _this._waitTimer = null;\n _this._waittTimer = null;\n _this._waitType = 0;\n });\n _defineProperty(_assertThisInitialized(_this), \"_onSeeking\", function() {\n if (_this.seekingStart) {\n return;\n }\n _this.suspendWaitingStatus(\"seek\");\n _this.seekingStart = now();\n _this.emitLog(LOG_TYPES.SEEK_START, {\n start: now()\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"_onSeeked\", function() {\n _this.suspendSeekingStatus(\"seeked\");\n });\n _defineProperty(_assertThisInitialized(_this), \"_onWaitingLoadStart\", function() {\n if (_this._isWaiting || _this.vt) {\n return;\n }\n _this._isWaiting = true;\n _this.waitingStart = now();\n _this.fixedWaitingStart = now();\n _this._waitType = 1;\n _this.emitLog(LOG_TYPES.WAIT_START, {\n fixedStart: _this.fixedWaitingStart,\n start: _this.waitingStart,\n type: 1,\n endType: \"loadstart\"\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"_onWaiting\", function() {\n if (_this._isWaiting || !_this.vt) {\n return;\n }\n _this._isWaiting = true;\n if (!_this.vt) {\n _this._waitType = 1;\n } else if (_this.seekingStart) {\n _this._waitType = 2;\n } else {\n _this._waitType = 0;\n }\n _this.fixedWaitingStart = now();\n _this._waitTimer = util.setTimeout(_assertThisInitialized(_this), function() {\n if (_this._isWaiting) {\n _this.waitingStart = now();\n util.clearTimeout(_assertThisInitialized(_this), _this._waitTimer);\n _this._waitTimer = null;\n _this._startWaitTimeout();\n _this.emitLog(LOG_TYPES.WAIT_START, {\n fixedStart: _this.fixedWaitingStart,\n start: _this.waitingStart,\n type: _this._waitType,\n endType: _this._waitType === 2 ? \"seek\" : \"playing\"\n });\n }\n }, 200);\n });\n _defineProperty(_assertThisInitialized(_this), \"_onError\", function() {\n _this.suspendSeekingStatus(\"error\");\n _this.suspendWaitingStatus(\"error\");\n });\n _defineProperty(_assertThisInitialized(_this), \"_onPlaying\", function() {\n _this._isWaiting && _this.suspendWaitingStatus(\"playing\");\n });\n return _this;\n }\n _createClass(XGLogger2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n this._onReset();\n this._waitType = \"firstFrame\";\n this._initOnceEvents();\n this.newPointTime = now();\n this.loadedCostTime = 0;\n this.startCostTime = 0;\n this.on(LOAD_START, function() {\n var _state = _this2._state;\n var autoplayStart = _state.autoplayStart, isFFSend = _state.isFFSend;\n _this2.startCostTime = now() - _this2.newPointTime;\n XG_DEBUG.logInfo(\"[xgLogger]\".concat(_this2.player.playerId, \" LOAD_START\"), \"autoplayStart:\".concat(autoplayStart, \" isFFSend:\").concat(isFFSend, \" startCostTime:\").concat(_this2.startCostTime, \" newPointTime\").concat(_this2.newPointTime));\n if (isFFSend) {\n return;\n }\n !_state.isLs && _this2.emitLog(LOG_TYPES.LOAD_START, {});\n _state.isLs = true;\n _state.isTimeUpdate = false;\n _state.isFFLoading = true;\n _this2.pt = now();\n _this2.vt = 0;\n _this2.fvt = 0;\n _this2._initOnceEvents();\n _this2._onWaitingLoadStart();\n });\n this.on(LOADED_DATA, function() {\n _this2.vt = now();\n _this2.fvt = _this2.vt - _this2.pt;\n _this2.loadedCostTime = _this2.vt - _this2.newPointTime;\n var _this2$_state = _this2._state, isTimeUpdate = _this2$_state.isTimeUpdate, isFFSend = _this2$_state.isFFSend, autoplayStart = _this2$_state.autoplayStart;\n XG_DEBUG.logInfo(\"[xgLogger]\".concat(_this2.player.playerId, \" LOADED_DATA\"), \"fvt:\".concat(_this2.fvt, \" isTimeUpdate:\").concat(_this2._state.isTimeUpdate, \" loadedCostTime:\").concat(_this2.loadedCostTime));\n if (isTimeUpdate || autoplayStart) {\n _this2._sendFF(\"loadedData\");\n }\n if (!isFFSend) {\n _this2.emitLog(LOG_TYPES.LOADED_DATA, {});\n }\n _this2.suspendWaitingStatus(\"loadeddata\");\n });\n this.on(SEEKING, this._onSeeking);\n this.on(SEEKED, this._onSeeked);\n this.on(DESTROY, function() {\n _this2.endState(\"destroy\");\n });\n this.on(URL_CHANGE, function() {\n _this2.endState(\"urlChange\");\n XG_DEBUG.logInfo(\"[xgLogger]\".concat(_this2.player.playerId, \" URL_CHANGE\"));\n _this2._state.isFFSend && _this2._onReset();\n });\n this.on([PLAYING, CANPLAY], this._onPlaying);\n this.on(WAITING, this._onWaiting);\n this.on(ERROR, this._onError);\n this.on(RESET, function() {\n XG_DEBUG.logInfo(\"[xgLogger]\".concat(_this2.player.playerId, \" RESET\"));\n _this2.endState(\"reset\");\n _this2._initOnceEvents();\n _this2._onReset();\n });\n }\n }, {\n key: \"_initOnceEvents\",\n value: function _initOnceEvents() {\n this.off(AUTOPLAY_STARTED, this._onAutoplayStart);\n this.off(TIME_UPDATE, this._onTimeupdate);\n this.once(AUTOPLAY_STARTED, this._onAutoplayStart);\n this.once(TIME_UPDATE, this._onTimeupdate);\n }\n }, {\n key: \"_sendFF\",\n value: function _sendFF(endType) {\n this.s = now();\n var _this$_state = this._state, isFFLoading = _this$_state.isFFLoading, isFFSend = _this$_state.isFFSend;\n XG_DEBUG.logInfo(\"[xgLogger]\".concat(this.player.playerId, \" _sendFF\"), \"\".concat(endType, \" fvt:\").concat(this.fvt, \" isFFLoading:\").concat(isFFLoading, \" !isFFSend:\").concat(!isFFSend));\n if (this.vt > 0 && isFFLoading && !isFFSend) {\n XG_DEBUG.logInfo(\"[xgLogger]\".concat(this.player.playerId, \" emitLog_firstFrame\"), endType);\n this._state.isFFLoading = false;\n this._state.isFFSend = true;\n this.emitLog(LOG_TYPES.FIRST_FRAME, {\n fvt: this.fvt,\n costTime: this.fvt,\n vt: this.vt,\n startCostTime: this.startCostTime,\n loadedCostTime: this.loadedCostTime\n });\n }\n }\n }, {\n key: \"_startWaitTimeout\",\n value: function _startWaitTimeout() {\n var _this3 = this;\n if (this._waittTimer) {\n util.clearTimeout(this, this._waittTimer);\n }\n this._waittTimer = util.setTimeout(this, function() {\n _this3.suspendWaitingStatus(\"timeout\");\n util.clearTimeout(_this3, _this3._waittTimer);\n _this3._waittTimer = null;\n }, this.config.waitTimeout);\n }\n }, {\n key: \"endState\",\n value: function endState(endType) {\n this.suspendWaitingStatus(endType);\n this.suspendSeekingStatus(endType);\n }\n }, {\n key: \"suspendSeekingStatus\",\n value: function suspendSeekingStatus(endType) {\n if (!this.seekingStart) {\n return;\n }\n var _now = now();\n var _cost = _now - this.seekingStart;\n this.seekingStart = 0;\n this.emitLog(LOG_TYPES.SEEK_END, {\n end: _now,\n costTime: _cost,\n endType\n });\n }\n }, {\n key: \"suspendWaitingStatus\",\n value: function suspendWaitingStatus(endType) {\n if (this._waitTimer) {\n util.clearTimeout(this, this._waitTimer);\n this._waitTimer = null;\n }\n if (this._waittTimer) {\n util.clearTimeout(this, this._waittTimer);\n this._waittTimer = null;\n }\n this._isWaiting = false;\n if (!this.waitingStart) {\n return;\n }\n var _now = now();\n var _cost = _now - this.waitingStart;\n var _fixedCost = _now - this.fixedWaitingStart;\n var waitTimeout = this.config.waitTimeout;\n this._isWaiting = false;\n this.waitingStart = 0;\n this.fixedWaitingStart = 0;\n this.emitLog(LOG_TYPES.WAIT_END, {\n fixedCostTime: _fixedCost > waitTimeout ? waitTimeout : _fixedCost,\n costTime: _cost > waitTimeout ? waitTimeout : _cost,\n type: endType === \"loadeddata\" ? 1 : this._waitType,\n endType: this._waitType === 2 ? \"seek\" : endType\n });\n }\n }, {\n key: \"emitLog\",\n value: function emitLog(eventType, data) {\n var player = this.player;\n this.emit(XGLOG, _objectSpread2({\n t: now(),\n host: util.getHostFromUrl(player.currentSrc),\n vtype: player.vtype,\n eventType,\n currentTime: this.player.currentTime,\n readyState: player.video.readyState,\n networkState: player.video.networkState\n }, data));\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"xgLogger\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n waitTimeout: 1e4\n };\n }\n }]);\n return XGLogger2;\n}(Plugin);\nexport { LOG_TYPES, XGLogger as default };\n","function ReplaySvg() {\n return new DOMParser().parseFromString('\\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { ReplaySvg as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { ENDED, PLAY } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nimport ReplaySvg from \"../assets/replay.js\";\nvar Replay = /* @__PURE__ */ function(_Plugin) {\n _inherits(Replay2, _Plugin);\n var _super = _createSuper(Replay2);\n function Replay2() {\n _classCallCheck(this, Replay2);\n return _super.apply(this, arguments);\n }\n _createClass(Replay2, [{\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n replay: ReplaySvg\n };\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this = this;\n Plugin.insert(this.icons.replay, this.root, 0);\n this.__handleReplay = this.hook(\"replayClick\", function() {\n _this.player.replay();\n }, {\n pre: function pre(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n });\n this.bind(\".xgplayer-replay\", [\"click\", \"touchend\"], this.__handleReplay);\n this.on(ENDED, function() {\n if (!_this.playerConfig.loop) {\n util.addClass(_this.player.root, \"replay\");\n }\n if (_this.config.disable) {\n return;\n }\n _this.show();\n var path = _this.root.querySelector(\"path\");\n if (path) {\n var transform = window.getComputedStyle(path).getPropertyValue(\"transform\");\n if (typeof transform === \"string\" && transform.indexOf(\"none\") > -1) {\n return null;\n } else {\n path.setAttribute(\"transform\", transform);\n }\n }\n });\n this.on(PLAY, function() {\n _this.hide();\n });\n }\n }, {\n key: \"handleReplay\",\n value: function handleReplay(e) {\n e.preventDefault();\n e.stopPropagation();\n this.player.replay();\n util.removeClass(this.player.root, \"replay\");\n }\n }, {\n key: \"show\",\n value: function show() {\n if (this.config.disable) {\n return;\n }\n this.root.style.display = \"flex\";\n }\n }, {\n key: \"enable\",\n value: function enable() {\n this.config.disable = false;\n }\n }, {\n key: \"disable\",\n value: function disable() {\n this.config.disable = true;\n this.hide();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.unbind(\".xgplayer-replay\", [\"click\", \"touchend\"], this.__handleReplay);\n }\n }, {\n key: \"render\",\n value: function render() {\n return '\\n ').concat(this.i18n.REPLAY, \"\\n \");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"replay\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n disable: false\n };\n }\n }]);\n return Replay2;\n}(Plugin);\nexport { Replay as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { ENDED, TIME_UPDATE, URL_CHANGE, PLAY } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar Poster = /* @__PURE__ */ function(_Plugin) {\n _inherits(Poster2, _Plugin);\n var _super = _createSuper(Poster2);\n function Poster2() {\n _classCallCheck(this, Poster2);\n return _super.apply(this, arguments);\n }\n _createClass(Poster2, [{\n key: \"isEndedShow\",\n get: function get() {\n return this.config.isEndedShow;\n },\n set: function set(value) {\n this.config.isEndedShow = value;\n }\n }, {\n key: \"hide\",\n value: function hide() {\n util.addClass(this.root, \"hide\");\n }\n }, {\n key: \"show\",\n value: function show() {\n util.removeClass(this.root, \"hide\");\n }\n }, {\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n if (typeof args.player.config.poster === \"string\") {\n args.config.poster = args.player.config.poster;\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this = this;\n this.on(ENDED, function() {\n if (_this.isEndedShow) {\n util.removeClass(_this.root, \"hide\");\n }\n });\n if (this.config.hideCanplay) {\n this.once(TIME_UPDATE, function() {\n _this.onTimeUpdate();\n });\n this.on(URL_CHANGE, function() {\n util.removeClass(_this.root, \"hide\");\n util.addClass(_this.root, \"xg-showplay\");\n _this.once(TIME_UPDATE, function() {\n _this.onTimeUpdate();\n });\n });\n } else {\n this.on(PLAY, function() {\n util.addClass(_this.root, \"hide\");\n });\n }\n }\n }, {\n key: \"onTimeUpdate\",\n value: function onTimeUpdate() {\n var _this2 = this;\n if (!this.player.currentTime) {\n this.once(TIME_UPDATE, function() {\n _this2.onTimeUpdate();\n });\n } else {\n util.removeClass(this.root, \"xg-showplay\");\n }\n }\n }, {\n key: \"update\",\n value: function update(poster) {\n if (!poster) {\n return;\n }\n this.config.poster = poster;\n this.root.style.backgroundImage = \"url(\".concat(poster, \")\");\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$config = this.config, poster = _this$config.poster, hideCanplay = _this$config.hideCanplay;\n var style = poster ? \"background-image:url(\".concat(poster, \");\") : \"\";\n return '\\n ');\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"poster\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n isEndedShow: true,\n hideCanplay: false,\n poster: \"\"\n };\n }\n }]);\n return Poster2;\n}(Plugin);\nexport { Poster as default };\n","function PlaySvg() {\n return new DOMParser().parseFromString('\\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { PlaySvg as default };\n","function PauseSvg() {\n return new DOMParser().parseFromString('\\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { PauseSvg as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { READY, AUTOPLAY_STARTED, AUTOPLAY_PREVENTED, PLAY, PAUSE, RESET } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nimport { STATES } from \"../../state.js\";\nimport PlaySvg from \"../assets/play.js\";\nimport PauseSvg from \"../assets/pause.js\";\nvar AnimateMap = {};\nfunction addAnimate(key, seconds) {\n var callback = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {\n start: null,\n end: null\n };\n if (AnimateMap[key]) {\n window.clearTimeout(AnimateMap[key].id);\n }\n AnimateMap[key] = {};\n callback.start && callback.start();\n AnimateMap[key].id = window.setTimeout(function() {\n callback.end && callback.end();\n window.clearTimeout(AnimateMap[key].id);\n delete AnimateMap[key];\n }, seconds);\n return AnimateMap[key].id;\n}\nfunction clearAnimation(id) {\n if (id) {\n window.clearTimeout(id);\n return;\n }\n Object.keys(AnimateMap).map(function(key) {\n window.clearTimeout(AnimateMap[key].id);\n delete AnimateMap[key];\n });\n}\nvar Start = /* @__PURE__ */ function(_Plugin) {\n _inherits(Start2, _Plugin);\n var _super = _createSuper(Start2);\n function Start2(args) {\n var _this;\n _classCallCheck(this, Start2);\n _this = _super.call(this, args);\n _defineProperty(_assertThisInitialized(_this), \"onPlayerReset\", function() {\n _this.autoPlayStart = false;\n var className = _this.config.mode === \"auto\" ? \"auto-hide\" : \"hide\";\n _this.setAttr(\"data-state\", \"play\");\n util.removeClass(_this.root, className);\n _this.show();\n });\n _defineProperty(_assertThisInitialized(_this), \"onAutoplayStart\", function() {\n if (_this.autoPlayStart) {\n return;\n }\n var className = _this.config.mode === \"auto\" ? \"auto-hide\" : \"hide\";\n util.addClass(_this.root, className);\n _this.autoPlayStart = true;\n _this.onPlayPause(\"play\");\n });\n _this.autoPlayStart = false;\n return _this;\n }\n _createClass(Start2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n var player = this.player, playerConfig = this.playerConfig;\n this.initIcons();\n this.once(READY, function() {\n if (playerConfig) {\n if (playerConfig.lang && playerConfig.lang === \"en\") {\n util.addClass(player.root, \"lang-is-en\");\n } else if (playerConfig.lang === \"jp\") {\n util.addClass(player.root, \"lang-is-jp\");\n }\n }\n });\n this.on(AUTOPLAY_STARTED, this.onAutoplayStart);\n if (!playerConfig.autoplay) {\n this.show();\n }\n this.on(AUTOPLAY_PREVENTED, function() {\n var className = _this2.config.mode === \"auto\" ? \"auto-hide\" : \"hide\";\n _this2.setAttr(\"data-state\", \"play\");\n util.removeClass(_this2.root, className);\n _this2.show();\n });\n this.on(PLAY, function() {\n _this2.onPlayPause(\"play\");\n });\n this.on(PAUSE, function() {\n _this2.onPlayPause(\"pause\");\n });\n this.on(RESET, function() {\n _this2.onPlayerReset();\n });\n this.clickHandler = this.hook(\"startClick\", this.switchPausePlay, {\n pre: function pre(e) {\n e.cancelable && e.preventDefault();\n e.stopPropagation();\n var paused = _this2.player.paused;\n _this2.emitUserAction(e, \"switch_play_pause\", {\n props: \"paused\",\n from: paused,\n to: !paused\n });\n }\n });\n this.bind([\"click\", \"touchend\"], this.clickHandler);\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n startPlay: {\n icon: PlaySvg,\n class: \"xg-icon-play\"\n },\n startPause: {\n icon: PauseSvg,\n class: \"xg-icon-pause\"\n }\n };\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(\"xg-start-inner\", icons.startPlay);\n this.appendChild(\"xg-start-inner\", icons.startPause);\n }\n }, {\n key: \"hide\",\n value: function hide() {\n util.addClass(this.root, \"hide\");\n }\n }, {\n key: \"show\",\n value: function show() {\n util.removeClass(this.root, \"hide\");\n }\n }, {\n key: \"focusHide\",\n value: function focusHide() {\n util.addClass(this.root, \"focus-hide\");\n }\n }, {\n key: \"recover\",\n value: function recover() {\n util.removeClass(this.root, \"focus-hide\");\n }\n }, {\n key: \"switchStatus\",\n value: function switchStatus(isAnimate) {\n if (isAnimate) {\n this.setAttr(\"data-state\", !this.player.paused ? \"play\" : \"pause\");\n } else {\n this.setAttr(\"data-state\", this.player.paused ? \"play\" : \"pause\");\n }\n }\n }, {\n key: \"animate\",\n value: function animate(endShow) {\n var _this3 = this;\n this._animateId = addAnimate(\"pauseplay\", 400, {\n start: function start() {\n util.addClass(_this3.root, \"interact\");\n _this3.show();\n _this3.switchStatus(true);\n },\n end: function end() {\n util.removeClass(_this3.root, \"interact\");\n !endShow && _this3.hide();\n _this3._animateId = null;\n }\n });\n }\n }, {\n key: \"endAnimate\",\n value: function endAnimate() {\n util.removeClass(this.root, \"interact\");\n clearAnimation(this._animateId);\n this._animateId = null;\n }\n }, {\n key: \"switchPausePlay\",\n value: function switchPausePlay(e) {\n var player = this.player;\n e.cancelable && e.preventDefault();\n e.stopPropagation();\n if (player.state < STATES.READY) {\n return;\n }\n var paused = this.player.paused;\n if (!paused && player.state === STATES.RUNNING) {\n player.pause();\n } else {\n player.play();\n }\n }\n }, {\n key: \"onPlayPause\",\n value: function onPlayPause(status) {\n var config = this.config, player = this.player;\n if (!player || player.state < STATES.RUNNING || !this.autoPlayStart) {\n return;\n }\n if (config.mode === \"show\") {\n this.switchStatus();\n this.show();\n return;\n }\n if (config.mode === \"auto\") {\n this.switchStatus();\n return;\n }\n if (config.isShowPause && player.paused && !player.ended || config.isShowEnd && player.ended) {\n this.switchStatus();\n this.show();\n this.endAnimate();\n return;\n }\n if (config.disableAnimate) {\n this.switchStatus();\n this.hide();\n return;\n }\n if (status === \"play\") {\n this.autoPlayStart ? this.animate() : this.hide();\n } else {\n if (!this.autoPlayStart || player.ended) {\n return;\n }\n this.animate();\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.unbind([\"click\", \"touchend\"], this.clickHandler);\n clearAnimation(this._animateId);\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = this.playerConfig.autoplay ? this.config.mode === \"auto\" ? \"auto-hide\" : \"hide\" : \"\";\n return '\\n \\n \\n ');\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"start\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n isShowPause: false,\n isShowEnd: false,\n disableAnimate: false,\n mode: \"hide\"\n };\n }\n }]);\n return Start2;\n}(Plugin);\nexport { Start as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar Enter = /* @__PURE__ */ function(_Plugin) {\n _inherits(Enter2, _Plugin);\n var _super = _createSuper(Enter2);\n function Enter2() {\n _classCallCheck(this, Enter2);\n return _super.apply(this, arguments);\n }\n _createClass(Enter2, [{\n key: \"render\",\n value: function render() {\n var innerHtml = this.config.innerHtml;\n var root = util.createDom(\"xg-enter\", \"\", {}, \"xgplayer-enter\");\n if (innerHtml && innerHtml instanceof window.HTMLElement) {\n root.appendChild(innerHtml);\n } else if (innerHtml && typeof innerHtml === \"string\") {\n root.innerHTML = innerHtml;\n } else {\n var barStr = \"\";\n for (var i = 1; i <= 12; i++) {\n barStr += '
');\n }\n root.innerHTML = '
'.concat(barStr, \"
\");\n }\n return root;\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"enter\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n innerHtml: \"\",\n logo: \"\"\n };\n }\n }]);\n return Enter2;\n}(Plugin);\nexport { Enter as default };\n","function xgIconTips(plugin, textKey, isShow) {\n try {\n return '
\\n ').concat(plugin.i18n[textKey], \"\\n
\");\n } catch (e) {\n return '
';\n }\n}\nexport { xgIconTips };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport \"../../utils/debug.js\";\nimport Plugin, { POSITIONS } from \"../../plugin/plugin.js\";\nvar MiniScreenIcon = /* @__PURE__ */ function(_Plugin) {\n _inherits(MiniScreenIcon2, _Plugin);\n var _super = _createSuper(MiniScreenIcon2);\n function MiniScreenIcon2() {\n _classCallCheck(this, MiniScreenIcon2);\n return _super.apply(this, arguments);\n }\n _createClass(MiniScreenIcon2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n this.getMini = this.getMini.bind(this);\n this.exitMini = this.exitMini.bind(this);\n this.bind(\"click\", this.getMini);\n }\n }, {\n key: \"getMini\",\n value: function getMini() {\n this.config.onClick && this.config.onClick();\n }\n }, {\n key: \"exitMini\",\n value: function exitMini() {\n this.config.onClick && this.config.onClick();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.unbind([\"click\", \"touchend\"], this.getMini);\n }\n }, {\n key: \"render\",\n value: function render() {\n var langKey = \"MINISCREEN\";\n return '\\n \\n
').concat(this.i18n[langKey], \"
\\n
\");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"miniscreenIcon\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 10\n };\n }\n }]);\n return MiniScreenIcon2;\n}(Plugin);\nexport { MiniScreenIcon as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, possibleConstructorReturn as _possibleConstructorReturn, createClass as _createClass, typeof as _typeof } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport EventEmitter from \"eventemitter3\";\nfunction getStyleSize(value) {\n var num = parseFloat(value);\n var isValid = value.indexOf(\"%\") === -1 && !Number.isNaN(num);\n return isValid && num;\n}\nvar measurements = [\"paddingLeft\", \"paddingRight\", \"paddingTop\", \"paddingBottom\", \"marginLeft\", \"marginRight\", \"marginTop\", \"marginBottom\", \"borderLeftWidth\", \"borderRightWidth\", \"borderTopWidth\", \"borderBottomWidth\"];\nvar measurementsLength = measurements.length;\nfunction getZeroSize() {\n var size = {\n width: 0,\n height: 0,\n innerWidth: 0,\n innerHeight: 0,\n outerWidth: 0,\n outerHeight: 0\n };\n for (var i = 0; i < measurementsLength; i++) {\n var measurement = measurements[i];\n size[measurement] = 0;\n }\n return size;\n}\nfunction getStyle(elem) {\n var style = window.getComputedStyle(elem);\n return style;\n}\nfunction getSize(elem) {\n if (typeof elem === \"string\") {\n elem = document.querySelector(elem);\n }\n if (!elem || _typeof(elem) !== \"object\" || !elem.nodeType) {\n return;\n }\n var style = getStyle(elem);\n if (style.display === \"none\") {\n return getZeroSize();\n }\n var size = {};\n size.width = elem.offsetWidth;\n size.height = elem.offsetHeight;\n var isBorderBox = size.isBorderBox = style.boxSizing === \"border-box\";\n for (var i = 0; i < measurementsLength; i++) {\n var measurement = measurements[i];\n var value = style[measurement];\n var num = parseFloat(value);\n size[measurement] = !Number.isNaN(num) ? num : 0;\n }\n var paddingWidth = size.paddingLeft + size.paddingRight;\n var paddingHeight = size.paddingTop + size.paddingBottom;\n var marginWidth = size.marginLeft + size.marginRight;\n var marginHeight = size.marginTop + size.marginBottom;\n var borderWidth = size.borderLeftWidth + size.borderRightWidth;\n var borderHeight = size.borderTopWidth + size.borderBottomWidth;\n var isBorderBoxSizeOuter = isBorderBox;\n var styleWidth = getStyleSize(style.width);\n if (styleWidth !== false) {\n size.width = styleWidth + (isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth);\n }\n var styleHeight = getStyleSize(style.height);\n if (styleHeight !== false) {\n size.height = styleHeight + (isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight);\n }\n size.innerWidth = size.width - (paddingWidth + borderWidth);\n size.innerHeight = size.height - (paddingHeight + borderHeight);\n size.outerWidth = size.width + marginWidth;\n size.outerHeight = size.height + marginHeight;\n return size;\n}\nfunction getTouch(touches, dentifier) {\n for (var i = 0; i < touches.length; i++) {\n var touch = touches[i];\n if (touch.identifier === dentifier) {\n return touch;\n }\n }\n}\nvar EVENTS = {\n START: \"dragStart\",\n MOVE: \"dragMove\",\n ENDED: \"dragEnded\"\n};\nvar POST_START_EVENTS = {\n mousedown: [\"mousemove\", \"mouseup\"],\n touchstart: [\"touchmove\", \"touchend\", \"touchcancel\"],\n pointerdown: [\"pointermove\", \"pointerup\", \"pointercancel\"]\n};\nvar Draggabilly = /* @__PURE__ */ function(_EventEmitter) {\n _inherits(Draggabilly2, _EventEmitter);\n var _super = _createSuper(Draggabilly2);\n function Draggabilly2(root) {\n var _this;\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n _classCallCheck(this, Draggabilly2);\n _this = _super.call(this);\n _this.isEnabled = true;\n _this.isDragging = false;\n _this.isDown = false;\n _this.position = {};\n _this.downPoint = {};\n _this.dragPoint = {\n x: 0,\n y: 0\n };\n _this.startPos = {\n x: 0,\n y: 0\n };\n _this._root = root instanceof Element ? root : document.querySelector(root);\n _this._handlerDom = options.handle instanceof Element ? options.handle : document.querySelector(options.handle);\n if (!_this._root || !_this._handlerDom) {\n return _possibleConstructorReturn(_this);\n }\n _this._bindStartEvent();\n return _this;\n }\n _createClass(Draggabilly2, [{\n key: \"_bindStartEvent\",\n value: function _bindStartEvent() {\n var _this2 = this;\n if (\"ontouchstart\" in window) {\n this._startKey = \"touchstart\";\n } else {\n this._startKey = \"mousedown\";\n }\n this[\"on\".concat(this._startKey)] = this[\"on\".concat(this._startKey)].bind(this);\n this._handlerDom.addEventListener(this._startKey, this[\"on\".concat(this._startKey)]);\n POST_START_EVENTS[this._startKey].map(function(key) {\n _this2[\"on\".concat(key)] = _this2[\"on\".concat(key)].bind(_this2);\n });\n }\n }, {\n key: \"_unbindStartEvent\",\n value: function _unbindStartEvent() {\n this._handlerDom.removeEventListener(this._startKey, this[\"on\".concat(this._startKey)]);\n }\n }, {\n key: \"_bindPostStartEvents\",\n value: function _bindPostStartEvents(event) {\n var _this3 = this;\n if (!event) {\n return;\n }\n var events = POST_START_EVENTS[this._startKey];\n events.map(function(eventName) {\n window.addEventListener(eventName, _this3[\"on\".concat(eventName)]);\n });\n this._boundPointerEvents = events;\n }\n }, {\n key: \"_unbindPostStartEvents\",\n value: function _unbindPostStartEvents() {\n var _this4 = this;\n if (!this._boundPointerEvents) {\n return;\n }\n this._boundPointerEvents.map(function(eventName) {\n window.removeEventListener(eventName, _this4[\"on\".concat(eventName)]);\n });\n delete this._boundPointerEvents;\n }\n }, {\n key: \"enable\",\n value: function enable() {\n this.isEnabled = true;\n }\n }, {\n key: \"disable\",\n value: function disable() {\n this.isEnabled = false;\n if (this.isDragging) {\n this.onUp();\n }\n }\n }, {\n key: \"onDocUp\",\n value: function onDocUp(e) {\n this.onUp();\n }\n }, {\n key: \"animate\",\n value: function animate() {\n var _this5 = this;\n if (!this.isDragging) {\n return;\n }\n this.positionDrag();\n window.requestAnimationFrame(function() {\n _this5.animate();\n });\n }\n }, {\n key: \"positionDrag\",\n value: function positionDrag() {\n var transform = \"translate3d(\".concat(this.dragPoint.x, \"px, \").concat(this.dragPoint.y, \"px, 0)\");\n this._root.style.transform = transform;\n this._root.style.webKitTransform = transform;\n }\n }, {\n key: \"setLeftTop\",\n value: function setLeftTop() {\n this._root.style.left = this.position.x + \"px\";\n this._root.style.top = this.position.y + \"px\";\n }\n }, {\n key: \"onmousedown\",\n value: function onmousedown(e) {\n this.dragStart(e, e);\n }\n }, {\n key: \"onmousemove\",\n value: function onmousemove(e) {\n this.dragMove(e, e);\n }\n }, {\n key: \"onmouseup\",\n value: function onmouseup(e) {\n this.dragEnd(e, e);\n }\n }, {\n key: \"ontouchstart\",\n value: function ontouchstart(e) {\n var touch = e.changedTouches[0];\n this.dragStart(e, touch);\n this.touchIdentifier = touch.pointerId !== void 0 ? touch.pointerId : touch.identifier;\n e.preventDefault();\n }\n }, {\n key: \"ontouchmove\",\n value: function ontouchmove(e) {\n var touch = getTouch(e.changedTouches, this.touchIdentifier);\n if (touch) {\n this.dragMove(e, touch);\n }\n }\n }, {\n key: \"ontouchend\",\n value: function ontouchend(e) {\n var touch = getTouch(e.changedTouches, this.touchIdentifier);\n if (touch) {\n this.dragEnd(e, touch);\n }\n e.preventDefault();\n }\n }, {\n key: \"ontouchcancel\",\n value: function ontouchcancel(e) {\n var touch = getTouch(e.changedTouches, this.touchIdentifier);\n if (touch) {\n this.dragCancel(e, touch);\n }\n }\n }, {\n key: \"dragStart\",\n value: function dragStart(e, pointer) {\n if (!this._root || this.isDown || !this.isEnabled) {\n return;\n }\n this.downPoint = pointer;\n this.dragPoint.x = 0;\n this.dragPoint.y = 0;\n this._getPosition();\n var size = getSize(this._root);\n this.startPos.x = this.position.x;\n this.startPos.y = this.position.y;\n this.startPos.maxY = window.innerHeight - size.height;\n this.startPos.maxX = window.innerWidth - size.width;\n this.setLeftTop();\n this.isDown = true;\n this._bindPostStartEvents(e);\n }\n }, {\n key: \"dragRealStart\",\n value: function dragRealStart(e, pointer) {\n this.isDragging = true;\n this.animate();\n this.emit(EVENTS.START, this.startPos);\n }\n }, {\n key: \"dragEnd\",\n value: function dragEnd(e, pointer) {\n if (!this._root) {\n return;\n }\n this._unbindPostStartEvents();\n if (this.isDragging) {\n this._root.style.transform = \"\";\n this.setLeftTop();\n this.emit(EVENTS.ENDED);\n }\n this.presetInfo();\n }\n }, {\n key: \"_dragPointerMove\",\n value: function _dragPointerMove(e, pointer) {\n var moveVector = {\n x: pointer.pageX - this.downPoint.pageX,\n y: pointer.pageY - this.downPoint.pageY\n };\n if (!this.isDragging && this.hasDragStarted(moveVector)) {\n this.dragRealStart(e, pointer);\n }\n return moveVector;\n }\n }, {\n key: \"dragMove\",\n value: function dragMove(e, pointer) {\n e = e || window.event;\n if (!this.isDown) {\n return;\n }\n var _this$startPos = this.startPos, x = _this$startPos.x, y = _this$startPos.y;\n var moveVector = this._dragPointerMove(e, pointer);\n var dragX = moveVector.x;\n var dragY = moveVector.y;\n dragX = this.checkContain(\"x\", dragX, x);\n dragY = this.checkContain(\"y\", dragY, y);\n this.position.x = x + dragX;\n this.position.y = y + dragY;\n this.dragPoint.x = dragX;\n this.dragPoint.y = dragY;\n this.emit(EVENTS.MOVE, this.position);\n }\n }, {\n key: \"dragCancel\",\n value: function dragCancel(e, pointer) {\n this.dragEnd(e, pointer);\n }\n }, {\n key: \"presetInfo\",\n value: function presetInfo() {\n this.isDragging = false;\n this.startPos = {\n x: 0,\n y: 0\n };\n this.dragPoint = {\n x: 0,\n y: 0\n };\n this.isDown = false;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this._unbindStartEvent();\n this._unbindPostStartEvents();\n if (this.isDragging) {\n this.dragEnd();\n }\n this.removeAllListeners();\n this._handlerDom = null;\n }\n }, {\n key: \"hasDragStarted\",\n value: function hasDragStarted(moveVector) {\n return Math.abs(moveVector.x) > 3 || Math.abs(moveVector.y) > 3;\n }\n }, {\n key: \"checkContain\",\n value: function checkContain(axis, drag, grid) {\n if (drag + grid < 0) {\n return 0 - grid;\n }\n if (axis === \"x\" && drag + grid > this.startPos.maxX) {\n return this.startPos.maxX - grid;\n }\n if (axis === \"y\" && drag + grid > this.startPos.maxY) {\n return this.startPos.maxY - grid;\n }\n return drag;\n }\n }, {\n key: \"_getPosition\",\n value: function _getPosition() {\n var style = window.getComputedStyle(this._root);\n var x = this._getPositionCoord(style.left, \"width\");\n var y = this._getPositionCoord(style.top, \"height\");\n this.position.x = Number.isNaN(x) ? 0 : x;\n this.position.y = Number.isNaN(y) ? 0 : y;\n this._addTransformPosition(style);\n }\n }, {\n key: \"_addTransformPosition\",\n value: function _addTransformPosition(style) {\n var transform = style.transform;\n if (transform.indexOf(\"matrix\") !== 0) {\n return;\n }\n var matrixValues = transform.split(\",\");\n var xIndex = transform.indexOf(\"matrix3d\") === 0 ? 12 : 4;\n var translateX = parseInt(matrixValues[xIndex], 10);\n var translateY = parseInt(matrixValues[xIndex + 1], 10);\n this.position.x += translateX;\n this.position.y += translateY;\n }\n }, {\n key: \"_getPositionCoord\",\n value: function _getPositionCoord(styleSide, measure) {\n if (styleSide.indexOf(\"%\") !== -1) {\n var parentSize = getSize(this._root.parentNode);\n return !parentSize ? 0 : parseFloat(styleSide) / 100 * parentSize[measure];\n }\n return parseInt(styleSide, 10);\n }\n }]);\n return Draggabilly2;\n}(EventEmitter);\nexport { Draggabilly as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { PAUSE, PLAY, MINI_STATE_CHANGE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nimport { xgIconTips } from \"../common/iconTools.js\";\nimport PlaySvg from \"../assets/play.js\";\nimport PauseSvg from \"../assets/pause.js\";\nimport MiniScreenIcon from \"./miniScreenIcon.js\";\nexport { default as MiniScreenIcon } from \"./miniScreenIcon.js\";\nimport Draggabilly from \"../../utils/draggabilly.js\";\nvar MiniScreen = /* @__PURE__ */ function(_Plugin) {\n _inherits(MiniScreen2, _Plugin);\n var _super = _createSuper(MiniScreen2);\n function MiniScreen2(args) {\n var _this;\n _classCallCheck(this, MiniScreen2);\n _this = _super.call(this, args);\n _defineProperty(_assertThisInitialized(_this), \"onCancelClick\", function(e) {\n _this.exitMini();\n _this.isClose = true;\n });\n _defineProperty(_assertThisInitialized(_this), \"onCenterClick\", function(e) {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;\n player.paused ? player.play() : player.pause();\n });\n _defineProperty(_assertThisInitialized(_this), \"onScroll\", function(e) {\n if (!window.scrollY && window.scrollY !== 0 || Math.abs(window.scrollY - _this.pos.scrollY) < 50) {\n return;\n }\n var scrollHeight = parseInt(util.getCss(_this.player.root, \"height\"));\n scrollHeight += _this.config.scrollTop;\n _this.pos.scrollY = window.scrollY;\n if (window.scrollY > scrollHeight + 5) {\n !_this.isMini && !_this.isClose && _this.getMini();\n } else if (window.scrollY <= scrollHeight) {\n _this.isMini && _this.exitMini();\n _this.isClose = false;\n }\n });\n _this.isMini = false;\n _this.isClose = false;\n var _assertThisInitialize2 = _assertThisInitialized(_this), config = _assertThisInitialize2.config;\n _this.pos = {\n left: config.left < 0 ? window.innerWidth - config.width - 20 : config.left,\n top: config.top < 0 ? window.innerHeight - config.height - 20 : config.top,\n height: _this.config.height,\n width: _this.config.width,\n scrollY: window.scrollY || 0\n };\n _this.lastStyle = null;\n return _this;\n }\n _createClass(MiniScreen2, [{\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n if (typeof args.player.config.mini === \"boolean\") {\n args.config.isShowIcon = args.player.config.mini;\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n this.initIcons();\n this.on(PAUSE, function() {\n _this2.setAttr(\"data-state\", \"pause\");\n });\n this.on(PLAY, function() {\n _this2.setAttr(\"data-state\", \"play\");\n });\n }\n }, {\n key: \"onPluginsReady\",\n value: function onPluginsReady() {\n var _this3 = this;\n var player = this.player, config = this.config;\n if (config.disable) {\n return;\n }\n if (this.config.isShowIcon) {\n var options = {\n config: {\n onClick: function onClick() {\n _this3.getMini();\n }\n }\n };\n player.controls.registerPlugin(MiniScreenIcon, options, MiniScreenIcon.pluginName);\n }\n var eventName = util.checkTouchSupport() ? \"touchend\" : \"click\";\n this.bind(\".mini-cancel-btn\", eventName, this.onCancelClick);\n this.bind(\".play-icon\", eventName, this.onCenterClick);\n if (!this.config.disableDrag) {\n this._draggabilly = new Draggabilly(this.player.root, {\n handle: this.root\n });\n }\n if (this.config.isScrollSwitch) {\n window.addEventListener(\"scroll\", this.onScroll);\n }\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n play: {\n icon: PlaySvg,\n class: \"xg-icon-play\"\n },\n pause: {\n icon: PauseSvg,\n class: \"xg-icon-pause\"\n }\n };\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(\".play-icon\", icons.play);\n this.appendChild(\".play-icon\", icons.pause);\n }\n }, {\n key: \"getMini\",\n value: function getMini() {\n var _this4 = this;\n if (this.isMini) {\n return;\n }\n var player = this.player, playerConfig = this.playerConfig;\n var target = this.config.target || this.player.root;\n this.lastStyle = {};\n util.addClass(player.root, \"xgplayer-mini\");\n [\"width\", \"height\", \"top\", \"left\"].map(function(key) {\n _this4.lastStyle[key] = target.style[key];\n target.style[key] = \"\".concat(_this4.pos[key], \"px\");\n });\n if (playerConfig.fluid) {\n target.style[\"padding-top\"] = \"\";\n }\n this.emit(MINI_STATE_CHANGE, true);\n player.isMini = this.isMini = true;\n }\n }, {\n key: \"exitMini\",\n value: function exitMini() {\n var _this5 = this;\n if (!this.isMini) {\n return false;\n }\n var player = this.player, playerConfig = this.playerConfig;\n var target = this.config.target || this.player.root;\n util.removeClass(player.root, \"xgplayer-mini\");\n if (this.lastStyle) {\n Object.keys(this.lastStyle).map(function(key) {\n target.style[key] = _this5.lastStyle[key];\n });\n }\n this.lastStyle = null;\n if (playerConfig.fluid) {\n player.root.style.width = \"100%\";\n player.root.style.height = \"0\";\n player.root.style[\"padding-top\"] = \"\".concat(playerConfig.height * 100 / playerConfig.width, \"%\");\n }\n this.emit(MINI_STATE_CHANGE, false);\n this.isMini = player.isMini = false;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n window.removeEventListener(\"scroll\", this.onScroll);\n var eventName = util.checkTouchSupport() ? \"touchend\" : \"click\";\n this.unbind(\".mini-cancel-btn\", eventName, this.onCancelClick);\n this.unbind(\".play-icon\", eventName, this.onCenterClick);\n this._draggabilly && this._draggabilly.destroy();\n this._draggabilly = null;\n this.exitMini();\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.config.disable) {\n return;\n }\n return '\\n \\n \\n '.concat(xgIconTips(this, \"MINI_DRAG\", this.playerConfig.isHideTips), '\\n \\n
\\n \\n \\n \\n
\\n
\\n
\\n
');\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"miniscreen\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n index: 10,\n disable: false,\n width: 320,\n height: 180,\n left: -1,\n top: -1,\n isShowIcon: false,\n isScrollSwitch: false,\n scrollTop: 0,\n disableDrag: false\n };\n }\n }]);\n return MiniScreen2;\n}(Plugin);\nexport { MiniScreen as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport BasePlugin from \"../../plugin/basePlugin.js\";\nimport \"delegate\";\nimport { runHooks } from \"../../plugin/hooksDescriptor.js\";\nvar MOUSE_EVENTS = {\n mouseenter: \"onMouseEnter\",\n mouseleave: \"onMouseLeave\",\n mousemove: \"onMouseMove\"\n};\nvar HOOKS = [\"videoClick\", \"videoDbClick\"];\nvar PCPlugin = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(PCPlugin2, _BasePlugin);\n var _super = _createSuper(PCPlugin2);\n function PCPlugin2() {\n var _this;\n _classCallCheck(this, PCPlugin2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onMouseMove\", function(e) {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player, playerConfig = _assertThisInitialize.playerConfig;\n if (!player.isActive) {\n player.focus({\n autoHide: !playerConfig.closeDelayBlur\n });\n !playerConfig.closeFocusVideoFocus && player.media.focus();\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseEnter\", function(e) {\n var _assertThisInitialize2 = _assertThisInitialized(_this), playerConfig = _assertThisInitialize2.playerConfig, player = _assertThisInitialize2.player;\n !playerConfig.closeFocusVideoFocus && player.media.focus();\n if (playerConfig.closeDelayBlur) {\n player.focus({\n autoHide: false\n });\n } else {\n player.focus();\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseLeave\", function(e) {\n var _this$playerConfig = _this.playerConfig, closePlayerBlur = _this$playerConfig.closePlayerBlur, leavePlayerTime = _this$playerConfig.leavePlayerTime, closeDelayBlur = _this$playerConfig.closeDelayBlur;\n if (!closePlayerBlur && !closeDelayBlur) {\n if (leavePlayerTime) {\n _this.player.focus({\n autoHide: true,\n delay: leavePlayerTime\n });\n } else {\n _this.player.blur();\n }\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onVideoClick\", function(e) {\n var _assertThisInitialize3 = _assertThisInitialized(_this), player = _assertThisInitialize3.player, playerConfig = _assertThisInitialize3.playerConfig;\n if (e.target && playerConfig.closeVideoClick) {\n return;\n }\n if (e.target === player.root || e.target === player.media || e.target === player.innerContainer || e.target === player.media.__canvas) {\n e.preventDefault();\n if (!playerConfig.closeVideoStopPropagation) {\n e.stopPropagation();\n }\n _this._clickCount++;\n if (_this.clickTimer) {\n clearTimeout(_this.clickTimer);\n _this.clickTimer = null;\n }\n _this.clickTimer = setTimeout(function() {\n if (!_this._clickCount) {\n return;\n }\n _this._clickCount--;\n runHooks(_assertThisInitialized(_this), HOOKS[0], function(plugin, data) {\n _this.switchPlayPause(data.e);\n }, {\n e,\n paused: player.paused\n });\n clearTimeout(_this.clickTimer);\n _this.clickTimer = null;\n }, 300);\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onVideoDblClick\", function(e) {\n var _assertThisInitialize4 = _assertThisInitialized(_this), player = _assertThisInitialize4.player, playerConfig = _assertThisInitialize4.playerConfig;\n if (playerConfig.closeVideoDblclick || !e.target || e.target !== player.media && e.target !== player.media.__canvas) {\n return;\n }\n if (!playerConfig.closeVideoClick && _this._clickCount < 2) {\n _this._clickCount = 0;\n return;\n }\n _this._clickCount = 0;\n if (_this.clickTimer) {\n clearTimeout(_this.clickTimer);\n _this.clickTimer = null;\n }\n e.preventDefault();\n e.stopPropagation();\n runHooks(_assertThisInitialized(_this), HOOKS[1], function(plugin, data) {\n _this.emitUserAction(data.e, \"switch_fullscreen\", {\n props: \"fullscreen\",\n from: player.fullscreen,\n to: !player.fullscreen\n });\n player.fullscreen ? player.exitFullscreen() : player.getFullscreen();\n }, {\n e,\n fullscreen: player.fullscreen\n });\n });\n return _this;\n }\n _createClass(PCPlugin2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n this._clickCount = 0;\n HOOKS.map(function(item) {\n _this2.__hooks[item] = null;\n });\n var isMobileSimulateMode = this.playerConfig.isMobileSimulateMode;\n if (isMobileSimulateMode === \"mobile\" || sniffer.device === \"mobile\" && !sniffer.os.isIpad) {\n return;\n }\n this.initEvents();\n }\n }, {\n key: \"initEvents\",\n value: function initEvents() {\n var _this3 = this;\n var _this$player = this.player, video = _this$player.video, root = _this$player.root;\n var enableContextmenu = this.playerConfig.enableContextmenu;\n root && root.addEventListener(\"click\", this.onVideoClick, false);\n root && root.addEventListener(\"dblclick\", this.onVideoDblClick, false);\n Object.keys(MOUSE_EVENTS).map(function(item) {\n root.addEventListener(item, _this3[MOUSE_EVENTS[item]], false);\n });\n enableContextmenu && video && video.addEventListener(\"contextmenu\", this.onContextmenu, false);\n }\n }, {\n key: \"switchPlayPause\",\n value: function switchPlayPause(e) {\n var player = this.player;\n this.emitUserAction(e, \"switch_play_pause\", {\n props: \"paused\",\n from: player.paused,\n to: !player.paused\n });\n if (!player.ended) {\n player.paused ? player.play() : player.pause();\n } else {\n player.duration !== Infinity && player.duration > 0 && player.replay();\n }\n }\n }, {\n key: \"onContextmenu\",\n value: function onContextmenu(e) {\n e = e || window.event;\n if (e.preventDefault) {\n e.preventDefault();\n }\n if (e.stopPropagation) {\n e.stopPropagation();\n } else {\n e.returnValue = false;\n e.cancelBubble = true;\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this4 = this;\n var _this$player2 = this.player, video = _this$player2.video, root = _this$player2.root;\n this.clickTimer && clearTimeout(this.clickTimer);\n root.removeEventListener(\"click\", this.onVideoClick, false);\n root.removeEventListener(\"dblclick\", this.onVideoDblClick, false);\n video.removeEventListener(\"contextmenu\", this.onContextmenu, false);\n Object.keys(MOUSE_EVENTS).map(function(item) {\n root.removeEventListener(item, _this4[MOUSE_EVENTS[item]], false);\n });\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"pc\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {};\n }\n }]);\n return PCPlugin2;\n}(BasePlugin);\nexport { PCPlugin as default };\n","import { createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nvar EVENTS = {\n PRESS: \"press\",\n PRESS_END: \"pressend\",\n DOUBlE_CLICK: \"doubleclick\",\n CLICK: \"click\",\n TOUCH_MOVE: \"touchmove\",\n TOUCH_START: \"touchstart\",\n TOUCH_END: \"touchend\"\n};\nvar TOUCHS = {\n start: \"touchstart\",\n end: \"touchend\",\n move: \"touchmove\",\n cancel: \"touchcancel\"\n};\nvar MOUSES = {\n start: \"mousedown\",\n end: \"mouseup\",\n move: \"mousemove\",\n cancel: \"mouseleave\"\n};\nfunction getTouch(touches) {\n if (touches && touches.length > 0) {\n return touches[touches.length - 1];\n } else {\n return null;\n }\n}\nfunction getDefaultConfig() {\n return {\n pressDelay: 600,\n dbClickDelay: 200,\n disablePress: false,\n disableDbClick: false,\n miniStep: 2,\n needPreventDefault: true\n };\n}\nvar Touche = /* @__PURE__ */ function() {\n function Touche2(dom) {\n var _this = this;\n var _config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {\n eventType: \"touch\"\n };\n _classCallCheck(this, Touche2);\n _defineProperty(this, \"onTouchStart\", function(e) {\n var _pos = _this._pos, root = _this.root;\n var touch = getTouch(e.touches);\n _pos.x = touch ? parseInt(touch.pageX, 10) : e.pageX;\n _pos.y = touch ? parseInt(touch.pageX, 10) : e.pageX;\n _pos.start = true;\n _this.__setPress(e);\n root.addEventListener(_this.events.end, _this.onTouchEnd);\n root.addEventListener(_this.events.cancel, _this.onTouchCancel);\n root.addEventListener(_this.events.move, _this.onTouchMove);\n _this.trigger(EVENTS.TOUCH_START, e);\n });\n _defineProperty(this, \"onTouchCancel\", function(e) {\n _this.onTouchEnd(e);\n });\n _defineProperty(this, \"onTouchEnd\", function(e) {\n var _pos = _this._pos, root = _this.root;\n _this.__clearPress();\n root.removeEventListener(_this.events.cancel, _this.onTouchCancel);\n root.removeEventListener(_this.events.end, _this.onTouchEnd);\n root.removeEventListener(_this.events.move, _this.onTouchMove);\n e.moving = _pos.moving;\n e.press = _pos.press;\n _pos.press && _this.trigger(EVENTS.PRESS_END, e);\n _this.trigger(EVENTS.TOUCH_END, e);\n !_pos.press && !_pos.moving && _this.__setDb(e);\n _pos.press = false;\n _pos.start = false;\n _pos.moving = false;\n });\n _defineProperty(this, \"onTouchMove\", function(e) {\n var _pos = _this._pos, config = _this.config;\n var touch = getTouch(e.touches);\n var x = touch ? parseInt(touch.pageX, 10) : e.pageX;\n var y = touch ? parseInt(touch.pageY, 10) : e.pageX;\n var diffx = x - _pos.x;\n var diffy = y - _pos.y;\n if (Math.abs(diffy) < config.miniStep && Math.abs(diffx) < config.miniStep) {\n return;\n }\n _this.__clearPress();\n _pos.press && _this.trigger(EVENTS.PRESS_END, e);\n _pos.press = false;\n _pos.moving = true;\n _this.trigger(EVENTS.TOUCH_MOVE, e);\n });\n this._pos = {\n moving: false,\n start: false,\n x: 0,\n y: 0\n };\n this.config = getDefaultConfig();\n Object.keys(_config).map(function(key) {\n _this.config[key] = _config[key];\n });\n this.root = dom;\n this.events = _config.eventType === \"mouse\" ? MOUSES : TOUCHS;\n this.pressIntrvalId = null;\n this.dbIntrvalId = null;\n this.__handlers = {};\n this._initEvent();\n }\n _createClass(Touche2, [{\n key: \"_initEvent\",\n value: function _initEvent() {\n this.root.addEventListener(this.events.start, this.onTouchStart);\n }\n }, {\n key: \"__setPress\",\n value: function __setPress(e) {\n var _this2 = this;\n var config = this.config;\n if (this.pressIntrvalId) {\n this.__clearPress();\n }\n this.pressIntrvalId = setTimeout(function() {\n _this2.trigger(EVENTS.PRESS, e);\n _this2._pos.press = true;\n _this2.__clearPress();\n }, config.pressDelay);\n }\n }, {\n key: \"__clearPress\",\n value: function __clearPress() {\n window.clearTimeout(this.pressIntrvalId);\n this.pressIntrvalId = null;\n }\n }, {\n key: \"__setDb\",\n value: function __setDb(e) {\n var _this3 = this;\n var config = this.config;\n if (this.dbIntrvalId) {\n this.__clearDb();\n this.trigger(EVENTS.DOUBlE_CLICK, e);\n return;\n }\n this.dbIntrvalId = setTimeout(function() {\n _this3.__clearDb();\n if (!_this3._pos.start && !_this3._pos.press && !_this3._pos.moving) {\n _this3.trigger(EVENTS.CLICK, e);\n }\n }, config.dbClickDelay);\n }\n }, {\n key: \"__clearDb\",\n value: function __clearDb() {\n clearTimeout(this.dbIntrvalId);\n this.dbIntrvalId = null;\n }\n }, {\n key: \"on\",\n value: function on(event, handler) {\n if (!this.__handlers[event]) {\n this.__handlers[event] = [];\n }\n this.__handlers[event].push(handler);\n }\n }, {\n key: \"off\",\n value: function off(event, handler) {\n if (!this.__handlers[event]) {\n return;\n }\n var handlers = this.__handlers[event];\n var index = -1;\n for (var i = 0; i < handlers.length; i++) {\n if (handlers[i] === handler) {\n index = i;\n break;\n }\n }\n if (index >= 0) {\n this.__handlers[event].splice(index, 1);\n }\n }\n }, {\n key: \"trigger\",\n value: function trigger(event, e) {\n if (!this.__handlers[event]) {\n return;\n }\n this.__handlers[event].map(function(handler) {\n try {\n handler(e);\n } catch (error) {\n console.error(\"trigger>>:\".concat(event), error);\n }\n });\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this4 = this;\n var map = {\n touchend: \"onTouchEnd\",\n touchmove: \"onTouchMove\",\n touchstart: \"onTouchStart\"\n };\n Object.keys(map).forEach(function(key) {\n _this4.root.removeEventListener(key, _this4[map[key]]);\n });\n }\n }]);\n return Touche2;\n}();\nexport { Touche as default };\n","function SeekTipIcon() {\n return new DOMParser().parseFromString('\\n \\n \\n', \"image/svg+xml\").firstChild;\n}\nexport { SeekTipIcon as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport { DURATION_CHANGE, CANPLAY, ENDED } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport { runHooks } from \"../../plugin/hooksDescriptor.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nimport { STATES } from \"../../state.js\";\nimport Touche from \"./touch.js\";\nimport SeekTipIcon from \"../assets/seekicon.js\";\nvar ACTIONS = {\n AUTO: \"auto\",\n SEEKING: \"seeking\",\n PLAYBACK: \"playbackrate\",\n LIGHT: \"\"\n};\nvar HOOKS = [\"videoClick\", \"videoDbClick\"];\nvar MobilePlugin = /* @__PURE__ */ function(_Plugin) {\n _inherits(MobilePlugin2, _Plugin);\n var _super = _createSuper(MobilePlugin2);\n function MobilePlugin2(options) {\n var _this;\n _classCallCheck(this, MobilePlugin2);\n _this = _super.call(this, options);\n _defineProperty(_assertThisInitialized(_this), \"onTouchStart\", function(e) {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player, config = _assertThisInitialize.config, pos = _assertThisInitialize.pos, playerConfig = _assertThisInitialize.playerConfig;\n var touche = _this.getTouche(e);\n if (touche && !config.disableGesture && _this.duration > 0 && !player.ended) {\n pos.isStart = true;\n util.checkIsFunction(playerConfig.disableSwipeHandler) && playerConfig.disableSwipeHandler();\n _this.find(\".xg-dur\").innerHTML = util.format(_this.duration);\n var rect = _this.root.getBoundingClientRect();\n if (player.rotateDeg === 90) {\n pos.top = rect.left;\n pos.left = rect.top;\n pos.width = rect.height;\n pos.height = rect.width;\n } else {\n pos.top = rect.top;\n pos.left = rect.left;\n pos.width = rect.width;\n pos.height = rect.height;\n }\n var _x = parseInt(touche.pageX - pos.left, 10);\n var _y = parseInt(touche.pageY - pos.top, 10);\n pos.x = player.rotateDeg === 90 ? _y : _x;\n pos.y = player.rotateDeg === 90 ? _x : _y;\n pos.scopeL = config.scopeL * pos.width;\n pos.scopeR = (1 - config.scopeR) * pos.width;\n pos.scopeM1 = pos.width * (1 - config.scopeM) / 2;\n pos.scopeM2 = pos.width - pos.scopeM1;\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onTouchMove\", function(e) {\n var touche = _this.getTouche(e);\n var _assertThisInitialize2 = _assertThisInitialized(_this), pos = _assertThisInitialize2.pos, config = _assertThisInitialize2.config, player = _assertThisInitialize2.player;\n if (!touche || config.disableGesture || !_this.duration || !pos.isStart) {\n return;\n }\n var miniMoveStep = config.miniMoveStep, hideControlsActive = config.hideControlsActive;\n var _x = parseInt(touche.pageX - pos.left, 10);\n var _y = parseInt(touche.pageY - pos.top, 10);\n var x = player.rotateDeg === 90 ? _y : _x;\n var y = player.rotateDeg === 90 ? _x : _y;\n if (Math.abs(x - pos.x) > miniMoveStep || Math.abs(y - pos.y) > miniMoveStep) {\n var diffx = x - pos.x;\n var diffy = y - pos.y;\n var scope = pos.scope;\n if (scope === -1) {\n scope = _this.checkScope(x, y, diffx, diffy, pos);\n if (scope === 0) {\n !hideControlsActive ? player.focus({\n autoHide: false\n }) : player.blur();\n !pos.time && (pos.time = parseInt(player.currentTime * 1e3, 10) + _this.timeOffset * 1e3);\n }\n pos.scope = scope;\n }\n if (scope === -1 || scope > 0 && !config.gestureY || scope === 0 && !config.gestureX) {\n return;\n }\n e.cancelable && e.preventDefault();\n _this.executeMove(diffx, diffy, scope, pos.width, pos.height);\n pos.x = x;\n pos.y = y;\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onTouchEnd\", function(e) {\n var _assertThisInitialize3 = _assertThisInitialized(_this), player = _assertThisInitialize3.player, pos = _assertThisInitialize3.pos, playerConfig = _assertThisInitialize3.playerConfig;\n if (!pos.isStart) {\n return;\n }\n if (pos.scope > -1) {\n e.cancelable && e.preventDefault();\n }\n var _this$config = _this.config, disableGesture = _this$config.disableGesture, gestureX = _this$config.gestureX;\n if (!disableGesture && gestureX) {\n _this.endLastMove(pos.scope);\n setTimeout(function() {\n player.getPlugin(\"progress\") && player.getPlugin(\"progress\").resetSeekState();\n }, 10);\n } else {\n pos.time = 0;\n }\n pos.scope = -1;\n _this.resetPos();\n util.checkIsFunction(playerConfig.enableSwipeHandler) && playerConfig.enableSwipeHandler();\n _this.changeAction(ACTIONS.AUTO);\n });\n _defineProperty(_assertThisInitialized(_this), \"onRootTouchMove\", function(e) {\n if (_this.config.disableGesture || !_this.config.gestureX) {\n return;\n }\n if (_this.checkIsRootTarget(e)) {\n e.stopPropagation();\n if (!_this.pos.isStart) {\n _this.onTouchStart(e);\n } else {\n _this.onTouchMove(e);\n }\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onRootTouchEnd\", function(e) {\n if (_this.pos.isStart && _this.checkIsRootTarget(e)) {\n e.stopPropagation();\n _this.onTouchEnd(e);\n }\n });\n _this.pos = {\n isStart: false,\n x: 0,\n y: 0,\n time: 0,\n volume: 0,\n rate: 1,\n light: 0,\n width: 0,\n height: 0,\n scopeL: 0,\n scopeR: 0,\n scopeM1: 0,\n scopeM2: 0,\n scope: -1\n };\n _this.timer = null;\n return _this;\n }\n _createClass(MobilePlugin2, [{\n key: \"duration\",\n get: function get() {\n return this.playerConfig.customDuration || this.player.duration;\n }\n }, {\n key: \"timeOffset\",\n get: function get() {\n return this.playerConfig.timeOffset || 0;\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n seekTipIcon: {\n icon: SeekTipIcon,\n class: \"xg-seek-pre\"\n }\n };\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n HOOKS.map(function(item) {\n _this2.__hooks[item] = null;\n });\n var playerConfig = this.playerConfig, config = this.config, player = this.player;\n if (playerConfig.closeVideoDblclick === true) {\n config.closedbClick = true;\n }\n this.resetPos();\n if (!util.isUndefined(playerConfig.disableGesture)) {\n config.disableGesture = !!playerConfig.disableGesture;\n }\n this.appendChild(\".xg-seek-icon\", this.icons.seekTipIcon);\n this.xgMask = util.createDom(\"xg-mask\", \"\", {}, \"xgmask\");\n player.root.appendChild(this.xgMask);\n this.initCustomStyle();\n this.registerThumbnail();\n var eventType = this.domEventType === \"mouse\" ? \"mouse\" : \"touch\";\n this.touch = new Touche(this.root, {\n eventType,\n needPreventDefault: !this.config.disableGesture\n });\n this.root.addEventListener(\"contextmenu\", function(e) {\n e.preventDefault();\n });\n player.root.addEventListener(\"touchmove\", this.onRootTouchMove, true);\n player.root.addEventListener(\"touchend\", this.onRootTouchEnd, true);\n this.on(DURATION_CHANGE, function() {\n var player2 = _this2.player, config2 = _this2.config;\n if (player2.duration * 1e3 < config2.moveDuration) {\n config2.moveDuration = player2.duration * 1e3;\n }\n });\n this.on([CANPLAY, ENDED], function() {\n var _this2$pos = _this2.pos, time = _this2$pos.time, isStart = _this2$pos.isStart;\n if (!isStart && time > 0) {\n _this2.pos.time = 0;\n }\n });\n var eventsMap = {\n touchstart: \"onTouchStart\",\n touchmove: \"onTouchMove\",\n touchend: \"onTouchEnd\",\n press: \"onPress\",\n pressend: \"onPressEnd\",\n click: \"onClick\",\n doubleclick: \"onDbClick\"\n };\n Object.keys(eventsMap).map(function(key) {\n _this2.touch.on(key, function(e) {\n _this2[eventsMap[key]](e);\n });\n });\n if (!config.disableActive) {\n var progressPlugin = player.plugins.progress;\n if (progressPlugin) {\n progressPlugin.addCallBack(\"dragmove\", function(data) {\n _this2.activeSeekNote(data.currentTime, data.forward);\n });\n progressPlugin.addCallBack(\"dragend\", function() {\n _this2.changeAction(ACTIONS.AUTO);\n });\n }\n }\n }\n }, {\n key: \"registerThumbnail\",\n value: function registerThumbnail() {\n var player = this.player;\n var thumbnail = player.plugins.thumbnail;\n if (thumbnail && thumbnail.usable) {\n this.thumbnail = thumbnail.createThumbnail(null, \"mobile-thumbnail\");\n var timePreview = this.find(\".time-preview\");\n timePreview.insertBefore(this.thumbnail, timePreview.children[0]);\n }\n }\n }, {\n key: \"initCustomStyle\",\n value: function initCustomStyle() {\n var _ref = this.playerConfig || {}, commonStyle = _ref.commonStyle;\n var playedColor = commonStyle.playedColor, progressColor = commonStyle.progressColor;\n if (playedColor) {\n this.find(\".xg-curbar\").style.backgroundColor = playedColor;\n this.find(\".xg-cur\").style.color = playedColor;\n }\n if (progressColor) {\n this.find(\".xg-bar\").style.backgroundColor = progressColor;\n this.find(\".time-preview\").style.color = progressColor;\n }\n this.config.disableTimeProgress && util.addClass(this.find(\".xg-timebar\"), \"hide\");\n }\n }, {\n key: \"resetPos\",\n value: function resetPos() {\n var _this3 = this;\n if (this.pos) {\n this.pos.isStart = false;\n this.pos.scope = -1;\n [\"x\", \"y\", \"width\", \"height\", \"scopeL\", \"scopeR\", \"scopeM1\", \"scopeM2\"].map(function(item) {\n _this3.pos[item] = 0;\n });\n } else {\n this.pos = {\n isStart: false,\n x: 0,\n y: 0,\n volume: 0,\n rate: 1,\n light: 0,\n width: 0,\n height: 0,\n scopeL: 0,\n scopeR: 0,\n scopeM1: 0,\n scopeM2: 0,\n scope: -1,\n time: 0\n };\n }\n }\n }, {\n key: \"changeAction\",\n value: function changeAction(action) {\n var player = this.player, root = this.root;\n root.setAttribute(\"data-xg-action\", action);\n var startPlugin = player.plugins.start;\n startPlugin && startPlugin.recover();\n }\n }, {\n key: \"getTouche\",\n value: function getTouche(e) {\n var rotateDeg = this.player.rotateDeg;\n var touche = e.touches && e.touches.length > 0 ? e.touches[e.touches.length - 1] : e;\n return rotateDeg === 0 ? {\n pageX: touche.pageX,\n pageY: touche.pageY\n } : {\n pageX: touche.pageX,\n pageY: touche.pageY\n };\n }\n }, {\n key: \"checkScope\",\n value: function checkScope(x, y, diffx, diffy, pos) {\n var width = pos.width;\n var scope = -1;\n if (x < 0 || x > width) {\n return scope;\n }\n var mold = diffy === 0 ? Math.abs(diffx) : Math.abs(diffx / diffy);\n if (Math.abs(diffx) > 0 && mold >= 1.73 && x > pos.scopeM1 && x < pos.scopeM2) {\n scope = 0;\n } else if (Math.abs(diffx) === 0 || mold <= 0.57) {\n scope = x < pos.scopeL ? 1 : x > pos.scopeR ? 2 : 3;\n }\n return scope;\n }\n }, {\n key: \"executeMove\",\n value: function executeMove(diffx, diffy, scope, width, height) {\n switch (scope) {\n case 0:\n this.updateTime(diffx / width * this.config.scopeM);\n break;\n case 1:\n this.updateBrightness(diffy / height);\n break;\n case 2:\n if (!sniffer.os.isIos) {\n this.updateVolume(diffy / height);\n }\n break;\n }\n }\n }, {\n key: \"endLastMove\",\n value: function endLastMove(lastScope) {\n var _this4 = this;\n var pos = this.pos, player = this.player, config = this.config;\n var time = (pos.time - this.timeOffset) / 1e3;\n switch (lastScope) {\n case 0:\n player.seek(Number(time).toFixed(1));\n config.hideControlsEnd ? player.blur() : player.focus();\n this.timer = setTimeout(function() {\n _this4.pos.time = 0;\n }, 500);\n break;\n }\n this.changeAction(ACTIONS.AUTO);\n }\n }, {\n key: \"checkIsRootTarget\",\n value: function checkIsRootTarget(e) {\n var plugins = this.player.plugins || {};\n if (plugins.progress && plugins.progress.root.contains(e.target)) {\n return false;\n }\n return plugins.start && plugins.start.root.contains(e.target) || plugins.controls && plugins.controls.root.contains(e.target);\n }\n }, {\n key: \"sendUseAction\",\n value: function sendUseAction(event) {\n var paused = this.player.paused;\n this.emitUserAction(event, \"switch_play_pause\", {\n prop: \"paused\",\n from: paused,\n to: !paused\n });\n }\n }, {\n key: \"clickHandler\",\n value: function clickHandler(e) {\n var player = this.player, config = this.config, playerConfig = this.playerConfig;\n if (player.state < STATES.RUNNING) {\n if (!playerConfig.closeVideoClick) {\n this.sendUseAction(util.createEvent(\"click\"));\n player.play();\n }\n return;\n }\n if (!config.closedbClick || playerConfig.closeVideoClick) {\n player.isActive ? player.blur() : player.focus();\n } else if (!playerConfig.closeVideoClick) {\n if (player.isActive || config.focusVideoClick) {\n this.sendUseAction(util.createEvent(\"click\"));\n this.switchPlayPause();\n }\n player.focus();\n }\n }\n }, {\n key: \"dbClickHandler\",\n value: function dbClickHandler(e) {\n var config = this.config, player = this.player;\n if (!config.closedbClick && player.state >= STATES.RUNNING) {\n this.sendUseAction(util.createEvent(\"dblclick\"));\n this.switchPlayPause();\n }\n }\n }, {\n key: \"onClick\",\n value: function onClick(e) {\n var _this5 = this;\n var player = this.player;\n runHooks(this, HOOKS[0], function(plugin, data) {\n _this5.clickHandler(data.e);\n }, {\n e,\n paused: player.paused\n });\n }\n }, {\n key: \"onDbClick\",\n value: function onDbClick(e) {\n var _this6 = this;\n var player = this.player;\n runHooks(this, HOOKS[1], function(plugin, data) {\n _this6.dbClickHandler(data.e);\n }, {\n e,\n paused: player.paused\n });\n }\n }, {\n key: \"onPress\",\n value: function onPress(e) {\n var pos = this.pos, config = this.config, player = this.player;\n if (config.disablePress) {\n return;\n }\n pos.rate = this.player.playbackRate;\n this.emitUserAction(\"press\", \"change_rate\", {\n prop: \"playbackRate\",\n from: player.playbackRate,\n to: config.pressRate\n });\n player.playbackRate = config.pressRate;\n this.changeAction(ACTIONS.PLAYBACK);\n }\n }, {\n key: \"onPressEnd\",\n value: function onPressEnd(e) {\n var pos = this.pos, config = this.config, player = this.player;\n if (config.disablePress) {\n return;\n }\n this.emitUserAction(\"pressend\", \"change_rate\", {\n prop: \"playbackRate\",\n from: player.playbackRate,\n to: pos.rate\n });\n player.playbackRate = pos.rate;\n pos.rate = 1;\n this.changeAction(ACTIONS.AUTO);\n }\n }, {\n key: \"updateTime\",\n value: function updateTime(percent) {\n var player = this.player, config = this.config;\n var duration = this.player.duration;\n percent = Number(percent.toFixed(4));\n var time = parseInt(percent * config.moveDuration, 10) + this.timeOffset;\n time += this.pos.time;\n time = time < 0 ? 0 : time > duration * 1e3 ? duration * 1e3 - 200 : time;\n player.getPlugin(\"time\") && player.getPlugin(\"time\").updateTime(time / 1e3);\n player.getPlugin(\"progress\") && player.getPlugin(\"progress\").updatePercent(time / 1e3 / this.duration, true);\n this.activeSeekNote(time / 1e3, percent > 0);\n if (config.isTouchingSeek) {\n player.seek(Number((time - this.timeOffset) / 1e3).toFixed(1));\n }\n this.pos.time = time;\n }\n }, {\n key: \"updateVolume\",\n value: function updateVolume(percent) {\n if (this.player.rotateDeg) {\n percent = -percent;\n }\n var player = this.player, pos = this.pos;\n percent = parseInt(percent * 100, 10);\n pos.volume += percent;\n if (Math.abs(pos.volume) < 10) {\n return;\n }\n var volume = parseInt(player.volume * 10, 10) - parseInt(pos.volume / 10, 10);\n volume = volume > 10 ? 10 : volume < 1 ? 0 : volume;\n player.volume = volume / 10;\n pos.volume = 0;\n }\n }, {\n key: \"updateBrightness\",\n value: function updateBrightness(percent) {\n if (this.player.rotateDeg) {\n percent = -percent;\n }\n var pos = this.pos, config = this.config, xgMask = this.xgMask;\n var light = pos.light + 0.8 * percent;\n light = light > config.maxDarkness ? config.maxDarkness : light < 0 ? 0 : light;\n if (xgMask) {\n xgMask.style.backgroundColor = \"rgba(0,0,0,\".concat(light, \")\");\n }\n pos.light = light;\n }\n }, {\n key: \"activeSeekNote\",\n value: function activeSeekNote(time) {\n var isForward = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;\n var player = this.player, config = this.config;\n var isLive = !(this.duration !== Infinity && this.duration > 0);\n if (!time || typeof time !== \"number\" || isLive || config.disableActive) {\n return;\n }\n if (time < 0) {\n time = 0;\n } else if (time > player.duration) {\n time = player.duration - 0.2;\n }\n this.changeAction(ACTIONS.SEEKING);\n var startPlugin = player.plugins.start;\n startPlugin && startPlugin.focusHide();\n this.find(\".xg-dur\").innerHTML = util.format(this.duration);\n this.find(\".xg-cur\").innerHTML = util.format(time);\n this.find(\".xg-curbar\").style.width = \"\".concat(time / this.duration * 100, \"%\");\n if (isForward) {\n util.removeClass(this.find(\".xg-seek-show\"), \"xg-back\");\n } else {\n util.addClass(this.find(\".xg-seek-show\"), \"xg-back\");\n }\n this.updateThumbnails(time);\n }\n }, {\n key: \"updateThumbnails\",\n value: function updateThumbnails(time) {\n var player = this.player;\n var thumbnail = player.plugins.thumbnail;\n if (thumbnail && thumbnail.usable) {\n this.thumbnail && thumbnail.update(this.thumbnail, time, 160, 90);\n }\n }\n }, {\n key: \"switchPlayPause\",\n value: function switchPlayPause() {\n var player = this.player;\n if (player.state < STATES.ATTACHED) {\n return false;\n } else if (!player.ended) {\n if (player.paused) {\n player.play();\n } else {\n player.pause();\n }\n }\n }\n }, {\n key: \"disableGesture\",\n value: function disableGesture() {\n this.config.disableGesture = false;\n }\n }, {\n key: \"enableGesture\",\n value: function enableGesture() {\n this.config.disableGesture = true;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var player = this.player;\n this.timer && clearTimeout(this.timer);\n this.thumbnail = null;\n player.root.removeChild(this.xgMask);\n this.xgMask = null;\n this.touch && this.touch.destroy();\n this.touch = null;\n player.root.removeEventListener(\"touchmove\", this.onRootTouchMove, true);\n player.root.removeEventListener(\"touchend\", this.onRootTouchEnd, true);\n }\n }, {\n key: \"render\",\n value: function render() {\n var className = this.config.gradient !== \"normal\" ? \"gradient \".concat(this.config.gradient) : \"gradient\";\n return '\\n \\n
\\n
\\n
\\n \\n 00:00\\n /\\n 00:00\\n
\\n
\\n
\\n
\\n
\\n
\\n ').concat(this.config.pressRate, \"X\").concat(this.i18n.FORWARD, \"\\n
\\n
\\n \");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"mobile\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n index: 0,\n disableGesture: false,\n gestureX: true,\n gestureY: true,\n gradient: \"normal\",\n isTouchingSeek: false,\n miniMoveStep: 5,\n miniYPer: 5,\n scopeL: 0.25,\n scopeR: 0.25,\n scopeM: 0.9,\n pressRate: 2,\n darkness: true,\n maxDarkness: 0.8,\n disableActive: false,\n disableTimeProgress: false,\n hideControlsActive: false,\n hideControlsEnd: false,\n moveDuration: 60 * 6 * 1e3,\n closedbClick: false,\n disablePress: true,\n disableSeekIcon: false,\n focusVideoClick: false\n };\n }\n }]);\n return MobilePlugin2;\n}(Plugin);\nexport { MobilePlugin as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, objectSpread2 as _objectSpread2 } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { SHORTCUT } from \"../../events.js\";\nimport BasePlugin from \"../../plugin/basePlugin.js\";\nimport \"delegate\";\nfunction preventDefault(e) {\n e.preventDefault();\n e.returnValue = false;\n}\nfunction isDisableTag(el) {\n var tagName = el.tagName;\n if (tagName === \"INPUT\" || tagName === \"TEXTAREA\" || el.isContentEditable) {\n return true;\n }\n return false;\n}\nvar Keyboard = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(Keyboard2, _BasePlugin);\n var _super = _createSuper(Keyboard2);\n function Keyboard2() {\n var _this;\n _classCallCheck(this, Keyboard2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onBodyKeyDown\", function(event) {\n if (!_this.player) {\n return;\n }\n var e = event || window.event;\n var keyCode = e.keyCode;\n var _assertThisInitialize = _assertThisInitialized(_this), _keyState = _assertThisInitialize._keyState, player = _assertThisInitialize.player;\n var _this$config = _this.config, disable = _this$config.disable, disableBodyTrigger = _this$config.disableBodyTrigger, isIgnoreUserActive = _this$config.isIgnoreUserActive;\n if (disable || disableBodyTrigger || !player.isUserActive && !isIgnoreUserActive || isDisableTag(e.target) || !_this.checkIsVisible() || e.metaKey || e.altKey || e.ctrlKey) {\n _keyState.isBodyKeyDown = false;\n return;\n }\n if (!event.repeat && !_keyState.isKeyDown) {\n if ((e.target === document.body || _this.config.isGlobalTrigger && !isDisableTag(e.target)) && _this.checkCode(keyCode, true)) {\n _keyState.isBodyKeyDown = true;\n }\n document.addEventListener(\"keyup\", _this.onBodyKeyUp);\n }\n _keyState.isBodyKeyDown && _this.handleKeyDown(e);\n });\n _defineProperty(_assertThisInitialized(_this), \"onBodyKeyUp\", function(event) {\n if (!_this.player) {\n return;\n }\n document.removeEventListener(\"keyup\", _this.onBodyKeyUp);\n _this.handleKeyUp(event);\n });\n _defineProperty(_assertThisInitialized(_this), \"onKeydown\", function(event) {\n if (!_this.player) {\n return;\n }\n var e = event || window.event;\n var _assertThisInitialize2 = _assertThisInitialized(_this), _keyState = _assertThisInitialize2._keyState;\n if (!e.repeat) {\n if (_this.config.disable || _this.config.disableRootTrigger || e.metaKey || e.altKey || e.ctrlKey) {\n return;\n }\n if (!_this.player.isUserActive && !_this.config.isIgnoreUserActive) {\n return;\n }\n if (e && (e.keyCode === 37 || _this.checkCode(e.keyCode)) && (e.target === _this.player.root || e.target === _this.player.video || e.target === _this.player.controls.el)) {\n _keyState.isKeyDown = true;\n }\n _this.player.root.addEventListener(\"keyup\", _this.onKeyup);\n }\n if (!_keyState.isKeyDown) {\n return;\n }\n _this.handleKeyDown(e);\n });\n _defineProperty(_assertThisInitialized(_this), \"onKeyup\", function(event) {\n if (!_this.player) {\n return;\n }\n _this.player.root.removeEventListener(\"keyup\", _this.onKeyup);\n _this.handleKeyUp(event);\n });\n return _this;\n }\n _createClass(Keyboard2, [{\n key: \"mergekeyCodeMap\",\n value: function mergekeyCodeMap() {\n var _this2 = this;\n var extendkeyCodeMap = this.config.keyCodeMap;\n if (extendkeyCodeMap) {\n Object.keys(extendkeyCodeMap).map(function(key) {\n if (!_this2.keyCodeMap[key]) {\n _this2.keyCodeMap[key] = extendkeyCodeMap[key];\n } else {\n [\"keyCode\", \"action\", \"disable\", \"pressAction\", \"disablePress\", \"isBodyTarget\"].map(function(key1) {\n extendkeyCodeMap[key][key1] && (_this2.keyCodeMap[key][key1] = extendkeyCodeMap[key][key1]);\n });\n }\n });\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n this.config.disable = !this.playerConfig.keyShortcut;\n var seekStep = typeof this.config.seekStep === \"function\" ? this.config.seekStep(this.player) : this.config.seekStep;\n if (!(!seekStep || typeof seekStep !== \"number\")) {\n this.seekStep = seekStep;\n }\n this.keyCodeMap = {\n space: {\n keyCode: 32,\n action: \"playPause\",\n disable: false,\n disablePress: false,\n noBodyTarget: false\n },\n up: {\n keyCode: 38,\n action: \"upVolume\",\n disable: false,\n disablePress: false,\n noBodyTarget: true\n },\n down: {\n keyCode: 40,\n action: \"downVolume\",\n disable: false,\n disablePress: false,\n noBodyTarget: true\n },\n left: {\n keyCode: 37,\n action: \"seekBack\",\n disablePress: false,\n disable: false\n },\n right: {\n keyCode: 39,\n action: \"seek\",\n pressAction: \"changePlaybackRate\",\n disablePress: false,\n disable: false\n },\n esc: {\n keyCode: 27,\n action: \"exitFullscreen\",\n disablePress: true,\n disable: false\n }\n };\n this.mergekeyCodeMap();\n this._keyState = {\n isKeyDown: false,\n isBodyKeyDown: false,\n isPress: false,\n tt: 0,\n playbackRate: 0\n };\n this.player.root.addEventListener(\"keydown\", this.onKeydown);\n document.addEventListener(\"keydown\", this.onBodyKeyDown);\n }\n }, {\n key: \"checkIsVisible\",\n value: function checkIsVisible() {\n if (!this.config.checkVisible) {\n return true;\n }\n var rec = this.player.root.getBoundingClientRect();\n var height = rec.height, top = rec.top, bottom = rec.bottom;\n var h = window.innerHeight;\n if (top < 0 && top < 0 - height * 0.9 || bottom > 0 && bottom - h > height * 0.9) {\n return false;\n }\n return true;\n }\n }, {\n key: \"checkCode\",\n value: function checkCode(code, isBodyTarget) {\n var _this3 = this;\n var flag = false;\n Object.keys(this.keyCodeMap).map(function(key) {\n if (_this3.keyCodeMap[key] && code === _this3.keyCodeMap[key].keyCode && !_this3.keyCodeMap[key].disable) {\n flag = !isBodyTarget || isBodyTarget && !_this3.keyCodeMap[key].noBodyTarget;\n }\n });\n return flag;\n }\n }, {\n key: \"downVolume\",\n value: function downVolume(event) {\n var player = this.player;\n if (player.volume <= 0) {\n return;\n }\n var val = parseFloat((player.volume - 0.1).toFixed(1));\n var props = {\n volume: {\n from: player.volume,\n to: val\n }\n };\n this.emitUserAction(event, \"change_volume\", {\n props\n });\n if (val >= 0) {\n player.volume = val;\n } else {\n player.volume = 0;\n }\n }\n }, {\n key: \"upVolume\",\n value: function upVolume(event) {\n var player = this.player;\n if (player.volume >= 1) {\n return;\n }\n var val = parseFloat((player.volume + 0.1).toFixed(1));\n var props = {\n volume: {\n from: player.volume,\n to: val\n }\n };\n this.emitUserAction(event, \"change_volume\", {\n props\n });\n if (val <= 1) {\n player.volume = val;\n } else {\n player.volume = 1;\n }\n }\n }, {\n key: \"seek\",\n value: function seek(event) {\n var _this$player = this.player, currentTime = _this$player.currentTime, offsetCurrentTime = _this$player.offsetCurrentTime, duration = _this$player.duration, offsetDuration = _this$player.offsetDuration, timeSegments = _this$player.timeSegments;\n var _time = offsetCurrentTime > -1 ? offsetCurrentTime : currentTime;\n var _duration = offsetDuration || duration;\n var _step = event.repeat && this.seekStep >= 4 ? parseInt(this.seekStep / 2, 10) : this.seekStep;\n if (_time + _step <= _duration) {\n _time = _time + _step;\n } else {\n _time = _duration;\n }\n var _seekTime = util.getCurrentTimeByOffset(_time, timeSegments);\n var props = {\n currentTime: {\n from: currentTime,\n to: _seekTime\n }\n };\n this.emitUserAction(event, \"seek\", {\n props\n });\n this.player.currentTime = _seekTime;\n }\n }, {\n key: \"seekBack\",\n value: function seekBack(event) {\n var _this$player2 = this.player, currentTime = _this$player2.currentTime, offsetCurrentTime = _this$player2.offsetCurrentTime, timeSegments = _this$player2.timeSegments;\n var _step = event.repeat ? parseInt(this.seekStep / 2, 10) : this.seekStep;\n var _time = offsetCurrentTime > -1 ? offsetCurrentTime : currentTime;\n var _seekTime = _time - _step;\n if (_seekTime < 0) {\n _seekTime = 0;\n }\n _seekTime = util.getCurrentTimeByOffset(_seekTime, timeSegments);\n var props = {\n currentTime: {\n from: currentTime,\n to: _seekTime\n }\n };\n this.emitUserAction(event, \"seek\", {\n props\n });\n this.player.currentTime = _seekTime;\n }\n }, {\n key: \"changePlaybackRate\",\n value: function changePlaybackRate(event) {\n var _keyState = this._keyState, config = this.config, player = this.player;\n if (_keyState.playbackRate === 0) {\n _keyState.playbackRate = player.playbackRate;\n player.playbackRate = config.playbackRate;\n }\n }\n }, {\n key: \"playPause\",\n value: function playPause(event) {\n var player = this.player;\n if (!player) {\n return;\n }\n this.emitUserAction(event, \"switch_play_pause\");\n if (player.paused) {\n player.play();\n } else {\n player.pause();\n }\n }\n }, {\n key: \"exitFullscreen\",\n value: function exitFullscreen(event) {\n var player = this.player;\n var fullscreen = player.fullscreen, cssfullscreen = player.cssfullscreen;\n if (fullscreen) {\n this.emitUserAction(\"keyup\", \"switch_fullscreen\", {\n prop: \"fullscreen\",\n from: fullscreen,\n to: !fullscreen\n });\n player.exitFullscreen();\n }\n if (cssfullscreen) {\n this.emitUserAction(\"keyup\", \"switch_css_fullscreen\", {\n prop: \"cssfullscreen\",\n from: cssfullscreen,\n to: !cssfullscreen\n });\n player.exitCssFullscreen();\n }\n }\n }, {\n key: \"handleKeyDown\",\n value: function handleKeyDown(e) {\n var _keyState = this._keyState;\n if (e.repeat) {\n _keyState.isPress = true;\n var _t = Date.now();\n if (_t - _keyState.tt < 200) {\n return;\n }\n _keyState.tt = _t;\n }\n preventDefault(e);\n this.handleKeyCode(e.keyCode, e, _keyState.isPress);\n }\n }, {\n key: \"handleKeyUp\",\n value: function handleKeyUp(e) {\n var _keyState = this._keyState;\n if (_keyState.playbackRate > 0) {\n this.player.playbackRate = _keyState.playbackRate;\n _keyState.playbackRate = 0;\n }\n _keyState.isKeyDown = false;\n _keyState.isPress = false;\n _keyState.tt = 0;\n }\n }, {\n key: \"handleKeyCode\",\n value: function handleKeyCode(curKeyCode, event, isPress) {\n var arr = Object.keys(this.keyCodeMap);\n for (var i = 0; i < arr.length; i++) {\n var _this$keyCodeMap$arr$ = this.keyCodeMap[arr[i]], action = _this$keyCodeMap$arr$.action, keyCode = _this$keyCodeMap$arr$.keyCode, disable = _this$keyCodeMap$arr$.disable, pressAction = _this$keyCodeMap$arr$.pressAction, disablePress = _this$keyCodeMap$arr$.disablePress;\n if (keyCode === curKeyCode) {\n if (!disable && !(isPress && disablePress)) {\n var _action = !isPress ? action : pressAction || action;\n if (typeof _action === \"function\") {\n action(event, this.player, isPress);\n } else if (typeof _action === \"string\") {\n if (typeof this[_action] === \"function\") {\n this[_action](event, this.player, isPress);\n }\n }\n this.emit(SHORTCUT, _objectSpread2({\n key: arr[i],\n target: event.target,\n isPress\n }, this.keyCodeMap[arr[i]]));\n }\n break;\n }\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.player.root.removeEventListener(\"keydown\", this.onKeydown);\n document.removeEventListener(\"keydown\", this.onBodyKeyDown);\n this.player.root.removeEventListener(\"keyup\", this.onKeyup);\n document.removeEventListener(\"keyup\", this.onBodyKeyUp);\n }\n }, {\n key: \"disable\",\n value: function disable() {\n this.config.disable = true;\n }\n }, {\n key: \"enable\",\n value: function enable() {\n this.config.disable = false;\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"keyboard\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n seekStep: 10,\n checkVisible: false,\n disableBodyTrigger: false,\n disableRootTrigger: false,\n isGlobalTrigger: false,\n keyCodeMap: {},\n disable: false,\n playbackRate: 2,\n isIgnoreUserActive: false\n };\n }\n }]);\n return Keyboard2;\n}(BasePlugin);\nexport { Keyboard as default };\n","function loadingIcon() {\n return new DOMParser().parseFromString('\\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { loadingIcon as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport Plugin, { POSITIONS } from \"../../plugin/plugin.js\";\nimport loadingIcon from \"../assets/loading.js\";\nvar Loading = /* @__PURE__ */ function(_Plugin) {\n _inherits(Loading2, _Plugin);\n var _super = _createSuper(Loading2);\n function Loading2() {\n _classCallCheck(this, Loading2);\n return _super.apply(this, arguments);\n }\n _createClass(Loading2, [{\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n loadingIcon\n };\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n this.appendChild(\"xg-loading-inner\", this.icons.loadingIcon);\n }\n }, {\n key: \"render\",\n value: function render() {\n return '\\n \\n \\n ';\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"loading\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.ROOT\n };\n }\n }]);\n return Loading2;\n}(Plugin);\nexport { Loading as default };\n","import { createClass as _createClass, classCallCheck as _classCallCheck } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport \"../../utils/debug.js\";\nimport \"delegate\";\nvar TPL = [{\n tag: \"xg-cache\",\n className: \"xgplayer-progress-cache\",\n styleKey: \"cachedColor\"\n}, {\n tag: \"xg-played\",\n className: \"xgplayer-progress-played\",\n styleKey: \"playedColor\"\n}];\nvar InnerList = /* @__PURE__ */ function() {\n function InnerList2(args) {\n _classCallCheck(this, InnerList2);\n this.fragments = args.fragments || [];\n if (this.fragments.length === 0) {\n this.fragments.push({\n percent: 1\n });\n }\n this._callBack = args.actionCallback;\n this.fragConfig = {\n fragFocusClass: args.fragFocusClass || \"inner-focus-point\",\n fragAutoFocus: !!args.fragAutoFocus,\n fragClass: args.fragClass || \"\"\n };\n this.style = args.style || {\n playedColor: \"\",\n cachedColor: \"\",\n progressColor: \"\"\n };\n this.duration = 0;\n this.cachedIndex = 0;\n this.playedIndex = 0;\n this.focusIndex = -1;\n }\n _createClass(InnerList2, [{\n key: \"updateDuration\",\n value: function updateDuration(duration) {\n var _this = this;\n this.duration = duration;\n var start = 0;\n var fragments = this.fragments;\n this.fragments = fragments.map(function(item) {\n item.start = parseInt(start, 10);\n item.end = parseInt(start + item.percent * _this.duration, 10);\n item.duration = parseInt(item.percent * _this.duration, 10);\n start += item.percent * _this.duration;\n return item;\n });\n }\n }, {\n key: \"updateProgress\",\n value: function updateProgress() {\n var type = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : \"played\";\n var data = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {\n newIndex: 0,\n curIndex: 0,\n millisecond: 0\n };\n var progressList = this.progressList, fragments = this.fragments;\n if (progressList.length < 1) {\n return;\n }\n var newIndex = data.newIndex, curIndex = data.curIndex, millisecond = data.millisecond;\n if (newIndex !== curIndex) {\n progressList.map(function(item, index) {\n if (index < newIndex) {\n item[type].style.width = \"100%\";\n } else if (index > newIndex) {\n item[type].style.width = 0;\n }\n });\n }\n var curPFrag = fragments[newIndex];\n var per = millisecond === 0 ? 0 : (millisecond - curPFrag.start) / curPFrag.duration;\n progressList[newIndex][type].style.width = per < 0 ? 0 : \"\".concat(per * 100, \"%\");\n }\n }, {\n key: \"updateFocus\",\n value: function updateFocus(data) {\n if (!this.fragConfig.fragAutoFocus || this.fragments.length < 2) {\n return;\n }\n if (!data) {\n if (this.focusIndex > -1) {\n this.unHightLight(this.focusIndex);\n var _data = {\n index: -1,\n preIndex: this.focusIndex,\n fragment: null\n };\n this._callBack && this._callBack(_data);\n this.focusIndex = -1;\n }\n return;\n }\n var newPIndex = this.findIndex(data.currentTime * 1e3, this.focusIndex);\n if (newPIndex >= 0 && newPIndex !== this.focusIndex) {\n this.focusIndex > -1 && this.unHightLight(this.focusIndex);\n this.setHightLight(newPIndex);\n var _data2 = {\n index: newPIndex,\n preIndex: this.focusIndex,\n fragment: this.fragments[this.focusIndex]\n };\n this.focusIndex = newPIndex;\n this._callBack && this._callBack(_data2);\n }\n }\n }, {\n key: \"update\",\n value: function update() {\n var data = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {\n cached: 0,\n played: 0\n };\n var duration = arguments.length > 1 ? arguments[1] : void 0;\n if (!this.duration || parseInt(duration * 1e3, 10) !== this.duration) {\n if (!duration && duration !== 0) {\n return;\n }\n this.updateDuration(parseInt(duration * 1e3, 10));\n }\n var playedIndex = this.playedIndex, cachedIndex = this.cachedIndex;\n if (util.typeOf(data.played) !== \"Undefined\") {\n var newPIndex = this.findIndex(data.played * 1e3, playedIndex);\n if (newPIndex < 0) {\n return;\n }\n this.updateProgress(\"played\", {\n newIndex: newPIndex,\n curIndex: playedIndex,\n millisecond: parseInt(data.played * 1e3, 10)\n });\n this.playedIndex = newPIndex;\n }\n if (util.typeOf(data.cached) !== \"Undefined\") {\n var newCIndex = this.findIndex(data.cached * 1e3, cachedIndex);\n if (newCIndex < 0) {\n return;\n }\n this.updateProgress(\"cached\", {\n newIndex: newCIndex,\n curIndex: cachedIndex,\n millisecond: parseInt(data.cached * 1e3, 10)\n });\n this.cachedIndex = newCIndex;\n }\n }\n }, {\n key: \"findIndex\",\n value: function findIndex(time, curIndex) {\n var fragments = this.fragments;\n if (!fragments || fragments.length === 0) {\n return -1;\n }\n if (fragments.length === 1) {\n return 0;\n }\n if (curIndex > -1 && curIndex < fragments.length && time > fragments[curIndex].start && time < fragments[curIndex].end) {\n return curIndex;\n }\n if (time > fragments[fragments.length - 1].start) {\n return fragments.length - 1;\n }\n for (var i = 0; i < fragments.length; i++) {\n if (time > fragments[i].start && time <= fragments[i].end) {\n curIndex = i;\n break;\n }\n }\n return curIndex;\n }\n }, {\n key: \"findHightLight\",\n value: function findHightLight() {\n var children = this.root.children;\n for (var i = 0; i < children.length; i++) {\n if (util.hasClass(children[i], this.fragConfig.fragFocusClass)) {\n return {\n dom: children[i],\n pos: children[i].getBoundingClientRect()\n };\n }\n }\n }\n }, {\n key: \"findFragment\",\n value: function findFragment(index) {\n var children = this.root.children;\n if (index < 0 || index >= children.length) {\n return null;\n }\n return {\n dom: children[index],\n pos: children[index].getBoundingClientRect()\n };\n }\n }, {\n key: \"unHightLight\",\n value: function unHightLight() {\n var children = this.root.children;\n for (var i = 0; i < children.length; i++) {\n util.removeClass(children[i], this.fragConfig.fragFocusClass);\n }\n }\n }, {\n key: \"setHightLight\",\n value: function setHightLight(index) {\n var children = this.root.children;\n if (index < children.length) {\n util.addClass(children[index], this.fragConfig.fragFocusClass);\n return {\n dom: children[index],\n pos: children[index].getBoundingClientRect()\n };\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.progressList = null;\n this.fragments = null;\n this.root.innerHTML = \"\";\n }\n }, {\n key: \"reset\",\n value: function reset(newOptions) {\n var _this2 = this;\n Object.keys(this.fragConfig).forEach(function(key) {\n if (newOptions[key] !== void 0) {\n _this2.fragConfig[key] = newOptions[key];\n }\n });\n if (newOptions.fragments) {\n this.fragments = newOptions.fragments.length === 0 ? [{\n percent: 1\n }] : newOptions.fragments;\n this.updateDuration(this.duration);\n this.playedIndex = 0;\n this.cachedIndex = 0;\n if (this.root) {\n var _c = this.root.children;\n while (_c.length > 0) {\n this.root.removeChild(_c[0]);\n }\n }\n this.render();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n var progressColor = this.style.progressColor;\n if (!this.root) {\n this.root = util.createDom(\"xg-inners\", \"\", {}, \"progress-list\");\n }\n if (this.fragments) {\n var _this$fragConfig = this.fragConfig, fragClass = _this$fragConfig.fragClass, fragFocusClass = _this$fragConfig.fragFocusClass;\n this.progressList = this.fragments.map(function(item) {\n var inner = util.createDom(\"xg-inner\", \"\", {\n style: progressColor ? \"background:\".concat(progressColor, \"; flex: \").concat(item.percent) : \"flex: \".concat(item.percent)\n }, \"\".concat(item.isFocus ? fragFocusClass : \"\", \" xgplayer-progress-inner \").concat(fragClass));\n _this3.root.appendChild(inner);\n TPL.forEach(function(item2) {\n inner.appendChild(util.createDom(item2.tag, \"\", {\n style: item2.styleKey ? \"background: \".concat(_this3.style[item2.styleKey], \"; width:0;\") : \"width:0;\"\n }, item2.className));\n });\n return {\n cached: inner.children[0],\n played: inner.children[1]\n };\n });\n }\n return this.root;\n }\n }]);\n return InnerList2;\n}();\nexport { InnerList as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, objectSpread2 as _objectSpread2, typeof as _typeof } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport { DURATION_CHANGE, TIME_UPDATE, SEEKED, PROGRESS, ENDED, EMPTIED, VIDEO_RESIZE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin, { POSITIONS } from \"../../plugin/plugin.js\";\nimport InnerList from \"./innerList.js\";\nvar FRAGMENT_FOCUS_CLASS = {\n POINT: \"inner-focus-point\",\n HIGHLIGHT: \"inner-focus-highlight\"\n};\nvar Progress = /* @__PURE__ */ function(_Plugin) {\n _inherits(Progress2, _Plugin);\n var _super = _createSuper(Progress2);\n function Progress2(args) {\n var _this;\n _classCallCheck(this, Progress2);\n _this = _super.call(this, args);\n _defineProperty(_assertThisInitialized(_this), \"onMoveOnly\", function(e, data) {\n var _assertThisInitialize = _assertThisInitialized(_this), pos = _assertThisInitialize.pos, config = _assertThisInitialize.config, player = _assertThisInitialize.player;\n var ret = data;\n if (e) {\n util.event(e);\n var _ePos = util.getEventPos(e, player.zoom);\n var x = player.rotateDeg === 90 ? _ePos.clientY : _ePos.clientX;\n if (pos.moving && Math.abs(pos.x - x) < config.miniMoveStep) {\n return;\n }\n pos.moving = true;\n pos.x = x;\n ret = _this.computeTime(e, x);\n }\n _this.triggerCallbacks(\"dragmove\", ret, e);\n _this._updateInnerFocus(ret);\n });\n _defineProperty(_assertThisInitialized(_this), \"onBodyClick\", function(e) {\n if (!_this.pos.isLocked) {\n return;\n }\n _this.pos.isLocked = false;\n e.preventDefault();\n e.stopPropagation();\n });\n _defineProperty(_assertThisInitialized(_this), \"_mouseDownHandler\", function(event, data) {\n _this._state.time = data.currentTime;\n _this.updateWidth(data.currentTime, data.seekTime, data.percent, 0);\n _this._updateInnerFocus(data);\n });\n _defineProperty(_assertThisInitialized(_this), \"_mouseUpHandler\", function(e, data) {\n var _assertThisInitialize2 = _assertThisInitialized(_this), pos = _assertThisInitialize2.pos;\n pos.moving && _this.updateWidth(data.currentTime, data.seekTime, data.percent, 2);\n });\n _defineProperty(_assertThisInitialized(_this), \"_mouseMoveHandler\", function(e, data) {\n var _assertThisInitialize3 = _assertThisInitialized(_this), _state = _assertThisInitialize3._state, pos = _assertThisInitialize3.pos, config = _assertThisInitialize3.config, player = _assertThisInitialize3.player;\n if (_state.time < data.currentTime) {\n data.forward = true;\n } else {\n data.forward = false;\n }\n _state.time = data.currentTime;\n if (pos.isDown && !pos.moving) {\n pos.moving = true;\n config.isPauseMoving && player.pause();\n _this.triggerCallbacks(\"dragstart\", data, e);\n _this.emitUserAction(\"drag\", \"dragstart\", data);\n }\n _this.updateWidth(data.currentTime, data.seekTime, data.percent, 1);\n _this.triggerCallbacks(\"dragmove\", data, e);\n _this._updateInnerFocus(data);\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseDown\", function(e) {\n var _assertThisInitialize4 = _assertThisInitialized(_this), _state = _assertThisInitialize4._state, player = _assertThisInitialize4.player, pos = _assertThisInitialize4.pos, config = _assertThisInitialize4.config, playerConfig = _assertThisInitialize4.playerConfig;\n var _ePos = util.getEventPos(e, player.zoom);\n var x = player.rotateDeg === 90 ? _ePos.clientY : _ePos.clientX;\n if (player.isMini || config.closeMoveSeek || !playerConfig.allowSeekAfterEnded && player.ended) {\n return;\n }\n if (!player.duration && !player.isPlaying) {\n player.play();\n return;\n }\n e.stopPropagation();\n _this.focus();\n util.checkIsFunction(playerConfig.disableSwipeHandler) && playerConfig.disableSwipeHandler();\n util.checkIsFunction(config.onMoveStart) && config.onMoveStart();\n util.event(e);\n pos.x = x;\n pos.isDown = true;\n pos.moving = false;\n _state.prePlayTime = player.currentTime;\n player.focus({\n autoHide: false\n });\n _this.isProgressMoving = true;\n util.addClass(_this.progressBtn, \"active\");\n var ret = _this.computeTime(e, x);\n ret.prePlayTime = _state.prePlayTime;\n _this._mouseDownHandlerHook(e, ret);\n var eventType = e.type;\n if (eventType === \"touchstart\") {\n _this.root.addEventListener(\"touchmove\", _this.onMouseMove);\n _this.root.addEventListener(\"touchend\", _this.onMouseUp);\n } else {\n _this.unbind(\"mousemove\", _this.onMoveOnly);\n document.addEventListener(\"mousemove\", _this.onMouseMove, false);\n document.addEventListener(\"mouseup\", _this.onMouseUp, false);\n }\n return true;\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseUp\", function(e) {\n var _assertThisInitialize5 = _assertThisInitialized(_this), player = _assertThisInitialize5.player, config = _assertThisInitialize5.config, pos = _assertThisInitialize5.pos, playerConfig = _assertThisInitialize5.playerConfig, _state = _assertThisInitialize5._state;\n e.stopPropagation();\n e.preventDefault();\n util.checkIsFunction(playerConfig.enableSwipeHandler) && playerConfig.enableSwipeHandler();\n util.checkIsFunction(config.onMoveEnd) && config.onMoveEnd();\n util.event(e);\n util.removeClass(_this.progressBtn, \"active\");\n var ret = _this.computeTime(e, pos.x);\n ret.prePlayTime = _state.prePlayTime;\n if (pos.moving) {\n _this.triggerCallbacks(\"dragend\", ret, e);\n _this.emitUserAction(\"drag\", \"dragend\", ret);\n } else {\n _this.triggerCallbacks(\"click\", ret, e);\n _this.emitUserAction(\"click\", \"click\", ret);\n }\n _this._mouseUpHandlerHook(e, ret);\n pos.moving = false;\n pos.isDown = false;\n pos.x = 0;\n pos.y = 0;\n pos.isLocked = true;\n _state.prePlayTime = 0;\n _state.time = 0;\n var eventType = e.type;\n if (eventType === \"touchend\") {\n _this.root.removeEventListener(\"touchmove\", _this.onMouseMove);\n _this.root.removeEventListener(\"touchend\", _this.onMouseUp);\n _this.blur();\n } else {\n document.removeEventListener(\"mousemove\", _this.onMouseMove, false);\n document.removeEventListener(\"mouseup\", _this.onMouseUp, false);\n if (!pos.isEnter) {\n _this.onMouseLeave(e);\n } else {\n playerConfig.isMobileSimulateMode !== \"mobile\" && _this.bind(\"mousemove\", _this.onMoveOnly);\n }\n }\n util.setTimeout(_assertThisInitialized(_this), function() {\n _this.resetSeekState();\n }, 10);\n player.focus();\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseMove\", function(e) {\n var _assertThisInitialize6 = _assertThisInitialized(_this), _state = _assertThisInitialize6._state, pos = _assertThisInitialize6.pos, player = _assertThisInitialize6.player, config = _assertThisInitialize6.config;\n if (util.checkTouchSupport()) {\n e.preventDefault();\n }\n util.event(e);\n var _ePos = util.getEventPos(e, player.zoom);\n var x = player.rotateDeg === 90 ? _ePos.clientY : _ePos.clientX;\n var diff = Math.abs(pos.x - x);\n if (pos.moving && diff < config.miniMoveStep || !pos.moving && diff < config.miniStartStep) {\n return;\n }\n pos.x = x;\n var ret = _this.computeTime(e, x);\n ret.prePlayTime = _state.prePlayTime;\n _this._mouseMoveHandlerHook(e, ret);\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseOut\", function(e) {\n _this.triggerCallbacks(\"mouseout\", null, e);\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseOver\", function(e) {\n _this.triggerCallbacks(\"mouseover\", null, e);\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseEnter\", function(e) {\n var _assertThisInitialize7 = _assertThisInitialized(_this), player = _assertThisInitialize7.player, pos = _assertThisInitialize7.pos;\n if (pos.isDown || pos.isEnter || player.isMini || !player.config.allowSeekAfterEnded && player.ended) {\n return;\n }\n pos.isEnter = true;\n _this.bind(\"mousemove\", _this.onMoveOnly);\n _this.bind(\"mouseleave\", _this.onMouseLeave);\n util.event(e);\n var _ePos = util.getEventPos(e, player.zoom);\n var x = player.rotateDeg === 90 ? _ePos.clientY : _ePos.clientX;\n var ret = _this.computeTime(e, x);\n _this.triggerCallbacks(\"mouseenter\", ret, e);\n _this.focus();\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseLeave\", function(e) {\n _this.triggerCallbacks(\"mouseleave\", null, e);\n _this.unlock();\n _this._updateInnerFocus(null);\n });\n _defineProperty(_assertThisInitialized(_this), \"onVideoResize\", function() {\n var _this$pos = _this.pos, x = _this$pos.x, isDown = _this$pos.isDown, isEnter = _this$pos.isEnter;\n if (isEnter && !isDown) {\n var ret = _this.computeTime(null, x);\n _this.onMoveOnly(null, ret);\n }\n });\n _this.useable = false;\n _this.isProgressMoving = false;\n _this.__dragCallBacks = [];\n _this._state = {\n now: -1,\n direc: 0,\n time: 0,\n prePlayTime: -1\n };\n _this._disableBlur = false;\n return _this;\n }\n _createClass(Progress2, [{\n key: \"offsetDuration\",\n get: function get() {\n return this.playerConfig.customDuration || this.player.offsetDuration || this.player.duration;\n }\n }, {\n key: \"duration\",\n get: function get() {\n return this.playerConfig.customDuration || this.player.duration;\n }\n }, {\n key: \"timeOffset\",\n get: function get() {\n return this.playerConfig.timeOffset || 0;\n }\n }, {\n key: \"currentTime\",\n get: function get() {\n var _this$player = this.player, offsetCurrentTime = _this$player.offsetCurrentTime, currentTime = _this$player.currentTime;\n return offsetCurrentTime >= 0 ? offsetCurrentTime : currentTime + this.timeOffset;\n }\n }, {\n key: \"changeState\",\n value: function changeState() {\n var useable = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;\n this.useable = useable;\n }\n }, {\n key: \"show\",\n value: function show() {\n this.root && (this.root.style.display = \"flex\");\n }\n }, {\n key: \"_initInner\",\n value: function _initInner() {\n var _this2 = this;\n var fragments = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];\n var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n if (!fragments || fragments.length === 0) {\n fragments = [{\n percent: 1\n }];\n }\n var _c = _objectSpread2(_objectSpread2({\n fragments\n }, config), {}, {\n actionCallback: function actionCallback(data) {\n _this2.emitUserAction(\"fragment_focus\", \"fragment_focus\", data);\n }\n });\n if (!this.innerList) {\n this.innerList = new InnerList(_c);\n this.outer.insertBefore(this.innerList.render(), this.outer.children[0]);\n [\"findHightLight\", \"unHightLight\", \"setHightLight\", \"findFragment\"].map(function(item) {\n _this2[item] = _this2.innerList[item].bind(_this2.innerList);\n });\n } else {\n this.innerList.reset(_c);\n }\n }\n }, {\n key: \"_updateInnerFocus\",\n value: function _updateInnerFocus(data) {\n this.innerList && this.innerList.updateFocus(data);\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this3 = this;\n if (this.config.disable || this.playerConfig.isLive) {\n return;\n }\n this.pos = {\n x: 0,\n y: 0,\n moving: false,\n isDown: false,\n isEnter: false,\n isLocked: false\n };\n this.outer = this.find(\"xg-outer\");\n var _this$config = this.config, fragFocusClass = _this$config.fragFocusClass, fragAutoFocus = _this$config.fragAutoFocus, fragClass = _this$config.fragClass;\n this._initInner(this.config.fragments, {\n fragFocusClass,\n fragAutoFocus,\n fragClass,\n style: this.playerConfig.commonStyle || {}\n });\n if (sniffer.device === \"mobile\") {\n this.config.isDragingSeek = false;\n this.isMobile = true;\n }\n this.progressBtn = this.find(\".xgplayer-progress-btn\");\n this.on(DURATION_CHANGE, function() {\n _this3.onMouseLeave();\n });\n this.on(TIME_UPDATE, function() {\n _this3.onTimeupdate();\n });\n this.on(SEEKED, function() {\n _this3.onTimeupdate();\n _this3.onCacheUpdate();\n });\n this.on(PROGRESS, function() {\n _this3.onCacheUpdate();\n });\n this.on(ENDED, function() {\n _this3.onCacheUpdate(true);\n _this3.onTimeupdate(true);\n _this3._state.now = 0;\n });\n this.on(EMPTIED, function() {\n _this3.onReset();\n });\n this.on(VIDEO_RESIZE, function() {\n _this3.onVideoResize();\n });\n this.bindDomEvents();\n this.initCustomStyle();\n }\n }, {\n key: \"setConfig\",\n value: function setConfig(config) {\n var _this4 = this;\n var frags = null;\n Object.keys(config).forEach(function(key) {\n _this4.config[key] = config[key];\n if (key === \"fragments\") {\n frags = config[key];\n }\n });\n if (frags) {\n this._initInner(frags, config);\n }\n }\n }, {\n key: \"initCustomStyle\",\n value: function initCustomStyle() {\n var _ref = this.playerConfig || {}, commonStyle = _ref.commonStyle;\n var sliderBtnStyle = commonStyle.sliderBtnStyle;\n var progressBtn = this.progressBtn;\n if (sliderBtnStyle) {\n if (typeof sliderBtnStyle === \"string\") {\n progressBtn.style.boxShadow = sliderBtnStyle;\n } else if (_typeof(sliderBtnStyle) === \"object\") {\n Object.keys(sliderBtnStyle).map(function(key) {\n progressBtn.style[key] = sliderBtnStyle[key];\n });\n }\n }\n }\n }, {\n key: \"triggerCallbacks\",\n value: function triggerCallbacks(type, data, event) {\n if (this.__dragCallBacks.length > 0) {\n this.__dragCallBacks.map(function(item) {\n if (item && item.handler && item.type === type) {\n try {\n item.handler(data, event);\n } catch (error) {\n console.error(\"[XGPLAYER][triggerCallbacks] \".concat(item, \" error\"), error);\n }\n }\n });\n }\n }\n }, {\n key: \"addCallBack\",\n value: function addCallBack(type, handle) {\n if (handle && typeof handle === \"function\") {\n this.__dragCallBacks.push({\n type,\n handler: handle\n });\n }\n }\n }, {\n key: \"removeCallBack\",\n value: function removeCallBack(type, event) {\n var __dragCallBacks = this.__dragCallBacks;\n var _index = -1;\n __dragCallBacks.map(function(item, index) {\n if (item && item.type === type && item.handler === event) {\n _index = index;\n }\n });\n if (_index > -1) {\n __dragCallBacks.splice(_index, 1);\n }\n }\n }, {\n key: \"unlock\",\n value: function unlock() {\n var player = this.player, pos = this.pos;\n pos.isEnter = false;\n if (player.isMini) {\n return;\n }\n this.unbind(\"mousemove\", this.onMoveOnly);\n if (pos.isDown) {\n this.unbind(\"mouseleave\", this.onMouseLeave);\n return;\n }\n this.blur();\n }\n }, {\n key: \"bindDomEvents\",\n value: function bindDomEvents() {\n var _this$player2 = this.player, controls = _this$player2.controls, config = _this$player2.config;\n this._mouseDownHandlerHook = this.hook(\"dragstart\", this._mouseDownHandler);\n this._mouseUpHandlerHook = this.hook(\"dragend\", this._mouseUpHandler);\n this._mouseMoveHandlerHook = this.hook(\"drag\", this._mouseMoveHandler);\n if (this.domEventType === \"touch\" || this.domEventType === \"compatible\") {\n this.root.addEventListener(\"touchstart\", this.onMouseDown);\n if (controls) {\n controls.root && controls.root.addEventListener(\"touchmove\", util.stopPropagation);\n controls.center && controls.center.addEventListener(\"touchend\", util.stopPropagation);\n }\n }\n if (this.domEventType === \"mouse\" || this.domEventType === \"compatible\") {\n this.bind(\"mousedown\", this.onMouseDown);\n config.isMobileSimulateMode !== \"mobile\" && this.bind(\"mouseenter\", this.onMouseEnter);\n this.bind(\"mouseover\", this.onMouseOver);\n this.bind(\"mouseout\", this.onMouseOut);\n this.player.root.addEventListener(\"click\", this.onBodyClick, true);\n }\n }\n }, {\n key: \"focus\",\n value: function focus() {\n this.player.controls.pauseAutoHide();\n util.addClass(this.root, \"active\");\n }\n }, {\n key: \"blur\",\n value: function blur() {\n if (this._disableBlur) {\n return;\n }\n this.player.controls.recoverAutoHide();\n util.removeClass(this.root, \"active\");\n }\n }, {\n key: \"disableBlur\",\n value: function disableBlur() {\n this._disableBlur = true;\n }\n }, {\n key: \"enableBlur\",\n value: function enableBlur() {\n this._disableBlur = false;\n }\n }, {\n key: \"updateWidth\",\n value: function updateWidth(currentTime, seekTime, percent, type) {\n var config = this.config, player = this.player;\n if (config.isCloseClickSeek && type === 0) {\n return;\n }\n var realTime = seekTime = seekTime >= player.duration ? player.duration - config.endedDiff : Number(seekTime).toFixed(1);\n this.updatePercent(percent);\n this.updateTime(currentTime);\n if (type === 1 && (!config.isDragingSeek || player.config.mediaType === \"audio\")) {\n return;\n }\n this._state.now = realTime;\n this._state.direc = realTime > player.currentTime ? 0 : 1;\n player.seek(realTime);\n }\n }, {\n key: \"computeTime\",\n value: function computeTime(e, x) {\n var player = this.player;\n var _this$root$getBoundin = this.root.getBoundingClientRect(), width = _this$root$getBoundin.width, height = _this$root$getBoundin.height, top = _this$root$getBoundin.top, left = _this$root$getBoundin.left;\n var rWidth, rLeft;\n var clientX = x;\n if (player.rotateDeg === 90) {\n rWidth = height;\n rLeft = top;\n } else {\n rWidth = width;\n rLeft = left;\n }\n var offset = clientX - rLeft;\n offset = offset > rWidth ? rWidth : offset < 0 ? 0 : offset;\n var percent = offset / rWidth;\n percent = percent < 0 ? 0 : percent > 1 ? 1 : percent;\n var currentTime = parseInt(percent * this.offsetDuration * 1e3, 10) / 1e3;\n var seekTime = util.getCurrentTimeByOffset(currentTime, player.timeSegments);\n return {\n percent,\n currentTime,\n seekTime,\n offset,\n width: rWidth,\n left: rLeft,\n e\n };\n }\n }, {\n key: \"updateTime\",\n value: function updateTime(time) {\n var player = this.player, duration = this.duration;\n if (time > duration) {\n time = duration;\n } else if (time < 0) {\n time = 0;\n }\n var timeIcon = player.plugins.time;\n if (timeIcon) {\n timeIcon.updateTime(time);\n }\n }\n }, {\n key: \"resetSeekState\",\n value: function resetSeekState() {\n this.isProgressMoving = false;\n var timeIcon = this.player.plugins.time;\n timeIcon && timeIcon.resetActive();\n }\n }, {\n key: \"updatePercent\",\n value: function updatePercent(percent, notSeek) {\n this.isProgressMoving = true;\n if (this.config.disable) {\n return;\n }\n percent = percent > 1 ? 1 : percent < 0 ? 0 : percent;\n this.progressBtn.style.left = \"\".concat(percent * 100, \"%\");\n this.innerList.update({\n played: percent * this.offsetDuration\n }, this.offsetDuration);\n var miniprogress = this.player.plugins.miniprogress;\n miniprogress && miniprogress.update({\n played: percent * this.offsetDuration\n }, this.offsetDuration);\n }\n }, {\n key: \"onTimeupdate\",\n value: function onTimeupdate(isEnded) {\n var player = this.player, _state = this._state, offsetDuration = this.offsetDuration;\n if (player.isSeeking || this.isProgressMoving) {\n return;\n }\n if (_state.now > -1) {\n var abs = parseInt(_state.now * 1e3, 10) - parseInt(player.currentTime * 1e3, 10);\n if (_state.direc === 0 && abs > 300 || _state.direc === 1 && abs > -300) {\n _state.now = -1;\n return;\n } else {\n _state.now = -1;\n }\n }\n var time = this.currentTime;\n time = util.adjustTimeByDuration(time, offsetDuration, isEnded);\n this.innerList.update({\n played: time\n }, offsetDuration);\n this.progressBtn.style.left = \"\".concat(time / offsetDuration * 100, \"%\");\n var miniprogress = this.player.plugins.miniprogress;\n miniprogress && miniprogress.update({\n played: time\n }, offsetDuration);\n }\n }, {\n key: \"onCacheUpdate\",\n value: function onCacheUpdate(isEnded) {\n var player = this.player, duration = this.duration;\n if (!player) {\n return;\n }\n var _end = player.bufferedPoint.end;\n _end = util.adjustTimeByDuration(_end, duration, isEnded);\n this.innerList.update({\n cached: _end\n }, duration);\n var miniprogress = this.player.plugins.miniprogress;\n miniprogress && miniprogress.update({\n cached: _end\n }, duration);\n }\n }, {\n key: \"onReset\",\n value: function onReset() {\n this.innerList.update({\n played: 0,\n cached: 0\n }, 0);\n var miniprogress = this.player.plugins.miniprogress;\n miniprogress && miniprogress.update({\n cached: 0,\n played: 0\n }, 0);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var player = this.player;\n var controls = player.controls;\n this.thumbnailPlugin = null;\n this.innerList.destroy();\n this.innerList = null;\n var domEventType = this.domEventType;\n if (domEventType === \"touch\" || domEventType === \"compatible\") {\n this.root.removeEventListener(\"touchstart\", this.onMouseDown);\n this.root.removeEventListener(\"touchmove\", this.onMouseMove);\n this.root.removeEventListener(\"touchend\", this.onMouseUp);\n if (controls) {\n controls.root && controls.root.removeEventListener(\"touchmove\", util.stopPropagation);\n controls.center && controls.center.removeEventListener(\"touchend\", util.stopPropagation);\n }\n }\n if (domEventType === \"mouse\" || domEventType === \"compatible\") {\n this.unbind(\"mousedown\", this.onMouseDown);\n this.unbind(\"mouseenter\", this.onMouseEnter);\n this.unbind(\"mousemove\", this.onMoveOnly);\n this.unbind(\"mouseleave\", this.onMouseLeave);\n document.removeEventListener(\"mousemove\", this.onMouseMove, false);\n document.removeEventListener(\"mouseup\", this.onMouseUp, false);\n player.root.removeEventListener(\"click\", this.onBodyClick, true);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.config.disable || this.playerConfig.isLive) {\n return;\n }\n var controlsMode = this.player.controls ? this.player.controls.config.mode : \"\";\n var className = controlsMode === \"bottom\" ? \"xgplayer-progress-bottom\" : \"\";\n return '\\n \\n \\n \\n \\n \\n ');\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"progress\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_CENTER,\n index: 0,\n disable: false,\n isDragingSeek: true,\n closeMoveSeek: false,\n isPauseMoving: false,\n isCloseClickSeek: false,\n fragments: [{\n percent: 1\n }],\n fragFocusClass: FRAGMENT_FOCUS_CLASS.POINT,\n fragClass: \"\",\n fragAutoFocus: false,\n miniMoveStep: 5,\n miniStartStep: 2,\n onMoveStart: function onMoveStart() {\n },\n onMoveEnd: function onMoveEnd() {\n },\n endedDiff: 0.2\n };\n }\n }, {\n key: \"FRAGMENT_FOCUS_CLASS\",\n get: function get() {\n return FRAGMENT_FOCUS_CLASS;\n }\n }]);\n return Progress2;\n}(Plugin);\nexport { Progress as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar Icon = /* @__PURE__ */ function(_Plugin) {\n _inherits(Icon2, _Plugin);\n var _super = _createSuper(Icon2);\n function Icon2() {\n var _this;\n _classCallCheck(this, Icon2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"_onMouseenter\", function(e) {\n _this.emit(\"icon_mouseenter\", {\n pluginName: _this.pluginName\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"_onMouseLeave\", function(e) {\n _this.emit(\"icon_mouseleave\", {\n pluginName: _this.pluginName\n });\n });\n return _this;\n }\n _createClass(Icon2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n this.bind(\"mouseenter\", this._onMouseenter);\n this.bind(\"mouseleave\", this._onMouseLeave);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.unbind(\"mouseenter\", this._onMouseenter);\n this.unbind(\"mouseleave\", this._onMouseLeave);\n }\n }]);\n return Icon2;\n}(Plugin);\nexport { Icon as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, get as _get, getPrototypeOf as _getPrototypeOf } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport { PAUSE, ERROR, EMPTIED, PLAY } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport { POSITIONS } from \"../../plugin/plugin.js\";\nimport { xgIconTips } from \"../common/iconTools.js\";\nimport Icon from \"../common/iconPlugin.js\";\nimport PlaySvg from \"../assets/play.js\";\nimport PauseSvg from \"../assets/pause.js\";\nvar Play = /* @__PURE__ */ function(_IconPlugin) {\n _inherits(Play2, _IconPlugin);\n var _super = _createSuper(Play2);\n function Play2() {\n _classCallCheck(this, Play2);\n return _super.apply(this, arguments);\n }\n _createClass(Play2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this = this;\n _get(_getPrototypeOf(Play2.prototype), \"afterCreate\", this).call(this);\n var player = this.player, config = this.config;\n if (config.disable) {\n return;\n }\n this.initIcons();\n this.btnClick = this.btnClick.bind(this);\n this.bind([\"touchend\", \"click\"], this.btnClick);\n this.on([PAUSE, ERROR, EMPTIED], function() {\n _this.animate(player.paused);\n });\n this.on(PLAY, function() {\n _this.animate(player.paused);\n });\n this.animate(true);\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n play: {\n icon: PlaySvg,\n class: \"xg-icon-play\"\n },\n pause: {\n icon: PauseSvg,\n class: \"xg-icon-pause\"\n }\n };\n }\n }, {\n key: \"btnClick\",\n value: function btnClick(e) {\n e.preventDefault();\n e.stopPropagation();\n var player = this.player;\n this.emitUserAction(e, \"switch_play_pause\", {\n prop: \"paused\",\n from: player.paused,\n to: !player.paused\n });\n if (player.ended) {\n player.replay();\n } else if (player.paused) {\n player.play();\n this.animate(false);\n } else {\n player.pause();\n this.animate(true);\n }\n return false;\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(\".xgplayer-icon\", icons.play);\n this.appendChild(\".xgplayer-icon\", icons.pause);\n }\n }, {\n key: \"animate\",\n value: function animate(paused) {\n if (!this.player) {\n return;\n }\n var i18nKeys = this.i18nKeys;\n var tipDom = this.find(\".xg-tips\");\n if (paused) {\n this.setAttr(\"data-state\", \"pause\");\n tipDom && this.changeLangTextKey(tipDom, i18nKeys.PLAY_TIPS);\n } else {\n this.setAttr(\"data-state\", \"play\");\n tipDom && this.changeLangTextKey(tipDom, i18nKeys.PAUSE_TIPS);\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(Play2.prototype), \"destroy\", this).call(this);\n this.unbind([\"touchend\", \"click\"], this.btnClick);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.config.disable) {\n return;\n }\n return '\\n
\\n
\\n '.concat(xgIconTips(this, \"PLAY_TIPS\", this.playerConfig.isHideTips), \"\\n
\");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"play\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_LEFT,\n index: 0,\n disable: false\n };\n }\n }]);\n return Play2;\n}(Icon);\nexport { Play as default };\n","function BackSVG() {\n return new DOMParser().parseFromString('\\n \\n \\n \\n', \"image/svg+xml\").firstChild;\n}\nexport { BackSVG as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport \"../../utils/debug.js\";\nimport Plugin, { POSITIONS } from \"../../plugin/plugin.js\";\nimport BackSVG from \"../assets/back.js\";\nvar TopBackIcon = /* @__PURE__ */ function(_Plugin) {\n _inherits(TopBackIcon2, _Plugin);\n var _super = _createSuper(TopBackIcon2);\n function TopBackIcon2() {\n _classCallCheck(this, TopBackIcon2);\n return _super.apply(this, arguments);\n }\n _createClass(TopBackIcon2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this = this;\n this.initIcons();\n this.onClick = function(e) {\n e.preventDefault();\n e.stopPropagation();\n _this.config.onClick(e);\n };\n this.bind([\"click\", \"touchend\"], this.onClick);\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n screenBack: {\n icon: BackSVG,\n class: \"xg-fullscreen-back\"\n }\n };\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(this.root, icons.screenBack);\n }\n }, {\n key: \"show\",\n value: function show() {\n util.addClass(this.root, \"show\");\n }\n }, {\n key: \"hide\",\n value: function hide() {\n util.removeClass(this.root, \"show\");\n }\n }, {\n key: \"render\",\n value: function render() {\n return '\\n ';\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"topbackicon\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.ROOT_TOP,\n index: 0\n };\n }\n }]);\n return TopBackIcon2;\n}(Plugin);\nexport { TopBackIcon as default };\n","function FullScreenSvg() {\n return new DOMParser().parseFromString('\\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { FullScreenSvg as default };\n","function ExitFullScreenSvg() {\n return new DOMParser().parseFromString('\\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { ExitFullScreenSvg as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, get as _get, getPrototypeOf as _getPrototypeOf } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport { FULLSCREEN_CHANGE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport { POSITIONS } from \"../../plugin/plugin.js\";\nimport { xgIconTips } from \"../common/iconTools.js\";\nimport Icon from \"../common/iconPlugin.js\";\nimport TopBackIcon from \"./backicon.js\";\nimport FullScreenSvg from \"../assets/requestFull.js\";\nimport ExitFullScreenSvg from \"../assets/exitFull.js\";\nvar Fullscreen = /* @__PURE__ */ function(_IconPlugin) {\n _inherits(Fullscreen2, _IconPlugin);\n var _super = _createSuper(Fullscreen2);\n function Fullscreen2() {\n var _this;\n _classCallCheck(this, Fullscreen2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"_onOrientationChange\", function(e) {\n if (_this.player.fullscreen && _this.config.rotateFullscreen) {\n if (window.orientation === 90 || window.orientation === -90) {\n _this.player.setRotateDeg(0);\n } else {\n _this.player.setRotateDeg(90);\n }\n }\n });\n return _this;\n }\n _createClass(Fullscreen2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n _get(_getPrototypeOf(Fullscreen2.prototype), \"afterCreate\", this).call(this);\n var config = this.config, playerConfig = this.playerConfig;\n if (config.disable) {\n return;\n }\n if (config.target) {\n this.playerConfig.fullscreenTarget = this.config.target;\n }\n var fullEl = util.getFullScreenEl();\n if (playerConfig.fullscreenTarget === fullEl) {\n this.player.getFullscreen().catch(function(e) {\n });\n }\n this.initIcons();\n this.handleFullscreen = this.hook(\"fullscreenChange\", this.toggleFullScreen, {\n pre: function pre(e) {\n var fullscreen = _this2.player.fullscreen;\n _this2.emitUserAction(e, \"switch_fullscreen\", {\n prop: \"fullscreen\",\n from: fullscreen,\n to: !fullscreen\n });\n }\n });\n this.bind(\".xgplayer-fullscreen\", [\"touchend\", \"click\"], this.handleFullscreen);\n this.on(FULLSCREEN_CHANGE, function(isFullScreen) {\n var tipsDom = _this2.find(\".xg-tips\");\n tipsDom && _this2.changeLangTextKey(tipsDom, isFullScreen ? _this2.i18nKeys.EXITFULLSCREEN_TIPS : _this2.i18nKeys.FULLSCREEN_TIPS);\n _this2.animate(isFullScreen);\n });\n if (this.config.needBackIcon) {\n this.topBackIcon = this.player.registerPlugin({\n plugin: TopBackIcon,\n options: {\n config: {\n onClick: function onClick(e) {\n _this2.handleFullscreen(e);\n }\n }\n }\n });\n }\n if (sniffer.device === \"mobile\") {\n window.addEventListener(\"orientationchange\", this._onOrientationChange);\n }\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n fullscreen: {\n icon: FullScreenSvg,\n class: \"xg-get-fullscreen\"\n },\n exitFullscreen: {\n icon: ExitFullScreenSvg,\n class: \"xg-exit-fullscreen\"\n }\n };\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(Fullscreen2.prototype), \"destroy\", this).call(this);\n this.unbind(\".xgplayer-icon\", sniffer.device === \"mobile\" ? \"touchend\" : \"click\", this.handleFullscreen);\n if (sniffer.device === \"mobile\") {\n window.removeEventListener(\"orientationchange\", this._onOrientationChange);\n }\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(\".xgplayer-icon\", icons.fullscreen);\n this.appendChild(\".xgplayer-icon\", icons.exitFullscreen);\n }\n }, {\n key: \"toggleFullScreen\",\n value: function toggleFullScreen(e) {\n if (e) {\n e.preventDefault();\n e.stopPropagation();\n }\n var player = this.player, config = this.config;\n var useCssFullscreen = config.useCssFullscreen === true || typeof config.useCssFullscreen === \"function\" && config.useCssFullscreen();\n if (useCssFullscreen) {\n if (player.fullscreen) {\n player.exitCssFullscreen();\n } else {\n player.getCssFullscreen();\n }\n this.animate(player.fullscreen);\n } else if (config.rotateFullscreen) {\n if (player.fullscreen) {\n player.exitRotateFullscreen();\n } else {\n player.getRotateFullscreen();\n }\n this.animate(player.fullscreen);\n } else if (config.switchCallback && typeof config.switchCallback === \"function\") {\n config.switchCallback(player.fullscreen);\n } else {\n if (player.fullscreen) {\n player.exitFullscreen();\n } else {\n player.getFullscreen().catch(function(e2) {\n });\n }\n }\n }\n }, {\n key: \"animate\",\n value: function animate(isFullScreen) {\n isFullScreen ? this.setAttr(\"data-state\", \"full\") : this.setAttr(\"data-state\", \"normal\");\n if (this.topBackIcon) {\n if (isFullScreen) {\n this.topBackIcon.show();\n this.hide();\n } else {\n this.topBackIcon.hide();\n this.show();\n }\n }\n }\n }, {\n key: \"show\",\n value: function show() {\n _get(_getPrototypeOf(Fullscreen2.prototype), \"show\", this).call(this);\n }\n }, {\n key: \"hide\",\n value: function hide() {\n _get(_getPrototypeOf(Fullscreen2.prototype), \"hide\", this).call(this);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.config.disable) {\n return;\n }\n var langKey = \"FULLSCREEN_TIPS\";\n return '\\n
\\n
\\n '.concat(xgIconTips(this, langKey, this.playerConfig.isHideTips), \"\\n
\");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"fullscreen\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 0,\n useCssFullscreen: false,\n rotateFullscreen: false,\n switchCallback: null,\n target: null,\n disable: false,\n needBackIcon: false\n };\n }\n }]);\n return Fullscreen2;\n}(Icon);\nexport { Fullscreen as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { DURATION_CHANGE, SEEKED, TIME_UPDATE, ENDED, EMPTIED } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin, { POSITIONS } from \"../../plugin/plugin.js\";\nvar Time = /* @__PURE__ */ function(_Plugin) {\n _inherits(Time2, _Plugin);\n var _super = _createSuper(Time2);\n function Time2(args) {\n var _this;\n _classCallCheck(this, Time2);\n _this = _super.call(this, args);\n _this.isActiving = false;\n return _this;\n }\n _createClass(Time2, [{\n key: \"duration\",\n get: function get() {\n var _this$player = this.player, offsetDuration = _this$player.offsetDuration, duration = _this$player.duration;\n return this.playerConfig.customDuration || offsetDuration || duration;\n }\n }, {\n key: \"currentTime\",\n get: function get() {\n var _this$player2 = this.player, offsetCurrentTime = _this$player2.offsetCurrentTime, currentTime = _this$player2.currentTime;\n return offsetCurrentTime >= 0 ? offsetCurrentTime : currentTime;\n }\n }, {\n key: \"timeOffset\",\n get: function get() {\n return this.playerConfig.timeOffset || 0;\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n var constrolsMode = this.player.controls.config.mode;\n this.mode = constrolsMode === \"flex\" ? \"flex\" : \"normal\";\n if (this.config.disable) {\n return;\n }\n if (this.mode === \"flex\") {\n this.createCenterTime();\n this.root.style.display = \"none\";\n }\n this.durationDom = this.find(\".time-duration\");\n this.timeDom = this.find(\".time-current\");\n this.on([DURATION_CHANGE, SEEKED, TIME_UPDATE], function() {\n _this2.onTimeUpdate();\n });\n this.on(ENDED, function() {\n _this2.onTimeUpdate(true);\n });\n this.on(EMPTIED, function() {\n _this2.onReset();\n });\n }\n }, {\n key: \"show\",\n value: function show() {\n if (this.mode === \"flex\") {\n this.centerCurDom && (this.centerCurDom.style.display = \"block\");\n this.centerDurDom && (this.centerDurDom.style.display = \"block\");\n return;\n }\n this.root.style.display = \"block\";\n }\n }, {\n key: \"hide\",\n value: function hide() {\n if (this.mode === \"flex\") {\n this.centerCurDom && (this.centerCurDom.style.display = \"none\");\n this.centerDurDom && (this.centerDurDom.style.display = \"none\");\n return;\n }\n this.root.style.display = \"none\";\n }\n }, {\n key: \"onTimeUpdate\",\n value: function onTimeUpdate(isEnded) {\n var player = this.player, config = this.config, duration = this.duration;\n if (config.disable || this.isActiving || !player.hasStart) {\n return;\n }\n var current = this.currentTime + this.timeOffset;\n current = util.adjustTimeByDuration(current, duration, isEnded);\n if (this.mode === \"flex\") {\n this.centerCurDom.innerHTML = this.minWidthTime(util.format(current));\n if (duration !== Infinity && duration > 0) {\n this.centerDurDom.innerHTML = util.format(duration);\n }\n } else {\n this.timeDom.innerHTML = this.minWidthTime(util.format(current));\n if (duration !== Infinity && duration > 0) {\n this.durationDom.innerHTML = util.format(duration);\n }\n }\n }\n }, {\n key: \"onReset\",\n value: function onReset() {\n if (this.mode === \"flex\") {\n this.centerCurDom.innerHTML = this.minWidthTime(util.format(0));\n this.centerDurDom.innerHTML = util.format(0);\n } else {\n this.timeDom.innerHTML = this.minWidthTime(util.format(0));\n this.durationDom.innerHTML = util.format(0);\n }\n }\n }, {\n key: \"createCenterTime\",\n value: function createCenterTime() {\n var player = this.player;\n if (!player.controls || !player.controls.center) {\n return;\n }\n var center = player.controls.center;\n this.centerCurDom = util.createDom(\"xg-icon\", \"00:00\", {}, \"xgplayer-time xg-time-left\");\n this.centerDurDom = util.createDom(\"xg-icon\", \"00:00\", {}, \"xgplayer-time xg-time-right\");\n center.children.length > 0 ? center.insertBefore(this.centerCurDom, center.children[0]) : center.appendChild(this.centerCurDom);\n center.appendChild(this.centerDurDom);\n }\n }, {\n key: \"afterPlayerInit\",\n value: function afterPlayerInit() {\n var config = this.config;\n if (this.duration === Infinity || this.playerConfig.isLive) {\n util.hide(this.durationDom);\n util.hide(this.timeDom);\n util.hide(this.find(\".time-separator\"));\n util.show(this.find(\".time-live-tag\"));\n } else {\n util.hide(this.find(\".time-live-tag\"));\n }\n if (config.hide) {\n this.hide();\n return;\n }\n this.show();\n }\n }, {\n key: \"changeLiveState\",\n value: function changeLiveState(isLive) {\n if (isLive) {\n util.hide(this.durationDom);\n util.hide(this.timeDom);\n util.hide(this.find(\".time-separator\"));\n util.show(this.find(\".time-live-tag\"));\n } else {\n util.hide(this.find(\".time-live-tag\"));\n util.show(this.find(\".time-separator\"));\n util.show(this.durationDom);\n util.show(this.timeDom);\n }\n }\n }, {\n key: \"updateTime\",\n value: function updateTime(time) {\n this.isActiving = true;\n if (!time && time !== 0 || time > this.duration) {\n return;\n }\n if (this.mode === \"flex\") {\n this.centerCurDom.innerHTML = this.minWidthTime(util.format(time));\n return;\n }\n this.timeDom.innerHTML = this.minWidthTime(util.format(time));\n }\n }, {\n key: \"minWidthTime\",\n value: function minWidthTime(timeStr) {\n return timeStr.split(\":\").map(function(value) {\n return ''.concat(value, \"\");\n }).join(\":\");\n }\n }, {\n key: \"resetActive\",\n value: function resetActive() {\n var _this3 = this;\n var player = this.player;\n var updateState = function updateState2() {\n _this3.isActiving = false;\n };\n this.off(SEEKED, updateState);\n if (player.isSeeking) {\n this.once(SEEKED, updateState);\n } else {\n this.isActiving = false;\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var center = this.player.controls.center;\n this.centerCurDom && center.removeChild(this.centerCurDom);\n this.centerCurDom = null;\n this.centerDurDom && center.removeChild(this.centerDurDom);\n this.centerDurDom = null;\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.config.disable) {\n return;\n }\n return '\\n 00:00\\n /\\n 00:00\\n '.concat(this.i18n.LIVE_TIP, \"\\n \");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"time\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_LEFT,\n index: 2,\n disable: false\n };\n }\n }]);\n return Time2;\n}(Plugin);\nexport { Time as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { DURATION_CHANGE, LOADED_DATA, TIME_UPDATE, SEEKING, PLAY } from \"../../events.js\";\nimport BasePlugin from \"../../plugin/basePlugin.js\";\nimport \"delegate\";\nvar TimeSegmentsControls = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(TimeSegmentsControls2, _BasePlugin);\n var _super = _createSuper(TimeSegmentsControls2);\n function TimeSegmentsControls2() {\n var _this;\n _classCallCheck(this, TimeSegmentsControls2);\n for (var _len2 = arguments.length, args = new Array(_len2), _key = 0; _key < _len2; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"_onDurationChange\", function() {\n _this.updateSegments();\n var _this$player = _this.player, currentTime = _this$player.currentTime, timeSegments = _this$player.timeSegments;\n if (!_this._checkIfEnabled(timeSegments)) {\n return;\n }\n var index = util.getIndexByTime(currentTime, timeSegments);\n var time = util.getOffsetCurrentTime(currentTime, timeSegments, index);\n _this.player.offsetCurrentTime = time;\n _this.changeIndex(index, timeSegments);\n });\n _defineProperty(_assertThisInitialized(_this), \"_onLoadedData\", function() {\n var timeSegments = _this.player.timeSegments;\n if (!_this._checkIfEnabled(timeSegments)) {\n return;\n }\n var time = util.getOffsetCurrentTime(0, timeSegments);\n _this.player.offsetCurrentTime = time;\n _this.changeIndex(0, timeSegments);\n if (_this.curPos.start > 0) {\n _this.player.currentTime = _this.curPos.start;\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"_onTimeupdate\", function() {\n var _this$player2 = _this.player, currentTime = _this$player2.currentTime, timeSegments = _this$player2.timeSegments;\n if (!_this._checkIfEnabled(timeSegments)) {\n return;\n }\n var _len = timeSegments.length;\n _this.lastCurrentTime = currentTime;\n var index = util.getIndexByTime(currentTime, timeSegments);\n if (index !== _this.curIndex) {\n _this.changeIndex(index, timeSegments);\n }\n var curTime = util.getOffsetCurrentTime(currentTime, timeSegments, index);\n _this.player.offsetCurrentTime = curTime;\n if (!_this.curPos) {\n return;\n }\n var _this$curPos = _this.curPos, start = _this$curPos.start, end = _this$curPos.end;\n if (currentTime < start) {\n _this.player.currentTime = start;\n } else if (currentTime > end && index >= _len - 1) {\n _this.player.pause();\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"_onSeeking\", function() {\n var _this$player3 = _this.player, currentTime = _this$player3.currentTime, timeSegments = _this$player3.timeSegments;\n if (!_this._checkIfEnabled(timeSegments)) {\n return;\n }\n if (currentTime < timeSegments[0].start) {\n _this.player.currentTime = timeSegments[0].start;\n } else if (currentTime > timeSegments[timeSegments.length - 1].end) {\n _this.player.currentTime = timeSegments[timeSegments.length - 1].end;\n } else {\n var _index = util.getIndexByTime(currentTime, timeSegments);\n if (_index >= 0) {\n var _seekTime = _this.getSeekTime(currentTime, _this.lastCurrentTime, _index, timeSegments);\n if (_seekTime >= 0) {\n _this.player.currentTime = _seekTime;\n }\n }\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"_onPlay\", function() {\n var _this$player4 = _this.player, currentTime = _this$player4.currentTime, timeSegments = _this$player4.timeSegments;\n if (_this._checkIfEnabled(timeSegments) && currentTime >= timeSegments[timeSegments.length - 1].end) {\n _this.player.currentTime = timeSegments[0].start;\n }\n });\n return _this;\n }\n _createClass(TimeSegmentsControls2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n this.curIndex = -1;\n this.curPos = null;\n this.lastCurrentTime = 0;\n this.updateSegments();\n this.on(DURATION_CHANGE, this._onDurationChange);\n this.on(LOADED_DATA, this._onLoadedData);\n this.on(TIME_UPDATE, this._onTimeupdate);\n this.on(SEEKING, this._onSeeking);\n this.on(PLAY, this._onPlay);\n }\n }, {\n key: \"setConfig\",\n value: function setConfig(newConfig) {\n var _this2 = this;\n if (!newConfig) {\n return;\n }\n var keys = Object.keys(newConfig);\n if (keys.length < 1) {\n return;\n }\n keys.forEach(function(key) {\n _this2.config[key] = newConfig[key];\n });\n this.updateSegments();\n }\n }, {\n key: \"updateSegments\",\n value: function updateSegments() {\n var _this$config = this.config, disable = _this$config.disable, segments = _this$config.segments;\n var player = this.player;\n if (disable || !segments || segments.length === 0) {\n player.timeSegments = [];\n player.offsetDuration = 0;\n player.offsetCurrentTime = -1;\n } else {\n var _segs = this.formatTimeSegments(segments, player.duration);\n player.timeSegments = _segs;\n player.offsetDuration = _segs.length > 0 ? _segs[_segs.length - 1].duration : 0;\n }\n }\n }, {\n key: \"formatTimeSegments\",\n value: function formatTimeSegments(timeSegments, duration) {\n var ret = [];\n if (!timeSegments) {\n return [];\n }\n timeSegments.sort(function(a, b) {\n return a.start - b.start;\n });\n timeSegments.forEach(function(item, index) {\n var _item = {};\n _item.start = item.start < 0 ? 0 : item.start;\n _item.end = duration > 0 && item.end > duration ? duration : item.end;\n if (duration > 0 && _item.start > duration) {\n return;\n }\n ret.push(_item);\n var _segDuration = _item.end - _item.start;\n if (index === 0) {\n _item.offset = item.start;\n _item.cTime = 0;\n _item.segDuration = _segDuration;\n _item.duration = _segDuration;\n } else {\n var last = ret[index - 1];\n _item.offset = last.offset + (_item.start - last.end);\n _item.cTime = last.duration + last.cTime;\n _item.segDuration = _segDuration;\n _item.duration = last.duration + _segDuration;\n }\n });\n return ret;\n }\n }, {\n key: \"getSeekTime\",\n value: function getSeekTime(currentTime, lastCurrentTime, index, timeSegments) {\n var _time = -1;\n var _timeSegments$index = timeSegments[index], start = _timeSegments$index.start, end = _timeSegments$index.end;\n if (currentTime >= start && currentTime <= end) {\n return _time;\n }\n var diff = currentTime - lastCurrentTime;\n if (diff < 0) {\n if (currentTime < start) {\n var diff2 = lastCurrentTime > start ? lastCurrentTime - start : 0;\n _time = index - 1 >= 0 ? timeSegments[index - 1].end + diff + diff2 : 0;\n return _time;\n }\n }\n return -1;\n }\n }, {\n key: \"_checkIfEnabled\",\n value: function _checkIfEnabled(segments) {\n return !(!segments || segments.length < 1);\n }\n }, {\n key: \"changeIndex\",\n value: function changeIndex(index, timeSegments) {\n this.curIndex = index;\n if (index >= 0 && timeSegments.length > 0) {\n this.curPos = timeSegments[index];\n } else {\n this.curPos = null;\n }\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"TimeSegmentsControls\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n disable: true,\n segments: []\n };\n }\n }]);\n return TimeSegmentsControls2;\n}(BasePlugin);\nexport { TimeSegmentsControls as default };\n","function volumeLargeSvg() {\n return new DOMParser().parseFromString('\\n \\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { volumeLargeSvg as default };\n","function volumeSmallSvg() {\n return new DOMParser().parseFromString('\\n \\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { volumeSmallSvg as default };\n","function volumeMutedSvg() {\n return new DOMParser().parseFromString('\\n \\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { volumeMutedSvg as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport { VOLUME_CHANGE, LOADED_DATA } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin, { POSITIONS } from \"../../plugin/plugin.js\";\nimport volumeLargeSvg from \"../assets/volumeLarge.js\";\nimport volumeSmallSvg from \"../assets/volumeSmall.js\";\nimport volumeMutedSvg from \"../assets/volumeMuted.js\";\nvar Volume = /* @__PURE__ */ function(_Plugin) {\n _inherits(Volume2, _Plugin);\n var _super = _createSuper(Volume2);\n function Volume2() {\n var _this;\n _classCallCheck(this, Volume2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onBarMousedown\", function(e) {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;\n var bar = _this.find(\".xgplayer-bar\");\n util.event(e);\n var barRect = bar.getBoundingClientRect();\n var pos = util.getEventPos(e, player.zoom);\n var height = barRect.height - (pos.clientY - barRect.top);\n pos.h = height;\n pos.barH = barRect.height;\n _this.pos = pos;\n if (height < -2) {\n return;\n }\n _this.updateVolumePos(height, e);\n document.addEventListener(\"mouseup\", _this.onBarMouseUp);\n _this._d.isStart = true;\n return false;\n });\n _defineProperty(_assertThisInitialized(_this), \"onBarMouseMove\", function(e) {\n var _assertThisInitialize2 = _assertThisInitialized(_this), _d = _assertThisInitialize2._d;\n if (!_d.isStart) {\n return;\n }\n var _assertThisInitialize3 = _assertThisInitialized(_this), pos = _assertThisInitialize3.pos, player = _assertThisInitialize3.player;\n e.preventDefault();\n e.stopPropagation();\n util.event(e);\n var _ePos = util.getEventPos(e, player.zoom);\n _d.isMoving = true;\n var w = pos.h - _ePos.clientY + pos.clientY;\n if (w > pos.barH) {\n return;\n }\n _this.updateVolumePos(w, e);\n });\n _defineProperty(_assertThisInitialized(_this), \"onBarMouseUp\", function(e) {\n util.event(e);\n document.removeEventListener(\"mouseup\", _this.onBarMouseUp);\n var _assertThisInitialize4 = _assertThisInitialized(_this), _d = _assertThisInitialize4._d;\n _d.isStart = false;\n _d.isMoving = false;\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseenter\", function(e) {\n _this._d.isActive = true;\n _this.focus();\n _this.emit(\"icon_mouseenter\", {\n pluginName: _this.pluginName\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseleave\", function(e) {\n _this._d.isActive = false;\n _this.unFocus(100, false, e);\n _this.emit(\"icon_mouseleave\", {\n pluginName: _this.pluginName\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"onVolumeChange\", function(e) {\n if (!_this.player) {\n return;\n }\n var _this$player = _this.player, muted = _this$player.muted, volume = _this$player.volume;\n if (!_this._d.isMoving) {\n _this.find(\".xgplayer-drag\").style.height = muted || volume === 0 ? \"4px\" : \"\".concat(volume * 100, \"%\");\n if (_this.config.showValueLabel) {\n _this.updateVolumeValue();\n }\n }\n _this.animate(muted, volume);\n });\n return _this;\n }\n _createClass(Volume2, [{\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n volumeSmall: {\n icon: volumeSmallSvg,\n class: \"xg-volume-small\"\n },\n volumeLarge: {\n icon: volumeLargeSvg,\n class: \"xg-volume\"\n },\n volumeMuted: {\n icon: volumeMutedSvg,\n class: \"xg-volume-mute\"\n }\n };\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n this._timerId = null;\n this._d = {\n isStart: false,\n isMoving: false,\n isActive: false\n };\n if (this.config.disable) {\n return;\n }\n this.initIcons();\n var _this$playerConfig = this.playerConfig, commonStyle = _this$playerConfig.commonStyle, volume = _this$playerConfig.volume;\n if (commonStyle.volumeColor) {\n this.find(\".xgplayer-drag\").style.backgroundColor = commonStyle.volumeColor;\n }\n this.changeMutedHandler = this.hook(\"mutedChange\", function(e) {\n _this2.changeMuted(e);\n }, {\n pre: function pre(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n });\n this._onMouseenterHandler = this.hook(\"mouseenter\", this.onMouseenter);\n this._onMouseleaveHandler = this.hook(\"mouseleave\", this.onMouseleave);\n if (!(sniffer.device === \"mobile\") && this.playerConfig.isMobileSimulateMode !== \"mobile\") {\n this.bind(\"mouseenter\", this._onMouseenterHandler);\n this.bind([\"blur\", \"mouseleave\"], this._onMouseleaveHandler);\n this.bind(\".xgplayer-slider\", \"mousedown\", this.onBarMousedown);\n this.bind(\".xgplayer-slider\", \"mousemove\", this.onBarMouseMove);\n this.bind(\".xgplayer-slider\", \"mouseup\", this.onBarMouseUp);\n }\n this.bind(\".xgplayer-icon\", [\"touchend\", \"click\"], this.changeMutedHandler);\n this.on(VOLUME_CHANGE, this.onVolumeChange);\n this.once(LOADED_DATA, this.onVolumeChange);\n if (util.typeOf(volume) !== \"Number\") {\n this.player.volume = this.config.default;\n }\n this.onVolumeChange();\n }\n }, {\n key: \"updateVolumePos\",\n value: function updateVolumePos(height, event) {\n var player = this.player;\n var drag = this.find(\".xgplayer-drag\");\n var bar = this.find(\".xgplayer-bar\");\n if (!bar || !drag) {\n return;\n }\n var now = parseInt(height / bar.getBoundingClientRect().height * 1e3, 10);\n drag.style.height = \"\".concat(height, \"px\");\n var to = Math.max(Math.min(now / 1e3, 1), 0);\n var props = {\n volume: {\n from: player.volume,\n to\n }\n };\n if (player.muted) {\n props.muted = {\n from: true,\n to: false\n };\n }\n this.emitUserAction(event, \"change_volume\", {\n muted: player.muted,\n volume: player.volume,\n props\n });\n player.volume = Math.max(Math.min(now / 1e3, 1), 0);\n player.muted && (player.muted = false);\n if (this.config.showValueLabel) {\n this.updateVolumeValue();\n }\n }\n }, {\n key: \"updateVolumeValue\",\n value: function updateVolumeValue() {\n var _this$player2 = this.player, volume = _this$player2.volume, muted = _this$player2.muted;\n var $labelValue = this.find(\".xgplayer-value-label\");\n var vol = Math.max(Math.min(volume, 1), 0);\n $labelValue.innerText = muted ? 0 : Math.ceil(vol * 100);\n }\n }, {\n key: \"focus\",\n value: function focus() {\n var player = this.player;\n player.focus({\n autoHide: false\n });\n if (this._timerId) {\n util.clearTimeout(this, this._timerId);\n this._timerId = null;\n }\n util.addClass(this.root, \"slide-show\");\n }\n }, {\n key: \"unFocus\",\n value: function unFocus() {\n var _this3 = this;\n var delay = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 100;\n var isForce = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;\n var e = arguments.length > 2 ? arguments[2] : void 0;\n var _d = this._d, player = this.player;\n if (_d.isActive) {\n return;\n }\n if (this._timerId) {\n util.clearTimeout(this, this._timerId);\n this._timerId = null;\n }\n this._timerId = util.setTimeout(this, function() {\n if (!_d.isActive) {\n isForce ? player.blur() : player.focus();\n util.removeClass(_this3.root, \"slide-show\");\n _d.isStart && _this3.onBarMouseUp(e);\n }\n _this3._timerId = null;\n }, delay);\n }\n }, {\n key: \"changeMuted\",\n value: function changeMuted(e) {\n e && e.stopPropagation();\n var player = this.player, _d = this._d;\n _d.isStart && this.onBarMouseUp(e);\n this.emitUserAction(e, \"change_muted\", {\n muted: player.muted,\n volume: player.volume,\n props: {\n muted: {\n from: player.muted,\n to: !player.muted\n }\n }\n });\n if (player.volume > 0) {\n player.muted = !player.muted;\n }\n if (player.volume < 0.01) {\n player.volume = this.config.miniVolume;\n }\n }\n }, {\n key: \"animate\",\n value: function animate(muted, volume) {\n if (muted || volume === 0) {\n this.setAttr(\"data-state\", \"mute\");\n } else if (volume < 0.5 && this.icons.volumeSmall) {\n this.setAttr(\"data-state\", \"small\");\n } else {\n this.setAttr(\"data-state\", \"normal\");\n }\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(\".xgplayer-icon\", icons.volumeSmall);\n this.appendChild(\".xgplayer-icon\", icons.volumeLarge);\n this.appendChild(\".xgplayer-icon\", icons.volumeMuted);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this._timerId) {\n util.clearTimeout(this, this._timerId);\n this._timerId = null;\n }\n this.unbind(\"mouseenter\", this.onMouseenter);\n this.unbind([\"blur\", \"mouseleave\"], this.onMouseleave);\n this.unbind(\".xgplayer-slider\", \"mousedown\", this.onBarMousedown);\n this.unbind(\".xgplayer-slider\", \"mousemove\", this.onBarMouseMove);\n this.unbind(\".xgplayer-slider\", \"mouseup\", this.onBarMouseUp);\n document.removeEventListener(\"mouseup\", this.onBarMouseUp);\n this.unbind(\".xgplayer-icon\", sniffer.device === \"mobile\" ? \"touchend\" : \"click\", this.changeMutedHandler);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.config.disable) {\n return;\n }\n var volume = this.config.default || this.player.volume;\n var isShowVolumeValue = this.config.showValueLabel;\n return '\\n \\n
\\n
\\n \\n '.concat(isShowVolumeValue ? '
'.concat(volume * 100, \"
\") : \"\", '\\n
\\n \\n
\\n
\\n
');\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"volume\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 1,\n disable: false,\n showValueLabel: false,\n default: 0.6,\n miniVolume: 0.2\n };\n }\n }]);\n return Volume2;\n}(Plugin);\nexport { Volume as default };\n","function RotateSvg() {\n return new DOMParser().parseFromString('\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { RotateSvg as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, get as _get, getPrototypeOf as _getPrototypeOf } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { VIDEO_RESIZE, ROTATE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport { POSITIONS } from \"../../plugin/plugin.js\";\nimport { xgIconTips } from \"../common/iconTools.js\";\nimport Icon from \"../common/iconPlugin.js\";\nimport RotateSvg from \"../assets/rotate.js\";\nvar Rotate = /* @__PURE__ */ function(_IconPlugin) {\n _inherits(Rotate2, _IconPlugin);\n var _super = _createSuper(Rotate2);\n function Rotate2(args) {\n var _this;\n _classCallCheck(this, Rotate2);\n _this = _super.call(this, args);\n _this.rotateDeg = _this.config.rotateDeg || 0;\n return _this;\n }\n _createClass(Rotate2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n if (this.config.disable) {\n return;\n }\n _get(_getPrototypeOf(Rotate2.prototype), \"afterCreate\", this).call(this);\n this.appendChild(\".xgplayer-icon\", this.icons.rotate);\n this.onBtnClick = this.onBtnClick.bind(this);\n this.bind(\".xgplayer-icon\", [\"click\", \"touchend\"], this.onBtnClick);\n this.on(VIDEO_RESIZE, function() {\n if (_this2.rotateDeg && _this2.config.innerRotate) {\n util.setTimeout(_this2, function() {\n _this2.updateRotateDeg(_this2.rotateDeg, _this2.config.innerRotate);\n }, 100);\n }\n });\n var root = this.player.root;\n this.rootWidth = root.style.width || root.offsetWidth || root.clientWidth;\n this.rootHeight = root.style.height || root.offsetHeight || root.clientHeight;\n if (this.rotateDeg) {\n this.updateRotateDeg(this.rotateDeg, this.config.innerRotate);\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(Rotate2.prototype), \"destroy\", this).call(this);\n this.unbind(\".xgplayer-icon\", [\"click\", \"touchend\"], this.onBtnClick);\n }\n }, {\n key: \"onBtnClick\",\n value: function onBtnClick(e) {\n e.preventDefault();\n e.stopPropagation();\n this.emitUserAction(e, \"rotate\");\n this.rotate(this.config.clockwise, this.config.innerRotate, 1);\n }\n }, {\n key: \"updateRotateDeg\",\n value: function updateRotateDeg(rotateDeg, innerRotate) {\n if (!rotateDeg) {\n rotateDeg = 0;\n }\n if (innerRotate) {\n this.player.videoRotateDeg = rotateDeg;\n return;\n }\n var player = this.player, rootWidth = this.rootWidth, rootHeight = this.rootHeight;\n var root = player.root, innerContainer = player.innerContainer;\n var video = player.media;\n var width = root.offsetWidth;\n var height = innerContainer && innerRotate ? innerContainer.offsetHeight : root.offsetHeight;\n var rWidth = rootWidth;\n var rHeight = rootHeight;\n var x = 0;\n var y = 0;\n if (rotateDeg === 0.75 || rotateDeg === 0.25) {\n rWidth = \"\".concat(height, \"px\");\n rHeight = \"\".concat(width, \"px\");\n x = -(height - width) / 2;\n y = -(width - height) / 2;\n }\n var _transform = \"translate(\".concat(x, \"px,\").concat(y, \"px) rotate(\").concat(rotateDeg, \"turn)\");\n var _styles = {\n transformOrigin: \"center center\",\n transform: _transform,\n webKitTransform: _transform,\n height: rHeight,\n width: rWidth\n };\n var _target = innerRotate ? video : root;\n var poster = innerRotate ? player.getPlugin(\"poster\") : null;\n Object.keys(_styles).map(function(key) {\n _target.style[key] = _styles[key];\n poster && poster.root && (poster.root.style[key] = _styles[key]);\n });\n }\n }, {\n key: \"rotate\",\n value: function rotate() {\n var clockwise = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;\n var innerRotate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;\n var times = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;\n var player = this.player;\n if (!this.rotateDeg) {\n this.rotateDeg = 0;\n }\n var factor = clockwise ? 1 : -1;\n this.rotateDeg = (this.rotateDeg + 1 + factor * 0.25 * times) % 1;\n this.updateRotateDeg(this.rotateDeg, innerRotate);\n player.emit(ROTATE, this.rotateDeg * 360);\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n rotate: RotateSvg\n };\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.config.disable) {\n return;\n }\n return '\\n \\n
\\n
\\n '.concat(xgIconTips(this, \"ROTATE_TIPS\", this.playerConfig.isHideTips), \"\\n
\");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"rotate\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 6,\n innerRotate: true,\n clockwise: false,\n rotateDeg: 0,\n disable: false\n };\n }\n }]);\n return Rotate2;\n}(Icon);\nexport { Rotate as default };\n","function PipIcon() {\n return new DOMParser().parseFromString('\\n \\n', \"image/svg+xml\").firstChild;\n}\nexport { PipIcon as default };\n","function PipIconExit() {\n return new DOMParser().parseFromString('\\n \\n \\n', \"image/svg+xml\").firstChild;\n}\nexport { PipIconExit as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, get as _get, getPrototypeOf as _getPrototypeOf } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { COMPLETE, PIP_CHANGE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport { POSITIONS } from \"../../plugin/plugin.js\";\nimport { xgIconTips } from \"../common/iconTools.js\";\nimport Icon from \"../common/iconPlugin.js\";\nimport PipIcon from \"../assets/pipIcon.js\";\nimport PipIconExit from \"../assets/pipIconExit.js\";\nvar PresentationMode = {\n PIP: \"picture-in-picture\",\n INLINE: \"inline\",\n FULLSCREEN: \"fullscreen\"\n};\nvar PIP = /* @__PURE__ */ function(_IconPlugin) {\n _inherits(PIP2, _IconPlugin);\n var _super = _createSuper(PIP2);\n function PIP2() {\n var _this;\n _classCallCheck(this, PIP2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"switchPIP\", function(e) {\n if (!_this.isPIPAvailable()) {\n return false;\n }\n e.stopPropagation && e.stopPropagation();\n if (_this.isPip) {\n _this.exitPIP();\n _this.emitUserAction(e, \"change_pip\", {\n props: \"pip\",\n from: true,\n to: false\n });\n _this.setAttr(\"data-state\", \"normal\");\n } else if (_this.player.media.readyState === 4) {\n _this.requestPIP();\n _this.emitUserAction(e, \"change_pip\", {\n props: \"pip\",\n from: false,\n to: true\n });\n _this.setAttr(\"data-state\", \"pip\");\n }\n });\n return _this;\n }\n _createClass(PIP2, [{\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n if (typeof args.player.config.pip === \"boolean\") {\n args.config.showIcon = args.player.config.pip;\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n if (!this.isPIPAvailable()) {\n return;\n }\n _get(_getPrototypeOf(PIP2.prototype), \"afterCreate\", this).call(this);\n this.pMode = PresentationMode.INLINE;\n this.initPipEvents();\n if (this.config.showIcon) {\n this.initIcons();\n }\n this.once(COMPLETE, function() {\n if (_this2.config.showIcon) {\n util.removeClass(_this2.find(\".xgplayer-icon\"), \"xg-icon-disable\");\n _this2.bind(\"click\", _this2.switchPIP);\n }\n });\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n pipIcon: {\n icon: PipIcon,\n class: \"xg-get-pip\"\n },\n pipIconExit: {\n icon: PipIconExit,\n class: \"xg-exit-pip\"\n }\n };\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(\".xgplayer-icon\", icons.pipIcon);\n this.appendChild(\".xgplayer-icon\", icons.pipIconExit);\n }\n }, {\n key: \"initPipEvents\",\n value: function initPipEvents() {\n var _this3 = this;\n var player = this.player;\n this.leavePIPCallback = function() {\n var paused = player.paused;\n util.setTimeout(_this3, function() {\n !paused && player.mediaPlay();\n }, 0);\n !paused && player.mediaPlay();\n _this3.setAttr(\"data-state\", \"normal\");\n player.emit(PIP_CHANGE, false);\n };\n this.enterPIPCallback = function(e) {\n player.emit(PIP_CHANGE, true);\n _this3.pipWindow = e.pictureInPictureWindow;\n _this3.setAttr(\"data-state\", \"pip\");\n };\n this.onWebkitpresentationmodechanged = function(e) {\n var mode = player.media.webkitPresentationMode;\n if (_this3.pMode === PresentationMode.FULLSCREEN && mode !== PresentationMode.FULLSCREEN) {\n player.onFullscreenChange(null, false);\n }\n _this3.pMode = mode;\n if (mode === PresentationMode.PIP) {\n _this3.enterPIPCallback(e);\n } else if (mode === PresentationMode.INLINE) {\n _this3.leavePIPCallback(e);\n }\n };\n if (player.media) {\n player.media.addEventListener(\"enterpictureinpicture\", this.enterPIPCallback);\n player.media.addEventListener(\"leavepictureinpicture\", this.leavePIPCallback);\n PIP2.checkWebkitSetPresentationMode(player.media) && player.media.addEventListener(\"webkitpresentationmodechanged\", this.onWebkitpresentationmodechanged);\n }\n }\n }, {\n key: \"requestPIP\",\n value: function requestPIP() {\n var player = this.player, playerConfig = this.playerConfig;\n if (!this.isPIPAvailable() || this.isPip) {\n return;\n }\n try {\n var poster = playerConfig.poster;\n if (poster) {\n player.media.poster = util.typeOf(poster) === \"String\" ? poster : poster.poster;\n }\n PIP2.checkWebkitSetPresentationMode(player.media) ? player.media.webkitSetPresentationMode(\"picture-in-picture\") : player.media.requestPictureInPicture();\n return true;\n } catch (reason) {\n console.error(\"requestPiP\", reason);\n return false;\n }\n }\n }, {\n key: \"exitPIP\",\n value: function exitPIP() {\n var player = this.player;\n try {\n if (this.isPIPAvailable() && this.isPip) {\n PIP2.checkWebkitSetPresentationMode(player.media) ? player.media.webkitSetPresentationMode(\"inline\") : document.exitPictureInPicture();\n }\n return true;\n } catch (reason) {\n console.error(\"exitPIP\", reason);\n return false;\n }\n }\n }, {\n key: \"isPip\",\n get: function get() {\n var player = this.player;\n return document.pictureInPictureElement && document.pictureInPictureElement === player.media || player.media.webkitPresentationMode === PresentationMode.PIP;\n }\n }, {\n key: \"isPIPAvailable\",\n value: function isPIPAvailable() {\n var video = this.player.media;\n var _isEnabled = util.typeOf(document.pictureInPictureEnabled) === \"Boolean\" ? document.pictureInPictureEnabled : true;\n return _isEnabled && (util.typeOf(video.disablePictureInPicture) === \"Boolean\" && !video.disablePictureInPicture || video.webkitSupportsPresentationMode && util.typeOf(video.webkitSetPresentationMode) === \"Function\");\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(PIP2.prototype), \"destroy\", this).call(this);\n var player = this.player;\n player.media.removeEventListener(\"enterpictureinpicture\", this.enterPIPCallback);\n player.media.removeEventListener(\"leavepictureinpicture\", this.leavePIPCallback);\n PIP2.checkWebkitSetPresentationMode(player.media) && player.media.removeEventListener(\"webkitpresentationmodechanged\", this.onWebkitpresentationmodechanged);\n this.exitPIP();\n this.unbind(\"click\", this.btnClick);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!this.config.showIcon || !this.isPIPAvailable()) {\n return;\n }\n return '\\n
\\n
\\n '.concat(xgIconTips(this, \"PIP\", this.playerConfig.isHideTips), \"\\n
\");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"pip\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 6,\n showIcon: false\n };\n }\n }, {\n key: \"checkWebkitSetPresentationMode\",\n value: function checkWebkitSetPresentationMode(video) {\n return typeof video.webkitSetPresentationMode === \"function\";\n }\n }]);\n return PIP2;\n}(Icon);\nexport { PIP as default };\n","function Next() {\n return new DOMParser().parseFromString('\\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { Next as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport { PLAYNEXT } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin, { POSITIONS } from \"../../plugin/plugin.js\";\nimport { xgIconTips } from \"../common/iconTools.js\";\nimport Next from \"../assets/playNext.js\";\nvar PlayNextIcon = /* @__PURE__ */ function(_Plugin) {\n _inherits(PlayNextIcon2, _Plugin);\n var _super = _createSuper(PlayNextIcon2);\n function PlayNextIcon2(options) {\n var _this;\n _classCallCheck(this, PlayNextIcon2);\n _this = _super.call(this, options);\n _defineProperty(_assertThisInitialized(_this), \"playNext\", function(e) {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;\n e.preventDefault();\n e.stopPropagation();\n if (_this.idx + 1 < _this.config.urlList.length) {\n _this.idx++;\n _this.nextHandler(_this.config.urlList[_this.idx], _this.idx);\n player.emit(PLAYNEXT, _this.idx + 1);\n } else {\n _this.nextHandler();\n player.emit(PLAYNEXT);\n }\n });\n _this.idx = -1;\n return _this;\n }\n _createClass(PlayNextIcon2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n if (!this.config.urlList || this.config.urlList.length === 0) {\n return;\n }\n this.appendChild(\".xgplayer-icon\", this.icons.playNext);\n this.initEvents();\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n playNext: Next\n };\n }\n }, {\n key: \"initEvents\",\n value: function initEvents() {\n this.nextHandler = this.hook(\"nextClick\", this.changeSrc);\n var event = sniffer.device === \"mobile\" ? \"touchend\" : \"click\";\n this.bind(event, this.playNext);\n this.show();\n }\n }, {\n key: \"changeSrc\",\n value: function changeSrc(url) {\n var player = this.player;\n if (!url) {\n return;\n }\n player.pause();\n player.currentTime = 0;\n if (player.switchURL) {\n player.switchURL(url);\n } else {\n player.src = url;\n }\n player.config.url = url;\n player.play();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.unbind([\"touchend\", \"click\"], this.playNext);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!this.config.urlList || this.config.urlList.length === 0) {\n return;\n }\n return '\\n \\n
\\n
\\n '.concat(xgIconTips(this, \"PLAYNEXT_TIPS\", this.playerConfig.isHideTips), \"\\n
\\n \");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"playNext\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_LEFT,\n index: 1,\n url: null,\n urlList: []\n };\n }\n }]);\n return PlayNextIcon2;\n}(Plugin);\nexport { PlayNextIcon as default };\n","//download.js v4.2, by dandavis; 2008-2016. [MIT] see http://danml.com/download.html for tests/usage\n// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime\n// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.URL support for larger+faster saves than dataURLs\n// v3 added dataURL and Blob Input, bind-toggle arity, and legacy dataURL fallback was improved with force-download mime and base64 support. 3.1 improved safari handling.\n// v4 adds AMD/UMD, commonJS, and plain browser support\n// v4.1 adds url download capability via solo URL argument (same domain/CORS only)\n// v4.2 adds semantic variable names, long (over 2MB) dataURL support, and hidden by default temp anchors\n// https://github.com/rndme/download\n\n(function (root, factory) {\n\tif (typeof define === 'function' && define.amd) {\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([], factory);\n\t} else if (typeof exports === 'object') {\n\t\t// Node. Does not work with strict CommonJS, but\n\t\t// only CommonJS-like environments that support module.exports,\n\t\t// like Node.\n\t\tmodule.exports = factory();\n\t} else {\n\t\t// Browser globals (root is window)\n\t\troot.download = factory();\n }\n}(this, function () {\n\n\treturn function download(data, strFileName, strMimeType) {\n\n\t\tvar self = window, // this script is only for browsers anyway...\n\t\t\tdefaultMime = \"application/octet-stream\", // this default mime also triggers iframe downloads\n\t\t\tmimeType = strMimeType || defaultMime,\n\t\t\tpayload = data,\n\t\t\turl = !strFileName && !strMimeType && payload,\n\t\t\tanchor = document.createElement(\"a\"),\n\t\t\ttoString = function(a){return String(a);},\n\t\t\tmyBlob = (self.Blob || self.MozBlob || self.WebKitBlob || toString),\n\t\t\tfileName = strFileName || \"download\",\n\t\t\tblob,\n\t\t\treader;\n\t\t\tmyBlob= myBlob.call ? myBlob.bind(self) : Blob ;\n\t \n\t\tif(String(this)===\"true\"){ //reverse arguments, allowing download.bind(true, \"text/xml\", \"export.xml\") to act as a callback\n\t\t\tpayload=[payload, mimeType];\n\t\t\tmimeType=payload[0];\n\t\t\tpayload=payload[1];\n\t\t}\n\n\n\t\tif(url && url.length< 2048){ // if no filename and no mime, assume a url was passed as the only argument\n\t\t\tfileName = url.split(\"/\").pop().split(\"?\")[0];\n\t\t\tanchor.href = url; // assign href prop to temp anchor\n\t\t \tif(anchor.href.indexOf(url) !== -1){ // if the browser determines that it's a potentially valid url path:\n \t\tvar ajax=new XMLHttpRequest();\n \t\tajax.open( \"GET\", url, true);\n \t\tajax.responseType = 'blob';\n \t\tajax.onload= function(e){ \n\t\t\t\t download(e.target.response, fileName, defaultMime);\n\t\t\t\t};\n \t\tsetTimeout(function(){ ajax.send();}, 0); // allows setting custom ajax headers using the return:\n\t\t\t return ajax;\n\t\t\t} // end if valid url?\n\t\t} // end if url?\n\n\n\t\t//go ahead and download dataURLs right away\n\t\tif(/^data:([\\w+-]+\\/[\\w+.-]+)?[,;]/.test(payload)){\n\t\t\n\t\t\tif(payload.length > (1024*1024*1.999) && myBlob !== toString ){\n\t\t\t\tpayload=dataUrlToBlob(payload);\n\t\t\t\tmimeType=payload.type || defaultMime;\n\t\t\t}else{\t\t\t\n\t\t\t\treturn navigator.msSaveBlob ? // IE10 can't do a[download], only Blobs:\n\t\t\t\t\tnavigator.msSaveBlob(dataUrlToBlob(payload), fileName) :\n\t\t\t\t\tsaver(payload) ; // everyone else can save dataURLs un-processed\n\t\t\t}\n\t\t\t\n\t\t}else{//not data url, is it a string with special needs?\n\t\t\tif(/([\\x80-\\xff])/.test(payload)){\t\t\t \n\t\t\t\tvar i=0, tempUiArr= new Uint8Array(payload.length), mx=tempUiArr.length;\n\t\t\t\tfor(i;i\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { DownloadSvg as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, get as _get, getPrototypeOf as _getPrototypeOf } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport downloadUtil from \"downloadjs\";\nimport util from \"../../utils/util.js\";\nimport \"../../utils/debug.js\";\nimport { POSITIONS } from \"../../plugin/plugin.js\";\nimport { xgIconTips } from \"../common/iconTools.js\";\nimport Icon from \"../common/iconPlugin.js\";\nimport DownloadSvg from \"../assets/download.js\";\nvar Download = /* @__PURE__ */ function(_IconPlugin) {\n _inherits(Download2, _IconPlugin);\n var _super = _createSuper(Download2);\n function Download2(args) {\n var _this;\n _classCallCheck(this, Download2);\n _this = _super.call(this, args);\n _defineProperty(_assertThisInitialized(_this), \"download\", function(e) {\n if (_this.isLock) {\n return;\n }\n _this.emitUserAction(e, \"download\");\n var url = _this.playerConfig.url;\n var dUrl = \"\";\n if (util.typeOf(url) === \"String\") {\n dUrl = url;\n } else if (util.typeOf(url) === \"Array\" && url.length > 0) {\n dUrl = url[0].src;\n }\n var newUrl = _this.getAbsoluteURL(dUrl);\n downloadUtil(newUrl);\n _this.isLock = true;\n _this.timer = window.setTimeout(function() {\n _this.isLock = false;\n window.clearTimeout(_this.timer);\n _this.timer = null;\n }, 300);\n });\n _this.timer = null;\n _this.isLock = false;\n return _this;\n }\n _createClass(Download2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n _get(_getPrototypeOf(Download2.prototype), \"afterCreate\", this).call(this);\n if (this.config.disable) {\n return;\n }\n this.appendChild(\".xgplayer-icon\", this.icons.download);\n this._handler = this.hook(\"click\", this.download, {\n pre: function pre(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n });\n this.bind([\"click\", \"touchend\"], this._handler);\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n download: DownloadSvg\n };\n }\n }, {\n key: \"getAbsoluteURL\",\n value: function getAbsoluteURL(url) {\n if (!url.match(/^https?:\\/\\//)) {\n var div = document.createElement(\"div\");\n div.innerHTML = '
x');\n url = div.firstChild.href;\n }\n return url;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(Download2.prototype), \"destroy\", this).call(this);\n this.unbind([\"click\", \"touchend\"], this.download);\n window.clearTimeout(this.timer);\n this.timer = null;\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.config.disable) {\n return;\n }\n return '\\n
\\n
\\n '.concat(xgIconTips(this, \"DOWNLOAD_TIPS\", this.playerConfig.isHideTips), \"\\n
\");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"download\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 3,\n disable: true\n };\n }\n }]);\n return Download2;\n}(Icon);\nexport { Download as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, get as _get, getPrototypeOf as _getPrototypeOf } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport { VIDEO_RESIZE, SCREEN_SHOT } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport { POSITIONS } from \"../../plugin/plugin.js\";\nimport Icon from \"../common/iconPlugin.js\";\nvar ScreenShot = /* @__PURE__ */ function(_IconPlugin) {\n _inherits(ScreenShot2, _IconPlugin);\n var _super = _createSuper(ScreenShot2);\n function ScreenShot2() {\n _classCallCheck(this, ScreenShot2);\n return _super.apply(this, arguments);\n }\n _createClass(ScreenShot2, [{\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n if (typeof args.player.config.screenShot === \"boolean\") {\n args.config.disable = !args.player.config.screenShot;\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n _get(_getPrototypeOf(ScreenShot2.prototype), \"afterCreate\", this).call(this);\n this.appendChild(\".xgplayer-icon\", this.icons.screenshotIcon);\n var config = this.config;\n this.initSize = function(data) {\n if (config.fitVideo) {\n config.width = data.vWidth;\n config.height = data.vHeight;\n }\n };\n this.once(VIDEO_RESIZE, this.initSize);\n }\n }, {\n key: \"onPluginsReady\",\n value: function onPluginsReady() {\n this.show();\n this.onClickBtn = this.onClickBtn.bind(this);\n this.bind([\"click\", \"touchend\"], this.onClickBtn);\n }\n }, {\n key: \"saveScreenShot\",\n value: function saveScreenShot(data, filename) {\n var saveLink = document.createElement(\"a\");\n saveLink.href = data;\n saveLink.download = filename;\n var event = document.createEvent(\"MouseEvents\");\n event.initMouseEvent(\"click\", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n saveLink.dispatchEvent(event);\n }\n }, {\n key: \"createCanvas\",\n value: function createCanvas(width, height) {\n var canvas = document.createElement(\"canvas\");\n var canvasCtx = canvas.getContext(\"2d\");\n this.canvasCtx = canvasCtx;\n this.canvas = canvas;\n canvas.width = width || this.config.width;\n canvas.height = height || this.config.height;\n canvasCtx.imageSmoothingEnabled = true;\n if (canvasCtx.imageSmoothingEnabled) {\n canvasCtx.imageSmoothingQuality = \"high\";\n }\n }\n }, {\n key: \"onClickBtn\",\n value: function onClickBtn(e) {\n var _this = this;\n e.preventDefault();\n e.stopPropagation();\n this.emitUserAction(e, \"shot\");\n this.shot().then(function(data) {\n _this.emit(SCREEN_SHOT, data);\n _this.saveScreenShot(data, _this.config.name + _this.config.format);\n });\n }\n }, {\n key: \"shot\",\n value: function shot(width, height) {\n var _this2 = this;\n var option = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {\n quality: 0.92,\n type: \"image/png\"\n };\n var config = this.config, player = this.player;\n var quality = option.quality || config.quality;\n var type = option.type || config.type;\n return new Promise(function(resolve, reject) {\n var canvas = null;\n var canvasCtx;\n if (player.media.canvas) {\n canvas = player.media.canvas;\n } else {\n if (!_this2.canvas) {\n _this2.createCanvas(width, height);\n } else {\n _this2.canvas.width = width || config.width;\n _this2.canvas.height = height || config.height;\n }\n canvas = _this2.canvas;\n canvasCtx = _this2.canvasCtx;\n var mediaRatio = player.media.videoWidth / player.media.videoHeight;\n var canvasRatio = canvas.width / canvas.height;\n var sx = 0, sy = 0, sw = player.media.videoWidth, sh = player.media.videoHeight;\n var dx, dy, dw, dh;\n if (mediaRatio > canvasRatio) {\n dw = canvas.width;\n dh = canvas.width / mediaRatio;\n dx = 0;\n dy = Math.round((canvas.height - dh) / 2);\n } else if (mediaRatio === canvasRatio) {\n dw = canvas.width;\n dh = canvas.height;\n dx = 0;\n dy = 0;\n } else if (mediaRatio < canvasRatio) {\n dw = canvas.height * mediaRatio;\n dh = canvas.height;\n dx = Math.round((canvas.width - dw) / 2);\n dy = 0;\n }\n canvasCtx.drawImage(player.media, sx, sy, sw, sh, dx, dy, dw, dh);\n }\n var src = canvas.toDataURL(type, quality).replace(type, \"image/octet-stream\");\n src = src.replace(/^data:image\\/[^;]+/, \"data:application/octet-stream\");\n resolve(src);\n });\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n screenshotIcon: null\n };\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(ScreenShot2.prototype), \"destroy\", this).call(this);\n this.unbind([\"click\", \"touchend\"], this.onClickBtn);\n this.off(VIDEO_RESIZE, this.initSize);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.config.disable) {\n return;\n }\n var className = this.icons.screenshotIcon ? \"xgplayer-icon\" : \"xgplayer-icon btn-text\";\n var langKey = \"SCREENSHOT\";\n return '\\n \\n
\\n ').concat(this.icons.screenshotIcon ? \"\" : '').concat(this.i18n[langKey], \"\"), \"\\n
\\n
\");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"screenShot\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 5,\n quality: 0.92,\n type: \"image/png\",\n format: \".png\",\n width: 600,\n height: 337,\n fitVideo: true,\n disable: false,\n name: \"screenshot\"\n };\n }\n }]);\n return ScreenShot2;\n}(Icon);\nexport { ScreenShot as default };\n","import { createClass as _createClass, classCallCheck as _classCallCheck } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar OptionList = /* @__PURE__ */ function() {\n function OptionList2(args) {\n _classCallCheck(this, OptionList2);\n this.config = args.config;\n this.parent = args.root;\n this.root = util.createDom(\"ul\", \"\", {}, \"xg-options-list xg-list-slide-scroll \".concat(this.config.className));\n args.root.appendChild(this.root);\n var maxHeight = this.config.maxHeight;\n if (maxHeight) {\n this.setStyle({\n maxHeight\n });\n }\n this.onItemClick = this.onItemClick.bind(this);\n this.renderItemList();\n var eventName = sniffer.device === \"mobile\" ? \"touchend\" : \"click\";\n this._delegates = Plugin.delegate.call(this, this.root, \"li\", eventName, this.onItemClick);\n }\n _createClass(OptionList2, [{\n key: \"renderItemList\",\n value: function renderItemList(data) {\n var _this = this;\n var config = this.config, root = this.root;\n if (data) {\n config.data = data;\n } else {\n data = config.data;\n }\n if (config.style) {\n Object.keys(config.style).map(function(key) {\n root.style[key] = config[key];\n });\n }\n if (data.length > 0) {\n this.attrKeys = Object.keys(data[0]);\n }\n this.root.innerHTML = \"\";\n data.map(function(item, index) {\n var className = item.selected ? \"option-item selected\" : \"option-item\";\n item[\"data-index\"] = index;\n _this.root.appendChild(util.createDom(\"li\", \"\".concat(item.showText, \"\"), item, className));\n });\n }\n }, {\n key: \"onItemClick\",\n value: function onItemClick(e) {\n if (!e.delegateTarget) {\n e.delegateTarget = e.target;\n }\n var target = e.delegateTarget;\n if (target && util.hasClass(target, \"selected\")) {\n return false;\n }\n var changeCallback = typeof this.config.onItemClick === \"function\" ? this.config.onItemClick : null;\n var curSelected = this.root.querySelector(\".selected\");\n util.addClass(target, \"selected\");\n curSelected && util.removeClass(curSelected, \"selected\");\n changeCallback(e, {\n from: curSelected ? this.getAttrObj(curSelected, this.attrKeys) : null,\n to: this.getAttrObj(target, this.attrKeys)\n });\n }\n }, {\n key: \"getAttrObj\",\n value: function getAttrObj(dom, keys) {\n if (!dom || !keys) {\n return {};\n }\n var obj = {};\n keys.map(function(key) {\n obj[key] = dom.getAttribute(key);\n });\n var index = dom.getAttribute(\"data-index\");\n if (index) {\n obj.index = Number(index);\n }\n return obj;\n }\n }, {\n key: \"show\",\n value: function show() {\n util.removeClass(this.root, \"hide\");\n util.addClass(this.root, \"active\");\n }\n }, {\n key: \"hide\",\n value: function hide() {\n util.removeClass(this.root, \"active\");\n util.addClass(this.root, \"hide\");\n }\n }, {\n key: \"setStyle\",\n value: function setStyle(style) {\n var _this2 = this;\n Object.keys(style).forEach(function(key) {\n _this2.root.style[key] = style[key];\n });\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this._delegates) {\n this._delegates.map(function(item) {\n item.destroy && item.destroy();\n });\n this._delegates = null;\n }\n this.root.innerHTML = null;\n this.parent.removeChild(this.root);\n this.root = null;\n }\n }]);\n return OptionList2;\n}();\nexport { OptionList as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, typeof as _typeof } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport { VIDEO_RESIZE, FULLSCREEN_CHANGE, CANPLAY, PLAYER_FOCUS } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin, { POSITIONS } from \"../../plugin/plugin.js\";\nimport OptionList from \"./optionList.js\";\nvar LIST_TYPES = {\n SIDE: \"side\",\n MIDDLE: \"middle\"\n};\nvar TOGGLE_MODES = {\n CLICK: \"click\",\n HOVER: \"hover\"\n};\nfunction getListClassName(listType, position) {\n if (listType === LIST_TYPES.SIDE) {\n return position === POSITIONS.CONTROLS_LEFT ? \"xg-side-list xg-left-side\" : \"xg-side-list xg-right-side\";\n } else {\n return \"\";\n }\n}\nvar IS_MOBILE = sniffer.device === \"mobile\";\nvar OptionsIcon = /* @__PURE__ */ function(_Plugin) {\n _inherits(OptionsIcon2, _Plugin);\n var _super = _createSuper(OptionsIcon2);\n function OptionsIcon2(args) {\n var _this;\n _classCallCheck(this, OptionsIcon2);\n _this = _super.call(this, args);\n _defineProperty(_assertThisInitialized(_this), \"onEnter\", function(e) {\n e.stopPropagation();\n _this.emit(\"icon_mouseenter\", {\n pluginName: _this.pluginName\n });\n _this.switchActiveState(e);\n });\n _defineProperty(_assertThisInitialized(_this), \"switchActiveState\", function(e) {\n e.stopPropagation();\n var toggleMode = _this.config.toggleMode;\n if (toggleMode === TOGGLE_MODES.CLICK) {\n _this.toggle(!_this.isActive);\n } else {\n _this.toggle(true);\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onLeave\", function(e) {\n e.stopPropagation();\n _this.emit(\"icon_mouseleave\", {\n pluginName: _this.pluginName\n });\n if (_this.config.listType !== LIST_TYPES.SIDE) {\n _this.isActive && _this.toggle(false);\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onListEnter\", function(e) {\n _this.enterType = 2;\n });\n _defineProperty(_assertThisInitialized(_this), \"onListLeave\", function(e) {\n _this.enterType = 0;\n _this.isActive && _this.toggle(false);\n });\n _this.isIcons = false;\n _this.isActive = false;\n _this.curValue = null;\n _this.curIndex = 0;\n return _this;\n }\n _createClass(OptionsIcon2, [{\n key: \"updateLang\",\n value: function updateLang(value) {\n this.renderItemList(this.config.list, this.curIndex);\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n var config = this.config;\n this.initIcons();\n if (IS_MOBILE && config.listType !== LIST_TYPES.MIDDLE) {\n config.listType = LIST_TYPES.SIDE;\n }\n config.hidePortrait && util.addClass(this.root, \"portrait\");\n this.on([VIDEO_RESIZE, FULLSCREEN_CHANGE], function() {\n _this2._resizeList();\n });\n this.once(CANPLAY, function() {\n if (config.list && config.list.length > 0) {\n _this2.renderItemList(config.list);\n _this2.show();\n }\n });\n IS_MOBILE && this.on(PLAYER_FOCUS, function() {\n if (!_this2.isActive) {\n return;\n }\n _this2.optionsList && _this2.optionsList.hide();\n _this2.isActive = false;\n });\n if (IS_MOBILE) {\n config.toggleMode = TOGGLE_MODES.CLICK;\n this.activeEvent = \"touchend\";\n } else {\n this.activeEvent = config.toggleMode === TOGGLE_MODES.CLICK ? \"click\" : \"mouseenter\";\n }\n if (config.toggleMode === TOGGLE_MODES.CLICK) {\n this.bind(this.activeEvent, this.switchActiveState);\n } else {\n this.bind(this.activeEvent, this.onEnter);\n this.bind(\"mouseleave\", this.onLeave);\n }\n this.isIcons && this.bind(\"click\", this.onIconClick);\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var _this3 = this;\n var icons = this.icons;\n var _c = Object.keys(icons);\n var _isIcons = false;\n if (_c.length > 0) {\n _c.forEach(function(key) {\n _this3.appendChild(\".xgplayer-icon\", icons[key]);\n !_isIcons && (_isIcons = icons[key]);\n });\n this.isIcons = _isIcons;\n }\n if (_isIcons) {\n return;\n }\n this.appendChild(\".xgplayer-icon\", util.createDom(\"span\", \"\", {}, \"icon-text\"));\n util.addClass(this.find(\".xgplayer-icon\"), \"btn-text\");\n }\n }, {\n key: \"show\",\n value: function show() {\n if (!this.config.list || this.config.list.length < 2) {\n return;\n }\n util.addClass(this.root, \"show\");\n }\n }, {\n key: \"hide\",\n value: function hide() {\n util.removeClass(this.root, \"show\");\n }\n }, {\n key: \"getTextByLang\",\n value: function getTextByLang(item, key, lang) {\n if (item === void 0) {\n return \"\";\n }\n var list = this.config.list;\n !lang && (lang = this.player.lang);\n key = !key || util.isUndefined(item[key]) ? \"text\" : key;\n typeof item === \"number\" && (item = list[item]);\n try {\n if (_typeof(item[key]) === \"object\") {\n return item[key][lang] || item[key].en;\n } else {\n return item[key];\n }\n } catch (err) {\n console.warn(err);\n return \"\";\n }\n }\n }, {\n key: \"toggle\",\n value: function toggle(isActive) {\n if (isActive === this.isActive)\n return;\n var controls = this.player.controls;\n var listType = this.config.listType;\n if (isActive) {\n listType === LIST_TYPES.SIDE ? controls.blur() : controls.focus();\n this.optionsList && this.optionsList.show();\n } else {\n listType === LIST_TYPES.SIDE ? controls.focus() : controls.focusAwhile();\n this.optionsList && this.optionsList.hide();\n }\n this.isActive = isActive;\n }\n }, {\n key: \"onItemClick\",\n value: function onItemClick(e, data) {\n e.stopPropagation();\n var _this$config = this.config, listType = _this$config.listType, list = _this$config.list;\n this.curIndex = data.to.index;\n this.curItem = list[this.curIndex];\n this.changeCurrentText();\n var isItemClickHide = this.config.isItemClickHide;\n (isItemClickHide || IS_MOBILE || listType === LIST_TYPES.SIDE) && this.toggle(false);\n }\n }, {\n key: \"onIconClick\",\n value: function onIconClick(e) {\n }\n }, {\n key: \"changeCurrentText\",\n value: function changeCurrentText() {\n if (this.isIcons) {\n return;\n }\n var list = this.config.list;\n var index = this.curIndex < list.length ? this.curIndex : 0;\n var curItem = list[index];\n if (!curItem)\n return;\n this.find(\".icon-text\").innerHTML = this.getTextByLang(curItem, \"iconText\");\n }\n }, {\n key: \"renderItemList\",\n value: function renderItemList(itemList, curIndex) {\n var _this4 = this;\n var config = this.config, optionsList = this.optionsList, player = this.player;\n if (typeof curIndex === \"number\") {\n this.curIndex = curIndex;\n this.curItem = config.list[curIndex];\n }\n if (optionsList) {\n optionsList.renderItemList(itemList);\n this.changeCurrentText();\n return;\n }\n var options = {\n config: {\n data: itemList || [],\n className: getListClassName(config.listType, config.position),\n onItemClick: function onItemClick(e, data) {\n _this4.onItemClick(e, data);\n }\n },\n root: config.listType === LIST_TYPES.SIDE ? player.innerContainer || player.root : this.root\n };\n if (this.config.isShowIcon) {\n var _this$player$root$get = this.player.root.getBoundingClientRect(), height = _this$player$root$get.height;\n var _maxH = config.listType === LIST_TYPES.MIDDLE ? height - 50 : height;\n if (_maxH) {\n options.config.maxHeight = \"\".concat(_maxH, \"px\");\n }\n this.optionsList = new OptionList(options);\n this.changeCurrentText();\n this.show();\n }\n this._resizeList();\n }\n }, {\n key: \"_resizeList\",\n value: function _resizeList() {\n var _this$player$root$get2 = this.player.root.getBoundingClientRect(), height = _this$player$root$get2.height;\n var _maxH = this.config.listType === LIST_TYPES.MIDDLE ? height - 50 : height;\n this.optionsList && this.optionsList.setStyle({\n maxHeight: \"\".concat(_maxH, \"px\")\n });\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var config = this.config;\n if (config.toggleMode === TOGGLE_MODES.CLICK) {\n this.unbind(this.activeEvent, this.switchActiveState);\n } else {\n this.unbind(this.activeEvent, this.onEnter);\n this.unbind(\"mouseleave\", this.onLeave);\n }\n this.isIcons && this.unbind(\"click\", this.onIconClick);\n if (this.optionsList) {\n this.optionsList.destroy();\n this.optionsList = null;\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!this.config.isShowIcon) {\n return;\n }\n return '\\n
\\n
\\n
');\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"optionsIcon\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 100,\n list: [],\n listType: \"middle\",\n listStyle: {},\n hidePortrait: true,\n isShowIcon: false,\n isItemClickHide: true,\n toggleMode: TOGGLE_MODES.HOVER\n };\n }\n }]);\n return OptionsIcon2;\n}(Plugin);\nexport { OptionsIcon as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, objectSpread2 as _objectSpread2, get as _get, getPrototypeOf as _getPrototypeOf } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { DEFINITION_CHANGE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport { POSITIONS } from \"../../plugin/plugin.js\";\nimport OptionsIcon from \"../common/optionsIcon.js\";\nvar DefinitionIcon = /* @__PURE__ */ function(_OptionsIcon) {\n _inherits(DefinitionIcon2, _OptionsIcon);\n var _super = _createSuper(DefinitionIcon2);\n function DefinitionIcon2(args) {\n var _this;\n _classCallCheck(this, DefinitionIcon2);\n _this = _super.call(this, args);\n _this.curTime = 0;\n _this.isPaused = true;\n return _this;\n }\n _createClass(DefinitionIcon2, [{\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n var list = args.config.list;\n if (Array.isArray(list) && list.length > 0) {\n args.config.list = list.map(function(item) {\n if (!item.text && item.name) {\n item.text = item.name;\n }\n if (!item.text) {\n item.text = item.definition;\n }\n return item;\n });\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n _get(_getPrototypeOf(DefinitionIcon2.prototype), \"afterCreate\", this).call(this);\n this.on(\"resourceReady\", function(list) {\n _this2.changeDefinitionList(list);\n });\n this.on(DEFINITION_CHANGE, function(data) {\n _this2.renderItemList(_this2.config.list, data.to);\n });\n if (this.player.definitionList.length < 2) {\n this.hide();\n }\n }\n }, {\n key: \"show\",\n value: function show() {\n if (!this.config.list || this.config.list.length < 2) {\n return;\n }\n util.addClass(this.root, \"show\");\n }\n }, {\n key: \"initDefinition\",\n value: function initDefinition() {\n var _this$config = this.config, list = _this$config.list, defaultDefinition = _this$config.defaultDefinition;\n if (list.length > 0) {\n var to = null;\n list.map(function(item) {\n if (item.definition === defaultDefinition) {\n to = item;\n }\n });\n if (!to) {\n to = list[0];\n }\n this.changeDefinition(to);\n }\n }\n }, {\n key: \"renderItemList\",\n value: function renderItemList() {\n var _this3 = this;\n var list = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.config.list || [];\n var to = arguments.length > 1 ? arguments[1] : void 0;\n var targetDef = to && to.definition ? to.definition : this.config.defaultDefinition;\n if (to) {\n list.forEach(function(item) {\n item.selected = false;\n });\n }\n var curIndex = 0;\n var items = list.map(function(item, index) {\n var showItem = _objectSpread2(_objectSpread2({}, item), {}, {\n showText: _this3.getTextByLang(item) || item.definition,\n selected: false\n });\n if (item.selected || item.definition && item.definition == targetDef) {\n showItem.selected = true;\n curIndex = index;\n }\n return showItem;\n });\n _get(_getPrototypeOf(DefinitionIcon2.prototype), \"renderItemList\", this).call(this, items, curIndex);\n }\n }, {\n key: \"changeDefinitionList\",\n value: function changeDefinitionList(list) {\n if (!Array.isArray(list)) {\n return;\n }\n this.config.list = list.map(function(item) {\n if (!item.text && item.name) {\n item.text = item.name;\n }\n if (!item.text) {\n item.text = item.definition;\n }\n return item;\n });\n this.renderItemList();\n this.config.list.length < 2 ? this.hide() : this.show();\n }\n }, {\n key: \"changeDefinition\",\n value: function changeDefinition(to, from) {\n this.player.changeDefinition(to, from);\n }\n }, {\n key: \"onItemClick\",\n value: function onItemClick(e, data) {\n var definitionList = this.player.definitionList;\n _get(_getPrototypeOf(DefinitionIcon2.prototype), \"onItemClick\", this).apply(this, arguments);\n this.emitUserAction(e, \"change_definition\", {\n from: data.from,\n to: data.to\n });\n for (var i = 0; i < definitionList.length; i++) {\n if (data.to && definitionList[i].definition === data.to.definition) {\n data.to.url = definitionList[i].url;\n }\n if (data.from && definitionList[i].definition === data.from.definition) {\n data.from.url = definitionList[i].url;\n }\n }\n this.player.changeDefinition(data.to, data.from);\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"definition\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return _objectSpread2(_objectSpread2({}, OptionsIcon.defaultConfig), {}, {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 3,\n list: [],\n defaultDefinition: \"\",\n disable: false,\n hidePortrait: false,\n className: \"xgplayer-definition\",\n isShowIcon: true\n });\n }\n }]);\n return DefinitionIcon2;\n}(OptionsIcon);\nexport { DefinitionIcon as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, objectSpread2 as _objectSpread2, get as _get, getPrototypeOf as _getPrototypeOf } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport { RATE_CHANGE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport { POSITIONS } from \"../../plugin/plugin.js\";\nimport OptionsIcon from \"../common/optionsIcon.js\";\nvar PlaybackRate = /* @__PURE__ */ function(_OptionsIcon) {\n _inherits(PlaybackRate2, _OptionsIcon);\n var _super = _createSuper(PlaybackRate2);\n function PlaybackRate2(args) {\n var _this;\n _classCallCheck(this, PlaybackRate2);\n _this = _super.call(this, args);\n _this.curRate = 1;\n return _this;\n }\n _createClass(PlaybackRate2, [{\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n var playbackRate = args.player.config.playbackRate;\n var list = !playbackRate ? [] : Array.isArray(playbackRate) ? playbackRate : args.config.list;\n if (Array.isArray(list)) {\n args.config.list = list.map(function(item) {\n if (typeof item === \"number\") {\n item = {\n rate: item,\n text: \"\".concat(item, \"x\")\n };\n } else if (!item.text && item.rate) {\n item.text = \"\".concat(item.rate, \"x\");\n }\n return item;\n });\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n _get(_getPrototypeOf(PlaybackRate2.prototype), \"afterCreate\", this).call(this);\n this.on(RATE_CHANGE, function() {\n if (_this2.curValue === _this2.player.playbackRate) {\n return;\n }\n _this2.renderItemList();\n });\n this.renderItemList();\n }\n }, {\n key: \"show\",\n value: function show() {\n if (!this.config.list || this.config.list.length === 0) {\n return;\n }\n _get(_getPrototypeOf(PlaybackRate2.prototype), \"show\", this).call(this);\n }\n }, {\n key: \"onItemClick\",\n value: function onItemClick(e, data) {\n _get(_getPrototypeOf(PlaybackRate2.prototype), \"onItemClick\", this).apply(this, arguments);\n var target = e.delegateTarget;\n var rate = Number(target.getAttribute(\"rate\"));\n if (!rate || rate === this.curValue) {\n return false;\n }\n var props = {\n playbackRate: {\n from: this.player.playbackRate,\n to: rate\n }\n };\n this.emitUserAction(e, \"change_rate\", {\n props\n });\n this.curValue = rate;\n this.player.playbackRate = rate;\n }\n }, {\n key: \"renderItemList\",\n value: function renderItemList() {\n var _this3 = this;\n var playbackRate = this.player.playbackRate || 1;\n this.curValue = playbackRate;\n var curIndex = -1;\n var items = this.config.list.map(function(item, index) {\n var itemInfo = {\n rate: item.rate\n };\n if (itemInfo.rate === playbackRate) {\n itemInfo.selected = true;\n curIndex = index;\n }\n itemInfo.showText = _this3.getTextByLang(item);\n return itemInfo;\n });\n _get(_getPrototypeOf(PlaybackRate2.prototype), \"renderItemList\", this).call(this, items, curIndex);\n }\n }, {\n key: \"changeCurrentText\",\n value: function changeCurrentText() {\n if (this.isIcons) {\n return;\n }\n var list = this.config.list;\n var index = this.curIndex < list.length ? this.curIndex : 0;\n var curItem = list[index];\n var _text = \"\";\n if (!curItem || this.curIndex < 0) {\n _text = \"\".concat(this.player.playbackRate, \"x\");\n } else {\n _text = this.getTextByLang(curItem, \"iconText\");\n }\n this.find(\".icon-text\").innerHTML = _text;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(PlaybackRate2.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"playbackRate\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return _objectSpread2(_objectSpread2({}, OptionsIcon.defaultConfig), {}, {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 4,\n list: [2, 1.5, 1, 0.75, 0.5],\n className: \"xgplayer-playbackrate\",\n isShowIcon: true,\n hidePortrait: false\n });\n }\n }]);\n return PlaybackRate2;\n}(OptionsIcon);\nexport { PlaybackRate as default };\n","function CssFullSceenSvg() {\n return new DOMParser().parseFromString(`\n \n\n`, \"image/svg+xml\").firstChild;\n}\nexport { CssFullSceenSvg as default };\n","function ExitCssFullSceenSvg() {\n return new DOMParser().parseFromString('\\n \\n\\n', \"image/svg+xml\").firstChild;\n}\nexport { ExitCssFullSceenSvg as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, get as _get, getPrototypeOf as _getPrototypeOf } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport { CSS_FULLSCREEN_CHANGE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport { POSITIONS } from \"../../plugin/plugin.js\";\nimport { xgIconTips } from \"../common/iconTools.js\";\nimport Icon from \"../common/iconPlugin.js\";\nimport CssFullSceenSvg from \"../assets/requestCssFull.js\";\nimport ExitCssFullSceenSvg from \"../assets/exitCssFull.js\";\nvar CssFullScreen = /* @__PURE__ */ function(_IconPlugin) {\n _inherits(CssFullScreen2, _IconPlugin);\n var _super = _createSuper(CssFullScreen2);\n function CssFullScreen2() {\n _classCallCheck(this, CssFullScreen2);\n return _super.apply(this, arguments);\n }\n _createClass(CssFullScreen2, [{\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n if (typeof args.player.config.cssFullscreen === \"boolean\") {\n args.config.disable = !args.player.config.cssFullscreen;\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this = this;\n _get(_getPrototypeOf(CssFullScreen2.prototype), \"afterCreate\", this).call(this);\n if (this.config.disable) {\n return;\n }\n if (this.config.target) {\n this.playerConfig.fullscreenTarget = this.config.target;\n }\n this.initIcons();\n this.on(CSS_FULLSCREEN_CHANGE, function(isCssfullScreen) {\n _this.animate(isCssfullScreen);\n });\n this.btnClick = this.btnClick.bind(this);\n this.handleCssFullscreen = this.hook(\"cssFullscreen_change\", this.btnClick, {\n pre: function pre(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n });\n this.bind([\"click\", \"touchend\"], this.handleCssFullscreen);\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n var contentIcon = this.find(\".xgplayer-icon\");\n contentIcon.appendChild(icons.cssFullscreen);\n contentIcon.appendChild(icons.exitCssFullscreen);\n }\n }, {\n key: \"btnClick\",\n value: function btnClick(e) {\n e.preventDefault();\n e.stopPropagation();\n var isCssfullScreen = this.player.isCssfullScreen;\n this.emitUserAction(e, \"switch_cssfullscreen\", {\n cssfullscreen: isCssfullScreen\n });\n if (!isCssfullScreen) {\n this.player.getCssFullscreen();\n } else {\n this.player.exitCssFullscreen();\n }\n }\n }, {\n key: \"animate\",\n value: function animate(isFullScreen) {\n if (!this.root) {\n return;\n }\n isFullScreen ? this.setAttr(\"data-state\", \"full\") : this.setAttr(\"data-state\", \"normal\");\n this.switchTips(isFullScreen);\n }\n }, {\n key: \"switchTips\",\n value: function switchTips(isFullScreen) {\n var i18nKeys = this.i18nKeys;\n var tipDom = this.find(\".xg-tips\");\n tipDom && this.changeLangTextKey(tipDom, isFullScreen ? i18nKeys.EXITCSSFULLSCREEN_TIPS : i18nKeys.CSSFULLSCREEN_TIPS);\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n cssFullscreen: {\n icon: CssFullSceenSvg,\n class: \"xg-get-cssfull\"\n },\n exitCssFullscreen: {\n icon: ExitCssFullSceenSvg,\n class: \"xg-exit-cssfull\"\n }\n };\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(CssFullScreen2.prototype), \"destroy\", this).call(this);\n this.unbind([\"click\", \"touchend\"], this.btnClick);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.config.disable) {\n return;\n }\n return `\n
\n
\n `.concat(xgIconTips(this, \"CSSFULLSCREEN_TIPS\", this.playerConfig.isHideTips), \"\\n
\");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"cssFullscreen\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n position: POSITIONS.CONTROLS_RIGHT,\n index: 1,\n disable: false,\n target: null\n };\n }\n }]);\n return CssFullScreen2;\n}(Icon);\nexport { CssFullScreen as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport { ERROR } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar ErrorPlugin = /* @__PURE__ */ function(_Plugin) {\n _inherits(ErrorPlugin2, _Plugin);\n var _super = _createSuper(ErrorPlugin2);\n function ErrorPlugin2() {\n _classCallCheck(this, ErrorPlugin2);\n return _super.apply(this, arguments);\n }\n _createClass(ErrorPlugin2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this = this;\n this.clickHandler = this.hook(\"errorRetry\", this.errorRetry, {\n pre: function pre(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n });\n this.onError = this.hook(\"showError\", this.handleError);\n this.bind(\".xgplayer-error-refresh\", \"click\", this.clickHandler);\n this.on(ERROR, function(error) {\n _this.onError(error);\n });\n }\n }, {\n key: \"errorRetry\",\n value: function errorRetry(e) {\n this.emitUserAction(e, \"error_retry\", {});\n this.player.retry();\n }\n }, {\n key: \"handleError\",\n value: function handleError() {\n var error = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var player = this.player;\n var type = error.errorType;\n var errorNote = player.errorNote ? this.i18n[player.errorNote] : \"\";\n if (!errorNote) {\n switch (type) {\n case \"decoder\":\n errorNote = this.i18n.MEDIA_ERR_DECODE;\n break;\n case \"network\":\n errorNote = this.i18n.MEDIA_ERR_NETWORK;\n break;\n default:\n errorNote = this.i18n.MEDIA_ERR_SRC_NOT_SUPPORTED;\n }\n }\n this.find(\".xgplayer-error-text\").innerHTML = errorNote;\n this.find(\".xgplayer-error-tips\").innerHTML = \"\".concat(this.i18n.REFRESH_TIPS, '').concat(this.i18n.REFRESH, \"\");\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.unbind(\".xgplayer-error-refresh\", \"click\", this.clickHandler);\n }\n }, {\n key: \"render\",\n value: function render() {\n return '\\n
\\n \\n \\n
\\n
';\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"error\";\n }\n }]);\n return ErrorPlugin2;\n}(Plugin);\nexport { ErrorPlugin as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nimport STATE_CLASS from \"../../stateClassMap.js\";\nvar Prompt = /* @__PURE__ */ function(_Plugin) {\n _inherits(Prompt2, _Plugin);\n var _super = _createSuper(Prompt2);\n function Prompt2() {\n _classCallCheck(this, Prompt2);\n return _super.apply(this, arguments);\n }\n _createClass(Prompt2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this = this;\n this.intervalId = 0;\n this.customConfig = null;\n this.bind(\".highlight\", [\"click\", \"touchend\"], function(e) {\n if (_this.config.onClick || _this.customOnClick) {\n e.preventDefault();\n e.stopPropagation();\n _this.customOnClick ? _this.customOnClick(e) : _this.config.onClick(e);\n }\n });\n this.player.showPrompt = function() {\n _this.show.apply(_this, arguments);\n };\n this.player.hidePrompt = function() {\n _this.hide();\n };\n }\n }, {\n key: \"setStyle\",\n value: function setStyle(style) {\n var _this2 = this;\n Object.keys(style).map(function(key) {\n _this2.root.style[key] = style[key];\n });\n }\n }, {\n key: \"show\",\n value: function show(detail) {\n var _this3 = this;\n var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var onClick = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {\n };\n if (!detail) {\n return;\n }\n this.customOnClick = onClick;\n var interval = this.config.interval;\n if (this.intervalId) {\n clearTimeout(this.intervalId);\n this.intervalId = null;\n }\n util.addClass(this.root, \"show\");\n config.mode === \"arrow\" && util.addClass(this.root, \"arrow\");\n if (typeof detail === \"string\") {\n this.find(\".xgplayer-prompt-detail\").innerHTML = detail;\n } else {\n this.find(\".xgplayer-prompt-detail\").innerHTML = \"\".concat(detail.text || \"\") + \"\".concat(detail.highlight ? ''.concat(detail.highlight, \"\") : \"\");\n }\n config.style && this.setStyle(config.style);\n var autoHide = typeof config.autoHide === \"boolean\" ? config.autoHide : this.config.autoHide;\n if (autoHide) {\n var hideinterval = config.interval || interval;\n this.intervalId = setTimeout(function() {\n _this3.hide();\n }, hideinterval);\n }\n }\n }, {\n key: \"hide\",\n value: function hide() {\n util.removeClass(this.root, \"show\");\n util.removeClass(this.root, \"arrow\");\n this.root.removeAttribute(\"style\");\n this.customOnClick = null;\n }\n }, {\n key: \"render\",\n value: function render() {\n return '\\n \\n ');\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"prompt\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n interval: 3e3,\n style: {},\n mode: \"arrow\",\n autoHide: true,\n detail: {\n text: \"\",\n highlight: \"\"\n },\n onClick: function onClick() {\n }\n };\n }\n }]);\n return Prompt2;\n}(Plugin);\nexport { Prompt as default };\n","import util from \"../../utils/util.js\";\nimport { DURATION_CHANGE, VIDEO_RESIZE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport \"delegate\";\nvar ISPOT = {\n time: 0,\n text: \"\",\n id: 1,\n duration: 1,\n color: \"#fff\",\n style: {},\n width: 6,\n height: 6\n};\nfunction mergeISPOT(iSpot) {\n Object.keys(ISPOT).map(function(key) {\n if (iSpot[key] === void 0) {\n iSpot[key] = ISPOT[key];\n }\n });\n}\nvar APIS = {\n _updateDotDom: function _updateDotDom(iSpot, dotDom) {\n if (!dotDom) {\n return;\n }\n var ret = this.calcuPosition(iSpot.time, iSpot.duration);\n var style = iSpot.style || {};\n style.left = \"\".concat(ret.left, \"%\");\n style.width = \"\".concat(ret.width, \"%\");\n dotDom.setAttribute(\"data-text\", iSpot.text);\n dotDom.setAttribute(\"data-time\", iSpot.time);\n if (ret.isMini) {\n util.addClass(dotDom, \"mini\");\n } else {\n util.removeClass(dotDom, \"mini\");\n }\n Object.keys(style).map(function(key) {\n dotDom.style[key] = style[key];\n });\n },\n initDots: function initDots() {\n var _this = this;\n this._ispots.map(function(item) {\n _this.createDot(item, false);\n });\n this.ispotsInit = true;\n },\n createDot: function createDot(iSpot) {\n var isNew = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;\n var progress = this.player.plugins.progress;\n if (!progress) {\n return;\n }\n if (isNew) {\n mergeISPOT(iSpot);\n this._ispots.push(iSpot);\n }\n if (!this.ispotsInit && isNew) {\n return;\n }\n var ret = this.calcuPosition(iSpot.time, iSpot.duration);\n var style = iSpot.style || {};\n style.left = \"\".concat(ret.left, \"%\");\n style.width = \"\".concat(ret.width, \"%\");\n var className = \"xgspot_\".concat(iSpot.id, \" xgplayer-spot\");\n ret.isMini && (className += \" mini\");\n var _t = iSpot.template ? '
'.concat(iSpot.template, \"
\") : \"\";\n var dotDom = util.createDom(\"xg-spot\", _t, {\n \"data-text\": iSpot.text,\n \"data-time\": iSpot.time,\n \"data-id\": iSpot.id\n }, className);\n Object.keys(style).map(function(key) {\n dotDom.style[key] = style[key];\n });\n progress.outer && progress.outer.appendChild(dotDom);\n this.positionDot(dotDom, iSpot.id);\n },\n findDot: function findDot(id) {\n if (!this.player.plugins.progress) {\n return;\n }\n var ret = this._ispots.filter(function(cur, index) {\n return cur.id === id;\n });\n return ret.length > 0 ? ret[0] : null;\n },\n updateDot: function updateDot(iSpot) {\n var needShow = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n var progress = this.player.plugins.progress;\n if (!progress) {\n return;\n }\n var dot = this.findDot(iSpot.id);\n if (dot) {\n Object.keys(iSpot).map(function(key) {\n dot[key] = iSpot[key];\n });\n }\n if (!this.ispotsInit) {\n return;\n }\n var dotDom = progress.find('xg-spot[data-id=\"'.concat(iSpot.id, '\"]'));\n if (!dotDom) {\n return;\n }\n this._updateDotDom(iSpot, dotDom);\n if (needShow) {\n this.showDot(iSpot.id);\n }\n },\n deleteDot: function deleteDot(id) {\n var _ispots = this._ispots;\n var progress = this.player.plugins.progress;\n if (!progress) {\n return;\n }\n var del = [];\n for (var i = 0; i < _ispots.length; i++) {\n if (_ispots[i].id === id) {\n del.push(i);\n }\n }\n var len = del.length;\n for (var _i = len - 1; _i >= 0; _i--) {\n _ispots.splice(del[_i], 1);\n if (this.ispotsInit) {\n var dotDom = progress.find('xg-spot[data-id=\"'.concat(id, '\"]'));\n if (dotDom) {\n dotDom.parentElement.removeChild(dotDom);\n }\n }\n }\n },\n deleteAllDots: function deleteAllDots() {\n var progress = this.player.plugins.progress;\n if (!progress) {\n return;\n }\n if (!this.ispotsInit) {\n this._ispots = [];\n return;\n }\n var dotDoms = progress.root.getElementsByTagName(\"xg-spot\");\n for (var i = dotDoms.length - 1; i >= 0; i--) {\n progress.outer.removeChild(dotDoms[i]);\n }\n this._ispots = [];\n },\n updateAllDots: function updateAllDots() {\n var _this2 = this;\n var iSpots = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];\n var progress = this.player.plugins.progress;\n if (!progress) {\n return;\n }\n if (!this.ispotsInit) {\n this._ispots = iSpots;\n return;\n }\n this._ispots = [];\n var dotDoms = progress.root.getElementsByTagName(\"xg-spot\");\n var len = dotDoms.length;\n if (len > iSpots.length) {\n for (var i = len - 1; i > iSpots.length - 1; i--) {\n progress.outer.removeChild(dotDoms[i]);\n }\n }\n iSpots.forEach(function(ispot, index) {\n if (index < len) {\n dotDoms[index].setAttribute(\"data-id\", \"\".concat(ispot.id));\n _this2._ispots.push(ispot);\n _this2.updateDot(ispot);\n } else {\n _this2.createDot(ispot);\n }\n });\n },\n positionDots: function positionDots() {\n var _this3 = this;\n var _ispots = this._ispots, playerSize = this.playerSize;\n var sizeInfo = this.player.sizeInfo;\n var progress = this.player.plugins.progress;\n if (!progress || sizeInfo.width === playerSize.width) {\n return;\n }\n playerSize.width = sizeInfo.width;\n playerSize.left = sizeInfo.left;\n _ispots.forEach(function(item) {\n var dotDom = progress.find('xg-spot[data-id=\"'.concat(item.id, '\"]'));\n dotDom && _this3.positionDot(dotDom, item.id);\n });\n },\n positionDot: function positionDot(dotDom, id) {\n var _pop = util.findDom(dotDom, \".xgplayer-spot-pop\");\n if (!_pop) {\n return;\n }\n var pRect = this.playerSize;\n var rect1 = dotDom.getBoundingClientRect();\n var rect = _pop.getBoundingClientRect();\n var _left = rect1.left - pRect.left;\n var _diff = pRect.width - _left - rect1.width / 2;\n if (_left < rect.width / 2 || pRect.width < rect.width) {\n var t = rect.width / 2 - _left;\n _pop.style.left = \"\".concat(t, \"px\");\n } else if (_diff < rect.width / 2) {\n var _t2 = _diff - rect.width / 2 + rect1.width / 2;\n _pop.style.left = \"\".concat(_t2, \"px\");\n } else {\n _pop.style.left = \"50%\";\n }\n },\n updateDuration: function updateDuration() {\n var _this4 = this;\n var progress = this.player.plugins.progress;\n if (!progress) {\n return;\n }\n var _ispots = this._ispots;\n _ispots.forEach(function(item) {\n var dotDom = progress.find('xg-spot[data-id=\"'.concat(item.id, '\"]'));\n _this4._updateDotDom(item, dotDom);\n });\n },\n getAllDotsDom: function getAllDotsDom() {\n var progress = this.player.plugins.progress;\n if (!progress) {\n return [];\n }\n var dotDoms = progress.root.getElementsByTagName(\"xg-spot\");\n return dotDoms;\n },\n getDotDom: function getDotDom(id) {\n var progress = this.player.plugins.progress;\n if (!progress) {\n return;\n }\n return progress.find('xg-spot[data-id=\"'.concat(id, '\"]'));\n }\n};\nfunction initDotsAPI(plugin) {\n var config = plugin.config, player = plugin.player;\n Object.keys(APIS).map(function(item) {\n plugin[item] = APIS[item].bind(plugin);\n });\n var ispots = player.config.progressDot || config.ispots || [];\n plugin._ispots = ispots.map(function(item) {\n mergeISPOT(item);\n return item;\n });\n plugin.ispotsInit = false;\n plugin.playerSize = {\n left: player.sizeInfo.left,\n width: player.sizeInfo.width\n };\n plugin.on(DURATION_CHANGE, function() {\n if (!plugin.ispotsInit) {\n plugin.initDots();\n } else {\n plugin.updateDuration();\n }\n });\n plugin.on(VIDEO_RESIZE, function() {\n plugin.positionDots();\n });\n}\nexport { initDotsAPI as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport { DURATION_CHANGE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nimport initDotsAPI from \"./dotsApi.js\";\nvar CALLBACK_MAP = {\n dragmove: \"onProgressMove\",\n dragstart: \"onProgressDragStart\",\n dragend: \"onProgressDragEnd\",\n click: \"onProgressClick\",\n mouseover: \"onProgressMouseOver\",\n mouseenter: \"onProgressMouseOver\"\n};\nvar ProgressPreview = /* @__PURE__ */ function(_Plugin) {\n _inherits(ProgressPreview2, _Plugin);\n var _super = _createSuper(ProgressPreview2);\n function ProgressPreview2(args) {\n var _this;\n _classCallCheck(this, ProgressPreview2);\n _this = _super.call(this, args);\n _defineProperty(_assertThisInitialized(_this), \"onMousemove\", function(e) {\n if (_this.config.disable) {\n return;\n }\n if (util.hasClass(e.target, \"xg-spot-content\") && _this.config.isHideThumbnailHover) {\n _this.player.plugins.progress.onMouseLeave(e);\n return;\n }\n if (_this._state.f || util.hasClass(e.target, \"xg-spot-content\")) {\n util.event(e);\n e.stopPropagation();\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onMousedown\", function(e) {\n if (_this.config.disable) {\n return;\n }\n if (_this._state.f || util.hasClass(e.target, \"xg-spot-content\")) {\n util.event(e);\n e.stopPropagation();\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onMouseup\", function(e) {\n if (!_this.isDrag) {\n return;\n }\n var progress = _this.player.plugins.progress;\n if (progress && progress.pos) {\n progress.onMouseUp(e);\n !progress.pos.isEnter && progress.onMouseLeave(e);\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"onDotMouseLeave\", function(e) {\n if (_this.config.disable) {\n return;\n }\n _this._curDot.removeEventListener(\"mouseleave\", _this.onDotMouseLeave);\n _this.blurDot(e.target);\n _this._curDot = null;\n var progress = _this.player.plugins.progress;\n progress && progress.enableBlur();\n _this.show();\n });\n _defineProperty(_assertThisInitialized(_this), \"onProgressMouseOver\", function(data, e) {\n if (_this.config.disable) {\n return;\n }\n if (util.hasClass(e.target, \"xgplayer-spot\") && !_this._curDot) {\n _this._curDot = e.target;\n _this.focusDot(e.target);\n if (_this._curDot.children.length > 0) {\n _this.hide();\n }\n var progress = _this.player.plugins.progress;\n progress && progress.disableBlur();\n _this._curDot.addEventListener(\"mouseleave\", _this.onDotMouseLeave);\n }\n });\n _this._ispots = [];\n _this.videoPreview = null;\n _this.videothumbnail = null;\n _this.thumbnail = null;\n _this.timeStr = \"\";\n _this._state = {\n now: 0,\n f: false\n };\n return _this;\n }\n _createClass(ProgressPreview2, [{\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n var progress = args.player.plugins.progress;\n if (progress) {\n args.root = progress.root;\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n this._curDot = null;\n this.handlerSpotClick = this.hook(\"spotClick\", function(_event, data) {\n if (data.seekTime) {\n _this2.player.seek(data.seekTime);\n }\n });\n this.transformTimeHook = this.hook(\"transformTime\", function(time) {\n _this2.setTimeContent(time);\n });\n initDotsAPI(this);\n this.on(DURATION_CHANGE, function() {\n _this2.show();\n });\n if (this.config.disable) {\n this.disable();\n }\n this.extTextRoot = this.find(\".xg-spot-ext-text\");\n }\n }, {\n key: \"setConfig\",\n value: function setConfig(config) {\n var _this3 = this;\n if (!config) {\n return;\n }\n Object.keys(config).map(function(key) {\n _this3.config[key] = config[key];\n });\n }\n }, {\n key: \"onPluginsReady\",\n value: function onPluginsReady() {\n var player = this.player;\n if (!player.plugins.progress) {\n return;\n }\n this.previewLine = this.find(\".xg-spot-line\");\n this.timePoint = this.find(\".xgplayer-progress-point\");\n this.timeText = this.find(\".xg-spot-time\");\n this.tipText = this.find(\".spot-inner-text\");\n this._hasThumnail = false;\n this.registerThumbnail();\n this.bindEvents();\n }\n }, {\n key: \"bindEvents\",\n value: function bindEvents() {\n var _this4 = this;\n var progress = this.player.plugins.progress;\n if (!progress) {\n return;\n }\n Object.keys(CALLBACK_MAP).map(function(key) {\n _this4[CALLBACK_MAP[key]] = _this4[CALLBACK_MAP[key]].bind(_this4);\n progress.addCallBack(key, _this4[CALLBACK_MAP[key]]);\n });\n if (sniffer.device === \"mobile\")\n return;\n this.bind(\".xg-spot-info\", \"mousemove\", this.onMousemove);\n this.bind(\".xg-spot-info\", \"mousedown\", this.onMousedown);\n this.bind(\".xg-spot-info\", \"mouseup\", this.onMouseup);\n var fun = this.hook(\"previewClick\", function() {\n });\n this.handlerPreviewClick = function(e) {\n e.stopPropagation();\n fun(parseInt(_this4._state.now * 1e3, 10) / 1e3, e);\n };\n this.bind(\".xg-spot-content\", \"mouseup\", this.handlerPreviewClick);\n }\n }, {\n key: \"onProgressMove\",\n value: function onProgressMove(data, e) {\n if (this.config.disable || !this.player.duration) {\n return;\n }\n this.updatePosition(data.offset, data.width, data.currentTime, data.e);\n }\n }, {\n key: \"onProgressDragStart\",\n value: function onProgressDragStart(data) {\n if (this.config.disable || !this.player.duration) {\n return;\n }\n this.isDrag = true;\n this.videoPreview && util.addClass(this.videoPreview, \"show\");\n }\n }, {\n key: \"onProgressDragEnd\",\n value: function onProgressDragEnd(data) {\n if (this.config.disable || !this.player.duration) {\n return;\n }\n this.isDrag = false;\n this.videoPreview && util.removeClass(this.videoPreview, \"show\");\n }\n }, {\n key: \"onProgressClick\",\n value: function onProgressClick(data, e) {\n if (this.config.disable) {\n return;\n }\n if (util.hasClass(e.target, \"xgplayer-spot\")) {\n e.stopPropagation();\n e.preventDefault();\n [\"time\", \"id\", \"text\"].map(function(key) {\n data[key] = e.target.getAttribute(\"data-\".concat(key));\n });\n data.time && (data.time = Number(data.time));\n this.handlerSpotClick(e, data);\n }\n }\n }, {\n key: \"updateLinePos\",\n value: function updateLinePos(offset, cwidth) {\n var root = this.root, previewLine = this.previewLine, player = this.player, config = this.config;\n var mode = player.controls.mode;\n var isflex = mode === \"flex\";\n var lwidth = root.getBoundingClientRect().width;\n if (!lwidth && this._hasThumnail) {\n return;\n }\n lwidth = this._hasThumnail && lwidth < config.width ? config.width : lwidth;\n var x = offset - lwidth / 2;\n var _t;\n if (x < 0 && !isflex) {\n x = 0;\n _t = offset - lwidth / 2;\n } else if (x > cwidth - lwidth && !isflex) {\n _t = x - (cwidth - lwidth);\n x = cwidth - lwidth;\n } else {\n _t = 0;\n }\n _t !== void 0 && (previewLine.style.transform = \"translateX(\".concat(_t.toFixed(2), \"px)\"));\n root.style.transform = \"translateX(\".concat(x.toFixed(2), \"px) translateZ(0)\");\n }\n }, {\n key: \"updateTimeText\",\n value: function updateTimeText(timeStr) {\n var timeText = this.timeText, timePoint = this.timePoint;\n timeText.innerHTML = timeStr;\n !this.thumbnail && (timePoint.innerHTML = timeStr);\n }\n }, {\n key: \"updatePosition\",\n value: function updatePosition(offset, cwidth, time, e) {\n var root = this.root, config = this.config, _state = this._state;\n if (!root) {\n return;\n }\n _state.now = time;\n this.transformTimeHook(time);\n var timeStr = this.timeStr;\n if (e && e.target && util.hasClass(e.target, \"xgplayer-spot\")) {\n this.showTips(e.target.getAttribute(\"data-text\"), false, timeStr);\n this.focusDot(e.target);\n _state.f = true;\n config.isFocusDots && _state.f && (_state.now = parseInt(e.target.getAttribute(\"data-time\"), 10));\n } else if (config.defaultText) {\n _state.f = false;\n this.showTips(config.defaultText, true, timeStr);\n } else {\n _state.f = false;\n this.hideTips(\"\");\n }\n this.updateTimeText(timeStr);\n this.updateThumbnails(_state.now);\n this.updateLinePos(offset, cwidth);\n }\n }, {\n key: \"setTimeContent\",\n value: function setTimeContent(time) {\n this.timeStr = \"\".concat(util.format(time));\n }\n }, {\n key: \"updateThumbnails\",\n value: function updateThumbnails(time) {\n var player = this.player, videoPreview = this.videoPreview, config = this.config;\n var thumbnail = player.plugins.thumbnail;\n if (thumbnail && thumbnail.usable) {\n this.thumbnail && thumbnail.update(this.thumbnail, time, config.width, config.height);\n var rect = videoPreview && videoPreview.getBoundingClientRect();\n this.videothumbnail && thumbnail.update(this.videothumbnail, time, rect.width, rect.height);\n }\n }\n }, {\n key: \"registerThumbnail\",\n value: function registerThumbnail() {\n var thumbnailConfig = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n if (sniffer.device === \"mobile\") {\n return;\n }\n var player = this.player, config = this.config;\n var thumbnail = player.getPlugin(\"thumbnail\");\n if (thumbnail) {\n thumbnail.setConfig(thumbnailConfig);\n }\n if (!thumbnail || !thumbnail.usable || !config.isShowThumbnail) {\n util.addClass(this.root, \"short-line no-thumbnail\");\n return;\n } else {\n util.removeClass(this.root, \"short-line no-thumbnail\");\n }\n if (config.mode === \"short\") {\n util.addClass(this.root, \"short-line\");\n }\n this._hasThumnail = true;\n var tRoot = this.find(\".xg-spot-thumbnail\");\n this.thumbnail = thumbnail.createThumbnail(tRoot, \"progress-thumbnail\");\n if (config.isShowCoverPreview) {\n this.videoPreview = util.createDom(\"xg-video-preview\", \"\", {}, \"xgvideo-preview\");\n player.root.appendChild(this.videoPreview);\n this.videothumbnail = thumbnail.createThumbnail(this.videoPreview, \"xgvideo-thumbnail\");\n }\n this.updateThumbnails(0);\n }\n }, {\n key: \"calcuPosition\",\n value: function calcuPosition(time, duration) {\n var progress = this.player.plugins.progress;\n var player = this.player;\n var totalWidth = progress.root.getBoundingClientRect().width;\n var widthPerSeconds = player.duration / totalWidth * 6;\n if (time + duration > player.duration) {\n duration = player.duration - time;\n }\n time / player.duration * 100;\n duration / player.duration;\n return {\n left: time / player.duration * 100,\n width: duration / player.duration * 100,\n isMini: duration < widthPerSeconds\n };\n }\n }, {\n key: \"showDot\",\n value: function showDot(id) {\n var dot = this.findDot(id);\n if (dot) {\n var rect = this.root.getBoundingClientRect();\n var width = rect.width;\n var offset = dot.time / this.player.duration * width;\n this.updatePosition(offset, width, dot.time);\n }\n }\n }, {\n key: \"focusDot\",\n value: function focusDot(target, id) {\n if (!target) {\n return;\n }\n if (!id) {\n id = target.getAttribute(\"data-id\");\n }\n util.addClass(target, \"active\");\n this._activeDotId = id;\n }\n }, {\n key: \"blurDot\",\n value: function blurDot(target) {\n if (!target) {\n var id = this._activeDotId;\n target = this.getDotDom(id);\n }\n if (!target) {\n return;\n }\n util.removeClass(target, \"active\");\n this._activeDotId = null;\n }\n }, {\n key: \"showTips\",\n value: function showTips(text, isDefault) {\n var timeStr = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : \"\";\n util.addClass(this.root, \"no-timepoint\");\n if (!text) {\n return;\n }\n util.addClass(this.find(\".xg-spot-content\"), \"show-text\");\n if (isDefault && this.config.mode === \"production\") {\n util.addClass(this.root, \"product\");\n this.tipText.textContent = text;\n } else {\n util.removeClass(this.root, \"product\");\n this.tipText.textContent = this._hasThumnail ? text : \"\".concat(timeStr, \" \").concat(text);\n }\n }\n }, {\n key: \"hideTips\",\n value: function hideTips() {\n util.removeClass(this.root, \"no-timepoint\");\n this.tipText.textContent = \"\";\n util.removeClass(this.find(\".xg-spot-content\"), \"show-text\");\n util.removeClass(this.root, \"product\");\n }\n }, {\n key: \"hide\",\n value: function hide() {\n util.addClass(this.root, \"hide\");\n }\n }, {\n key: \"show\",\n value: function show() {\n util.removeClass(this.root, \"hide\");\n }\n }, {\n key: \"enable\",\n value: function enable() {\n var config = this.config, playerConfig = this.playerConfig;\n this.config.disable = false;\n this.show();\n if (!this.thumbnail && config.isShowThumbnail) {\n this.registerThumbnail(playerConfig.thumbnail || {});\n }\n }\n }, {\n key: \"disable\",\n value: function disable() {\n this.config.disable = true;\n this.hide();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this5 = this;\n var progress = this.player.plugins.progress;\n progress && Object.keys(CALLBACK_MAP).map(function(key) {\n progress.removeCallBack(key, _this5[CALLBACK_MAP[key]]);\n });\n this.videothumbnail = null;\n this.thumbnail = null;\n this.videoPreview && this.player.root.removeChild(this.videoPreview);\n this.unbind(\".xg-spot-info\", \"mousemove\", this.onMousemove);\n this.unbind(\".xg-spot-info\", \"mousedown\", this.onMousedown);\n this.unbind(\".xg-spot-info\", \"mouseup\", this.onMouseup);\n this.unbind(\".xg-spot-content\", \"mouseup\", this.handlerPreviewClick);\n }\n }, {\n key: \"render\",\n value: function render() {\n if (sniffer.device === \"mobile\" || this.playerConfig.isMobileSimulateMode === \"mobile\") {\n return \"\";\n }\n return '
\\n
\\n
\\n \\n
\\n
\\n
\\n
00:00
\\n
\\n
\\n
');\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"progresspreview\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n index: 1,\n miniWidth: 6,\n ispots: [],\n defaultText: \"\",\n isFocusDots: true,\n isHideThumbnailHover: true,\n isShowThumbnail: true,\n isShowCoverPreview: false,\n mode: \"\",\n disable: false,\n width: 160,\n height: 90\n };\n }\n }]);\n return ProgressPreview2;\n}(Plugin);\nexport { ProgressPreview as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { DURATION_CHANGE } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar Thumbnail = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(Thumbnail2, _BasePlugin);\n var _super = _createSuper(Thumbnail2);\n function Thumbnail2(args) {\n var _this;\n _classCallCheck(this, Thumbnail2);\n _this = _super.call(this, args);\n _this.ratio = 1;\n _this.interval = null;\n _this._preloadMark = {};\n return _this;\n }\n _createClass(Thumbnail2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n if (this.usable) {\n this.initThumbnail();\n }\n this.on([DURATION_CHANGE], function() {\n var _this2$config = _this2.config, pic_num = _this2$config.pic_num, interval = _this2$config.interval;\n _this2.usable && (_this2.interval = interval > 0 ? interval : Math.round(_this2.player.duration * 1e3 / pic_num) / 1e3);\n });\n }\n }, {\n key: \"setConfig\",\n value: function setConfig(config) {\n var _this3 = this;\n if (!config) {\n return;\n }\n var keys = Object.keys(config);\n if (keys.length < 1) {\n return;\n }\n keys.forEach(function(key) {\n _this3.config[key] = config[key];\n });\n this.usable && this.initThumbnail();\n }\n }, {\n key: \"usable\",\n get: function get() {\n var _this$config = this.config, urls = _this$config.urls, pic_num = _this$config.pic_num;\n return urls && urls.length > 0 && pic_num > 0;\n }\n }, {\n key: \"initThumbnail\",\n value: function initThumbnail() {\n var _this$config2 = this.config, width = _this$config2.width, height = _this$config2.height, pic_num = _this$config2.pic_num, interval = _this$config2.interval;\n this.ratio = width / height * 100;\n this.interval = interval || Math.round(this.player.duration / pic_num);\n this._preloadMark = {};\n }\n }, {\n key: \"getUrlByIndex\",\n value: function getUrlByIndex(index) {\n return index >= 0 && index < this.config.urls.length ? this.config.urls[index] : \"\";\n }\n }, {\n key: \"preload\",\n value: function preload(index) {\n var _this4 = this;\n if (this._preloadMark[index]) {\n return;\n }\n var urls = this.config.urls;\n var len = urls.length;\n var arr = [];\n index > 0 && arr.push(index - 1);\n arr.push(index);\n index > 0 && index < len - 1 && arr.push(index + 1);\n arr.map(function(item) {\n if (!_this4._preloadMark[item] && item >= 0 && item < len) {\n _this4._preloadMark[item] = 1;\n util.preloadImg(urls[item], function() {\n _this4._preloadMark[item] = 2;\n });\n }\n });\n }\n }, {\n key: \"getPosition\",\n value: function getPosition(now) {\n var containerWidth = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n var containerHeight = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;\n var _this$config3 = this.config, pic_num = _this$config3.pic_num, row = _this$config3.row, col = _this$config3.col, width = _this$config3.width, height = _this$config3.height;\n this.interval = Math.round(this.player.duration / pic_num);\n var index = Math.ceil(now / this.interval);\n index = index > pic_num ? pic_num : index;\n var urlIndex = index < row * col ? 0 : Math.ceil(index / (row * col)) - 1;\n var indexInPage = index - urlIndex * (col * row);\n var rowIndex = indexInPage > 0 ? Math.ceil(indexInPage / col) - 1 : 0;\n var colIndex = indexInPage > 0 ? indexInPage - rowIndex * col - 1 : 0;\n var swidth = 0;\n var sHeight = 0;\n if (containerWidth && containerHeight) {\n var per = containerWidth / containerHeight;\n if (per < width / height) {\n sHeight = containerHeight;\n swidth = sHeight * (width / height);\n } else {\n swidth = containerWidth;\n sHeight = swidth / (width / height);\n }\n } else if (!containerHeight) {\n swidth = containerWidth || width;\n sHeight = swidth / (width / height);\n } else if (!containerWidth) {\n sHeight = containerHeight || height;\n swidth = sHeight * (width / height);\n }\n var url = this.getUrlByIndex(urlIndex);\n return {\n urlIndex,\n rowIndex,\n colIndex,\n url,\n height: sHeight,\n width: swidth,\n style: {\n backgroundImage: \"url(\".concat(url, \")\"),\n backgroundSize: \"\".concat(swidth * col, \"px auto\"),\n backgroundPosition: \"-\".concat(colIndex * swidth, \"px -\").concat(rowIndex * sHeight, \"px\"),\n width: \"\".concat(swidth, \"px\"),\n height: \"\".concat(sHeight, \"px\")\n }\n };\n }\n }, {\n key: \"update\",\n value: function update(dom, now) {\n var containerWidth = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;\n var containerHeight = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;\n var customStyle = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : \"\";\n var _this$config4 = this.config, pic_num = _this$config4.pic_num, urls = _this$config4.urls;\n if (pic_num <= 0 || !urls || urls.length === 0) {\n return;\n }\n var pos = this.getPosition(now, containerWidth, containerHeight);\n this.preload(pos.urlIndex);\n Object.keys(pos.style).map(function(key) {\n dom.style[key] = pos.style[key];\n });\n Object.keys(customStyle).map(function(key) {\n dom.style[key] = customStyle[key];\n });\n }\n }, {\n key: \"changeConfig\",\n value: function changeConfig() {\n var newConfig = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n this.setConfig(newConfig);\n }\n }, {\n key: \"createThumbnail\",\n value: function createThumbnail(root, className) {\n var dom = util.createDom(\"xg-thumbnail\", \"\", {}, \"thumbnail \".concat(className));\n root && root.appendChild(dom);\n return dom;\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"thumbnail\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n isShow: false,\n urls: [],\n pic_num: 0,\n col: 0,\n row: 0,\n height: 90,\n width: 160,\n scale: 1,\n className: \"\",\n hidePortrait: false\n };\n }\n }]);\n return Thumbnail2;\n}(Plugin);\nexport { Thumbnail as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar MiniProgress = /* @__PURE__ */ function(_Plugin) {\n _inherits(MiniProgress2, _Plugin);\n var _super = _createSuper(MiniProgress2);\n function MiniProgress2() {\n _classCallCheck(this, MiniProgress2);\n return _super.apply(this, arguments);\n }\n _createClass(MiniProgress2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n }\n }, {\n key: \"update\",\n value: function update() {\n var data = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {\n cached: 0,\n played: 0\n };\n var duration = arguments.length > 1 ? arguments[1] : void 0;\n if (!duration || !this.root) {\n return;\n }\n if (data.cached) {\n this.find(\"xg-mini-progress-cache\").style.width = \"\".concat(data.cached / duration * 100, \"%\");\n }\n if (data.played) {\n this.find(\"xg-mini-progress-played\").style.width = \"\".concat(data.played / duration * 100, \"%\");\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!this.playerConfig.progress || !this.playerConfig.miniprogress) {\n return;\n }\n return '\\n \\n \\n ';\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"MiniProgress\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {};\n }\n }]);\n return MiniProgress2;\n}(Plugin);\nexport { MiniProgress as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport sniffer from \"../../utils/sniffer.js\";\nimport { TIME_UPDATE, COMPLETE, EMPTIED, PLAY, PAUSE, LOADED_DATA, LOAD_START } from \"../../events.js\";\nimport XG_DEBUG from \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar MODES = {\n REAL_TIME: \"realtime\",\n FIRST_FRAME: \"firstframe\",\n FRAME_RATE: \"framerate\",\n POSTER: \"poster\"\n};\nfunction nowTime() {\n try {\n return parseInt(window.performance.now(), 10);\n } catch (e) {\n return new Date().getTime();\n }\n}\nfunction checkIsSupportCanvas() {\n try {\n var ctx = document.createElement(\"canvas\").getContext;\n if (ctx) {\n return true;\n }\n return false;\n } catch (e) {\n return false;\n }\n}\nvar isSupportCanvas = null;\nvar DynamicBg = /* @__PURE__ */ function(_Plugin) {\n _inherits(DynamicBg2, _Plugin);\n var _super = _createSuper(DynamicBg2);\n function DynamicBg2() {\n var _this;\n _classCallCheck(this, DynamicBg2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onLoadedData\", function(e) {\n if (!_this.player) {\n return;\n }\n _this._frameCount = _this.config.startFrameCount;\n _this.renderOnTimeupdate(e);\n _this.off(TIME_UPDATE, _this.renderOnTimeupdate);\n _this.on(TIME_UPDATE, _this.renderOnTimeupdate);\n });\n _defineProperty(_assertThisInitialized(_this), \"renderOnTimeupdate\", function(e) {\n if (_this._frameCount > 0) {\n _this.renderOnce();\n _this._frameCount--;\n } else {\n _this._isLoaded = true;\n _this.off(TIME_UPDATE, _this.renderOnTimeupdate);\n !_this.player.paused && _this._checkIfCanStart() && _this.start();\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"start\", function() {\n var video = _this.player.media;\n var _now = nowTime();\n var _sVideo = _this.checkVideoIsSupport(video);\n if (!_sVideo || !_this.canvasCtx) {\n return;\n }\n _this.stop();\n if (video.videoWidth && video.videoHeight) {\n _this.videoPI = video.videoHeight > 0 ? parseInt(video.videoWidth / video.videoHeight * 100, 10) : 0;\n if (_this.config.mode === MODES.REAL_TIME) {\n video && video.videoWidth && _this.update(_sVideo, _this.videoPI);\n _this.preTime = _now;\n } else if (_now - _this.preTime >= _this.interval) {\n video && video.videoWidth && _this.update(_sVideo, _this.videoPI);\n _this.preTime = _now;\n }\n }\n _this.frameId = util.requestAnimationFrame(_this.start);\n });\n _defineProperty(_assertThisInitialized(_this), \"stop\", function() {\n if (_this.frameId) {\n util.cancelAnimationFrame(_this.frameId);\n _this.frameId = null;\n }\n });\n return _this;\n }\n _createClass(DynamicBg2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n if (this.playerConfig.dynamicBg === true) {\n this.config.disable = false;\n }\n if (!DynamicBg2.isSupport) {\n this.config.disable = true;\n }\n var _this$config = this.config, disable = _this$config.disable, mode = _this$config.mode, frameRate = _this$config.frameRate;\n if (disable) {\n return;\n }\n this._pos = {\n width: 0,\n height: 0,\n rwidth: 0,\n rheight: 0,\n x: 0,\n y: 0,\n pi: 0\n };\n this.isStart = false;\n this._isLoaded = false;\n this.videoPI = 0;\n this.preTime = 0;\n this.interval = parseInt(1e3 / frameRate, 10);\n this.canvas = null;\n this.canvasCtx = null;\n this._frameCount = 0;\n this.once(COMPLETE, function() {\n if (!_this2.player) {\n return;\n }\n _this2.init();\n if (!_this2.player.paused) {\n _this2.start();\n }\n });\n if (mode === MODES.POSTER) {\n return;\n }\n if (mode !== MODES.FIRST_FRAME) {\n this.on(EMPTIED, function() {\n _this2.stop();\n });\n this.on(PLAY, function() {\n _this2._checkIfCanStart() && _this2.start();\n });\n this.on(PAUSE, function() {\n _this2.stop();\n });\n }\n this.on(LOADED_DATA, this.onLoadedData);\n this.on(LOAD_START, function() {\n _this2._isLoaded = false;\n _this2.stop();\n });\n }\n }, {\n key: \"init\",\n value: function init() {\n var player = this.player, config = this.config;\n this.canvasFilter = DynamicBg2.supportCanvasFilter();\n try {\n var parent = !this.config.isInnerRender ? player.root : player.innerContainer || player.root;\n parent.insertAdjacentHTML(\"afterbegin\", '
\\n
'));\n this.root = parent.children[0];\n this.canvas = this.find(\"canvas\");\n if (!this.canvasFilter) {\n this.canvas.style.filter = config.filter;\n this.canvas.style.webkitFilter = config.filter;\n }\n this.mask = this.find(\"xgmask\");\n config.addMask && (this.mask.style.background = config.maskBg);\n this.canvasCtx = this.canvas.getContext(\"2d\");\n this.renderByPoster();\n } catch (e) {\n XG_DEBUG.logError(\"plugin:DynamicBg\", e);\n }\n }\n }, {\n key: \"checkVideoIsSupport\",\n value: function checkVideoIsSupport(video) {\n if (!video) {\n return null;\n }\n var _tVideo = video && video instanceof window.HTMLVideoElement ? video : video.canvas ? video.canvas : video.flyVideo ? video.flyVideo : null;\n if (_tVideo && !(sniffer.browser === \"safari\" && util.isMSE(_tVideo))) {\n return _tVideo;\n }\n var _tagName = _tVideo ? _tVideo.tagName.toLowerCase() : \"\";\n if (_tagName === \"canvas\" || _tagName === \"img\") {\n return _tVideo;\n }\n return null;\n }\n }, {\n key: \"renderByPoster\",\n value: function renderByPoster() {\n var poster = this.playerConfig.poster;\n if (poster) {\n var url = util.typeOf(poster) === \"String\" ? poster : util.typeOf(poster.poster) === \"String\" ? poster.poster : null;\n this.updateImg(url);\n }\n }\n }, {\n key: \"_checkIfCanStart\",\n value: function _checkIfCanStart() {\n var mode = this.config.mode;\n return this._isLoaded && mode !== MODES.FIRST_FRAME && mode !== MODES.POSTER;\n }\n }, {\n key: \"renderOnce\",\n value: function renderOnce() {\n var video = this.player.media;\n if (!video.videoWidth || !video.videoHeight) {\n return;\n }\n this.videoPI = parseInt(video.videoWidth / video.videoHeight * 100, 10);\n var _sVideo = this.checkVideoIsSupport(video);\n _sVideo && video.videoWidth && this.update(_sVideo, this.videoPI);\n }\n }, {\n key: \"updateImg\",\n value: function updateImg(url) {\n var _this3 = this;\n if (!url) {\n return;\n }\n var _this$canvas$getBound = this.canvas.getBoundingClientRect(), width = _this$canvas$getBound.width, height = _this$canvas$getBound.height;\n var image = new window.Image();\n image.onload = function() {\n if (!_this3.canvas || _this3.frameId || _this3.isStart) {\n return;\n }\n _this3.canvas.height = height;\n _this3.canvas.width = width;\n var pi = parseInt(width / height * 100, 10);\n _this3.update(image, pi);\n image = null;\n };\n image.src = url;\n }\n }, {\n key: \"update\",\n value: function update(video, sourcePI) {\n if (!this.canvas || !this.canvasCtx || !sourcePI) {\n return;\n }\n try {\n var _pos = this._pos, config = this.config;\n var _this$canvas$getBound2 = this.canvas.getBoundingClientRect(), width = _this$canvas$getBound2.width, height = _this$canvas$getBound2.height;\n if (width !== _pos.width || height !== _pos.height || _pos.pi !== sourcePI) {\n var pi = parseInt(width / height * 100, 10);\n _pos.pi = sourcePI;\n _pos.width = this.canvas.width = width;\n _pos.height = this.canvas.height = height;\n var rheight = height;\n var rwidth = width;\n if (pi < sourcePI) {\n rwidth = parseInt(height * sourcePI / 100, 10);\n } else if (pi > sourcePI) {\n rheight = parseInt(width * 100 / sourcePI, 10);\n }\n _pos.rwidth = rwidth * config.multiple;\n _pos.rheight = rheight * config.multiple;\n _pos.x = (width - _pos.rwidth) / 2;\n _pos.y = (height - _pos.rheight) / 2;\n }\n this.canvasFilter && (this.canvasCtx.filter = config.filter);\n this.canvasCtx.drawImage(video, _pos.x, _pos.y, _pos.rwidth, _pos.rheight);\n } catch (e) {\n XG_DEBUG.logError(\"plugin:DynamicBg\", e);\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.stop();\n this.canvasCtx = null;\n this.canvas = null;\n }\n }, {\n key: \"render\",\n value: function render() {\n return \"\";\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"dynamicBg\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n isInnerRender: false,\n disable: true,\n index: -1,\n mode: \"framerate\",\n frameRate: 10,\n filter: \"blur(50px)\",\n startFrameCount: 2,\n addMask: true,\n multiple: 1.2,\n maskBg: \"rgba(0,0,0,0.7)\"\n };\n }\n }, {\n key: \"isSupport\",\n get: function get() {\n if (typeof isSupportCanvas === \"boolean\") {\n return isSupportCanvas;\n }\n isSupportCanvas = checkIsSupportCanvas();\n return isSupportCanvas;\n }\n }, {\n key: \"supportCanvasFilter\",\n value: function supportCanvasFilter() {\n return !(sniffer.browser === \"safari\" || sniffer.browser === \"firefox\");\n }\n }]);\n return DynamicBg2;\n}(Plugin);\nexport { DynamicBg as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, objectSpread2 as _objectSpread2, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport { USER_ACTION, STATS_EVENTS as STATS_EVENTS$1 } from \"../../events.js\";\nimport BasePlugin from \"../../plugin/basePlugin.js\";\nimport \"delegate\";\nvar INFO = \"info\";\nvar STATS_EVENTS = STATS_EVENTS$1;\nvar Stats = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(Stats2, _BasePlugin);\n var _super = _createSuper(Stats2);\n function Stats2() {\n var _this;\n _classCallCheck(this, Stats2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"_recordUserActions\", function(actionData) {\n var time = _this._getTime();\n var payload = Object.assign({}, actionData, {\n msg: actionData.msg || actionData.action\n });\n _this._stats[INFO].push(_objectSpread2(_objectSpread2({\n type: \"userAction\"\n }, time), {}, {\n payload\n }));\n });\n _defineProperty(_assertThisInitialized(_this), \"_onReset\", function() {\n _this.reset();\n });\n _defineProperty(_assertThisInitialized(_this), \"_recordInfo\", function(data) {\n _this.info(data);\n });\n _defineProperty(_assertThisInitialized(_this), \"_downloadStats\", function() {\n var stats = _this.getStats();\n var blob = new Blob([JSON.stringify(stats)], {\n type: \"application/json\"\n });\n var downloadUrl = window.URL.createObjectURL(blob);\n var link = document.createElement(\"a\");\n link.style.display = \"none\";\n link.href = downloadUrl;\n link.download = \"player.txt\";\n link.disabled = false;\n link.click();\n });\n return _this;\n }\n _createClass(Stats2, [{\n key: \"_getTime\",\n value: function _getTime() {\n return {\n timestamp: Date.now(),\n timeFormat: new Date().toISOString()\n };\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n this.reset();\n this.on(USER_ACTION, this._recordUserActions);\n this.on(STATS_EVENTS.STATS_INFO, this._recordInfo);\n this.on(STATS_EVENTS.STATS_DOWNLOAD, this._downloadStats);\n this.on(STATS_EVENTS.STATS_RESET, this._onReset);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.offAll();\n }\n }, {\n key: \"downloadStats\",\n value: function downloadStats() {\n this._downloadStats();\n }\n }, {\n key: \"info\",\n value: function info(data) {\n if (data.profile) {\n this._infoProfile(data);\n } else {\n this._info(data);\n }\n }\n }, {\n key: \"_info\",\n value: function _info(data) {\n var time = this._getTime();\n this._stats[INFO].push(_objectSpread2(_objectSpread2({}, time), {}, {\n payload: data\n }));\n }\n }, {\n key: \"_infoProfile\",\n value: function _infoProfile(data) {\n if (data && data.startMs) {\n var endMs = Date.now();\n var dur = endMs - data.startMs;\n var profile = _objectSpread2({\n cat: \"function\",\n dur,\n name: data.name || data.msg,\n ph: \"X\",\n pid: 0,\n tid: 0,\n ts: data.startMs,\n profile: true\n }, data);\n this._info(profile);\n } else {\n console.warn(\"infoProfile need object data, include startMs\");\n }\n }\n }, {\n key: \"reset\",\n value: function reset() {\n var _this$_stats;\n this._stats = (_this$_stats = {}, _defineProperty(_this$_stats, INFO, []), _defineProperty(_this$_stats, \"media\", {}), _this$_stats);\n }\n }, {\n key: \"getStats\",\n value: function getStats() {\n var player = this.player;\n var mediaElem = player.media;\n var buffered = [];\n for (var i = 0; i < mediaElem.buffered.length; i++) {\n buffered.push({\n start: mediaElem.buffered.start(i),\n end: mediaElem.buffered.end(i)\n });\n }\n var mediaInfo = {\n currentTime: mediaElem.currentTime,\n readyState: mediaElem.readyState,\n buffered,\n paused: mediaElem.paused,\n ended: mediaElem.ended\n };\n this._stats.media = mediaInfo;\n return {\n raw: this._stats,\n timestat: this._getTimeStats(),\n profile: this._getProfile()\n };\n }\n }, {\n key: \"_getTimeStats\",\n value: function _getTimeStats() {\n var allStat = this._stats[INFO];\n var msgs = allStat.map(function(stat) {\n var data = stat.payload.data;\n var msg = \"\";\n try {\n if (data instanceof Error) {\n msg = data.msg;\n } else if (data !== void 0) {\n msg = JSON.stringify(data);\n }\n } catch (error) {\n console.log(\"err\", error);\n }\n return \"[\".concat(stat.timeFormat, \"] : \").concat(stat.payload.msg, \" \").concat(msg, \" \");\n });\n return msgs;\n }\n }, {\n key: \"_getProfile\",\n value: function _getProfile() {\n var profile = {\n traceEvents: []\n };\n var allStat = this._stats[INFO];\n allStat.forEach(function(stat) {\n if (stat.payload.profile) {\n profile.traceEvents.push(stat.payload);\n }\n });\n return profile;\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"stats\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {};\n }\n }]);\n return Stats2;\n}(BasePlugin);\nexport { Stats as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport { WAITING, PLAY, SEEKING } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar GapJump = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(GapJump2, _BasePlugin);\n var _super = _createSuper(GapJump2);\n function GapJump2() {\n var _this;\n _classCallCheck(this, GapJump2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onGapJump\", function() {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player, config = _assertThisInitialize.config;\n if (player.media.readyState === HTMLMediaElement.HAVE_NOTHING) {\n return;\n }\n if (player.media.seeking) {\n if (!_this.seekingEventReceived) {\n return;\n }\n } else {\n _this.seekingEventReceived = false;\n }\n if (player.media.paused && player.media.currentTime !== 0 && _this.hasPlayed) {\n return;\n }\n var buffered = player.media.buffered;\n var smallGapLimit = config.smallGapLimit || 0.5;\n var gapDetectionThreshold = config.gapDetectionThreshold || 0.3;\n var currentTime = player.media.currentTime;\n var idx = _this._getIndex(buffered, currentTime, gapDetectionThreshold);\n if (idx === null || idx === 0) {\n return;\n }\n console.log(\"GapJump bufferRange \", buffered.start(idx), buffered.end(idx));\n var jumpTo = buffered.start(idx) + 0.1;\n var seekEnd = player.media.duration;\n if (jumpTo > seekEnd) {\n return;\n }\n var jumpSize = jumpTo - currentTime;\n var isGapSmall = jumpSize <= smallGapLimit;\n if (jumpSize < GapJump2.BROWSER_GAP_TOLERANCE) {\n return;\n }\n if (isGapSmall) {\n if (config.useGapJump !== false) {\n player.media.currentTime = _this.isSafari ? jumpTo + 0.1 : jumpTo;\n }\n _this.player && _this.player.emit(\"detectGap\");\n console.log(\"gapJump gapIndex\", idx, \" isGapSamll:\", isGapSmall, \" currentTime:\", player.media.currentTime, \" jumpSize:\", currentTime - player.media.currentTime);\n if (jumpTo !== 0.08) {\n player && player.emit(\"log\", {\n type: \"oneevent\",\n end_type: \"gap\",\n vid: player.config.vid,\n ext: {\n video_postion: Math.floor(jumpTo * 1e3)\n }\n });\n }\n }\n });\n return _this;\n }\n _createClass(GapJump2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n var useGapJump = this.config.useGapJump;\n if (useGapJump === false) {\n return;\n }\n this.hasPlayed = false;\n this.seekingEventReceived = false;\n this.isSafari = /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) && !/Chrome/.test(navigator.userAgent) && !/BlackBerry/.test(navigator.platform);\n this.on(WAITING, this.onGapJump);\n this.on(PLAY, function() {\n _this2.hasPlayed = true;\n });\n this.on(SEEKING, function() {\n _this2.seekingEventReceived = true;\n });\n }\n }, {\n key: \"_getIndex\",\n value: function _getIndex(buffered, time, threshold) {\n if (!buffered || !buffered.length) {\n return null;\n }\n if (buffered.length === 1 && buffered.end(0) - buffered.start(0) < 1e-6) {\n return null;\n }\n var bufferedInfo = this._getBuffered(buffered);\n var idx = null;\n for (var i = 0; i < bufferedInfo.length; i++) {\n var item = bufferedInfo[i];\n if (item.start > time && (i === 0 || bufferedInfo[i - 1].end - time <= threshold)) {\n idx = i;\n break;\n }\n }\n return idx;\n }\n }, {\n key: \"_getBuffered\",\n value: function _getBuffered(b) {\n if (!b) {\n return [];\n }\n var ret = [];\n for (var i = 0; i < b.length; i++) {\n ret.push({\n start: b.start(i),\n end: b.end(i)\n });\n }\n return ret;\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"gapJump\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n useGapJump: false,\n smallGapLimit: 0.5,\n gapDetectionThreshold: 0.3\n };\n }\n }]);\n return GapJump2;\n}(Plugin);\nGapJump.BROWSER_GAP_TOLERANCE = 1e-3;\nexport { GapJump as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport { WAITING, PLAYING, CANPLAY, PLAY } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar WaitingTimeoutJump = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(WaitingTimeoutJump2, _BasePlugin);\n var _super = _createSuper(WaitingTimeoutJump2);\n function WaitingTimeoutJump2() {\n var _this;\n _classCallCheck(this, WaitingTimeoutJump2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onWaiting\", function() {\n var _assertThisInitialize = _assertThisInitialized(_this), config = _assertThisInitialize.config;\n if (_this.jumpCnt > config.jumpCntMax || _this.timer || config.useWaitingTimeoutJump === false) {\n return;\n }\n _this.timer = setTimeout(_this.onJump, config.waitingTime * 1e3);\n });\n _defineProperty(_assertThisInitialized(_this), \"onJump\", function() {\n var _assertThisInitialize2 = _assertThisInitialized(_this), player = _assertThisInitialize2.player, config = _assertThisInitialize2.config;\n clearTimeout(_this.timer);\n _this.timer = null;\n if (_this.jumpCnt > config.jumpCntMax || config.useWaitingTimeoutJump === false) {\n return;\n }\n if (player.media.paused && player.media.currentTime !== 0 && _this.hasPlayed) {\n return;\n }\n _this.jumpSize = config.jumpSize * (_this.jumpCnt + 1);\n if (_this.jumpCnt === config.jumpSize && _this.jumpSize < 6) {\n _this.jumpSize = 6;\n }\n var jumpTo = player.currentTime + _this.jumpSize;\n var seekEnd = player.media.duration;\n if (jumpTo > seekEnd) {\n return;\n }\n console.log(\"waitintTimeout, currentTime:\", player.currentTime, \", jumpTo:\", jumpTo);\n _this.jumpCnt++;\n player.currentTime = jumpTo;\n });\n return _this;\n }\n _createClass(WaitingTimeoutJump2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n var _this$config = this.config, useWaitingTimeoutJump = _this$config.useWaitingTimeoutJump, jumpSize = _this$config.jumpSize;\n if (useWaitingTimeoutJump === false) {\n return;\n }\n this.hasPlayed = false;\n this.jumpCnt = 0;\n this.timer = null;\n this.jumpSize = jumpSize;\n this.on(WAITING, this.onWaiting);\n this.on([PLAYING, CANPLAY], function() {\n clearTimeout(_this2.timer);\n _this2.timer = null;\n _this2.jumpSize = _this2.config.jumpSize;\n });\n this.on(PLAY, function() {\n _this2.hasPlayed = true;\n });\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"waitingTimeoutJump\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n useWaitingTimeoutJump: false,\n waitingTime: 15,\n jumpSize: 2,\n jumpCntMax: 4\n };\n }\n }]);\n return WaitingTimeoutJump2;\n}(Plugin);\nexport { WaitingTimeoutJump as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, toConsumableArray as _toConsumableArray } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport util from \"../../utils/util.js\";\nimport { DOWNLOAD_SPEED_CHANGE, LOADED_DATA, REPLAY } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar DEFAULT_SPEED_TYPE = \"cdn\";\nvar SPEED_TYPE = [\"cdn\"];\nvar TestSpeed = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(TestSpeed2, _BasePlugin);\n var _super = _createSuper(TestSpeed2);\n function TestSpeed2() {\n var _this;\n _classCallCheck(this, TestSpeed2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"getSpeed\", function() {\n var type = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_SPEED_TYPE;\n if (!_this.speedListCache || !_this.speedListCache[type])\n return 0;\n if (_this.speedListCache[type].length <= 0)\n return 0;\n var total = 0;\n _this.speedListCache[type].map(function(item) {\n total += item;\n });\n return Math.floor(total / _this.speedListCache[type].length);\n });\n _defineProperty(_assertThisInitialized(_this), \"startTimer\", function() {\n if (util.isMSE(_this.player.video)) {\n return;\n }\n _this.initSpeedList();\n _this.cnt = 0;\n _this.timer = setTimeout(_this.testSpeed, _this.config.testTimeStep);\n });\n _defineProperty(_assertThisInitialized(_this), \"initSpeedList\", function() {\n _this.speedListCache = {};\n SPEED_TYPE.forEach(function(type) {\n _this.speedListCache[type] = [];\n });\n });\n _defineProperty(_assertThisInitialized(_this), \"_onRealSpeedChange\", function(data) {\n data.speed && _this.appendList(data.speed, data.type || DEFAULT_SPEED_TYPE);\n });\n _defineProperty(_assertThisInitialized(_this), \"testSpeed\", function() {\n clearTimeout(_this.timer);\n _this.timer = null;\n if (!_this.player || !_this.config.openSpeed)\n return;\n var _this$config = _this.config, url = _this$config.url, loadSize = _this$config.loadSize, testCnt = _this$config.testCnt, testTimeStep = _this$config.testTimeStep;\n var testSpeedUrl = url + (url.indexOf(\"?\") < 0 ? \"?testst=\" : \"&testst=\") + Date.now();\n if (_this.cnt >= testCnt) {\n return;\n }\n _this.cnt++;\n try {\n var start = new Date().getTime();\n var end = null;\n var xhr = new XMLHttpRequest();\n _this.xhr = xhr;\n xhr.open(\"GET\", testSpeedUrl);\n var headers = {};\n var random = Math.floor(Math.random() * 10);\n headers.Range = \"bytes=\" + random + \"-\" + (loadSize + random);\n if (headers) {\n Object.keys(headers).forEach(function(k) {\n xhr.setRequestHeader(k, headers[k]);\n });\n }\n xhr.onreadystatechange = function() {\n if (xhr.readyState === 4) {\n _this.xhr = null;\n end = new Date().getTime();\n var size = xhr.getResponseHeader(\"Content-Length\") / 1024 * 8;\n var speed = Math.round(size * 1e3 / (end - start));\n _this.appendList(speed);\n _this.timer = setTimeout(_this.testSpeed, testTimeStep);\n }\n };\n xhr.send();\n } catch (e) {\n console.error(e);\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"appendList\", function(speed) {\n var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : DEFAULT_SPEED_TYPE;\n if (!_this.speedListCache || !_this.speedListCache[type])\n return;\n var saveSpeedMax = _this.config.saveSpeedMax;\n if (_this.speedListCache[type].length >= saveSpeedMax) {\n _this.speedListCache[type].shift();\n }\n _this.speedListCache[type].push(speed);\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;\n if (player) {\n type === DEFAULT_SPEED_TYPE ? player.realTimeSpeed = speed : player[_this.getSpeedName(\"realTime\", type)] = speed;\n }\n _this.updateSpeed(type);\n });\n _defineProperty(_assertThisInitialized(_this), \"updateSpeed\", function() {\n var type = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : DEFAULT_SPEED_TYPE;\n var speed = _this.getSpeed(type);\n var _assertThisInitialize2 = _assertThisInitialized(_this), player = _assertThisInitialize2.player;\n if (player) {\n if (type === DEFAULT_SPEED_TYPE) {\n if (!player.avgSpeed || speed !== player.avgSpeed) {\n player.avgSpeed = speed;\n player.emit(DOWNLOAD_SPEED_CHANGE, {\n speed,\n realTimeSpeed: player.realTimeSpeed\n });\n }\n } else {\n var speedName = _this.getSpeedName(\"avg\", type);\n if (!player[speedName] || speed !== player[speedName]) {\n player[speedName] = speed;\n player.emit(DOWNLOAD_SPEED_CHANGE, {\n speed,\n realTimeSpeed: player.realTimeSpeed\n });\n }\n }\n }\n });\n return _this;\n }\n _createClass(TestSpeed2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this$config2 = this.config, openSpeed = _this$config2.openSpeed, addSpeedTypeList = _this$config2.addSpeedTypeList;\n if ((addSpeedTypeList === null || addSpeedTypeList === void 0 ? void 0 : addSpeedTypeList.length) > 0) {\n SPEED_TYPE.push.apply(SPEED_TYPE, _toConsumableArray(addSpeedTypeList));\n }\n this.initSpeedList();\n this.on(\"real_time_speed\", this._onRealSpeedChange);\n this.timer = null;\n this.cnt = 0;\n this.xhr = null;\n if (!openSpeed) {\n return;\n }\n this.on([LOADED_DATA, REPLAY], this.startTimer);\n }\n }, {\n key: \"getSpeedName\",\n value: function getSpeedName(namePrefix, type) {\n return namePrefix + \"Speed\" + type.toUpperCase();\n }\n }, {\n key: \"openSpeed\",\n get: function get() {\n return this.config.openSpeed;\n },\n set: function set(value) {\n this.config.openSpeed = value;\n if (!value && this.timer) {\n clearTimeout(this.timer);\n this.timer = null;\n return;\n }\n if (this.config.openSpeed) {\n if (this.timer)\n return;\n this.timer = setTimeout(this.testSpeed, this.config.testTimeStep);\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this2 = this;\n this.off(\"real_time_speed\", this._onRealSpeedChange);\n this.off([LOADED_DATA, REPLAY], this.startTimer);\n SPEED_TYPE.forEach(function(type) {\n _this2.speedListCache && _this2.speedListCache[type] && (_this2.speedListCache[type] = []);\n });\n this.speedListCache && (this.speedListCache = {});\n clearTimeout(this.timer);\n this.timer = null;\n if (this.xhr && this.xhr.readyState !== 4) {\n this.xhr.cancel && this.xhr.cancel();\n this.xhr = null;\n }\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"testspeed\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n openSpeed: false,\n testCnt: 3,\n loadSize: 200 * 1024,\n testTimeStep: 3e3,\n url: \"\",\n saveSpeedMax: 5,\n addSpeedTypeList: []\n };\n }\n }]);\n return TestSpeed2;\n}(Plugin);\nexport { TestSpeed as default };\n","import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass } from \"../../_virtual/_rollupPluginBabelHelpers.js\";\nimport \"../../utils/util.js\";\nimport { PLAY, PAUSE, ENDED, EMPTIED, FPS_STUCK } from \"../../events.js\";\nimport \"../../utils/debug.js\";\nimport Plugin from \"../../plugin/plugin.js\";\nvar FpsDetect = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(FpsDetect2, _BasePlugin);\n var _super = _createSuper(FpsDetect2);\n function FpsDetect2() {\n _classCallCheck(this, FpsDetect2);\n return _super.apply(this, arguments);\n }\n _createClass(FpsDetect2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this = this;\n var player = this.player, config = this.config;\n this.timer = null;\n this._lastDecodedFrames = 0;\n this._currentStuckCount = 0;\n this._lastCheckPoint = null;\n this._payload = [];\n if (config.disabled)\n return;\n var getVideoPlaybackQuality = player.media.getVideoPlaybackQuality;\n if (!getVideoPlaybackQuality)\n return;\n this.on(PLAY, function() {\n _this._startTick();\n });\n this.on(PAUSE, function() {\n _this._stopTick();\n });\n this.on(ENDED, function() {\n _this._stopTick();\n });\n this.on(EMPTIED, function() {\n _this._stopTick();\n });\n }\n }, {\n key: \"_startTick\",\n value: function _startTick() {\n var _this2 = this;\n this._stopTick();\n this._timer = setTimeout(function() {\n _this2._checkDecodeFPS();\n _this2._startTick();\n }, this.config.tick);\n }\n }, {\n key: \"_stopTick\",\n value: function _stopTick() {\n clearTimeout(this._timer);\n this._timer = null;\n }\n }, {\n key: \"_checkStuck\",\n value: function _checkStuck(curDecodedFrames, totalVideoFrames, droppedVideoFrames, checkInterval) {\n var media = this.player.media;\n var hidden = document.hidden;\n var paused = media.paused;\n if (typeof hidden === \"boolean\" && !hidden && !paused) {\n var curTime = media.currentTime;\n var buffered = media.buffered;\n var enoughBuffer = false;\n var bufs = [];\n for (var i = 0; i < buffered.length; i++) {\n var start = buffered.start(i);\n var end = buffered.end(i);\n bufs.push({\n start,\n end\n });\n if (start <= curTime && curTime <= end - 1) {\n enoughBuffer = true;\n break;\n }\n }\n if (media.readyState === 4 && enoughBuffer) {\n if (this._currentStuckCount > this.config.stuckCount) {\n this.emit(FPS_STUCK, this._payload);\n this._reset();\n } else {\n if (curDecodedFrames <= this.config.reportFrame) {\n this._currentStuckCount++;\n this._payload.push({\n bufs,\n currentTime: media.currentTime,\n curDecodedFrames,\n totalVideoFrames,\n droppedVideoFrames,\n checkInterval\n });\n } else {\n this._reset();\n }\n }\n }\n }\n }\n }, {\n key: \"_reset\",\n value: function _reset() {\n this._payload = [];\n this._currentStuckCount = 0;\n }\n }, {\n key: \"_checkDecodeFPS\",\n value: function _checkDecodeFPS() {\n if (!this.player.media) {\n return;\n }\n var _this$player$media$ge = this.player.media.getVideoPlaybackQuality(), totalVideoFrames = _this$player$media$ge.totalVideoFrames, droppedVideoFrames = _this$player$media$ge.droppedVideoFrames;\n var currTime = performance.now();\n if (totalVideoFrames) {\n if (this._lastCheckPoint) {\n var curDecoded = totalVideoFrames - this._lastDecodedFrames;\n var checkInterval = currTime - this._lastCheckPoint;\n this._checkStuck(curDecoded, totalVideoFrames, droppedVideoFrames, checkInterval);\n }\n }\n this._lastDecodedFrames = totalVideoFrames;\n this._lastCheckPoint = currTime;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this._stopTick();\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"FpsDetect\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n disabled: false,\n tick: 1e3,\n stuckCount: 3,\n reportFrame: 0\n };\n }\n }]);\n return FpsDetect2;\n}(Plugin);\nexport { FpsDetect as default };\n","import { createClass as _createClass, classCallCheck as _classCallCheck, toConsumableArray as _toConsumableArray } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport sniffer from \"../utils/sniffer.js\";\nimport XGLogger from \"../plugins/logger/index.js\";\nimport Replay from \"../plugins/replay/index.js\";\nimport Poster from \"../plugins/poster/index.js\";\nimport Start from \"../plugins/start/index.js\";\nimport Enter from \"../plugins/enter/index.js\";\nimport MiniScreen from \"../plugins/miniScreen/index.js\";\nimport PCPlugin from \"../plugins/pc/index.js\";\nimport MobilePlugin from \"../plugins/mobile/index.js\";\nimport Keyboard from \"../plugins/keyboard/index.js\";\nimport Loading from \"../plugins/loading/index.js\";\nimport Progress from \"../plugins/progress/index.js\";\nimport Play from \"../plugins/play/index.js\";\nimport Fullscreen from \"../plugins/fullscreen/index.js\";\nimport Time from \"../plugins/time/index.js\";\nimport TimeSegmentsControls from \"../plugins/time/timesegments.js\";\nimport Volume from \"../plugins/volume/index.js\";\nimport Rotate from \"../plugins/rotate/index.js\";\nimport PIP from \"../plugins/pip/index.js\";\nimport PlayNextIcon from \"../plugins/playNext/index.js\";\nimport Download from \"../plugins/download/index.js\";\nimport ScreenShot from \"../plugins/screenShot/index.js\";\nimport DefinitionIcon from \"../plugins/definition/index.js\";\nimport PlaybackRate from \"../plugins/playbackRate/index.js\";\nimport CssFullScreen from \"../plugins/cssFullScreen/index.js\";\nimport ErrorPlugin from \"../plugins/error/index.js\";\nimport Prompt from \"../plugins/prompt/index.js\";\nimport ProgressPreview from \"../plugins/progressPreview/index.js\";\nimport Thumbnail from \"../plugins/common/thumbnail.js\";\nimport MiniProgress from \"../plugins/progress/miniProgress.js\";\nimport DynamicBg from \"../plugins/dynamicBg/index.js\";\nimport ZH from \"../lang/zh-cn.js\";\nimport Stats from \"../plugins/stats/index.js\";\nimport GapJump from \"../plugins/gapJump/index.js\";\nimport WaitingTimeoutJump from \"../plugins/waitingTimeoutJump/index.js\";\nimport TestSpeed from \"../plugins/testspeed/index.js\";\nimport I18N from \"../lang/i18n.js\";\nimport FpsDetect from \"../plugins/fpsDetect/index.js\";\nI18N.use(ZH);\nvar DefaultPreset = /* @__PURE__ */ _createClass(function DefaultPreset2(options, playerConfig) {\n var _this$plugins, _this$plugins2, _this$plugins3;\n _classCallCheck(this, DefaultPreset2);\n var simulateMode = playerConfig && playerConfig.isMobileSimulateMode === \"mobile\";\n var isLive = playerConfig.isLive;\n var vodPlugins = isLive ? [] : [TimeSegmentsControls, Progress, MiniProgress, ProgressPreview, Time];\n var contolsIcons = [].concat(vodPlugins, [Play, Fullscreen, Rotate, PlayNextIcon, DefinitionIcon, PlaybackRate, Download, ScreenShot, Volume, PIP]);\n var layers = [Replay, Poster, Start, Loading, Enter, ErrorPlugin, Prompt, Thumbnail, MiniScreen];\n this.plugins = [Stats, XGLogger].concat(_toConsumableArray(contolsIcons), layers, [GapJump, WaitingTimeoutJump]);\n var mode = simulateMode ? \"mobile\" : sniffer.device;\n switch (mode) {\n case \"pc\":\n (_this$plugins = this.plugins).push.apply(_this$plugins, [Keyboard, PCPlugin, CssFullScreen, TestSpeed, FpsDetect]);\n break;\n case \"mobile\":\n (_this$plugins2 = this.plugins).push.apply(_this$plugins2, [MobilePlugin]);\n break;\n default:\n (_this$plugins3 = this.plugins).push.apply(_this$plugins3, [Keyboard, PCPlugin, CssFullScreen]);\n }\n if (sniffer.os.isIpad || mode === \"pc\") {\n this.plugins.push(DynamicBg);\n }\n if (sniffer.os.isIpad) {\n this.plugins.push(PCPlugin);\n }\n this.ignores = [];\n this.i18n = [];\n});\nexport { DefaultPreset as default };\n","var ZH = {\n LANG: \"zh-cn\",\n TEXT: {\n ERROR_TYPES: {\n network: {\n code: 1,\n msg: \"\\u89C6\\u9891\\u4E0B\\u8F7D\\u9519\\u8BEF\"\n },\n mse: {\n code: 2,\n msg: \"\\u6D41\\u8FFD\\u52A0\\u9519\\u8BEF\"\n },\n parse: {\n code: 3,\n msg: \"\\u89E3\\u6790\\u9519\\u8BEF\"\n },\n format: {\n code: 4,\n msg: \"\\u683C\\u5F0F\\u9519\\u8BEF\"\n },\n decoder: {\n code: 5,\n msg: \"\\u89E3\\u7801\\u9519\\u8BEF\"\n },\n runtime: {\n code: 6,\n msg: \"\\u8BED\\u6CD5\\u9519\\u8BEF\"\n },\n timeout: {\n code: 7,\n msg: \"\\u64AD\\u653E\\u8D85\\u65F6\"\n },\n other: {\n code: 8,\n msg: \"\\u5176\\u4ED6\\u9519\\u8BEF\"\n }\n },\n HAVE_NOTHING: \"\\u6CA1\\u6709\\u5173\\u4E8E\\u97F3\\u9891/\\u89C6\\u9891\\u662F\\u5426\\u5C31\\u7EEA\\u7684\\u4FE1\\u606F\",\n HAVE_METADATA: \"\\u97F3\\u9891/\\u89C6\\u9891\\u7684\\u5143\\u6570\\u636E\\u5DF2\\u5C31\\u7EEA\",\n HAVE_CURRENT_DATA: \"\\u5173\\u4E8E\\u5F53\\u524D\\u64AD\\u653E\\u4F4D\\u7F6E\\u7684\\u6570\\u636E\\u662F\\u53EF\\u7528\\u7684\\uFF0C\\u4F46\\u6CA1\\u6709\\u8DB3\\u591F\\u7684\\u6570\\u636E\\u6765\\u64AD\\u653E\\u4E0B\\u4E00\\u5E27/\\u6BEB\\u79D2\",\n HAVE_FUTURE_DATA: \"\\u5F53\\u524D\\u53CA\\u81F3\\u5C11\\u4E0B\\u4E00\\u5E27\\u7684\\u6570\\u636E\\u662F\\u53EF\\u7528\\u7684\",\n HAVE_ENOUGH_DATA: \"\\u53EF\\u7528\\u6570\\u636E\\u8DB3\\u4EE5\\u5F00\\u59CB\\u64AD\\u653E\",\n NETWORK_EMPTY: \"\\u97F3\\u9891/\\u89C6\\u9891\\u5C1A\\u672A\\u521D\\u59CB\\u5316\",\n NETWORK_IDLE: \"\\u97F3\\u9891/\\u89C6\\u9891\\u662F\\u6D3B\\u52A8\\u7684\\u4E14\\u5DF2\\u9009\\u53D6\\u8D44\\u6E90\\uFF0C\\u4F46\\u5E76\\u672A\\u4F7F\\u7528\\u7F51\\u7EDC\",\n NETWORK_LOADING: \"\\u6D4F\\u89C8\\u5668\\u6B63\\u5728\\u4E0B\\u8F7D\\u6570\\u636E\",\n NETWORK_NO_SOURCE: \"\\u672A\\u627E\\u5230\\u97F3\\u9891/\\u89C6\\u9891\\u6765\\u6E90\",\n MEDIA_ERR_ABORTED: \"\\u53D6\\u56DE\\u8FC7\\u7A0B\\u88AB\\u7528\\u6237\\u4E2D\\u6B62\",\n MEDIA_ERR_NETWORK: \"\\u7F51\\u7EDC\\u9519\\u8BEF\",\n MEDIA_ERR_DECODE: \"\\u89E3\\u7801\\u9519\\u8BEF\",\n MEDIA_ERR_SRC_NOT_SUPPORTED: \"\\u4E0D\\u652F\\u6301\\u7684\\u97F3\\u9891/\\u89C6\\u9891\\u683C\\u5F0F\",\n REPLAY: \"\\u91CD\\u64AD\",\n ERROR: \"\\u7F51\\u7EDC\\u8FDE\\u63A5\\u4F3C\\u4E4E\\u51FA\\u73B0\\u4E86\\u95EE\\u9898\",\n PLAY_TIPS: \"\\u64AD\\u653E\",\n PAUSE_TIPS: \"\\u6682\\u505C\",\n PLAYNEXT_TIPS: \"\\u4E0B\\u4E00\\u96C6\",\n DOWNLOAD_TIPS: \"\\u4E0B\\u8F7D\",\n ROTATE_TIPS: \"\\u65CB\\u8F6C\",\n RELOAD_TIPS: \"\\u91CD\\u65B0\\u8F7D\\u5165\",\n FULLSCREEN_TIPS: \"\\u8FDB\\u5165\\u5168\\u5C4F\",\n EXITFULLSCREEN_TIPS: \"\\u9000\\u51FA\\u5168\\u5C4F\",\n CSSFULLSCREEN_TIPS: \"\\u8FDB\\u5165\\u6837\\u5F0F\\u5168\\u5C4F\",\n EXITCSSFULLSCREEN_TIPS: \"\\u9000\\u51FA\\u6837\\u5F0F\\u5168\\u5C4F\",\n TEXTTRACK: \"\\u5B57\\u5E55\",\n PIP: \"\\u753B\\u4E2D\\u753B\",\n SCREENSHOT: \"\\u622A\\u56FE\",\n LIVE: \"\\u6B63\\u5728\\u76F4\\u64AD\",\n OFF: \"\\u5173\\u95ED\",\n OPEN: \"\\u5F00\\u542F\",\n MINI_DRAG: \"\\u70B9\\u51FB\\u6309\\u4F4F\\u53EF\\u62D6\\u52A8\\u89C6\\u9891\",\n MINISCREEN: \"\\u5C0F\\u5C4F\\u5E55\",\n REFRESH_TIPS: \"\\u8BF7\\u8BD5\\u8BD5\",\n REFRESH: \"\\u5237\\u65B0\",\n FORWARD: \"\\u5FEB\\u8FDB\\u4E2D\",\n LIVE_TIP: \"\\u76F4\\u64AD\"\n }\n};\nexport { ZH as default };\n","import { defineProperty as _defineProperty, inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck } from \"./_virtual/_rollupPluginBabelHelpers.js\";\nimport Player from \"./player.js\";\nimport Plugin from \"./plugin/plugin.js\";\nimport BasePlugin from \"./plugin/basePlugin.js\";\nimport * as events from \"./events.js\";\nimport STATE_CLASS from \"./stateClassMap.js\";\nimport I18N from \"./lang/i18n.js\";\nimport Errors from \"./error.js\";\nimport sniffer from \"./utils/sniffer.js\";\nimport util from \"./utils/util.js\";\nimport DefaultPreset from \"./presets/default.js\";\nvar PresetPlayer = /* @__PURE__ */ function(_Player) {\n _inherits(PresetPlayer2, _Player);\n var _super = _createSuper(PresetPlayer2);\n function PresetPlayer2() {\n _classCallCheck(this, PresetPlayer2);\n return _super.apply(this, arguments);\n }\n return _createClass(PresetPlayer2);\n}(Player);\n_defineProperty(PresetPlayer, \"defaultPreset\", DefaultPreset);\n_defineProperty(PresetPlayer, \"Util\", util);\n_defineProperty(PresetPlayer, \"Sniffer\", sniffer);\n_defineProperty(PresetPlayer, \"Errors\", Errors);\n_defineProperty(PresetPlayer, \"Events\", events);\n_defineProperty(PresetPlayer, \"Plugin\", Plugin);\n_defineProperty(PresetPlayer, \"BasePlugin\", BasePlugin);\n_defineProperty(PresetPlayer, \"I18N\", I18N);\n_defineProperty(PresetPlayer, \"STATE_CLASS\", STATE_CLASS);\nexport { PresetPlayer as default };\n","function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), true).forEach(function(key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor)\n descriptor.writable = true;\n Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps)\n _defineProperties(Constructor.prototype, protoProps);\n if (staticProps)\n _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass)\n _setPrototypeOf(subClass, superClass);\n}\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf2(o2) {\n return o2.__proto__ || Object.getPrototypeOf(o2);\n };\n return _getPrototypeOf(o);\n}\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {\n o2.__proto__ = p2;\n return o2;\n };\n return _setPrototypeOf(o, p);\n}\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct)\n return false;\n if (Reflect.construct.sham)\n return false;\n if (typeof Proxy === \"function\")\n return true;\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {\n }));\n return true;\n } catch (e) {\n return false;\n }\n}\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n return _assertThisInitialized(self);\n}\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived), result;\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n return _possibleConstructorReturn(this, result);\n };\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null)\n return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== void 0) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\")\n return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\nexport { _assertThisInitialized as assertThisInitialized, _classCallCheck as classCallCheck, _createClass as createClass, _createSuper as createSuper, _defineProperty as defineProperty, _getPrototypeOf as getPrototypeOf, _inherits as inherits, _isNativeReflectConstruct as isNativeReflectConstruct, _objectSpread2 as objectSpread2, _possibleConstructorReturn as possibleConstructorReturn, _setPrototypeOf as setPrototypeOf, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey };\n","import { createClass as _createClass, classCallCheck as _classCallCheck } from \"./_virtual/_rollupPluginBabelHelpers.js\";\nvar Xhr = /* @__PURE__ */ function() {\n function Xhr2(url, callback) {\n _classCallCheck(this, Xhr2);\n this.url = url;\n var xhr = new window.XMLHttpRequest();\n xhr.target = this;\n xhr.responseType = \"arraybuffer\";\n xhr.open(\"get\", url);\n xhr.onload = function() {\n if (xhr.status === 200 || xhr.status === 206) {\n if (callback && callback instanceof Function) {\n callback(xhr.response);\n }\n }\n };\n xhr.onerror = function(e) {\n };\n this.xhr = xhr;\n this.run();\n }\n _createClass(Xhr2, [{\n key: \"cancel\",\n value: function cancel() {\n this.xhr.abort();\n }\n }, {\n key: \"run\",\n value: function run() {\n if (this.xhr.readyState === 1) {\n this.xhr.send();\n }\n }\n }]);\n return Xhr2;\n}();\nexport { Xhr as default };\n","import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, objectSpread2 as _objectSpread2 } from \"./_virtual/_rollupPluginBabelHelpers.js\";\nimport { Util, Events, BasePlugin } from \"xgplayer\";\nimport Xhr from \"./xhr.js\";\nvar PLAY_MODES = {\n ORDER: \"order\",\n SLOOP: \"sloop\",\n LOOP: \"loop\",\n RANDOM: \"random\"\n};\nvar CLASS_NAME = \"xgplayer-music\";\nfunction _randomIndex(min, max, index) {\n var i = Math.floor(Math.random() * (max - min) + min);\n if (i === index) {\n if (i > max / 2) {\n max = max / 2;\n } else {\n min = max / 2;\n }\n return max - min > 2 ? _randomIndex(min, max, index) : i;\n } else {\n return i;\n }\n}\nvar Music = /* @__PURE__ */ function(_BasePlugin) {\n _inherits(Music2, _BasePlugin);\n var _super = _createSuper(Music2);\n function Music2() {\n var _this;\n _classCallCheck(this, Music2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"_onEnded\", function() {\n if (_this.mode === \"order\" && _this.index + 1 >= _this.list.length) {\n _this.player.pause();\n _this.player.currentTime = 0;\n return;\n }\n switch (_this.mode) {\n case PLAY_MODES.SLOOP:\n _this.change();\n break;\n case PLAY_MODES.ORDER:\n case PLAY_MODES.LOOP:\n default:\n _this.next();\n break;\n }\n });\n _defineProperty(_assertThisInitialized(_this), \"_onDurationChange\", function() {\n var abCycle = _this.config.abCycle;\n _this._initABCycle(abCycle, _this.player);\n });\n _defineProperty(_assertThisInitialized(_this), \"_onTimeUpdate\", function() {\n var _assertThisInitialize = _assertThisInitialized(_this), config = _assertThisInitialize.config, player = _assertThisInitialize.player;\n if (!_this.halfPass && player.currentTime > player.duration / 2) {\n _this.confirmOrder();\n }\n if (config.abCycle) {\n var c = config.abCycle;\n var _end = c.end > player.duration ? player.duration : c.end;\n if (player.currentTime >= _end) {\n if (!c.loop) {\n player.pause();\n _this.emit(\"abCycle_ended\");\n }\n player.currentTime = c.start || 0;\n } else if (player.currentTime < c.start) {\n player.currentTime = c.start || 0;\n }\n }\n });\n return _this;\n }\n _createClass(Music2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var player = this.player, playerConfig = this.playerConfig;\n Util.addClass(player.root, CLASS_NAME);\n this.halfPass = false;\n this.list = this.config.list || [];\n this.nextIndex = -1;\n this.prevIndex = -1;\n this.history = [];\n this.disable = !(this.list.length > 0);\n if (this.list.length === 0) {\n return;\n }\n if (!playerConfig.url && this.list.length > 0) {\n playerConfig.url = this.list[0].src;\n }\n if (!playerConfig.poster) {\n playerConfig.poster = this.list[0].poster;\n }\n if (!playerConfig.title) {\n playerConfig.title = this.list[0].title || \"\";\n }\n if (!playerConfig.vid) {\n playerConfig.vid = this.list[0].vid || \"\";\n }\n this._curInfo = {\n src: playerConfig.url,\n poster: playerConfig.poster,\n title: playerConfig.title,\n vid: playerConfig.vid\n };\n this.index = 0;\n this.on(Events.TIME_UPDATE, this._onTimeUpdate);\n this.on(Events.ENDED, this._onEnded);\n this.on(Events.DURATION_CHANGE, this._onDurationChange);\n if (this.config.offline) {\n this.checkOffline(this._curInfo.src, this._curInfo.vid).then(function(data) {\n if (data.code === 0) {\n playerConfig.url = data.url;\n if (player.state >= 4) {\n player.src = data.url;\n }\n }\n }).catch(function(e) {\n });\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n Util.removeClass(this.player.root, CLASS_NAME);\n }\n }, {\n key: \"_nextCompute\",\n value: function _nextCompute() {\n if (this.disable) {\n return;\n }\n switch (this.mode) {\n case PLAY_MODES.SLOOP:\n case PLAY_MODES.ORDER:\n case PLAY_MODES.LOOP:\n if (this.index + 1 < this.list.length) {\n this.nextIndex = this.index + 1;\n } else {\n this.nextIndex = 0;\n }\n break;\n default:\n this.nextIndex = _randomIndex(0, this.list.length, this.index);\n break;\n }\n }\n }, {\n key: \"_prevCompute\",\n value: function _prevCompute() {\n if (this.disable) {\n return;\n }\n switch (this.mode) {\n case PLAY_MODES.SLOOP:\n case PLAY_MODES.ORDER:\n case PLAY_MODES.LOOP:\n if (this.index - 1 >= 0) {\n this.prevIndex = this.index - 1;\n } else {\n this.prevIndex = this.list.length - 1;\n }\n break;\n default:\n this.prevIndex = _randomIndex(0, this.list.length, this.index);\n break;\n }\n }\n }, {\n key: \"_emitChange\",\n value: function _emitChange() {\n this.emit(\"change\", this._curInfo);\n }\n }, {\n key: \"_initABCycle\",\n value: function _initABCycle(abCycle, player) {\n var _p = player.plugins.progresspreview;\n if (abCycle && player) {\n var _end = abCycle.end > this.player.duration ? this.player.duration : abCycle.end;\n var _start = abCycle.start > this.player.duration ? 0 : abCycle.start;\n var dot = {\n id: player.playerId,\n time: abCycle.start,\n duration: _end - _start,\n text: abCycle.text,\n color: abCycle.color\n };\n _p.findDot(dot.id) ? _p.updateDot(dot) : _p.createDot(dot);\n } else {\n _p.findDot(player.playerId) ? _p.deleteDot(player.playerId) : \"\";\n }\n }\n }, {\n key: \"random\",\n value: function random() {\n if (this.list.length < 0) {\n return null;\n }\n var _i = _randomIndex(0, this.list.length, this.index);\n return this.list[_i];\n }\n }, {\n key: \"next\",\n value: function next() {\n if (this.disable) {\n return;\n }\n if (!this.halfPass) {\n this.halfPass = true;\n this._nextCompute();\n }\n this.index = this.nextIndex;\n this.change();\n }\n }, {\n key: \"prev\",\n value: function prev() {\n if (this.disable) {\n return;\n }\n if (!this.halfPass) {\n this.halfPass = true;\n this._prevCompute();\n }\n this.index = this.prevIndex;\n this.change();\n }\n }, {\n key: \"forward\",\n value: function forward() {\n var player = this.player;\n var timeScale = this.config.timeScale;\n player.currentTime = player.currentTime + timeScale < player.duration ? player.currentTime + timeScale : player.duration - 0.1;\n }\n }, {\n key: \"backward\",\n value: function backward() {\n var player = this.player;\n var timeScale = this.config.timeScale;\n player.currentTime = player.currentTime - timeScale > 0 ? player.currentTime - timeScale : 0;\n }\n }, {\n key: \"add\",\n value: function add(meta) {\n this.list.push({\n src: meta.src,\n title: meta.title,\n vid: meta.vid,\n poster: meta.poster\n });\n }\n }, {\n key: \"remove\",\n value: function remove(vid) {\n var idx = -1;\n this.list.every(function(item, index) {\n if (item.vid === vid) {\n idx = index;\n return false;\n } else {\n return true;\n }\n });\n if (idx > -1) {\n this.list.splice(idx, 1);\n }\n }\n }, {\n key: \"setAbCycle\",\n value: function setAbCycle(start, end, loop) {\n var ext = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};\n if (start && Util.typeof(start) === \"Object\") {\n this.config.abCycle = _objectSpread2({}, start);\n } else {\n this.config.abCycle = _objectSpread2({\n start: start || 0,\n end: end || this.player.duration,\n loop\n }, ext);\n }\n this._initABCycle(this.config.abCycle, this.player);\n }\n }, {\n key: \"removeAbCycle\",\n value: function removeAbCycle() {\n this.config.abCycle = null;\n this._initABCycle(null, this.player);\n }\n }, {\n key: \"updateList\",\n value: function updateList() {\n var list = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];\n this.removeAbCycle();\n this.player.pause();\n this.player.currentTime = 0;\n this.list = list;\n this.nextIndex = 0;\n this.index = 0;\n this.change();\n }\n }, {\n key: \"setIndex\",\n value: function setIndex() {\n var index = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;\n if (index < 0 || index >= this.list.length) {\n return;\n }\n this.nextIndex = index;\n this.index = index;\n this.change();\n }\n }, {\n key: \"change\",\n value: function change() {\n var _this2 = this;\n if (this.disable) {\n return;\n }\n var player = this.player, list = this.list, index = this.index;\n var offlineVid = list[index].vid;\n this.halfPass = false;\n this.checkOffline(list[index].src, offlineVid).then(function(data) {\n _this2._curInfo = {\n title: _this2.list[_this2.index].title || \"\",\n vid: _this2.list[_this2.index].vid,\n poster: _this2.list[_this2.index].poster || \"\",\n src: data.url\n };\n player.playNext({\n url: data.url,\n vid: _this2.list[_this2.index].vid || 0,\n poster: _this2.list[_this2.index].poster || \"\",\n autoplay: true\n });\n player.off(\"timeupdate\", _this2._emitChange);\n player.once(\"timeupdate\", _this2._emitChange);\n player.play();\n });\n }\n }, {\n key: \"checkOffline\",\n value: function checkOffline(url, offlineVid) {\n var _this3 = this;\n return new Promise(function(resolve, reject) {\n if (!_this3.config.offline || _this3.disable) {\n resolve({\n url,\n code: -1,\n vid: offlineVid\n });\n }\n var database = _this3.player.database;\n database.openDB(function() {\n database.getDataByKey(database.myDB.ojstore.name, offlineVid, function(result) {\n setTimeout(function() {\n database.closeDB();\n }, 5e3);\n if (result) {\n resolve({\n url: URL.createObjectURL(result.blob),\n code: 0,\n vid: result.vid\n });\n } else {\n resolve({\n url,\n code: -2,\n vid: offlineVid\n });\n }\n });\n });\n });\n }\n }, {\n key: \"confirmOrder\",\n value: function confirmOrder() {\n this.halfPass = true;\n this._nextCompute();\n this._prevCompute();\n if (this.config.preloadNext) {\n this.preload(this.nextIndex);\n }\n }\n }, {\n key: \"preload\",\n value: function preload(index) {\n if (index < 0 || index >= this.list.length) {\n return;\n }\n var _item = this.list[index];\n var player = this.player;\n this.checkOffline(_item.src, _item.vid).then(function(data) {\n if (data.code === -2) {\n var offlineVid = _item.vid;\n new Xhr(_item.src, function(res) {\n player.database.openDB(function() {\n player.database.addData(player.database.myDB.ojstore.name, [{\n vid: offlineVid,\n blob: new Blob([res], {\n type: 'audio/mp4; codecs=\"mp4a.40.5\"'\n })\n }]);\n setTimeout(function() {\n player.database.closeDB();\n }, 5e3);\n });\n });\n }\n });\n }\n }, {\n key: \"timeScale\",\n get: function get() {\n return this.config.timeScale || 15;\n },\n set: function set(scale) {\n this.config.timeScale = scale;\n }\n }, {\n key: \"mode\",\n get: function get() {\n return this.config.mode || PLAY_MODES.RANDOM;\n },\n set: function set(val) {\n this.config.mode = val;\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"music\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n offline: false,\n preloadNext: true,\n abCycle: null,\n timeScale: 15,\n mode: PLAY_MODES.ORDER,\n list: []\n };\n }\n }, {\n key: \"ModeType\",\n get: function get() {\n return Object.keys(PLAY_MODES).map(function(key) {\n return PLAY_MODES[key];\n });\n }\n }]);\n return Music2;\n}(BasePlugin);\nexport { Music as default };\n","import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport { Plugin } from \"xgplayer\";\nvar MusicCover = /* @__PURE__ */ function(_Plugin) {\n _inherits(MusicCover2, _Plugin);\n var _super = _createSuper(MusicCover2);\n function MusicCover2() {\n _classCallCheck(this, MusicCover2);\n return _super.apply(this, arguments);\n }\n _createClass(MusicCover2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this = this;\n this.on(\"change\", function(item) {\n if (item && item.poster) {\n if (_this.find(\"img\")) {\n _this.find(\"img\").src = item.poster;\n } else {\n var _img2 = new Image();\n _img2.src = item.poster;\n _this.appendChild(_img2);\n }\n _this.find(\"img\").src = item.poster;\n _this.show();\n } else {\n _this.hide();\n }\n });\n if (this.playerConfig.poster) {\n var _img = new Image();\n _img.src = this.playerConfig.poster;\n this.appendChild(_img);\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n return '';\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"musiccover\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n index: 6,\n position: Plugin.POSITIONS.CONTROLS_LEFT\n };\n }\n }]);\n return MusicCover2;\n}(Plugin);\nexport { MusicCover };\n","import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport { Plugin } from \"xgplayer\";\nvar MusicBackward = /* @__PURE__ */ function(_Plugin) {\n _inherits(MusicBackward2, _Plugin);\n var _super = _createSuper(MusicBackward2);\n function MusicBackward2() {\n var _this;\n _classCallCheck(this, MusicBackward2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function(e) {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;\n e.preventDefault();\n e.stopPropagation();\n player.plugins.music.backward();\n });\n return _this;\n }\n _createClass(MusicBackward2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n this.initIcons();\n var ev = [\"click\", \"touchstart\"];\n ev.forEach(function(item) {\n _this2.bind(item, _this2.onClick);\n });\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n musicBackward: {\n icon: '\\n \\n ',\n class: \"xg-icon-mbackward\"\n }\n };\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(\".xgplayer-icon\", icons.musicBackward);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this3 = this;\n var ev = [\"click\", \"touchstart\"];\n ev.forEach(function(item) {\n _this3.unbind(item, _this3.onClick);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return '\\n
\\n
\\n
';\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"musicbackward\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n index: 1,\n position: Plugin.POSITIONS.CONTROLS_LEFT\n };\n }\n }]);\n return MusicBackward2;\n}(Plugin);\nexport { MusicBackward };\n","import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport { Plugin } from \"xgplayer\";\nvar MusicPrev = /* @__PURE__ */ function(_Plugin) {\n _inherits(MusicPrev2, _Plugin);\n var _super = _createSuper(MusicPrev2);\n function MusicPrev2() {\n var _this;\n _classCallCheck(this, MusicPrev2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function(e) {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;\n e.preventDefault();\n e.stopPropagation();\n player.plugins.music.prev();\n });\n return _this;\n }\n _createClass(MusicPrev2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n this.initIcons();\n var ev = [\"click\", \"touchstart\"];\n ev.forEach(function(item) {\n _this2.bind(item, _this2.onClick);\n });\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n musicPrev: {\n icon: ' \\n \\n ',\n class: \"xg-icon-mprev\"\n }\n };\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(\".xgplayer-icon\", icons.musicPrev);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this3 = this;\n var ev = [\"click\", \"touchstart\"];\n ev.forEach(function(item) {\n _this3.unbind(item, _this3.onClick);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return '\\n
\\n
\\n
';\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"musicprev\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n index: 2,\n position: Plugin.POSITIONS.CONTROLS_LEFT\n };\n }\n }]);\n return MusicPrev2;\n}(Plugin);\nexport { MusicPrev };\n","import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport { Plugin } from \"xgplayer\";\nvar MusicForward = /* @__PURE__ */ function(_Plugin) {\n _inherits(MusicForward2, _Plugin);\n var _super = _createSuper(MusicForward2);\n function MusicForward2() {\n var _this;\n _classCallCheck(this, MusicForward2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function(e) {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;\n e.preventDefault();\n e.stopPropagation();\n player.plugins.music.forward();\n });\n return _this;\n }\n _createClass(MusicForward2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n this.initIcons();\n var ev = [\"click\", \"touchstart\"];\n ev.forEach(function(item) {\n _this2.bind(item, _this2.onClick);\n });\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n musicForward: {\n icon: '\\n \\n ',\n class: \"xg-icon-mforward\"\n }\n };\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(\".xgplayer-icon\", icons.musicForward);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this3 = this;\n var ev = [\"click\", \"touchstart\"];\n ev.forEach(function(item) {\n _this3.unbind(item, _this3.onClick);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return '\\n
\\n
\\n
';\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"musicforward\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n index: 5,\n position: Plugin.POSITIONS.CONTROLS_LEFT\n };\n }\n }]);\n return MusicForward2;\n}(Plugin);\nexport { MusicForward };\n","import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport { Plugin } from \"xgplayer\";\nvar MusicNext = /* @__PURE__ */ function(_Plugin) {\n _inherits(MusicNext2, _Plugin);\n var _super = _createSuper(MusicNext2);\n function MusicNext2() {\n var _this;\n _classCallCheck(this, MusicNext2);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"onClick\", function(e) {\n var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;\n e.preventDefault();\n e.stopPropagation();\n player.plugins.music.next();\n });\n return _this;\n }\n _createClass(MusicNext2, [{\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this2 = this;\n this.initIcons();\n var ev = [\"click\", \"touchstart\"];\n ev.forEach(function(item) {\n _this2.bind(item, _this2.onClick);\n });\n }\n }, {\n key: \"registerIcons\",\n value: function registerIcons() {\n return {\n musicNext: {\n icon: ' \\n \\n ',\n class: \"xg-icon-mnext\"\n }\n };\n }\n }, {\n key: \"initIcons\",\n value: function initIcons() {\n var icons = this.icons;\n this.appendChild(\".xgplayer-icon\", icons.musicNext);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var _this3 = this;\n var ev = [\"click\", \"touchstart\"];\n ev.forEach(function(item) {\n _this3.unbind(item, _this3.onClick);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return '\\n
\\n
\\n
';\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"musicnext\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n index: 4,\n position: Plugin.POSITIONS.CONTROLS_LEFT\n };\n }\n }]);\n return MusicNext2;\n}(Plugin);\nexport { MusicNext };\n","import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck } from \"../_virtual/_rollupPluginBabelHelpers.js\";\nimport { Plugin } from \"xgplayer\";\nvar MusicMeta = /* @__PURE__ */ function(_Plugin) {\n _inherits(MusicMeta2, _Plugin);\n var _super = _createSuper(MusicMeta2);\n function MusicMeta2() {\n _classCallCheck(this, MusicMeta2);\n return _super.apply(this, arguments);\n }\n _createClass(MusicMeta2, [{\n key: \"beforeCreate\",\n value: function beforeCreate(args) {\n var progress = args.player.plugins.progress;\n if (progress) {\n args.root = progress.root;\n }\n }\n }, {\n key: \"afterCreate\",\n value: function afterCreate() {\n var _this = this;\n this.on(\"change\", function(item) {\n if (item && item.title) {\n _this.root.innerHTML = \"\".concat(item.title);\n } else {\n _this.root.innerHTML = \"\";\n }\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var playerConfig = this.playerConfig;\n return '\\n '.concat(playerConfig.title || \"\", \"\\n \");\n }\n }], [{\n key: \"pluginName\",\n get: function get() {\n return \"musicmeta\";\n }\n }, {\n key: \"defaultConfig\",\n get: function get() {\n return {\n index: 0\n };\n }\n }]);\n return MusicMeta2;\n}(Plugin);\nexport { MusicMeta };\n","import { createClass as _createClass, classCallCheck as _classCallCheck, objectSpread2 as _objectSpread2 } from \"./_virtual/_rollupPluginBabelHelpers.js\";\nimport { Util } from \"xgplayer\";\nimport Music from \"./music.js\";\nimport { MusicCover } from \"./plugins/musicCover.js\";\nimport { MusicBackward } from \"./plugins/musicBackward.js\";\nimport { MusicPrev } from \"./plugins/musicPrev.js\";\nimport { MusicForward } from \"./plugins/musicForward.js\";\nimport { MusicNext } from \"./plugins/musicNext.js\";\nimport { MusicMeta } from \"./plugins/musicMeta.js\";\nfunction initMusicConfig(playerConfig) {\n if (Util.typeOf(playerConfig.controls) !== \"Object\") {\n playerConfig.controls = {\n mode: \"flex\",\n initShow: true\n };\n } else {\n var _c = playerConfig.controls;\n playerConfig.controls = _objectSpread2({\n mode: \"flex\",\n initShow: true\n }, _c);\n }\n var _p = playerConfig.play || {};\n playerConfig.play = _objectSpread2({\n index: 3\n }, _p);\n playerConfig.marginControls = true;\n playerConfig.mediaType = \"audio\";\n}\nvar MusicPreset = /* @__PURE__ */ _createClass(function MusicPreset2(options, playerConfig) {\n _classCallCheck(this, MusicPreset2);\n console.log(\"config\", options, playerConfig);\n console.log(\"playerConfig\", Util.typeOf(playerConfig.controls) !== \"Object\");\n initMusicConfig(playerConfig);\n this.plugins = [\n Music,\n MusicBackward,\n MusicPrev,\n MusicForward,\n MusicNext,\n MusicCover,\n MusicMeta\n ];\n this.ignores = [\"start\", \"cssFullScreen\", \"fullscreen\", \"pip\", \"enter\", \"replay\", \"pc\", \"loading\", \"poster\"];\n});\nexport { MusicPreset as default };\n","import Xgplayer, { IPlayerOptions } from \"xgplayer\";\nimport MusicPreset, { Music } from \"xgplayer-music\";\nimport Mobile from \"xgplayer/es/plugins/mobile\";\nimport Play from \"xgplayer/es/plugins/play\";\nimport Playbackrate from \"xgplayer/es/plugins/playbackRate\";\nimport Progress from \"xgplayer/es/plugins/progress\";\nimport Time from \"xgplayer/es/plugins/time\";\nimport Volume from \"xgplayer/es/plugins/volume\";\n\nexport type XgplayerOptions = Omit<\n IPlayerOptions,\n \"id\" | \"el\" | \"url\" | \"plugins\"\n> & {\n music?: Music;\n};\n\nclass XgplayerProxy {\n el: HTMLElement;\n initOptions: XgplayerOptions;\n player: Xgplayer;\n\n constructor(\n selector: string,\n url: IPlayerOptions[\"url\"],\n options: XgplayerOptions\n ) {\n const el: HTMLElement = document.querySelector(selector);\n\n if (!el) {\n throw new Error(\n \"[Xgplayer] this selector of DOM node that player to mount on is required.\"\n );\n }\n\n if (!url) {\n throw new Error(\"[Xgplayer] this media resource url is required.\");\n }\n\n this.initOptions = options;\n this.el = el;\n this.init(url, options);\n }\n\n invokeVoid(prop: string, args: any[]) {\n if (this.player[prop] && typeof this.player[prop] === \"function\") {\n this.player[prop](...args);\n }\n }\n\n getPropsAndStates() {\n return {\n autoplay: this.player.autoplay,\n crossOrigin: this.player.crossOrigin,\n currentSrc: this.player.currentSrc,\n currentTime: this.player.currentTime,\n duration: this.player.duration,\n cumulateTime: this.player.cumulateTime,\n volume: this.player.volume,\n muted: this.player.muted,\n defaultMuted: this.player.defaultMuted,\n playbackRate: this.player.playbackRate,\n loop: this.player.loop,\n src: this.player.src,\n lang: this.player.lang,\n version: this.player.version,\n state: this.player.state,\n ended: this.player.ended,\n paused: this.player.paused,\n networkState: this.player.networkState,\n readyState: this.player.readyState,\n isFullscreen: this.player.isFullscreen,\n isCssFullscreen: this.player.isCssfullScreen,\n isSeeking: this.player.isSeeking,\n isActive: this.player.isActive,\n };\n }\n\n init(url: IPlayerOptions[\"url\"], options: XgplayerOptions) {\n let playerOptions: IPlayerOptions = {\n el: this.el,\n url,\n };\n\n if (options.music) {\n playerOptions = {\n ...playerOptions,\n presets: [MusicPreset],\n plugins: [Mobile, Progress, Play, Playbackrate, Time, Volume],\n ...options,\n };\n } else {\n playerOptions = {\n ...playerOptions,\n ...options,\n };\n }\n\n if (window.MasaBlazor.xgplayerPlugins) {\n playerOptions.plugins = [\n ...playerOptions.plugins,\n ...window.MasaBlazor.xgplayerPlugins,\n ];\n\n playerOptions = {\n ...playerOptions,\n ...window.MasaBlazor.xgplayerPluginOptions,\n };\n }\n\n this.player = new Xgplayer(playerOptions);\n }\n\n destroy() {\n this.player.destroy();\n this.player = null;\n }\n}\n\nexport function init(\n selector: string,\n url: IPlayerOptions[\"url\"],\n options: XgplayerOptions\n) {\n const instance = new XgplayerProxy(selector, url, options);\n return instance;\n}\n"],"names":["ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread2","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_typeof","obj","Symbol","iterator","obj2","constructor","prototype","_classCallCheck","instance","Constructor","TypeError","_defineProperties","props","descriptor","configurable","writable","_toPropertyKey","_createClass","protoProps","staticProps","value","_inherits","subClass","superClass","create","_setPrototypeOf","_getPrototypeOf","o","setPrototypeOf","getPrototypeOf","bind","o2","__proto__","p","p2","_assertThisInitialized","self","ReferenceError","_possibleConstructorReturn","call","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","e","_isNativeReflectConstruct","result","Super","NewTarget","this","_get","get","property","receiver","base","hasOwnProperty","_superPropBase","desc","_toConsumableArray","arr","Array","isArray","_arrayLikeToArray","_arrayWithoutHoles","iter","from","_iterableToArray","minLen","n","toString","slice","name","test","_unsupportedIterableToArray","_nonIterableSpread","len","arr2","arg","input","hint","prim","toPrimitive","res","String","Number","_toPrimitive","has","prefix","Events","EE","fn","context","once","addListener","emitter","event","listener","evt","_events","_eventsCount","clearEvent","EventEmitter","eventNames","events","names","concat","listeners","handlers","l","ee","listenerCount","emit","a1","a2","a3","a4","a5","args","removeListener","undefined","j","on","removeAllListeners","off","prefixed","module","exports","XG_DEBUG_OPEN","window","location","href","indexOf","STYLE","info","error","warn","XGTAG","XG_DEBUG","config","debug","logInfo","message","_console","_len","optionalParams","_key","console","log","logWarn","_console2","_len2","_key2","logError","_console3","_fun","_len3","_key3","XgplayerTimeRange","XgplayerTimeRange2","bufferedList","index","start","end","util","isObject","type","debounce","func","wait","options","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","useRAF","requestAnimationFrame","invokeFunc","time","thisArg","startTimer","pendingFunc","wait2","cancelAnimationFrame","setTimeout","shouldInvoke","timeSinceLastCall","timerExpired","Date","now","trailingEdge","timeSinceLastInvoke","timeWaiting","Math","min","remainingWait","debounced","isInvoking","leadingEdge","max","cancel","id","clearTimeout","cancelTimer","flush","pending","createDom","el","tpl","attrs","cname","dom","document","createElement","className","innerHTML","item","setAttribute","createDomFromHtml","html","classname","doc","children","addClass","err","hasClass","some","classList","orgClassName","getAttribute","match","RegExp","replace","split","add","removeClass","remove","reg","toggleClass","classNames","_arguments","_loop","i2","typeOf","map","join","findDom","sel","querySelector","getElementById","getCss","currentStyle","defaultView","getComputedStyle","padStart","str","pad","charstr","maxlen","ceil","chars","r","substring","format","isNaN","round","hour","floor","minute","second","touches","touch","changedTouches","clientX","clientY","offsetX","pageX","offsetLeft","offsetY","pageY","offsetTop","_target","srcElement","deepCopy","dst","src","Node","deepMerge","_dst$key","getBgImage","url","backgroundImage","a","copyDom","nodeType","back","tagName","attributes","node","setInterval","eventName","intervalFunc","frequency","_interval","clearInterval","fun","_timers","splice","clearAllTimers","_timerIds","createImgBtn","imgUrl","width","height","w","h","unit","btn","style","every","parseFloat","trim","backgroundSize","margin","Hex2RGBA","hex","alpha","rgb","sixHex","kw","parseInt","getFullScreenEl","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","checkIsFunction","checkIsObject","hide","display","show","isUndefined","val","isNotNull","setStyleFromCsstext","text","filterStyleFromText","list","_cssText","cssText","styleArr","ret","remain","checkIsIn","getStyleFromCsstext","preloadImg","onload","onerror","img","Image","stopPropagation","scrollTop","pageYOffset","documentElement","body","scrollLeft","pageXOffset","checkTouchSupport","getBuffered2","vbuffered","maxHoleDuration","buffered","sort","b","diff","buffered2","_i","buf2len","buf2end","getEventPos","zoom","x","y","callback","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","getHostFromUrl","results","domain","frameId","mozCancelAnimationFrame","cancelRequestAnimationFrame","isMSE","video","HTMLMediaElement","currentSrc","isBlob","generateSessionId","did","d","getTime","performance","c","random","createEvent","Event","initEvent","adjustTimeByDuration","duration","isEnded","createPositionBar","root","appendChild","getTransformStyle","pos","scale","rotate","transformValue","styles","translate","lastIndex","convertDeg","abs","getIndexByTime","segments","_index","getOffsetCurrentTime","currentTime","_segments$_index","cTime","offset","getCurrentTimeByOffset","offsetTime","VERSION_REG","H264_MIMETYPES","sniffer","device","os","isPc","browser","navigator","ua","userAgent","toLowerCase","ie","firefox","chrome","opera","safari","isWindowsPhone","isSymbian","isAndroid","isFireFox","isTablet","isPhone","isIpad","isIos","osVersion","_match","exec","version","isWeixin","toLocaleLowerCase","isSupportMP4","isSupport","mime","supportResult","canPlayType","isMSESupport","MediaSource","isTypeSupported","_logger","isHevcSupported","probeConfigSupported","defaults","supported","smooth","powerEfficient","Promise","resolve","mediaCapabilities","decodingInfo","videoConfig","audioConfig","audio","videoSupported","contentType","audioSupported","ERROR_TYPE_MAP","ERROR_MAP","Errors","Errors2","player","errorInfo","errorType","errorCode","errorMessage","originError","ext","mediaError","ERROR_TYPES","i18n","media","ended","_player$media","readyState","networkState","_errc","code","playerVersion","stack","host","_r","ex","msg","PLAY","PLAYING","ENDED","PAUSE","ERROR","SEEKING","SEEKED","TIME_UPDATE","WAITING","CANPLAY","DURATION_CHANGE","VOLUME_CHANGE","LOADED_DATA","RATE_CHANGE","PROGRESS","LOAD_START","EMPTIED","PLAYER_FOCUS","PLAYER_BLUR","READY","URL_NULL","AUTOPLAY_STARTED","AUTOPLAY_PREVENTED","COMPLETE","REPLAY","DESTROY","URL_CHANGE","DOWNLOAD_SPEED_CHANGE","FULLSCREEN_CHANGE","CSS_FULLSCREEN_CHANGE","MINI_STATE_CHANGE","DEFINITION_CHANGE","AFTER_DEFINITION_CHANGE","VIDEO_RESIZE","PIP_CHANGE","ROTATE","SCREEN_SHOT","PLAYNEXT","SHORTCUT","XGLOG","USER_ACTION","RESET","SOURCE_ERROR","SOURCE_SUCCESS","VIDEO_EVENTS","STATS_EVENTS","STATS_INFO","STATS_DOWNLOAD","STATS_RESET","FPS_STUCK","emitVideoEvent","eventKey","errorHandler","MediaProxy","_EventEmitter","MediaProxy2","_super","_this","_hasStart","_currentTime","_duration","_internalOp","_lastMuted","vtype","_rate","mediaConfig","assign","controls","autoplay","playsinline","x5VideoPlayerFullscreen","x5VideoOrientation","airplay","tabindex","mediaType","videoAttributes","playerType","x5VideoPlayerType","loop","autoplayMuted","muted","defaultPlaybackRate","playbackRate","volume","mediaEventMiddleware","attachVideoEvents","middlewares","_this2","_this3","_this4","_evHandlers","funName","charAt","toUpperCase","_err","eData","originalEvent","detail","timeStamp","paused","isInternalOp","removeInnerOP","isMutedChange","getVideoEventHandler","addEventListener","_this5","removeEventListener","urls","_this6","removeAttribute","load","_c","_videoSourceCount","_videoSourceIndex","_vLoadeddata","_eHandler","_sourceError","_dIndex","removeChild","_e","k","pause","detachVideoEvents","set","play","range","isTrue","_buffered","crossOrigin","defaultMuted","rate","Infinity","played","preload","seekable","seeking","onWaiting","_detachSourceEvents","_attachSourceEvents","vol","data","_get2","_get3","_get4","_get5","_len4","_key4","INDEXDB","INDEXDB2","mydb","db","ojstore","keypath","indexedDB","webkitindexedDB","IDBKeyRange","webkitIDBKeyRange","myDB","request","open","onsuccess","onupgradeneeded","transaction","objectStoreNames","contains","createObjectStore","keyPath","deleteDatabase","close","storename","store","objectStore","put","delete","clear","FULLSCREEN_EVENTS","GET_FULLSCREEN_API","EXIT_FULLSCREEN_API","PLATER_ID","callHandler","handler","next","then","args2","hook","hookName","preset","pre","__hooks","_preset$pre","pluginName","_this$__hooks$hookNam","preRet","isContinue","catch","useHooks","removeHooks","usePluginHooks","plugins","plugin","removePluginHooks","hooksDescriptor","presetHooks","delHooksDescriptor","runHooks","_len5","_key5","_obj$__hooks$hookName","showErrorMsg","BasePlugin","BasePlugin2","beforeCreate","__args","__events","__onceEvents","playerConfig","__init","logger","lang","i18nKeys","domEventType","_this$player","action","params","nParams","emitUserAction","registerPlugin","getPlugin","offAll","destroy","unRegisterPlugin","Obj","DOCUMENT_NODE_TYPE","Element","matches","proto","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","closest","element","selector","parentNode","_delegate","useCapture","listenerFn","delegateTarget","delegate_1","elements","querySelectorAll","ROOT_TYPES","CONTROLS","ROOT","POSITIONS","ROOT_LEFT","ROOT_RIGHT","ROOT_TOP","CONTROLS_LEFT","CONTROLS_RIGTH","CONTROLS_RIGHT","CONTROLS_CENTER","isUrl","createIcon","icon","attr","newIcon","key2","tag","registerIconsObj","iconsConfig","_icons","icons","orgIcon","class","mergeIconClass","mergeIconAttr","Plugin","_BasePlugin","Plugin2","__delegates","_parent","_el","parent","registerIcons","langText","textConfig","defaultTexConfig","registerLanguageTexts","renderStr","render","Error","insert","setAttr","setStyle","__registerChildren","_children","_Plugin","_plugin","checkChildren","langKey","langTextShow","qs","eventType","bindEL","delegate","unbindEL","htmlStr","eventHandle","isBubble","getPropertyValue","pdom","child","find","_this7","insertIdx","isDomElement","coordinate","mode","curIdx","insertBefore","insertAdjacentHTML","capture","dels","ret2","ResizeObserver","ResizeObserver2","entries","t","__runHandler","__handlers","observer","throttle","__trigger","observe","_pid","playerId","unobserve","disconnect","resizeObserver","pluginsManager","pluginGroup","init","cgid","_pluginInfoId","closeResizeObserver","resize","addObserver","isUserActive","_player","_originalOptions","_plugins","checkPlayerRoot","_keys","_p","formatPluginInfo","PLUFGIN","checkPluginIfExits","getRootByConfig","_pConfig","position","lazyRegister","lazyPlugin","timeout","race","loader","__esModule","default","register","reject","originalOptions","isSupported","codecType","disable","defaultConfig","unRegister","_instance","afterCreate","__destroy","deletePlugin","getPlugins","findPlugin","cName","beforeInit","retPromise","_loadingPlugins","all","pluginsRet","pName","beforePlayerInit","afterInit","afterPlayerInit","setLang","updateLang","reRender","_pList","onPluginsReady","setCurrentUserActive","isActive","getCurrentUseActiveId","unObserver","_Object$keys","_isUseActive","isUseActive","STATE_CLASS","DEFAULT","DEFAULT_SKIN","ENTER","PAUSED","LOADING","NO_START","ACTIVE","INACTIVE","FULLSCREEN","CSS_FULLSCREEN","ROTATE_FULLSCREEN","PARENT_ROTATE_FULLSCREEN","PARENT_FULLSCREEN","INNER_FULLSCREEN","NO_CONTROLS","FLEX_CONTROLS","CONTROLS_FOLLOW","CONTROLS_AUTOHIDE","TOP_BAR_AUTOHIDE","NOT_ALLOW_AUTOPLAY","PC","MOBILE","MINI","getDefaultConfig","nullUrlStart","fluid","fitVideoSize","videoFillMode","isLive","videoInit","poster","isMobileSimulateMode","execBeforePluginsCall","allowSeekAfterEnded","enableContextmenu","closeVideoClick","closeVideoDblclick","closePlayerBlur","closeDelayBlur","leavePlayerTime","closePlayVideoFocus","closePauseVideoFocus","closeFocusVideoFocus","closeControlsBlur","topBarAutoHide","startTime","seekedStatus","miniprogress","disableSwipeHandler","enableSwipeHandler","preProcessUrl","ignores","whitelist","inactive","language","marginControls","fullscreenTarget","screenShot","pip","download","mini","cssFullscreen","keyShortcut","presets","definition","customDuration","timeOffset","thumbnail","isHideTips","minWaitDelay","commonStyle","progressColor","playedColor","cachedColor","sliderBtnStyle","volumeColor","Controls","Controls2","_assertThisInitialize","focus","autoHide","_this$config","left","center","right","innerRoot","isMini","onMouseEnter","onMouseLeave","blur","ignorePaused","unbind","_this$config2","initShow","XGI18nLang","langKeys","textKeys","_s","_t","updateKeys","en","use","langData","i18nLangs","_clang","LANG","texts","TEXT","network","mse","parse","decoder","runtime","other","HAVE_NOTHING","HAVE_METADATA","HAVE_CURRENT_DATA","HAVE_FUTURE_DATA","HAVE_ENOUGH_DATA","NETWORK_EMPTY","NETWORK_IDLE","NETWORK_LOADING","NETWORK_NO_SOURCE","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","PLAY_TIPS","PAUSE_TIPS","PLAYNEXT_TIPS","DOWNLOAD_TIPS","ROTATE_TIPS","RELOAD_TIPS","FULLSCREEN_TIPS","EXITFULLSCREEN_TIPS","CSSFULLSCREEN_TIPS","EXITCSSFULLSCREEN_TIPS","TEXTTRACK","PIP","SCREENSHOT","LIVE","OFF","OPEN","MINI_DRAG","MINISCREEN","REFRESH_TIPS","REFRESH","FORWARD","LIVE_TIP","I18N","zh","extend","i18nTextList","lang2","_ret$langKeys","pId","STATES","STATE_ARRAY","PlAYER_HOOKS","REAL_TIME_SPEED","AVG_SPEED","Player","_MediaProxy","Player2","_config","_useAutoplay","mediaPlay","canPlayFunc","isFullScreen","delayResize","fullEl","_fullActionFrom","prop","to","isVideo","pid","checkIsCurrentVideo","_fullscreenEl","fullscreen","changeFullStyle","_fullScreenOffset","cssfullscreen","exitCssFullscreen","needFullscreenScroll","scrollTo","top","recoverFullStyle","onFullscreenChange","defaultPreset","defaultIdx","userTimer","waitTimer","_state","isError","isSeeking","isCanplay","rotateDeg","isRotateFullscreen","timeSegments","_cssfullscreenEl","curDefinition","_orgCss","_videoHeight","_videoWidth","videoPos","pi","vy","vx","sizeInfo","_accPlayed","acc","loopAcc","_offsetInfo","innerContainer","topBar","__i18n","database","_onceSeekCanplay","_isPauseBeforeSeek","innerStates","isActiveLocked","_initDOM","_this$config2$definit","defaultDefinitionObj","defaultDefinition","_bindEvents","_registerPresets","_registerPlugins","getInitDefinition","setState","onReady","hasStart","state","vid","line","handle","_initBaseDoms","XgVideoProxy","_nVideo","_root","_this$config3","_width","_height","_this$root$getBoundin","getBoundingClientRect","leftBar","rightBar","_onWebkitbeginfullscreen","_onWebkitendfullscreen","playFunc","mousemoveFunc","firstChild","isInit","ignoresStr","cuPlugins","lazy","loadingPlugin","forceBeforeInit","Preset","_player$config$plugin","_player$config$ignore","_presetInst","_presetInst$plugins","_presetInst$ignores","_presetInst$icons","_presetInst$i18n","_ci18n","usePreset","_retPlugin","_getRootByPosition","removedFromConfig","deregister","removePluginFromConfig","_this8","_furl","_startInit","fileName","lineNumber","_this9","_src","curTime","isPaused","_error","_canplay","_this10","playPromise","onError","_errorTimer","_this11","_this12","status","_this13","_this$config4","isSeekedPlay","_status","_this14","_this$config5","_this15","bitrate","switchURL","seamless","reloadFunc","_this16","clsList","mediaPause","cls","_this17","unregisterPlugins","isResetConfig","resetState","pn","de","_this18","updateAcc","_unbindEvents","exitFullscreen","cList","_this19","onPlay","_this20","cur","_srcRet","rootClass","pClassName","_orgPCss","webkitRequestFullscreen","ALLOW_KEYBOARD_INPUT","fullscreenEnabled","webkitSupportsFullscreen","webkitEnterFullscreen","exitRotateFullscreen","webkitExitFullScreen","_class","_this$config$fullscre","useCssFullscreen","_this$config$fullscre2","setRotateDeg","_rootStyle","innerHeight","deg","orientation","delay","onFocus","onBlur","_this21","isLock","_ref$ignorePaused","_this22","_this23","videoHeight","endType","_at","_this$videoPos","_pi","videoWidth","_pos","offsetWidth","offsetHeight","rHeight","rWidth","formStyle","transform","webkitTransform","resizePosition","_this24","setConfig","_this25","_this26","containerSize","_this$media","_this$config6","controlsHeight","videoFit","fit","_style","paddingTop","videoScale","vWidth","vHeight","cWidth","cHeight","updateObjectPosition","objectPosition","newState","preProcessUrl2","bool","_this27","curDef","targetDef","_this27$curDefinition","changeDefinition","total","dropped","corrupted","droppedRate","droppedDuration","getVideoPlaybackQuality","_quality","droppedVideoFrames","totalVideoFrames","corruptedVideoFrames","cumulateTime","_l","__url","posterUrl","update","_this$_accPlayed","isMuted","addInnerOP","LOG_TYPES","XGLogger","XGLogger2","isTimeUpdate","autoplayStart","_sendFF","vt","isFFLoading","isFFSend","isLs","pt","fvt","newPointTime","loadedCostTime","startCostTime","_isSeeking","seekingStart","waitingStart","fixedWaitingStart","_isWaiting","_waitTimer","_waittTimer","_waitType","suspendWaitingStatus","emitLog","suspendSeekingStatus","fixedStart","_startWaitTimeout","_onReset","_initOnceEvents","_onWaitingLoadStart","_this2$_state","_onSeeking","_onSeeked","endState","_onPlaying","_onWaiting","_onError","_onAutoplayStart","_onTimeupdate","s","_this$_state","costTime","waitTimeout","_now","_cost","_fixedCost","fixedCostTime","ReplaySvg","DOMParser","parseFromString","Replay","Replay2","replay","__handleReplay","preventDefault","path","Poster","Poster2","isEndedShow","hideCanplay","onTimeUpdate","PlaySvg","PauseSvg","AnimateMap","clearAnimation","Start","Start2","autoPlayStart","onPlayPause","initIcons","onAutoplayStart","onPlayerReset","clickHandler","switchPausePlay","cancelable","startPlay","startPause","isAnimate","endShow","_animateId","seconds","addAnimate","switchStatus","isShowPause","isShowEnd","endAnimate","disableAnimate","animate","Enter","Enter2","innerHtml","HTMLElement","barStr","logo","xgIconTips","textKey","isShow","MiniScreenIcon","MiniScreenIcon2","getMini","exitMini","onClick","getStyleSize","num","measurements","measurementsLength","getSize","elem","getStyle","size","innerWidth","outerWidth","outerHeight","getZeroSize","isBorderBox","boxSizing","measurement","paddingWidth","paddingLeft","paddingRight","paddingHeight","paddingBottom","marginWidth","marginLeft","marginRight","marginHeight","marginTop","marginBottom","borderWidth","borderLeftWidth","borderRightWidth","borderHeight","borderTopWidth","borderBottomWidth","isBorderBoxSizeOuter","styleWidth","styleHeight","getTouch","dentifier","identifier","EVENTS","POST_START_EVENTS","mousedown","touchstart","pointerdown","Draggabilly","Draggabilly2","isEnabled","isDragging","isDown","downPoint","dragPoint","startPos","_handlerDom","_bindStartEvent","_startKey","_boundPointerEvents","onUp","positionDrag","webKitTransform","dragStart","dragMove","dragEnd","touchIdentifier","pointerId","dragCancel","pointer","_getPosition","maxY","maxX","setLeftTop","_bindPostStartEvents","_unbindPostStartEvents","presetInfo","moveVector","hasDragStarted","dragRealStart","_this$startPos","_dragPointerMove","dragX","dragY","checkContain","_unbindStartEvent","axis","drag","grid","_getPositionCoord","_addTransformPosition","matrixValues","xIndex","translateX","translateY","styleSide","measure","parentSize","MiniScreen","MiniScreen2","isClose","scrollY","scrollHeight","lastStyle","isShowIcon","onCancelClick","onCenterClick","disableDrag","_draggabilly","isScrollSwitch","onScroll","MOUSE_EVENTS","mouseenter","mouseleave","mousemove","HOOKS","PCPlugin","PCPlugin2","_assertThisInitialize2","_this$playerConfig","_assertThisInitialize3","__canvas","closeVideoStopPropagation","_clickCount","clickTimer","switchPlayPause","_assertThisInitialize4","getFullscreen","initEvents","onVideoClick","onVideoDblClick","onContextmenu","returnValue","cancelBubble","_this$player2","TOUCHS","move","MOUSES","Touche","Touche2","__setPress","onTouchEnd","onTouchCancel","onTouchMove","trigger","__clearPress","moving","press","__setDb","diffx","diffy","miniStep","pressDelay","dbClickDelay","disablePress","disableDbClick","needPreventDefault","pressIntrvalId","dbIntrvalId","_initEvent","onTouchStart","__clearDb","touchend","touchmove","SeekTipIcon","ACTIONS","MobilePlugin","MobilePlugin2","touche","getTouche","disableGesture","isStart","rect","_x","_y","scopeL","scopeR","scopeM1","scopeM","scopeM2","miniMoveStep","hideControlsActive","scope","checkScope","gestureY","gestureX","executeMove","endLastMove","resetSeekState","resetPos","changeAction","checkIsRootTarget","light","timer","seekTipIcon","closedbClick","xgMask","initCustomStyle","registerThumbnail","onRootTouchMove","onRootTouchEnd","player2","config2","moveDuration","_this2$pos","eventsMap","pressend","click","doubleclick","disableActive","progressPlugin","progress","addCallBack","activeSeekNote","forward","usable","createThumbnail","timePreview","backgroundColor","color","disableTimeProgress","startPlugin","recover","mold","updateTime","updateBrightness","updateVolume","lastScope","seek","toFixed","hideControlsEnd","sendUseAction","focusVideoClick","dbClickHandler","pressRate","percent","updatePercent","isTouchingSeek","maxDarkness","isForward","focusHide","updateThumbnails","gradient","disableSeekIcon","miniYPer","darkness","isDisableTag","isContentEditable","Keyboard","Keyboard2","keyCode","_keyState","disableBodyTrigger","isIgnoreUserActive","checkIsVisible","metaKey","altKey","ctrlKey","isBodyKeyDown","repeat","isKeyDown","isGlobalTrigger","checkCode","onBodyKeyUp","handleKeyDown","handleKeyUp","disableRootTrigger","onKeyup","extendkeyCodeMap","keyCodeMap","key1","seekStep","space","noBodyTarget","up","down","pressAction","esc","mergekeyCodeMap","isPress","tt","onKeydown","onBodyKeyDown","checkVisible","rec","bottom","isBodyTarget","flag","offsetCurrentTime","offsetDuration","_time","_step","_seekTime","handleKeyCode","curKeyCode","_this$keyCodeMap$arr$","_action","loadingIcon","Loading","Loading2","TPL","styleKey","InnerList","InnerList2","fragments","_callBack","actionCallback","fragConfig","fragFocusClass","fragAutoFocus","fragClass","cachedIndex","playedIndex","focusIndex","newIndex","curIndex","millisecond","progressList","curPFrag","per","newPIndex","findIndex","unHightLight","setHightLight","_data2","preIndex","fragment","_data","cached","updateDuration","updateProgress","newCIndex","newOptions","_this$fragConfig","inner","isFocus","item2","FRAGMENT_FOCUS_CLASS","POINT","HIGHLIGHT","Progress","Progress2","_ePos","computeTime","triggerCallbacks","_updateInnerFocus","isLocked","updateWidth","seekTime","isPauseMoving","closeMoveSeek","isPlaying","onMoveStart","prePlayTime","isProgressMoving","progressBtn","_mouseDownHandlerHook","onMouseMove","onMouseUp","onMoveOnly","_assertThisInitialize5","onMoveEnd","_mouseUpHandlerHook","isEnter","_assertThisInitialize6","miniStartStep","_mouseMoveHandlerHook","_assertThisInitialize7","unlock","_this$pos","useable","__dragCallBacks","direc","_disableBlur","innerList","reset","outer","updateFocus","_initInner","isDragingSeek","isMobile","onTimeupdate","onCacheUpdate","onReset","onVideoResize","bindDomEvents","frags","boxShadow","_mouseDownHandler","_mouseUpHandler","_mouseMoveHandler","onMouseDown","onMouseOver","onMouseOut","onBodyClick","pauseAutoHide","recoverAutoHide","isCloseClickSeek","realTime","endedDiff","rLeft","timeIcon","resetActive","notSeek","_end","bufferedPoint","thumbnailPlugin","controlsMode","Icon","Icon2","_onMouseenter","_onMouseLeave","Play","_IconPlugin","Play2","btnClick","tipDom","changeLangTextKey","BackSVG","TopBackIcon","TopBackIcon2","screenBack","FullScreenSvg","ExitFullScreenSvg","Fullscreen","Fullscreen2","rotateFullscreen","handleFullscreen","toggleFullScreen","tipsDom","needBackIcon","topBackIcon","_onOrientationChange","getCssFullscreen","getRotateFullscreen","switchCallback","e2","Time","Time2","isActiving","constrolsMode","createCenterTime","durationDom","timeDom","centerCurDom","centerDurDom","current","minWidthTime","timeStr","updateState","TimeSegmentsControls","TimeSegmentsControls2","updateSegments","_checkIfEnabled","changeIndex","curPos","lastCurrentTime","_this$curPos","_this$player3","getSeekTime","_this$player4","_onDurationChange","_onLoadedData","_onPlay","newConfig","_segs","formatTimeSegments","_item","_segDuration","segDuration","last","_timeSegments$index","diff2","volumeLargeSvg","volumeSmallSvg","volumeMutedSvg","Volume","Volume2","bar","barRect","barH","updateVolumePos","onBarMouseUp","_d","isMoving","unFocus","showValueLabel","updateVolumeValue","volumeSmall","volumeLarge","volumeMuted","_timerId","changeMutedHandler","changeMuted","_onMouseenterHandler","onMouseenter","_onMouseleaveHandler","onMouseleave","onBarMousedown","onBarMouseMove","onVolumeChange","$labelValue","innerText","isForce","miniVolume","isShowVolumeValue","RotateSvg","Rotate","Rotate2","onBtnClick","innerRotate","updateRotateDeg","rootWidth","clientWidth","rootHeight","clientHeight","clockwise","videoRotateDeg","_transform","_styles","transformOrigin","times","factor","PipIcon","PipIconExit","PresentationMode","PIP2","isPIPAvailable","isPip","exitPIP","requestPIP","showIcon","pMode","initPipEvents","switchPIP","pipIcon","pipIconExit","leavePIPCallback","enterPIPCallback","pipWindow","pictureInPictureWindow","onWebkitpresentationmodechanged","webkitPresentationMode","checkWebkitSetPresentationMode","webkitSetPresentationMode","requestPictureInPicture","reason","exitPictureInPicture","pictureInPictureElement","pictureInPictureEnabled","disablePictureInPicture","webkitSupportsPresentationMode","Next","PlayNextIcon","PlayNextIcon2","idx","urlList","nextHandler","playNext","changeSrc","strFileName","strMimeType","blob","reader","defaultMime","mimeType","payload","anchor","myBlob","Blob","MozBlob","WebKitBlob","pop","ajax","XMLHttpRequest","responseType","response","send","msSaveBlob","dataUrlToBlob","saver","tempUiArr","Uint8Array","mx","charCodeAt","strUrl","parts","binData","atob","decodeURIComponent","uiArr","winMode","URL","revokeObjectURL","confirm","f","createObjectURL","btoa","encodeURIComponent","FileReader","readAsDataURL","DownloadSvg","Download","Download2","dUrl","newUrl","getAbsoluteURL","downloadUtil","_handler","div","ScreenShot","ScreenShot2","screenshotIcon","initSize","fitVideo","onClickBtn","filename","saveLink","initMouseEvent","dispatchEvent","canvas","canvasCtx","getContext","imageSmoothingEnabled","imageSmoothingQuality","shot","saveScreenShot","option","quality","createCanvas","dx","dy","dw","dh","mediaRatio","canvasRatio","sw","sh","drawImage","toDataURL","OptionList","OptionList2","maxHeight","onItemClick","renderItemList","_delegates","attrKeys","selected","showText","changeCallback","curSelected","getAttrObj","LIST_TYPES","SIDE","MIDDLE","TOGGLE_MODES","IS_MOBILE","OptionsIcon","OptionsIcon2","switchActiveState","toggleMode","toggle","listType","enterType","isIcons","curValue","hidePortrait","_resizeList","optionsList","activeEvent","onEnter","onLeave","onIconClick","_isIcons","focusAwhile","curItem","changeCurrentText","isItemClickHide","getTextByLang","itemList","_maxH","listStyle","DefinitionIcon","_OptionsIcon","DefinitionIcon2","changeDefinitionList","definitionList","items","showItem","PlaybackRate","PlaybackRate2","curRate","itemInfo","_text","CssFullSceenSvg","ExitCssFullSceenSvg","CssFullScreen","CssFullScreen2","isCssfullScreen","handleCssFullscreen","contentIcon","switchTips","ErrorPlugin","ErrorPlugin2","errorRetry","handleError","retry","errorNote","Prompt","Prompt2","intervalId","customConfig","customOnClick","showPrompt","hidePrompt","interval","highlight","hideinterval","ISPOT","mergeISPOT","iSpot","APIS","_updateDotDom","dotDom","calcuPosition","initDots","_ispots","createDot","ispotsInit","isNew","template","positionDot","findDot","updateDot","needShow","dot","showDot","deleteDot","del","parentElement","deleteAllDots","dotDoms","getElementsByTagName","updateAllDots","iSpots","ispot","positionDots","playerSize","_pop","pRect","rect1","_left","_diff","_t2","getAllDotsDom","getDotDom","CALLBACK_MAP","dragmove","dragstart","dragend","mouseover","ProgressPreview","ProgressPreview2","isHideThumbnailHover","isDrag","_curDot","onDotMouseLeave","blurDot","enableBlur","focusDot","disableBlur","videoPreview","videothumbnail","handlerSpotClick","_event","transformTimeHook","setTimeContent","ispots","progressDot","initDotsAPI","extTextRoot","previewLine","timePoint","timeText","tipText","_hasThumnail","bindEvents","onMousemove","onMousedown","onMouseup","handlerPreviewClick","updatePosition","cwidth","isflex","lwidth","showTips","isFocusDots","defaultText","hideTips","updateTimeText","updateLinePos","thumbnailConfig","isShowThumbnail","tRoot","isShowCoverPreview","totalWidth","widthPerSeconds","_activeDotId","isDefault","textContent","removeCallBack","miniWidth","Thumbnail","Thumbnail2","ratio","_preloadMark","initThumbnail","_this2$config","pic_num","containerWidth","containerHeight","row","col","urlIndex","indexInPage","rowIndex","colIndex","swidth","sHeight","getUrlByIndex","backgroundPosition","customStyle","getPosition","MiniProgress","MiniProgress2","MODES","isSupportCanvas","DynamicBg","DynamicBg2","_frameCount","startFrameCount","renderOnTimeupdate","renderOnce","_isLoaded","_checkIfCanStart","nowTime","_sVideo","checkVideoIsSupport","stop","videoPI","preTime","dynamicBg","frameRate","rwidth","rheight","onLoadedData","canvasFilter","supportCanvasFilter","isInnerRender","webkitFilter","mask","addMask","background","maskBg","renderByPoster","_tVideo","HTMLVideoElement","flyVideo","_tagName","updateImg","_this$canvas$getBound","image","sourcePI","_this$canvas$getBound2","multiple","checkIsSupportCanvas","INFO","STATS_EVENTS$1","Stats","Stats2","actionData","_getTime","_stats","stats","getStats","JSON","stringify","downloadUrl","link","disabled","timestamp","timeFormat","toISOString","_recordUserActions","_recordInfo","_downloadStats","profile","_infoProfile","_info","startMs","cat","dur","ph","tid","ts","_this$_stats","mediaElem","mediaInfo","raw","timestat","_getTimeStats","_getProfile","stat","traceEvents","GapJump","GapJump2","seekingEventReceived","hasPlayed","smallGapLimit","gapDetectionThreshold","_getIndex","jumpTo","jumpSize","isGapSmall","BROWSER_GAP_TOLERANCE","useGapJump","isSafari","end_type","video_postion","platform","onGapJump","threshold","bufferedInfo","_getBuffered","WaitingTimeoutJump","WaitingTimeoutJump2","jumpCnt","jumpCntMax","useWaitingTimeoutJump","onJump","waitingTime","DEFAULT_SPEED_TYPE","SPEED_TYPE","TestSpeed","TestSpeed2","speedListCache","initSpeedList","cnt","testSpeed","testTimeStep","speed","appendList","openSpeed","loadSize","testCnt","testSpeedUrl","xhr","headers","Range","setRequestHeader","onreadystatechange","getResponseHeader","saveSpeedMax","shift","realTimeSpeed","getSpeedName","updateSpeed","getSpeed","avgSpeed","speedName","addSpeedTypeList","_onRealSpeedChange","namePrefix","FpsDetect","FpsDetect2","_lastDecodedFrames","_currentStuckCount","_lastCheckPoint","_payload","_startTick","_stopTick","_timer","_checkDecodeFPS","tick","curDecodedFrames","checkInterval","hidden","enoughBuffer","bufs","stuckCount","_reset","reportFrame","_this$player$media$ge","currTime","curDecoded","_checkStuck","DefaultPreset","DefaultPreset2","_this$plugins","_this$plugins2","_this$plugins3","simulateMode","contolsIcons","layers","PresetPlayer","_Player","PresetPlayer2","Xhr","Xhr2","Function","run","abort","PLAY_MODES","ORDER","SLOOP","LOOP","RANDOM","CLASS_NAME","_randomIndex","Music","Music2","change","abCycle","_initABCycle","halfPass","confirmOrder","Util","nextIndex","prevIndex","history","title","_curInfo","Events.TIME_UPDATE","_onTimeUpdate","Events.ENDED","_onEnded","Events.DURATION_CHANGE","offline","checkOffline","progresspreview","_start","_nextCompute","_prevCompute","timeScale","meta","typeof","removeAbCycle","offlineVid","_emitChange","openDB","getDataByKey","closeDB","preloadNext","addData","MusicCover","MusicCover2","_img2","_img","MusicBackward","MusicBackward2","music","backward","musicBackward","MusicPrev","MusicPrev2","prev","musicPrev","MusicForward","MusicForward2","musicForward","MusicNext","MusicNext2","musicNext","MusicMeta","MusicMeta2","MusicPreset","MusicPreset2","initMusicConfig","XgplayerProxy","initOptions","invokeVoid","getPropsAndStates","isFullscreen","isCssFullscreen","playerOptions","Mobile","Playbackrate","MasaBlazor","xgplayerPlugins","xgplayerPluginOptions","Xgplayer"],"mappings":"AAAA,SAASA,EAAQC,EAAQC,GACvB,IAAIC,EAAOC,OAAOD,KAAKF,GACvB,GAAIG,OAAOC,sBAAuB,CAChC,IAAIC,EAAUF,OAAOC,sBAAsBJ,GAC3CC,IAAmBI,EAAUA,EAAQC,QAAO,SAASC,GACnD,OAAOJ,OAAOK,yBAAyBR,EAAQO,GAAKE,UAC1D,KAASP,EAAKQ,KAAKC,MAAMT,EAAMG,EAC5B,CACD,OAAOH,CACT,CACA,SAASU,EAAeC,GACtB,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAAS,MAAQF,UAAUD,GAAKC,UAAUD,GAAK,GACnDA,EAAI,E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d,EACA7H,GAGA,OADiB,IAAIuyE,GAAcptD,EAAUtd,EAAK7H,EAEpD"} \ No newline at end of file diff --git a/src/Masa.Try.Server/Pages/_Host.cshtml b/src/Masa.Try.Server/Pages/_Host.cshtml index 7ed836e9ed..b8bbc6aa9c 100644 --- a/src/Masa.Try.Server/Pages/_Host.cshtml +++ b/src/Masa.Try.Server/Pages/_Host.cshtml @@ -25,6 +25,7 @@ + diff --git a/src/Masa.Try.WebAssembly/wwwroot/index.html b/src/Masa.Try.WebAssembly/wwwroot/index.html index f8767a6853..1612e787dc 100644 --- a/src/Masa.Try.WebAssembly/wwwroot/index.html +++ b/src/Masa.Try.WebAssembly/wwwroot/index.html @@ -20,6 +20,7 @@ +