xgplayer 2.32.5 → 2.32.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/controls/airplay.js +1 -1
- package/browser/controls/cssFullscreen.js +1 -1
- package/browser/controls/danmu.js +3 -1
- package/browser/controls/definition.js +1 -1
- package/browser/controls/download.js +1 -1
- package/browser/controls/enter.js +1 -1
- package/browser/controls/error.js +1 -1
- package/browser/controls/errorRetry.js +1 -1
- package/browser/controls/flex.js +1 -1
- package/browser/controls/fullscreen.js +1 -1
- package/browser/controls/loading.js +1 -1
- package/browser/controls/memoryPlay.js +1 -1
- package/browser/controls/miniplayer.js +9 -7
- package/browser/controls/mobile.js +1 -1
- package/browser/controls/nativeTextTrack.js +1 -1
- package/browser/controls/pc.js +1 -1
- package/browser/controls/pip.js +1 -1
- package/browser/controls/play.js +1 -1
- package/browser/controls/playNext.js +1 -1
- package/browser/controls/playbackRate.js +1 -1
- package/browser/controls/poster.js +1 -1
- package/browser/controls/progress.js +1 -1
- package/browser/controls/reload.js +1 -1
- package/browser/controls/replay.js +1 -1
- package/browser/controls/rotate.js +1 -1
- package/browser/controls/screenShot.js +1 -1
- package/browser/controls/start.js +1 -1
- package/browser/controls/textTrack.js +1 -1
- package/browser/controls/time.js +1 -1
- package/browser/controls/volume.js +1 -1
- package/browser/core_player.js +1 -1
- package/browser/core_player.js.map +1 -1
- package/browser/index.js +11 -7
- package/browser/index.js.map +1 -1
- package/browser/simple_player.js +1 -1
- package/browser/simple_player.js.map +1 -1
- package/dist/controls/airplay.js +1 -1
- package/dist/controls/cssFullscreen.js +1 -1
- package/dist/controls/danmu.js +3 -1
- package/dist/controls/definition.js +1 -1
- package/dist/controls/download.js +1 -1
- package/dist/controls/enter.js +1 -1
- package/dist/controls/error.js +1 -1
- package/dist/controls/errorRetry.js +1 -1
- package/dist/controls/flex.js +1 -1
- package/dist/controls/fullscreen.js +1 -1
- package/dist/controls/loading.js +1 -1
- package/dist/controls/memoryPlay.js +1 -1
- package/dist/controls/miniplayer.js +9 -7
- package/dist/controls/mobile.js +1 -1
- package/dist/controls/nativeTextTrack.js +1 -1
- package/dist/controls/pc.js +1 -1
- package/dist/controls/pip.js +1 -1
- package/dist/controls/play.js +1 -1
- package/dist/controls/playNext.js +1 -1
- package/dist/controls/playbackRate.js +1 -1
- package/dist/controls/poster.js +1 -1
- package/dist/controls/progress.js +1 -1
- package/dist/controls/reload.js +1 -1
- package/dist/controls/replay.js +1 -1
- package/dist/controls/rotate.js +1 -1
- package/dist/controls/screenShot.js +1 -1
- package/dist/controls/start.js +1 -1
- package/dist/controls/textTrack.js +1 -1
- package/dist/controls/time.js +1 -1
- package/dist/controls/volume.js +1 -1
- package/dist/core_player.js +2960 -2889
- package/dist/core_player.js.map +1 -1
- package/dist/index.js +1938 -3321
- package/dist/index.js.map +1 -1
- package/dist/index.min.css +1 -0
- package/dist/index.min.js +2 -0
- package/dist/index.min.js.map +1 -0
- package/dist/simple_player.js +274 -281
- package/dist/simple_player.js.map +1 -1
- package/es/_virtual/_rollupPluginBabelHelpers.js +216 -0
- package/es/constant.d.ts +4 -0
- package/es/constant.js +5 -0
- package/es/controls/airplay.js +1 -1
- package/es/controls/cssFullscreen.js +1 -1
- package/es/controls/danmu.js +3 -1
- package/es/controls/definition.js +1 -1
- package/es/controls/download.js +1 -1
- package/es/controls/enter.js +1 -1
- package/es/controls/error.js +1 -1
- package/es/controls/errorRetry.js +1 -1
- package/es/controls/flex.js +1 -1
- package/es/controls/fullscreen.js +1 -1
- package/es/controls/i18n.js +1 -1
- package/es/controls/keyboard.js +1 -1
- package/es/controls/loading.js +1 -1
- package/es/controls/localPreview.js +1 -1
- package/es/controls/memoryPlay.js +1 -1
- package/es/controls/miniplayer.js +9 -7
- package/es/controls/mobile.js +1 -1
- package/es/controls/nativeTextTrack.js +1 -1
- package/es/controls/pc.js +1 -1
- package/es/controls/pip.js +1 -1
- package/es/controls/play.js +1 -1
- package/es/controls/playNext.js +1 -1
- package/es/controls/playbackRate.js +1 -1
- package/es/controls/poster.js +1 -1
- package/es/controls/progress.js +1 -1
- package/es/controls/reload.js +1 -1
- package/es/controls/replay.js +1 -1
- package/es/controls/rotate.js +1 -1
- package/es/controls/screenShot.js +1 -1
- package/es/controls/start.js +1 -1
- package/es/controls/textTrack.js +1 -1
- package/es/controls/time.js +1 -1
- package/es/controls/volume.js +1 -1
- package/es/core_player.js +1 -1
- package/es/core_player.js.map +1 -1
- package/es/defaultConfig.d.ts +243 -0
- package/es/defaultConfig.js +85 -0
- package/es/error.d.ts +114 -0
- package/es/error.js +75 -0
- package/es/events.d.ts +61 -0
- package/es/events.js +62 -0
- package/es/icons.d.ts +2 -0
- package/es/index.css +499 -0
- package/es/index.d.ts +25 -0
- package/es/index.js +11 -7
- package/es/index.js.map +1 -1
- package/es/index.scss +29 -0
- package/es/index.umd.d.ts +60 -0
- package/es/index.umd.js +30 -0
- package/es/lang/en.d.ts +91 -0
- package/es/lang/en.js +77 -0
- package/es/lang/i18n.d.ts +36 -0
- package/es/lang/i18n.js +122 -0
- package/es/lang/index.d.ts +2 -0
- package/es/lang/jp.d.ts +91 -0
- package/es/lang/jp.js +77 -0
- package/es/lang/zh-cn.d.ts +91 -0
- package/es/lang/zh-cn.js +77 -0
- package/es/lang/zh-hk.d.ts +91 -0
- package/es/lang/zh-hk.js +77 -0
- package/es/mediaProxy.d.ts +334 -0
- package/es/mediaProxy.js +623 -0
- package/es/player.d.ts +825 -0
- package/es/player.js +1945 -0
- package/es/plugin/basePlugin.d.ts +180 -0
- package/es/plugin/basePlugin.js +259 -0
- package/es/plugin/hooksDescriptor.d.ts +60 -0
- package/es/plugin/hooksDescriptor.js +149 -0
- package/es/plugin/index.d.ts +13 -0
- package/es/plugin/plugin.d.ts +207 -0
- package/es/plugin/plugin.js +542 -0
- package/es/plugin/pluginsManager.d.ts +162 -0
- package/es/plugin/pluginsManager.js +362 -0
- package/es/plugin/preset.d.ts +1 -0
- package/es/plugin/preset.js +28 -0
- package/es/plugin/resizeObserver.d.ts +3 -0
- package/es/plugin/resizeObserver.js +108 -0
- package/es/plugins/assets/back.js +4 -0
- package/es/plugins/assets/download.js +4 -0
- package/es/plugins/assets/exitCssFull.js +4 -0
- package/es/plugins/assets/exitFull.js +4 -0
- package/es/plugins/assets/loading.js +4 -0
- package/es/plugins/assets/panel.js +4 -0
- package/es/plugins/assets/pause.js +4 -0
- package/es/plugins/assets/pipIcon.js +4 -0
- package/es/plugins/assets/pipIconExit.js +4 -0
- package/es/plugins/assets/play.js +4 -0
- package/es/plugins/assets/playNext.js +4 -0
- package/es/plugins/assets/replay.js +4 -0
- package/es/plugins/assets/requestCssFull.js +7 -0
- package/es/plugins/assets/requestFull.js +4 -0
- package/es/plugins/assets/rotate.js +4 -0
- package/es/plugins/assets/seekicon.js +4 -0
- package/es/plugins/assets/volumeLarge.js +4 -0
- package/es/plugins/assets/volumeMuted.js +4 -0
- package/es/plugins/assets/volumeSmall.js +4 -0
- package/es/plugins/common/iconPlugin.d.ts +5 -0
- package/es/plugins/common/iconPlugin.js +42 -0
- package/es/plugins/common/iconTools.d.ts +1 -0
- package/es/plugins/common/iconTools.js +8 -0
- package/es/plugins/common/index.scss +2 -0
- package/es/plugins/common/optionList.d.ts +15 -0
- package/es/plugins/common/optionList.js +120 -0
- package/es/plugins/common/optionsIcon.d.ts +40 -0
- package/es/plugins/common/optionsIcon.js +304 -0
- package/es/plugins/common/optionsIcon.scss +154 -0
- package/es/plugins/common/thumbnail.d.ts +62 -0
- package/es/plugins/common/thumbnail.js +191 -0
- package/es/plugins/common/thumbnail.scss +27 -0
- package/es/plugins/controls/index.css +132 -0
- package/es/plugins/controls/index.d.ts +73 -0
- package/es/plugins/controls/index.js +189 -0
- package/es/plugins/controls/index.scss +204 -0
- package/es/plugins/cssFullScreen/index.css +12 -0
- package/es/plugins/cssFullScreen/index.d.ts +40 -0
- package/es/plugins/cssFullScreen/index.js +136 -0
- package/es/plugins/cssFullScreen/index.scss +19 -0
- package/es/plugins/danmu/danmuIcon.d.ts +24 -0
- package/es/plugins/danmu/danmuIcon.js +98 -0
- package/es/plugins/danmu/danmuPanel.d.ts +39 -0
- package/es/plugins/danmu/danmuPanel.js +81 -0
- package/es/plugins/danmu/index.css +603 -0
- package/es/plugins/danmu/index.d.ts +96 -0
- package/es/plugins/danmu/index.js +313 -0
- package/es/plugins/danmu/index.scss +356 -0
- package/es/plugins/definition/index.css +4 -0
- package/es/plugins/definition/index.d.ts +38 -0
- package/es/plugins/definition/index.js +164 -0
- package/es/plugins/definition/index.scss +4 -0
- package/es/plugins/download/index.css +13 -0
- package/es/plugins/download/index.d.ts +31 -0
- package/es/plugins/download/index.js +107 -0
- package/es/plugins/download/index.scss +22 -0
- package/es/plugins/dynamicBg/index.css +16 -0
- package/es/plugins/dynamicBg/index.d.ts +83 -0
- package/es/plugins/dynamicBg/index.js +316 -0
- package/es/plugins/dynamicBg/index.scss +19 -0
- package/es/plugins/enter/index.css +104 -0
- package/es/plugins/enter/index.d.ts +19 -0
- package/es/plugins/enter/index.js +46 -0
- package/es/plugins/enter/index.scss +78 -0
- package/es/plugins/error/index.css +29 -0
- package/es/plugins/error/index.d.ts +8 -0
- package/es/plugins/error/index.js +75 -0
- package/es/plugins/error/index.scss +34 -0
- package/es/plugins/fpsDetect/index.d.ts +34 -0
- package/es/plugins/fpsDetect/index.js +149 -0
- package/es/plugins/fullscreen/backicon.d.ts +17 -0
- package/es/plugins/fullscreen/backicon.js +72 -0
- package/es/plugins/fullscreen/index.css +23 -0
- package/es/plugins/fullscreen/index.d.ts +58 -0
- package/es/plugins/fullscreen/index.js +202 -0
- package/es/plugins/fullscreen/index.scss +35 -0
- package/es/plugins/gapJump/index.d.ts +21 -0
- package/es/plugins/gapJump/index.js +142 -0
- package/es/plugins/keyboard/index.d.ts +89 -0
- package/es/plugins/keyboard/index.js +421 -0
- package/es/plugins/loading/index.css +58 -0
- package/es/plugins/loading/index.d.ts +11 -0
- package/es/plugins/loading/index.js +43 -0
- package/es/plugins/loading/index.scss +70 -0
- package/es/plugins/logger/index.d.ts +54 -0
- package/es/plugins/logger/index.js +311 -0
- package/es/plugins/miniScreen/index.css +179 -0
- package/es/plugins/miniScreen/index.d.ts +68 -0
- package/es/plugins/miniScreen/index.js +212 -0
- package/es/plugins/miniScreen/index.scss +198 -0
- package/es/plugins/miniScreen/miniScreenIcon.d.ts +11 -0
- package/es/plugins/miniScreen/miniScreenIcon.js +56 -0
- package/es/plugins/mobile/index.css +181 -0
- package/es/plugins/mobile/index.d.ts +125 -0
- package/es/plugins/mobile/index.js +631 -0
- package/es/plugins/mobile/index.scss +180 -0
- package/es/plugins/mobile/touch.d.ts +43 -0
- package/es/plugins/mobile/touch.js +214 -0
- package/es/plugins/netAdaption/index.d.ts +5 -0
- package/es/plugins/pc/index.css +3 -0
- package/es/plugins/pc/index.d.ts +14 -0
- package/es/plugins/pc/index.js +199 -0
- package/es/plugins/pc/index.scss +5 -0
- package/es/plugins/pip/index.css +12 -0
- package/es/plugins/pip/index.d.ts +37 -0
- package/es/plugins/pip/index.js +222 -0
- package/es/plugins/pip/index.scss +21 -0
- package/es/plugins/play/index.css +12 -0
- package/es/plugins/play/index.d.ts +23 -0
- package/es/plugins/play/index.js +127 -0
- package/es/plugins/play/index.scss +18 -0
- package/es/plugins/playNext/index.css +22 -0
- package/es/plugins/playNext/index.d.ts +19 -0
- package/es/plugins/playNext/index.js +104 -0
- package/es/plugins/playNext/index.scss +35 -0
- package/es/plugins/playbackRate/index.css +4 -0
- package/es/plugins/playbackRate/index.d.ts +31 -0
- package/es/plugins/playbackRate/index.js +140 -0
- package/es/plugins/playbackRate/index.scss +6 -0
- package/es/plugins/poster/index.css +39 -0
- package/es/plugins/poster/index.d.ts +27 -0
- package/es/plugins/poster/index.js +109 -0
- package/es/plugins/poster/index.scss +56 -0
- package/es/plugins/progress/index.css +234 -0
- package/es/plugins/progress/index.d.ts +178 -0
- package/es/plugins/progress/index.js +687 -0
- package/es/plugins/progress/index.scss +288 -0
- package/es/plugins/progress/innerList.d.ts +49 -0
- package/es/plugins/progress/innerList.js +285 -0
- package/es/plugins/progress/miniProgress.d.ts +9 -0
- package/es/plugins/progress/miniProgress.js +55 -0
- package/es/plugins/progressPreview/dotsApi.d.ts +1 -0
- package/es/plugins/progressPreview/dotsApi.js +269 -0
- package/es/plugins/progressPreview/index.css +190 -0
- package/es/plugins/progressPreview/index.d.ts +87 -0
- package/es/plugins/progressPreview/index.js +475 -0
- package/es/plugins/progressPreview/index.scss +235 -0
- package/es/plugins/prompt/index.css +47 -0
- package/es/plugins/prompt/index.d.ts +24 -0
- package/es/plugins/prompt/index.js +110 -0
- package/es/plugins/prompt/index.scss +53 -0
- package/es/plugins/replay/index.css +33 -0
- package/es/plugins/replay/index.d.ts +16 -0
- package/es/plugins/replay/index.js +109 -0
- package/es/plugins/replay/index.scss +41 -0
- package/es/plugins/rotate/index.css +0 -0
- package/es/plugins/rotate/index.d.ts +22 -0
- package/es/plugins/rotate/index.js +148 -0
- package/es/plugins/rotate/index.scss +0 -0
- package/es/plugins/rotate/index2.js +2 -0
- package/es/plugins/screenShot/index.css +3 -0
- package/es/plugins/screenShot/index.d.ts +30 -0
- package/es/plugins/screenShot/index.js +178 -0
- package/es/plugins/screenShot/index.scss +5 -0
- package/es/plugins/start/index.css +91 -0
- package/es/plugins/start/index.d.ts +41 -0
- package/es/plugins/start/index.js +267 -0
- package/es/plugins/start/index.scss +115 -0
- package/es/plugins/stats/index.d.ts +38 -0
- package/es/plugins/stats/index.js +194 -0
- package/es/plugins/testspeed/index.d.ts +26 -0
- package/es/plugins/testspeed/index.js +207 -0
- package/es/plugins/time/index.css +46 -0
- package/es/plugins/time/index.d.ts +28 -0
- package/es/plugins/time/index.js +225 -0
- package/es/plugins/time/index.scss +57 -0
- package/es/plugins/time/timesegments.d.ts +24 -0
- package/es/plugins/time/timesegments.js +216 -0
- package/es/plugins/track/index.css +91 -0
- package/es/plugins/track/index.d.ts +132 -0
- package/es/plugins/track/index.js +463 -0
- package/es/plugins/track/index.scss +111 -0
- package/es/plugins/track/nativeSubTitle.d.ts +22 -0
- package/es/plugins/track/nativeSubTitle.js +94 -0
- package/es/plugins/volume/index.css +95 -0
- package/es/plugins/volume/index.d.ts +88 -0
- package/es/plugins/volume/index.js +319 -0
- package/es/plugins/volume/index.scss +124 -0
- package/es/plugins/waitingTimeoutJump/index.d.ts +15 -0
- package/es/plugins/waitingTimeoutJump/index.js +88 -0
- package/es/presets/default-en.d.ts +33 -0
- package/es/presets/default-en.js +63 -0
- package/es/presets/default.d.ts +34 -0
- package/es/presets/default.js +70 -0
- package/es/presets/index.d.ts +4 -0
- package/es/presets/live.d.ts +94 -0
- package/es/presets/live.js +39 -0
- package/es/presets/mobile.d.ts +103 -0
- package/es/presets/mobile.js +34 -0
- package/es/simple_player.js +1 -1
- package/es/simple_player.js.map +1 -1
- package/es/state.d.ts +11 -0
- package/es/state.js +12 -0
- package/es/stateClassMap.d.ts +32 -0
- package/es/stateClassMap.js +32 -0
- package/es/style/common/animation.scss +16 -0
- package/es/style/common/svg-url.scss +70 -0
- package/es/style/common.scss +457 -0
- package/es/style/index.scss +4 -0
- package/es/style/variable.scss +76 -0
- package/es/utils/database.d.ts +31 -0
- package/es/utils/database.js +107 -0
- package/es/utils/debug.d.ts +10 -0
- package/es/utils/debug.js +43 -0
- package/es/utils/draggabilly.d.ts +54 -0
- package/es/utils/draggabilly.js +410 -0
- package/es/utils/sniffer.d.ts +28 -0
- package/es/utils/sniffer.js +150 -0
- package/es/utils/url.d.ts +1 -0
- package/es/utils/util.d.ts +304 -0
- package/es/utils/util.js +827 -0
- package/es/utils/xgplayerTimeRange.d.ts +7 -0
- package/es/utils/xgplayerTimeRange.js +25 -0
- package/es/version.d.ts +2 -0
- package/es/version.js +2 -0
- package/package.json +2 -3
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import { addObserver, unObserver } from "./resizeObserver.js";
|
|
2
|
+
import util from "../utils/util.js";
|
|
3
|
+
var pluginsManager = {
|
|
4
|
+
pluginGroup: {},
|
|
5
|
+
init: function init(player) {
|
|
6
|
+
var cgid = player._pluginInfoId;
|
|
7
|
+
if (!cgid) {
|
|
8
|
+
cgid = new Date().getTime();
|
|
9
|
+
player._pluginInfoId = cgid;
|
|
10
|
+
}
|
|
11
|
+
!player.config.closeResizeObserver && addObserver(player.root, function() {
|
|
12
|
+
player.resize();
|
|
13
|
+
});
|
|
14
|
+
if (Object.keys(this.pluginGroup).length === 0) {
|
|
15
|
+
player.isUserActive = true;
|
|
16
|
+
}
|
|
17
|
+
this.pluginGroup[cgid] = {
|
|
18
|
+
_player: player,
|
|
19
|
+
_originalOptions: player.config || {},
|
|
20
|
+
_plugins: {}
|
|
21
|
+
};
|
|
22
|
+
},
|
|
23
|
+
checkPlayerRoot: function checkPlayerRoot(root) {
|
|
24
|
+
if (this.pluginGroup) {
|
|
25
|
+
var _keys = Object.keys(this.pluginGroup);
|
|
26
|
+
for (var i = 0; i < _keys.length; i++) {
|
|
27
|
+
var _p = this.pluginGroup[_keys[i]]._player;
|
|
28
|
+
if (_p.root === root) {
|
|
29
|
+
return _p;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
},
|
|
36
|
+
formatPluginInfo: function formatPluginInfo(plugin, config) {
|
|
37
|
+
var PLUFGIN = null;
|
|
38
|
+
var options = null;
|
|
39
|
+
if (plugin.plugin && typeof plugin.plugin === "function") {
|
|
40
|
+
PLUFGIN = plugin.plugin;
|
|
41
|
+
options = plugin.options;
|
|
42
|
+
} else {
|
|
43
|
+
PLUFGIN = plugin;
|
|
44
|
+
options = {};
|
|
45
|
+
}
|
|
46
|
+
if (config) {
|
|
47
|
+
options.config = config || {};
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
PLUFGIN,
|
|
51
|
+
options
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
checkPluginIfExits: function checkPluginIfExits(pluginName, plugins) {
|
|
55
|
+
for (var i = 0; i < plugins.length; i++) {
|
|
56
|
+
if (pluginName.toLowerCase() === plugins[i].pluginName.toLowerCase()) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return false;
|
|
61
|
+
},
|
|
62
|
+
getRootByConfig: function getRootByConfig(pluginName, playerConfig) {
|
|
63
|
+
var keys = Object.keys(playerConfig);
|
|
64
|
+
var _pConfig = null;
|
|
65
|
+
for (var i = 0; i < keys.length; i++) {
|
|
66
|
+
if (pluginName.toLowerCase() === keys[i].toLowerCase()) {
|
|
67
|
+
_pConfig = playerConfig[keys[i]];
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (util.typeOf(_pConfig) === "Object") {
|
|
72
|
+
return {
|
|
73
|
+
root: _pConfig.root,
|
|
74
|
+
position: _pConfig.position
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return {};
|
|
78
|
+
},
|
|
79
|
+
lazyRegister: function lazyRegister(player, lazyPlugin) {
|
|
80
|
+
var _this = this;
|
|
81
|
+
var timeout = lazyPlugin.timeout || 1500;
|
|
82
|
+
return Promise.race([lazyPlugin.loader().then(function(plugin) {
|
|
83
|
+
var result;
|
|
84
|
+
if (plugin && plugin.__esModule) {
|
|
85
|
+
result = plugin.default;
|
|
86
|
+
} else {
|
|
87
|
+
result = plugin;
|
|
88
|
+
}
|
|
89
|
+
_this.register(player, result, plugin.options);
|
|
90
|
+
}), new Promise(function(resolve, reject) {
|
|
91
|
+
setTimeout(function() {
|
|
92
|
+
reject(new Error("timeout"));
|
|
93
|
+
}, timeout);
|
|
94
|
+
})]);
|
|
95
|
+
},
|
|
96
|
+
register: function register(player, plugin) {
|
|
97
|
+
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
98
|
+
if (!player || !plugin || typeof plugin !== "function" || plugin.prototype === void 0) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
var cgid = player._pluginInfoId;
|
|
102
|
+
if (!cgid || !this.pluginGroup[cgid]) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (!this.pluginGroup[cgid]._plugins) {
|
|
106
|
+
this.pluginGroup[cgid]._plugins = {};
|
|
107
|
+
}
|
|
108
|
+
var plugins = this.pluginGroup[cgid]._plugins;
|
|
109
|
+
var originalOptions = this.pluginGroup[cgid]._originalOptions;
|
|
110
|
+
options.player = this.pluginGroup[cgid]._player;
|
|
111
|
+
var pluginName = options.pluginName || plugin.pluginName;
|
|
112
|
+
if (!pluginName) {
|
|
113
|
+
throw new Error("The property pluginName is necessary");
|
|
114
|
+
}
|
|
115
|
+
if (plugin.isSupported && !plugin.isSupported(player.config.mediaType, player.config.codecType)) {
|
|
116
|
+
console.warn("not supported plugin [".concat(pluginName, "]"));
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (!options.config) {
|
|
120
|
+
options.config = {};
|
|
121
|
+
}
|
|
122
|
+
var keys = Object.keys(originalOptions);
|
|
123
|
+
for (var i = 0; i < keys.length; i++) {
|
|
124
|
+
if (pluginName.toLowerCase() === keys[i].toLowerCase()) {
|
|
125
|
+
var config = originalOptions[keys[i]];
|
|
126
|
+
if (util.typeOf(config) === "Object") {
|
|
127
|
+
options.config = Object.assign({}, options.config, originalOptions[keys[i]]);
|
|
128
|
+
} else if (util.typeOf(config) === "Boolean") {
|
|
129
|
+
options.config.disable = !config;
|
|
130
|
+
}
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
if (plugin.defaultConfig) {
|
|
135
|
+
Object.keys(plugin.defaultConfig).forEach(function(key) {
|
|
136
|
+
if (typeof options.config[key] === "undefined") {
|
|
137
|
+
options.config[key] = plugin.defaultConfig[key];
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
if (!options.root) {
|
|
142
|
+
options.root = player.root;
|
|
143
|
+
} else if (typeof options.root === "string") {
|
|
144
|
+
options.root = player[options.root];
|
|
145
|
+
}
|
|
146
|
+
options.index = options.config.index || 0;
|
|
147
|
+
try {
|
|
148
|
+
if (plugins[pluginName.toLowerCase()]) {
|
|
149
|
+
this.unRegister(cgid, pluginName.toLowerCase());
|
|
150
|
+
console.warn("the is one plugin with same pluginName [".concat(pluginName, "] exist, destroy the old instance"));
|
|
151
|
+
}
|
|
152
|
+
var _instance = new plugin(options);
|
|
153
|
+
plugins[pluginName.toLowerCase()] = _instance;
|
|
154
|
+
plugins[pluginName.toLowerCase()].func = plugin;
|
|
155
|
+
if (_instance && typeof _instance.afterCreate === "function") {
|
|
156
|
+
_instance.afterCreate();
|
|
157
|
+
}
|
|
158
|
+
return _instance;
|
|
159
|
+
} catch (err) {
|
|
160
|
+
console.error(err);
|
|
161
|
+
throw err;
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
unRegister: function unRegister(cgid, name) {
|
|
165
|
+
if (cgid._pluginInfoId) {
|
|
166
|
+
cgid = cgid._pluginInfoId;
|
|
167
|
+
}
|
|
168
|
+
name = name.toLowerCase();
|
|
169
|
+
try {
|
|
170
|
+
var plugin = this.pluginGroup[cgid]._plugins[name];
|
|
171
|
+
if (plugin) {
|
|
172
|
+
plugin.pluginName && plugin.__destroy();
|
|
173
|
+
delete this.pluginGroup[cgid]._plugins[name];
|
|
174
|
+
}
|
|
175
|
+
} catch (e) {
|
|
176
|
+
console.error("[unRegister:".concat(name, "] cgid:[").concat(cgid, "] error"), e);
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
deletePlugin: function deletePlugin(player, name) {
|
|
180
|
+
var cgid = player._pluginInfoId;
|
|
181
|
+
if (cgid && this.pluginGroup[cgid] && this.pluginGroup[cgid]._plugins) {
|
|
182
|
+
delete this.pluginGroup[cgid]._plugins[name];
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
getPlugins: function getPlugins(player) {
|
|
186
|
+
var cgid = player._pluginInfoId;
|
|
187
|
+
return cgid && this.pluginGroup[cgid] ? this.pluginGroup[cgid]._plugins : {};
|
|
188
|
+
},
|
|
189
|
+
findPlugin: function findPlugin(player, name) {
|
|
190
|
+
var cgid = player._pluginInfoId;
|
|
191
|
+
if (!cgid || !this.pluginGroup[cgid]) {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
var cName = name.toLowerCase();
|
|
195
|
+
return this.pluginGroup[cgid]._plugins[cName];
|
|
196
|
+
},
|
|
197
|
+
beforeInit: function beforeInit(player) {
|
|
198
|
+
var _this2 = this;
|
|
199
|
+
function retPromise(fun) {
|
|
200
|
+
if (!fun || !fun.then) {
|
|
201
|
+
return new Promise(function(resolve) {
|
|
202
|
+
resolve();
|
|
203
|
+
});
|
|
204
|
+
} else {
|
|
205
|
+
return fun;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return new Promise(function(resolve) {
|
|
209
|
+
if (!_this2.pluginGroup) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
var prevTask;
|
|
213
|
+
if (player._loadingPlugins && player._loadingPlugins.length) {
|
|
214
|
+
prevTask = Promise.all(player._loadingPlugins);
|
|
215
|
+
} else {
|
|
216
|
+
prevTask = Promise.resolve();
|
|
217
|
+
}
|
|
218
|
+
return prevTask.then(function() {
|
|
219
|
+
var cgid = player._pluginInfoId;
|
|
220
|
+
if (!_this2.pluginGroup[cgid]) {
|
|
221
|
+
resolve();
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
var plugins = _this2.pluginGroup[cgid]._plugins;
|
|
225
|
+
var pluginsRet = [];
|
|
226
|
+
Object.keys(plugins).forEach(function(pName) {
|
|
227
|
+
if (plugins[pName] && plugins[pName].beforePlayerInit) {
|
|
228
|
+
try {
|
|
229
|
+
var ret = plugins[pName].beforePlayerInit();
|
|
230
|
+
pluginsRet.push(retPromise(ret));
|
|
231
|
+
} catch (e) {
|
|
232
|
+
pluginsRet.push(retPromise(null));
|
|
233
|
+
throw e;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
Promise.all([].concat(pluginsRet)).then(function() {
|
|
238
|
+
resolve();
|
|
239
|
+
}).catch(function(e) {
|
|
240
|
+
console.error(e);
|
|
241
|
+
resolve();
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
},
|
|
246
|
+
afterInit: function afterInit(player) {
|
|
247
|
+
var cgid = player._pluginInfoId;
|
|
248
|
+
if (!cgid || !this.pluginGroup[cgid]) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
var plugins = this.pluginGroup[cgid]._plugins;
|
|
252
|
+
Object.keys(plugins).forEach(function(pName) {
|
|
253
|
+
if (plugins[pName] && plugins[pName].afterPlayerInit) {
|
|
254
|
+
plugins[pName].afterPlayerInit();
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
},
|
|
258
|
+
setLang: function setLang(lang, player) {
|
|
259
|
+
var cgid = player._pluginInfoId;
|
|
260
|
+
if (!cgid || !this.pluginGroup[cgid]) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
var plugins = this.pluginGroup[cgid]._plugins;
|
|
264
|
+
Object.keys(plugins).forEach(function(item) {
|
|
265
|
+
if (plugins[item].updateLang) {
|
|
266
|
+
plugins[item].updateLang(lang);
|
|
267
|
+
} else {
|
|
268
|
+
try {
|
|
269
|
+
plugins[item].lang = lang;
|
|
270
|
+
} catch (error) {
|
|
271
|
+
console.warn("".concat(item, " setLang"));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
},
|
|
276
|
+
reRender: function reRender(player) {
|
|
277
|
+
var _this3 = this;
|
|
278
|
+
var cgid = player._pluginInfoId;
|
|
279
|
+
if (!cgid || !this.pluginGroup[cgid]) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
var _pList = [];
|
|
283
|
+
var plugins = this.pluginGroup[cgid]._plugins;
|
|
284
|
+
Object.keys(plugins).forEach(function(pName) {
|
|
285
|
+
if (pName !== "controls" && plugins[pName]) {
|
|
286
|
+
_pList.push({
|
|
287
|
+
plugin: plugins[pName].func,
|
|
288
|
+
options: plugins[pName].__args
|
|
289
|
+
});
|
|
290
|
+
_this3.unRegister(cgid, pName);
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
_pList.forEach(function(item) {
|
|
294
|
+
_this3.register(player, item.plugin, item.options);
|
|
295
|
+
});
|
|
296
|
+
},
|
|
297
|
+
onPluginsReady: function onPluginsReady(player) {
|
|
298
|
+
var cgid = player._pluginInfoId;
|
|
299
|
+
if (!cgid || !this.pluginGroup[cgid]) {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
var plugins = this.pluginGroup[cgid]._plugins || {};
|
|
303
|
+
Object.keys(plugins).forEach(function(key) {
|
|
304
|
+
if (plugins[key].onPluginsReady && typeof plugins[key].onPluginsReady === "function") {
|
|
305
|
+
plugins[key].onPluginsReady();
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
},
|
|
309
|
+
setCurrentUserActive: function setCurrentUserActive(playerId, isActive) {
|
|
310
|
+
if (!this.pluginGroup[playerId]) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
if (!isActive) {
|
|
314
|
+
this.pluginGroup[playerId]._player.isUserActive = isActive;
|
|
315
|
+
return playerId;
|
|
316
|
+
}
|
|
317
|
+
var keys = Object.keys(this.pluginGroup);
|
|
318
|
+
for (var i = 0; i < keys.length; i++) {
|
|
319
|
+
var c = this.pluginGroup[keys[i]];
|
|
320
|
+
if (c && c._player) {
|
|
321
|
+
this.pluginGroup[keys[i]]._player.isUserActive = false;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
this.pluginGroup[playerId]._player.isUserActive = isActive;
|
|
325
|
+
return playerId;
|
|
326
|
+
},
|
|
327
|
+
getCurrentUseActiveId: function getCurrentUseActiveId() {
|
|
328
|
+
if (!this.pluginGroup) {
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
var keys = Object.keys(this.pluginGroup);
|
|
332
|
+
for (var i = 0; i < keys.length; i++) {
|
|
333
|
+
var c = this.pluginGroup[keys[i]];
|
|
334
|
+
if (c && c._player && c._player.isUserActive) {
|
|
335
|
+
return keys[i];
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return null;
|
|
339
|
+
},
|
|
340
|
+
destroy: function destroy(player) {
|
|
341
|
+
var cgid = player._pluginInfoId;
|
|
342
|
+
if (!this.pluginGroup[cgid]) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
unObserver(player.root);
|
|
346
|
+
var plugins = this.pluginGroup[cgid]._plugins;
|
|
347
|
+
for (var _i = 0, _Object$keys = Object.keys(plugins); _i < _Object$keys.length; _i++) {
|
|
348
|
+
var item = _Object$keys[_i];
|
|
349
|
+
this.unRegister(cgid, item);
|
|
350
|
+
}
|
|
351
|
+
var _isUseActive = player.isUseActive;
|
|
352
|
+
delete this.pluginGroup[cgid];
|
|
353
|
+
delete player._pluginInfoId;
|
|
354
|
+
if (_isUseActive) {
|
|
355
|
+
var keys = Object.keys(this.pluginGroup);
|
|
356
|
+
if (keys.length > 0) {
|
|
357
|
+
this.setCurrentUserActive(keys[keys.length - 1], true);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
export { pluginsManager as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function usePreset(player: any, Preset: any): void;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { toConsumableArray as _toConsumableArray } from "../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
var usePreset = function usePreset2(player, Preset) {
|
|
3
|
+
var _player$config$plugin, _player$config$ignore;
|
|
4
|
+
var presetInst;
|
|
5
|
+
if (Preset.preset && Preset.options) {
|
|
6
|
+
presetInst = new Preset.preset(Preset.options, player.config);
|
|
7
|
+
} else {
|
|
8
|
+
presetInst = new Preset({}, player.config);
|
|
9
|
+
}
|
|
10
|
+
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;
|
|
11
|
+
if (!player.config.plugins) {
|
|
12
|
+
player.config.plugins = [];
|
|
13
|
+
}
|
|
14
|
+
if (!player.config.ignores) {
|
|
15
|
+
player.config.ignores = [];
|
|
16
|
+
}
|
|
17
|
+
(_player$config$plugin = player.config.plugins).push.apply(_player$config$plugin, _toConsumableArray(plugins));
|
|
18
|
+
(_player$config$ignore = player.config.ignores).push.apply(_player$config$ignore, _toConsumableArray(ignores));
|
|
19
|
+
Object.keys(icons).map(function(key) {
|
|
20
|
+
if (!player.config.icons[key]) {
|
|
21
|
+
player.config.icons[key] = icons[key];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _ci18n = player.config.i18n || [];
|
|
25
|
+
i18n.push.apply(i18n, _toConsumableArray(_ci18n));
|
|
26
|
+
player.config.i18n = i18n;
|
|
27
|
+
};
|
|
28
|
+
export { usePreset };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createClass as _createClass, classCallCheck as _classCallCheck, defineProperty as _defineProperty } from "../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import { throttle } from "../utils/util.js";
|
|
3
|
+
import { PLATER_ID } from "../constant.js";
|
|
4
|
+
var ResizeObserver = /* @__PURE__ */ function() {
|
|
5
|
+
function ResizeObserver2() {
|
|
6
|
+
var _this = this;
|
|
7
|
+
_classCallCheck(this, ResizeObserver2);
|
|
8
|
+
_defineProperty(this, "__trigger", function(entries) {
|
|
9
|
+
var t = new Date().getTime();
|
|
10
|
+
_this.timeStamp = t;
|
|
11
|
+
for (var i = 0; i < entries.length; i++) {
|
|
12
|
+
_this.__runHandler(entries[i].target);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
this.__handlers = [];
|
|
16
|
+
this.timeStamp = 0;
|
|
17
|
+
this.observer = null;
|
|
18
|
+
if (!window.ResizeObserver) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
this.observer = new window.ResizeObserver(throttle(this.__trigger, 100, {
|
|
23
|
+
trailing: true
|
|
24
|
+
}));
|
|
25
|
+
this.timeStamp = new Date().getTime();
|
|
26
|
+
} catch (e) {
|
|
27
|
+
console.error(e);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
_createClass(ResizeObserver2, [{
|
|
31
|
+
key: "addObserver",
|
|
32
|
+
value: function addObserver2(target, handler) {
|
|
33
|
+
if (!this.observer) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this.observer && this.observer.observe(target);
|
|
37
|
+
var _pid = target.getAttribute(PLATER_ID);
|
|
38
|
+
var __handlers = this.__handlers;
|
|
39
|
+
var index = -1;
|
|
40
|
+
for (var i = 0; i < __handlers.length; i++) {
|
|
41
|
+
if (__handlers[i] && target === __handlers[i].target) {
|
|
42
|
+
index = i;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (index > -1) {
|
|
46
|
+
this.__handlers[index].handler = handler;
|
|
47
|
+
} else {
|
|
48
|
+
this.__handlers.push({
|
|
49
|
+
target,
|
|
50
|
+
handler,
|
|
51
|
+
playerId: _pid
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
key: "unObserver",
|
|
57
|
+
value: function unObserver2(target) {
|
|
58
|
+
var i = -1;
|
|
59
|
+
this.__handlers.map(function(item, index) {
|
|
60
|
+
if (target === item.target) {
|
|
61
|
+
i = index;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
try {
|
|
65
|
+
this.observer && this.observer.unobserve(target);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
}
|
|
68
|
+
this.observer && this.observer.unobserve(target);
|
|
69
|
+
i > -1 && this.__handlers.splice(i, 1);
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
key: "destroyObserver",
|
|
73
|
+
value: function destroyObserver() {
|
|
74
|
+
this.observer && this.observer.disconnect();
|
|
75
|
+
this.observer = null;
|
|
76
|
+
this.__handlers = null;
|
|
77
|
+
}
|
|
78
|
+
}, {
|
|
79
|
+
key: "__runHandler",
|
|
80
|
+
value: function __runHandler(target) {
|
|
81
|
+
var __handlers = this.__handlers;
|
|
82
|
+
for (var i = 0; i < __handlers.length; i++) {
|
|
83
|
+
if (__handlers[i] && target === __handlers[i].target) {
|
|
84
|
+
try {
|
|
85
|
+
__handlers[i].handler(target);
|
|
86
|
+
} catch (error) {
|
|
87
|
+
console.error(error);
|
|
88
|
+
}
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
}]);
|
|
95
|
+
return ResizeObserver2;
|
|
96
|
+
}();
|
|
97
|
+
var resizeObserver = null;
|
|
98
|
+
function addObserver(target, handler) {
|
|
99
|
+
if (!resizeObserver) {
|
|
100
|
+
resizeObserver = new ResizeObserver();
|
|
101
|
+
}
|
|
102
|
+
resizeObserver.addObserver(target, handler);
|
|
103
|
+
return resizeObserver;
|
|
104
|
+
}
|
|
105
|
+
function unObserver(target, handler) {
|
|
106
|
+
resizeObserver.unObserver(target, handler);
|
|
107
|
+
}
|
|
108
|
+
export { addObserver, unObserver };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function BackSVG() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg width="32px" height="40px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <path d="M11.2374369,14 L17.6187184,7.61871843 C17.9604272,7.27700968 17.9604272,6.72299032 17.6187184,6.38128157 C17.2770097,6.03957281 16.7229903,6.03957281 16.3812816,6.38128157 L9.38128157,13.3812816 C9.03957281,13.7229903 9.03957281,14.2770097 9.38128157,14.6187184 L16.3812816,21.6187184 C16.7229903,21.9604272 17.2770097,21.9604272 17.6187184,21.6187184 C17.9604272,21.2770097 17.9604272,20.7229903 17.6187184,20.3812816 L11.2374369,14 L11.2374369,14 Z" fill="#FFFFFF"></path>\n </g>\n</svg>', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { BackSVG as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function DownloadSvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="24px" viewBox="0 0 24 24">\n <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n <g transform="translate(-488.000000, -340.000000)" fill="#FFFFFF">\n <g id="Group-2">\n <g id="volme_big-copy" transform="translate(488.000000, 340.000000)">\n <rect id="Rectangle-18" x="11" y="4" width="2" height="12" rx="1"></rect>\n <rect id="Rectangle-2" x="3" y="18" width="18" height="2" rx="1"></rect>\n <rect id="Rectangle-2" transform="translate(4.000000, 17.500000) rotate(90.000000) translate(-4.000000, -17.500000) " x="1.5" y="16.5" width="5" height="2" rx="1"></rect><rect id="Rectangle-2-Copy-3" transform="translate(20.000000, 17.500000) rotate(90.000000) translate(-20.000000, -17.500000) " x="17.5" y="16.5" width="5" height="2" rx="1"></rect>\n <path d="M9.48791171,8.26502656 L9.48791171,14.2650266 C9.48791171,14.8173113 9.04019646,15.2650266 8.48791171,15.2650266 C7.93562696,15.2650266 7.48791171,14.8173113 7.48791171,14.2650266 L7.48791171,7.26502656 C7.48791171,6.71274181 7.93562696,6.26502656 8.48791171,6.26502656 L15.4879117,6.26502656 C16.0401965,6.26502656 16.4879117,6.71274181 16.4879117,7.26502656 C16.4879117,7.81731131 16.0401965,8.26502656 15.4879117,8.26502656 L9.48791171,8.26502656 Z" id="Combined-Shape" transform="translate(11.987912, 10.765027) scale(1, -1) rotate(45.000000) translate(-11.987912, -10.765027) "></path>\n </g>\n </g>\n </g>\n </g>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { DownloadSvg as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function ExitCssFullSceenSvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">\n <path fill="#fff" transform="scale(1.3, 1.3)" d="M9,10V9a.9.9,0,0,1,1-1,.9.9,0,0,1,1,1v2a.9.9,0,0,1-1,1H8a.9.9,0,0,1-1-1,.9.9,0,0,1,1-1Zm6,4v1a1,1,0,0,1-2,0V13a.9.9,0,0,1,1-1h2a1,1,0,0,1,0,2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { ExitCssFullSceenSvg as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function ExitFullScreenSvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { ExitFullScreenSvg as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function loadingIcon() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="-5 -5 110 110">\n <path d="M100,50A50,50,0,1,1,50,0" stroke-width="5" stroke="#ddd" stroke-dasharray="236" fill="none"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { loadingIcon as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function PanelIcon() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" viewBox="-5 -11 40 40" width="40" height="40">\n <path fill="#f85959" transform="scale(0.8 0.8)" d="M36.5,18.73a1.19,1.19,0,0,0,1-1.14V16.33a1.2,1.2,0,0,0-1-1.13l-.61-.08a1.75,1.75,0,0,1-1.3-.86l-.21-.36-.2-.36A1.72,1.72,0,0,1,34,12l.23-.58a1.18,1.18,0,0,0-.5-1.42l-1.1-.62a1.18,1.18,0,0,0-1.47.3l-.39.51a1.82,1.82,0,0,1-1.41.72c-.44,0-1.88-.27-2.22-.7l-.39-.49a1.18,1.18,0,0,0-1.48-.28l-1.09.64a1.19,1.19,0,0,0-.47,1.43l.25.59a1.87,1.87,0,0,1-.08,1.58c-.26.37-1.17,1.5-1.71,1.58l-.63.09a1.19,1.19,0,0,0-1,1.14l0,1.27a1.17,1.17,0,0,0,1,1.12l.61.08a1.74,1.74,0,0,1,1.3.87l.21.36.2.35A1.69,1.69,0,0,1,24,22.08l-.23.59a1.19,1.19,0,0,0,.5,1.42l1.1.62a1.19,1.19,0,0,0,1.48-.31l.38-.5a1.83,1.83,0,0,1,1.41-.72c.44,0,1.88.25,2.22.69l.39.49a1.18,1.18,0,0,0,1.48.28L33.86,24a1.19,1.19,0,0,0,.47-1.43L34.09,22a1.84,1.84,0,0,1,.07-1.58c.26-.37,1.17-1.5,1.72-1.58ZM31,18.94a2.76,2.76,0,0,1-4.65-1.2A2.71,2.71,0,0,1,27,15.13a2.76,2.76,0,0,1,4.64,1.2A2.7,2.7,0,0,1,31,18.94Z"/>\n <path fill="#f85959" transform="scale(0.8 0.8)" d="M32,0H3.59A3.59,3.59,0,0,0,0,3.59v17A3.59,3.59,0,0,0,3.59,24.2H19.72a12.59,12.59,0,0,1-.81-1.2A11.73,11.73,0,0,1,35.54,7.28V3.59A3.59,3.59,0,0,0,32,0ZM13,14.18H4.29a1.52,1.52,0,0,1,0-3H13a1.52,1.52,0,0,1,0,3ZM16.45,8H4.29a1.51,1.51,0,0,1,0-3H16.45a1.51,1.51,0,1,1,0,3Z"/>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { PanelIcon as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function PauseSvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { PauseSvg as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function PipIcon() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n</svg>', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { PipIcon as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function PipIconExit() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"\n fill="white" />\n <path fill-rule="evenodd" clip-rule="evenodd"\n d="M9.4998 7.7C9.77595 7.7 9.9998 7.47614 9.9998 7.2V6.5C9.9998 6.22386 9.77595 6 9.4998 6H5.5402L5.52754 6.00016H5.5C5.22386 6.00016 5 6.22401 5 6.50016V10.4598C5 10.7359 5.22386 10.9598 5.5 10.9598H6.2C6.47614 10.9598 6.7 10.7359 6.7 10.4598V8.83005L8.76983 10.9386C8.96327 11.1357 9.27984 11.1386 9.47691 10.9451L9.97645 10.4548C10.1735 10.2613 10.1764 9.94476 9.983 9.7477L7.97289 7.7H9.4998Z"\n fill="white" />\n</svg>', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { PipIconExit as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function PlaySvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { PlaySvg as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function Next() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="40" viewBox="10 0 24 40">\n <path transform="scale(0.038 0.028)" d="M800 380v768h-128v-352l-320 320v-704l320 320v-352z"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { Next as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function ReplaySvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg class="xgplayer-replay-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 78 78" width="78" height="78">\n <path fill="#fff" transform="translate(20, 20)" d="M8.22708362,13.8757234 L11.2677371,12.6472196 C11.7798067,12.4403301 12.3626381,12.6877273 12.5695276,13.1997969 L12.9441342,14.1269807 C13.1510237,14.6390502 12.9036264,15.2218816 12.3915569,15.4287712 L6.8284538,17.6764107 L5.90126995,18.0510173 C5.38920044,18.2579068 4.80636901,18.0105096 4.5994795,17.49844 L1.97723335,11.0081531 C1.77034384,10.4960836 2.0177411,9.91325213 2.52981061,9.70636262 L3.45699446,9.33175602 C3.96906396,9.12486652 4.5518954,9.37226378 4.75878491,9.88433329 L5.67885163,12.1615783 C7.99551726,6.6766934 13.3983951,3 19.5,3 C27.7842712,3 34.5,9.71572875 34.5,18 C34.5,26.2842712 27.7842712,33 19.5,33 C15.4573596,33 11.6658607,31.3912946 8.87004692,28.5831991 C8.28554571,27.9961303 8.28762719,27.0463851 8.87469603,26.4618839 C9.46176488,25.8773827 10.4115101,25.8794641 10.9960113,26.466533 C13.2344327,28.7147875 16.263503,30 19.5,30 C26.127417,30 31.5,24.627417 31.5,18 C31.5,11.372583 26.127417,6 19.5,6 C14.4183772,6 9.94214483,9.18783811 8.22708362,13.8757234 Z"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { ReplaySvg as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
function CssFullSceenSvg() {
|
|
2
|
+
return new DOMParser().parseFromString(`<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">
|
|
3
|
+
<path fill="#fff" transform="scale(1.3, 1.3)" class='path_full' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>
|
|
4
|
+
</svg>
|
|
5
|
+
`, "image/svg+xml").firstChild;
|
|
6
|
+
}
|
|
7
|
+
export { CssFullSceenSvg as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function FullScreenSvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">\n <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { FullScreenSvg as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function RotateSvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="-4 -6 40 40" fill="none">\n <g clip-path="url(#clip0)">\n <path transform="scale(1.5 1.5)" d="M11.6665 9.16663H4.1665C2.78579 9.16663 1.6665 10.2859 1.6665 11.6666V15.8333C1.6665 17.214 2.78579 18.3333 4.1665 18.3333H11.6665C13.0472 18.3333 14.1665 17.214 14.1665 15.8333V11.6666C14.1665 10.2859 13.0472 9.16663 11.6665 9.16663Z" fill="white"/>\n <path transform="scale(1.5 1.5)" fill-rule="evenodd" clip-rule="evenodd" d="M3.88148 4.06298C3.75371 4.21005 3.67667 4.40231 3.67749 4.61242C3.67847 4.87253 3.79852 5.10435 3.98581 5.25646L6.99111 8.05895C7.32771 8.37283 7.85502 8.35443 8.16891 8.01782C8.48279 7.68122 8.46437 7.15391 8.12778 6.84003L6.62061 5.43457L9.8198 5.4224C9.82848 5.42239 9.8372 5.42221 9.84591 5.4219C10.9714 5.38233 12.0885 5.6285 13.0931 6.13744C14.0976 6.64635 14.957 7.40148 15.5908 8.33234C16.2246 9.2632 16.6122 10.3394 16.7177 11.4606C16.823 12.5819 16.6427 13.7115 16.1934 14.7442C16.0098 15.1661 16.203 15.6571 16.6251 15.8408C17.0471 16.0243 17.5381 15.8311 17.7216 15.4091C18.2833 14.1183 18.5087 12.7063 18.3771 11.3047C18.2453 9.90318 17.7607 8.55792 16.9684 7.39433C16.1761 6.23073 15.1021 5.28683 13.8463 4.65065C12.5946 4.01651 11.203 3.70872 9.80072 3.75583L6.43415 3.76862L7.96326 2.12885C8.27715 1.79225 8.25872 1.26494 7.92213 0.951061C7.58553 0.63718 7.05822 0.655585 6.74433 0.99219L3.90268 4.0395C3.89545 4.04724 3.88841 4.05509 3.88154 4.06303L3.88148 4.06298Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0">\n <rect width="40" height="40" fill="white"/>\n </clipPath>\n </defs>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { RotateSvg as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function SeekTipIcon() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg width="20" height="9" viewBox="0 0 8 9" fill="none" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <path opacity="0.54"\n d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z"\n fill="white" />\n <path transform="translate(5 0)" d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z" fill="white"/>\n</svg>', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { SeekTipIcon as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function volumeLargeSvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { volumeLargeSvg as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function volumeMutedSvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { volumeMutedSvg as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function volumeSmallSvg() {
|
|
2
|
+
return new DOMParser().parseFromString('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>\n <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>\n</svg>\n', "image/svg+xml").firstChild;
|
|
3
|
+
}
|
|
4
|
+
export { volumeSmallSvg as default };
|