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,124 @@
|
|
|
1
|
+
.xgplayer {
|
|
2
|
+
// slider
|
|
3
|
+
$sliderBgColor: rgba(0, 0, 0, 0.54);
|
|
4
|
+
$sliderBarBgColor: rgba(255, 255, 255, 0.30);
|
|
5
|
+
$sliderDragBgColor: #FA1F41;
|
|
6
|
+
$sliderDragAfterBgColor: #fff;
|
|
7
|
+
$sliderDragAfterShadow: 0 0 5px 0 rgba(0, 0, 0, 0.26);
|
|
8
|
+
|
|
9
|
+
.xgplayer-volume {
|
|
10
|
+
&.slide-show {
|
|
11
|
+
.xgplayer-slider {
|
|
12
|
+
display: block;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.xgplayer-slider {
|
|
17
|
+
display: none;
|
|
18
|
+
position: absolute;
|
|
19
|
+
width: 28px;
|
|
20
|
+
height: 92px;
|
|
21
|
+
background: $sliderBgColor;
|
|
22
|
+
border-radius: 1px;
|
|
23
|
+
bottom: 40px;
|
|
24
|
+
outline: none;
|
|
25
|
+
&:after{
|
|
26
|
+
content:" ";
|
|
27
|
+
display:block;
|
|
28
|
+
height: 15px;
|
|
29
|
+
width:28px;
|
|
30
|
+
position: absolute;
|
|
31
|
+
bottom: -15px;
|
|
32
|
+
left: 0;
|
|
33
|
+
z-index: 20;
|
|
34
|
+
cursor: initial;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.xgplayer-value-label {
|
|
39
|
+
position: absolute;
|
|
40
|
+
left: 0;
|
|
41
|
+
right: 0;
|
|
42
|
+
bottom: 100%;
|
|
43
|
+
padding: 5px 0 0 0;
|
|
44
|
+
font-size: 12px;
|
|
45
|
+
background-color: $sliderBgColor;
|
|
46
|
+
color: #fff;
|
|
47
|
+
text-align: center;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.xgplayer-bar,.xgplayer-drag{
|
|
51
|
+
display: block;
|
|
52
|
+
position: absolute;
|
|
53
|
+
bottom: 6px;
|
|
54
|
+
left: 12px;
|
|
55
|
+
background: $sliderBarBgColor;
|
|
56
|
+
border-radius: 100px;
|
|
57
|
+
width: 4px;
|
|
58
|
+
height: 76px;
|
|
59
|
+
outline: none;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.xgplayer-drag {
|
|
64
|
+
bottom: 0;
|
|
65
|
+
left: 0;
|
|
66
|
+
background: $sliderDragBgColor;
|
|
67
|
+
max-height: 76px;
|
|
68
|
+
&:after{
|
|
69
|
+
content: " ";
|
|
70
|
+
display: inline-block;
|
|
71
|
+
width: 8px;
|
|
72
|
+
height: 8px;
|
|
73
|
+
background: $sliderDragAfterBgColor;
|
|
74
|
+
box-shadow: $sliderDragAfterShadow;
|
|
75
|
+
position: absolute;
|
|
76
|
+
border-radius: 50%;
|
|
77
|
+
left: -2px;
|
|
78
|
+
top: -4px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.xgplayer-volume[data-state=normal] {
|
|
83
|
+
.xg-volume {
|
|
84
|
+
display: block;
|
|
85
|
+
}
|
|
86
|
+
.xg-volume-small {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
.xg-volume-mute {
|
|
90
|
+
display: none;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
.xgplayer-volume[data-state=small] {
|
|
94
|
+
.xg-volume {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
.xg-volume-small {
|
|
98
|
+
display: block;
|
|
99
|
+
}
|
|
100
|
+
.xg-volume-mute {
|
|
101
|
+
display: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
.xgplayer-volume[data-state=mute] {
|
|
106
|
+
.xg-volume {
|
|
107
|
+
display: none;
|
|
108
|
+
}
|
|
109
|
+
.xg-volume-small {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
.xg-volume-mute {
|
|
113
|
+
display: block;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&.xgplayer-mobile {
|
|
118
|
+
.xgplayer-volume {
|
|
119
|
+
.xgplayer-slider {
|
|
120
|
+
display: none;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default class WaitingTimeoutJump extends BasePlugin {
|
|
2
|
+
static get defaultConfig(): {
|
|
3
|
+
useWaitingTimeoutJump: boolean;
|
|
4
|
+
waitingTime: number;
|
|
5
|
+
jumpSize: number;
|
|
6
|
+
jumpCntMax: number;
|
|
7
|
+
};
|
|
8
|
+
hasPlayed: boolean;
|
|
9
|
+
jumpCnt: number;
|
|
10
|
+
timer: NodeJS.Timeout;
|
|
11
|
+
jumpSize: any;
|
|
12
|
+
onWaiting: () => void;
|
|
13
|
+
onJump: () => void;
|
|
14
|
+
}
|
|
15
|
+
import BasePlugin from "../../plugin";
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import "../../utils/util.js";
|
|
3
|
+
import { WAITING, PLAYING, CANPLAY, PLAY } from "../../events.js";
|
|
4
|
+
import "../../utils/debug.js";
|
|
5
|
+
import Plugin from "../../plugin/plugin.js";
|
|
6
|
+
var WaitingTimeoutJump = /* @__PURE__ */ function(_BasePlugin) {
|
|
7
|
+
_inherits(WaitingTimeoutJump2, _BasePlugin);
|
|
8
|
+
var _super = _createSuper(WaitingTimeoutJump2);
|
|
9
|
+
function WaitingTimeoutJump2() {
|
|
10
|
+
var _this;
|
|
11
|
+
_classCallCheck(this, WaitingTimeoutJump2);
|
|
12
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13
|
+
args[_key] = arguments[_key];
|
|
14
|
+
}
|
|
15
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
16
|
+
_defineProperty(_assertThisInitialized(_this), "onWaiting", function() {
|
|
17
|
+
var _assertThisInitialize = _assertThisInitialized(_this), config = _assertThisInitialize.config;
|
|
18
|
+
if (_this.jumpCnt > config.jumpCntMax || _this.timer || config.useWaitingTimeoutJump === false) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
_this.timer = setTimeout(_this.onJump, config.waitingTime * 1e3);
|
|
22
|
+
});
|
|
23
|
+
_defineProperty(_assertThisInitialized(_this), "onJump", function() {
|
|
24
|
+
var _assertThisInitialize2 = _assertThisInitialized(_this), player = _assertThisInitialize2.player, config = _assertThisInitialize2.config;
|
|
25
|
+
clearTimeout(_this.timer);
|
|
26
|
+
_this.timer = null;
|
|
27
|
+
if (_this.jumpCnt > config.jumpCntMax || config.useWaitingTimeoutJump === false) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (player.media.paused && player.media.currentTime !== 0 && _this.hasPlayed) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
_this.jumpSize = config.jumpSize * (_this.jumpCnt + 1);
|
|
34
|
+
if (_this.jumpCnt === config.jumpSize && _this.jumpSize < 6) {
|
|
35
|
+
_this.jumpSize = 6;
|
|
36
|
+
}
|
|
37
|
+
var jumpTo = player.currentTime + _this.jumpSize;
|
|
38
|
+
var seekEnd = player.media.duration;
|
|
39
|
+
if (jumpTo > seekEnd) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
console.log("waitintTimeout, currentTime:", player.currentTime, ", jumpTo:", jumpTo);
|
|
43
|
+
_this.jumpCnt++;
|
|
44
|
+
player.currentTime = jumpTo;
|
|
45
|
+
});
|
|
46
|
+
return _this;
|
|
47
|
+
}
|
|
48
|
+
_createClass(WaitingTimeoutJump2, [{
|
|
49
|
+
key: "afterCreate",
|
|
50
|
+
value: function afterCreate() {
|
|
51
|
+
var _this2 = this;
|
|
52
|
+
var _this$config = this.config, useWaitingTimeoutJump = _this$config.useWaitingTimeoutJump, jumpSize = _this$config.jumpSize;
|
|
53
|
+
if (useWaitingTimeoutJump === false) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this.hasPlayed = false;
|
|
57
|
+
this.jumpCnt = 0;
|
|
58
|
+
this.timer = null;
|
|
59
|
+
this.jumpSize = jumpSize;
|
|
60
|
+
this.on(WAITING, this.onWaiting);
|
|
61
|
+
this.on([PLAYING, CANPLAY], function() {
|
|
62
|
+
clearTimeout(_this2.timer);
|
|
63
|
+
_this2.timer = null;
|
|
64
|
+
_this2.jumpSize = _this2.config.jumpSize;
|
|
65
|
+
});
|
|
66
|
+
this.on(PLAY, function() {
|
|
67
|
+
_this2.hasPlayed = true;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}], [{
|
|
71
|
+
key: "pluginName",
|
|
72
|
+
get: function get() {
|
|
73
|
+
return "waitingTimeoutJump";
|
|
74
|
+
}
|
|
75
|
+
}, {
|
|
76
|
+
key: "defaultConfig",
|
|
77
|
+
get: function get() {
|
|
78
|
+
return {
|
|
79
|
+
useWaitingTimeoutJump: false,
|
|
80
|
+
waitingTime: 15,
|
|
81
|
+
jumpSize: 2,
|
|
82
|
+
jumpCntMax: 4
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}]);
|
|
86
|
+
return WaitingTimeoutJump2;
|
|
87
|
+
}(Plugin);
|
|
88
|
+
export { WaitingTimeoutJump as default };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export default class DefaultPreset {
|
|
2
|
+
constructor(options: any, playerConfig: any);
|
|
3
|
+
plugins: (typeof Xglogger | typeof Replay | typeof Poster | typeof Start | typeof Enter | typeof Miniscreen | typeof Loading | typeof Progress | typeof PlayIcon | typeof FullScreen | typeof TimeIcon | typeof Volume | typeof RotateIcon | typeof PIPIcon | typeof PlayNextIcon | typeof DownLoadIcon | typeof ScreenShotIcon | typeof DefinitionIcon | typeof PlaybackRateIcon | typeof Error | typeof Prompt | typeof ProgressPreview | typeof Thumbnail | typeof MiniProgress | typeof Stats | typeof GapJump | typeof WaitingTimeoutJump)[];
|
|
4
|
+
ignores: any[];
|
|
5
|
+
i18n: any[];
|
|
6
|
+
}
|
|
7
|
+
import Xglogger from "../plugins/logger";
|
|
8
|
+
import Replay from "../plugins/replay";
|
|
9
|
+
import Poster from "../plugins/poster";
|
|
10
|
+
import Start from "../plugins/start";
|
|
11
|
+
import Enter from "../plugins/enter";
|
|
12
|
+
import Miniscreen from "../plugins/miniScreen";
|
|
13
|
+
import Loading from "../plugins/loading";
|
|
14
|
+
import Progress from "../plugins/progress";
|
|
15
|
+
import PlayIcon from "../plugins/play";
|
|
16
|
+
import FullScreen from "../plugins/fullscreen";
|
|
17
|
+
import TimeIcon from "../plugins/time";
|
|
18
|
+
import Volume from "../plugins/volume";
|
|
19
|
+
import RotateIcon from "../plugins/rotate";
|
|
20
|
+
import PIPIcon from "../plugins/pip";
|
|
21
|
+
import PlayNextIcon from "../plugins/playNext";
|
|
22
|
+
import DownLoadIcon from "../plugins/download";
|
|
23
|
+
import ScreenShotIcon from "../plugins/screenShot";
|
|
24
|
+
import DefinitionIcon from "../plugins/definition";
|
|
25
|
+
import PlaybackRateIcon from "../plugins/playbackRate";
|
|
26
|
+
import Error from "../plugins/error";
|
|
27
|
+
import Prompt from "../plugins/prompt";
|
|
28
|
+
import ProgressPreview from "../plugins/progressPreview";
|
|
29
|
+
import Thumbnail from "../plugins/common/thumbnail";
|
|
30
|
+
import MiniProgress from "../plugins/progress/miniProgress";
|
|
31
|
+
import Stats from "../plugins/stats";
|
|
32
|
+
import GapJump from "../plugins/gapJump";
|
|
33
|
+
import WaitingTimeoutJump from "../plugins/waitingTimeoutJump";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { createClass as _createClass, classCallCheck as _classCallCheck, toConsumableArray as _toConsumableArray } from "../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import sniffer from "../utils/sniffer.js";
|
|
3
|
+
import XGLogger from "../plugins/logger/index.js";
|
|
4
|
+
import Replay from "../plugins/replay/index.js";
|
|
5
|
+
import Poster from "../plugins/poster/index.js";
|
|
6
|
+
import Start from "../plugins/start/index.js";
|
|
7
|
+
import Enter from "../plugins/enter/index.js";
|
|
8
|
+
import MiniScreen from "../plugins/miniScreen/index.js";
|
|
9
|
+
import PCPlugin from "../plugins/pc/index.js";
|
|
10
|
+
import MobilePlugin from "../plugins/mobile/index.js";
|
|
11
|
+
import Keyboard from "../plugins/keyboard/index.js";
|
|
12
|
+
import Loading from "../plugins/loading/index.js";
|
|
13
|
+
import Progress from "../plugins/progress/index.js";
|
|
14
|
+
import Play from "../plugins/play/index.js";
|
|
15
|
+
import Fullscreen from "../plugins/fullscreen/index.js";
|
|
16
|
+
import Time from "../plugins/time/index.js";
|
|
17
|
+
import Volume from "../plugins/volume/index.js";
|
|
18
|
+
import Rotate from "../plugins/rotate/index.js";
|
|
19
|
+
import PIP from "../plugins/pip/index.js";
|
|
20
|
+
import PlayNextIcon from "../plugins/playNext/index.js";
|
|
21
|
+
import Download from "../plugins/download/index.js";
|
|
22
|
+
import ScreenShot from "../plugins/screenShot/index.js";
|
|
23
|
+
import DefinitionIcon from "../plugins/definition/index.js";
|
|
24
|
+
import PlaybackRate from "../plugins/playbackRate/index.js";
|
|
25
|
+
import CssFullScreen from "../plugins/cssFullScreen/index.js";
|
|
26
|
+
import ErrorPlugin from "../plugins/error/index.js";
|
|
27
|
+
import Prompt from "../plugins/prompt/index.js";
|
|
28
|
+
import ProgressPreview from "../plugins/progressPreview/index.js";
|
|
29
|
+
import Thumbnail from "../plugins/common/thumbnail.js";
|
|
30
|
+
import MiniProgress from "../plugins/progress/miniProgress.js";
|
|
31
|
+
import DynamicBg from "../plugins/dynamicBg/index.js";
|
|
32
|
+
import Stats from "../plugins/stats/index.js";
|
|
33
|
+
import GapJump from "../plugins/gapJump/index.js";
|
|
34
|
+
import WaitingTimeoutJump from "../plugins/waitingTimeoutJump/index.js";
|
|
35
|
+
import TestSpeed from "../plugins/testspeed/index.js";
|
|
36
|
+
import FpsDetect from "../plugins/fpsDetect/index.js";
|
|
37
|
+
var DefaultPreset = /* @__PURE__ */ _createClass(function DefaultPreset2(options, playerConfig) {
|
|
38
|
+
var _this$plugins, _this$plugins2, _this$plugins3;
|
|
39
|
+
_classCallCheck(this, DefaultPreset2);
|
|
40
|
+
var simulateMode = playerConfig && playerConfig.isMobileSimulateMode === "mobile";
|
|
41
|
+
var isLive = playerConfig.isLive;
|
|
42
|
+
var vodPlugins = isLive ? [] : [Progress, MiniProgress, ProgressPreview, Time];
|
|
43
|
+
var contolsIcons = [].concat(vodPlugins, [Play, Fullscreen, Rotate, PlayNextIcon, DefinitionIcon, PlaybackRate, Download, ScreenShot, Volume, PIP]);
|
|
44
|
+
var layers = [Replay, Poster, Start, Loading, Enter, ErrorPlugin, Prompt, Thumbnail, MiniScreen];
|
|
45
|
+
this.plugins = [Stats, XGLogger].concat(_toConsumableArray(contolsIcons), layers, [GapJump, WaitingTimeoutJump]);
|
|
46
|
+
var mode = simulateMode ? "mobile" : sniffer.device;
|
|
47
|
+
switch (mode) {
|
|
48
|
+
case "pc":
|
|
49
|
+
(_this$plugins = this.plugins).push.apply(_this$plugins, [Keyboard, PCPlugin, CssFullScreen, TestSpeed, FpsDetect]);
|
|
50
|
+
break;
|
|
51
|
+
case "mobile":
|
|
52
|
+
(_this$plugins2 = this.plugins).push.apply(_this$plugins2, [MobilePlugin]);
|
|
53
|
+
break;
|
|
54
|
+
default:
|
|
55
|
+
(_this$plugins3 = this.plugins).push.apply(_this$plugins3, [Keyboard, PCPlugin, CssFullScreen]);
|
|
56
|
+
}
|
|
57
|
+
if (sniffer.os.isIpad || mode === "pc") {
|
|
58
|
+
this.plugins.push(DynamicBg);
|
|
59
|
+
}
|
|
60
|
+
this.ignores = [];
|
|
61
|
+
this.i18n = [];
|
|
62
|
+
});
|
|
63
|
+
export { DefaultPreset as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export default class DefaultPreset {
|
|
2
|
+
constructor(options: any, playerConfig: any);
|
|
3
|
+
plugins: (typeof Xglogger | typeof Replay | typeof Poster | typeof Start | typeof Enter | typeof Miniscreen | typeof Loading | typeof Progress | typeof PlayIcon | typeof FullScreen | typeof TimeIcon | typeof TimeSegments | typeof Volume | typeof RotateIcon | typeof PIPIcon | typeof PlayNextIcon | typeof DownLoadIcon | typeof ScreenShotIcon | typeof DefinitionIcon | typeof PlaybackRateIcon | typeof Error | typeof Prompt | typeof ProgressPreview | typeof Thumbnail | typeof MiniProgress | typeof Stats | typeof GapJump | typeof WaitingTimeoutJump)[];
|
|
4
|
+
ignores: any[];
|
|
5
|
+
i18n: any[];
|
|
6
|
+
}
|
|
7
|
+
import Xglogger from "../plugins/logger";
|
|
8
|
+
import Replay from "../plugins/replay";
|
|
9
|
+
import Poster from "../plugins/poster";
|
|
10
|
+
import Start from "../plugins/start";
|
|
11
|
+
import Enter from "../plugins/enter";
|
|
12
|
+
import Miniscreen from "../plugins/miniScreen";
|
|
13
|
+
import Loading from "../plugins/loading";
|
|
14
|
+
import Progress from "../plugins/progress";
|
|
15
|
+
import PlayIcon from "../plugins/play";
|
|
16
|
+
import FullScreen from "../plugins/fullscreen";
|
|
17
|
+
import TimeIcon from "../plugins/time";
|
|
18
|
+
import TimeSegments from "../plugins/time/timesegments";
|
|
19
|
+
import Volume from "../plugins/volume";
|
|
20
|
+
import RotateIcon from "../plugins/rotate";
|
|
21
|
+
import PIPIcon from "../plugins/pip";
|
|
22
|
+
import PlayNextIcon from "../plugins/playNext";
|
|
23
|
+
import DownLoadIcon from "../plugins/download";
|
|
24
|
+
import ScreenShotIcon from "../plugins/screenShot";
|
|
25
|
+
import DefinitionIcon from "../plugins/definition";
|
|
26
|
+
import PlaybackRateIcon from "../plugins/playbackRate";
|
|
27
|
+
import Error from "../plugins/error";
|
|
28
|
+
import Prompt from "../plugins/prompt";
|
|
29
|
+
import ProgressPreview from "../plugins/progressPreview";
|
|
30
|
+
import Thumbnail from "../plugins/common/thumbnail";
|
|
31
|
+
import MiniProgress from "../plugins/progress/miniProgress";
|
|
32
|
+
import Stats from "../plugins/stats";
|
|
33
|
+
import GapJump from "../plugins/gapJump";
|
|
34
|
+
import WaitingTimeoutJump from "../plugins/waitingTimeoutJump";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { createClass as _createClass, classCallCheck as _classCallCheck, toConsumableArray as _toConsumableArray } from "../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import sniffer from "../utils/sniffer.js";
|
|
3
|
+
import XGLogger from "../plugins/logger/index.js";
|
|
4
|
+
import Replay from "../plugins/replay/index.js";
|
|
5
|
+
import Poster from "../plugins/poster/index.js";
|
|
6
|
+
import Start from "../plugins/start/index.js";
|
|
7
|
+
import Enter from "../plugins/enter/index.js";
|
|
8
|
+
import MiniScreen from "../plugins/miniScreen/index.js";
|
|
9
|
+
import PCPlugin from "../plugins/pc/index.js";
|
|
10
|
+
import MobilePlugin from "../plugins/mobile/index.js";
|
|
11
|
+
import Keyboard from "../plugins/keyboard/index.js";
|
|
12
|
+
import Loading from "../plugins/loading/index.js";
|
|
13
|
+
import Progress from "../plugins/progress/index.js";
|
|
14
|
+
import Play from "../plugins/play/index.js";
|
|
15
|
+
import Fullscreen from "../plugins/fullscreen/index.js";
|
|
16
|
+
import Time from "../plugins/time/index.js";
|
|
17
|
+
import TimeSegmentsControls from "../plugins/time/timesegments.js";
|
|
18
|
+
import Volume from "../plugins/volume/index.js";
|
|
19
|
+
import Rotate from "../plugins/rotate/index.js";
|
|
20
|
+
import PIP from "../plugins/pip/index.js";
|
|
21
|
+
import PlayNextIcon from "../plugins/playNext/index.js";
|
|
22
|
+
import Download from "../plugins/download/index.js";
|
|
23
|
+
import ScreenShot from "../plugins/screenShot/index.js";
|
|
24
|
+
import DefinitionIcon from "../plugins/definition/index.js";
|
|
25
|
+
import PlaybackRate from "../plugins/playbackRate/index.js";
|
|
26
|
+
import CssFullScreen from "../plugins/cssFullScreen/index.js";
|
|
27
|
+
import ErrorPlugin from "../plugins/error/index.js";
|
|
28
|
+
import Prompt from "../plugins/prompt/index.js";
|
|
29
|
+
import ProgressPreview from "../plugins/progressPreview/index.js";
|
|
30
|
+
import Thumbnail from "../plugins/common/thumbnail.js";
|
|
31
|
+
import MiniProgress from "../plugins/progress/miniProgress.js";
|
|
32
|
+
import DynamicBg from "../plugins/dynamicBg/index.js";
|
|
33
|
+
import ZH from "../lang/zh-cn.js";
|
|
34
|
+
import Stats from "../plugins/stats/index.js";
|
|
35
|
+
import GapJump from "../plugins/gapJump/index.js";
|
|
36
|
+
import WaitingTimeoutJump from "../plugins/waitingTimeoutJump/index.js";
|
|
37
|
+
import TestSpeed from "../plugins/testspeed/index.js";
|
|
38
|
+
import I18N from "../lang/i18n.js";
|
|
39
|
+
import FpsDetect from "../plugins/fpsDetect/index.js";
|
|
40
|
+
I18N.use(ZH);
|
|
41
|
+
var DefaultPreset = /* @__PURE__ */ _createClass(function DefaultPreset2(options, playerConfig) {
|
|
42
|
+
var _this$plugins, _this$plugins2, _this$plugins3;
|
|
43
|
+
_classCallCheck(this, DefaultPreset2);
|
|
44
|
+
var simulateMode = playerConfig && playerConfig.isMobileSimulateMode === "mobile";
|
|
45
|
+
var isLive = playerConfig.isLive;
|
|
46
|
+
var vodPlugins = isLive ? [] : [TimeSegmentsControls, Progress, MiniProgress, ProgressPreview, Time];
|
|
47
|
+
var contolsIcons = [].concat(vodPlugins, [Play, Fullscreen, Rotate, PlayNextIcon, DefinitionIcon, PlaybackRate, Download, ScreenShot, Volume, PIP]);
|
|
48
|
+
var layers = [Replay, Poster, Start, Loading, Enter, ErrorPlugin, Prompt, Thumbnail, MiniScreen];
|
|
49
|
+
this.plugins = [Stats, XGLogger].concat(_toConsumableArray(contolsIcons), layers, [GapJump, WaitingTimeoutJump]);
|
|
50
|
+
var mode = simulateMode ? "mobile" : sniffer.device;
|
|
51
|
+
switch (mode) {
|
|
52
|
+
case "pc":
|
|
53
|
+
(_this$plugins = this.plugins).push.apply(_this$plugins, [Keyboard, PCPlugin, CssFullScreen, TestSpeed, FpsDetect]);
|
|
54
|
+
break;
|
|
55
|
+
case "mobile":
|
|
56
|
+
(_this$plugins2 = this.plugins).push.apply(_this$plugins2, [MobilePlugin]);
|
|
57
|
+
break;
|
|
58
|
+
default:
|
|
59
|
+
(_this$plugins3 = this.plugins).push.apply(_this$plugins3, [Keyboard, PCPlugin, CssFullScreen]);
|
|
60
|
+
}
|
|
61
|
+
if (sniffer.os.isIpad || mode === "pc") {
|
|
62
|
+
this.plugins.push(DynamicBg);
|
|
63
|
+
}
|
|
64
|
+
if (sniffer.os.isIpad) {
|
|
65
|
+
this.plugins.push(PCPlugin);
|
|
66
|
+
}
|
|
67
|
+
this.ignores = [];
|
|
68
|
+
this.i18n = [];
|
|
69
|
+
});
|
|
70
|
+
export { DefaultPreset as default };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export default class DefaultPreset {
|
|
2
|
+
plugins: (typeof Poster | typeof Start | typeof Enter | typeof Loading | typeof PlayIcon | typeof FullScreen | typeof TimeIcon | typeof Volume | typeof RotateIcon | typeof PIPIcon | typeof DefinitionIcon | typeof PlaybackRateIcon | typeof CssFullScreen | typeof Error)[];
|
|
3
|
+
ignores: any[];
|
|
4
|
+
i18n: {
|
|
5
|
+
LANG: string;
|
|
6
|
+
TEXT: {
|
|
7
|
+
ERROR_TYPES: {
|
|
8
|
+
network: {
|
|
9
|
+
code: number;
|
|
10
|
+
msg: string;
|
|
11
|
+
};
|
|
12
|
+
mse: {
|
|
13
|
+
code: number;
|
|
14
|
+
msg: string;
|
|
15
|
+
};
|
|
16
|
+
parse: {
|
|
17
|
+
code: number;
|
|
18
|
+
msg: string;
|
|
19
|
+
};
|
|
20
|
+
format: {
|
|
21
|
+
code: number;
|
|
22
|
+
msg: string;
|
|
23
|
+
};
|
|
24
|
+
decoder: {
|
|
25
|
+
code: number;
|
|
26
|
+
msg: string;
|
|
27
|
+
};
|
|
28
|
+
runtime: {
|
|
29
|
+
code: number;
|
|
30
|
+
msg: string;
|
|
31
|
+
};
|
|
32
|
+
timeout: {
|
|
33
|
+
code: number;
|
|
34
|
+
msg: string;
|
|
35
|
+
};
|
|
36
|
+
other: {
|
|
37
|
+
code: number;
|
|
38
|
+
msg: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
HAVE_NOTHING: string;
|
|
42
|
+
HAVE_METADATA: string;
|
|
43
|
+
HAVE_CURRENT_DATA: string;
|
|
44
|
+
HAVE_FUTURE_DATA: string;
|
|
45
|
+
HAVE_ENOUGH_DATA: string;
|
|
46
|
+
NETWORK_EMPTY: string;
|
|
47
|
+
NETWORK_IDLE: string;
|
|
48
|
+
NETWORK_LOADING: string;
|
|
49
|
+
NETWORK_NO_SOURCE: string;
|
|
50
|
+
MEDIA_ERR_ABORTED: string;
|
|
51
|
+
MEDIA_ERR_NETWORK: string;
|
|
52
|
+
MEDIA_ERR_DECODE: string;
|
|
53
|
+
MEDIA_ERR_SRC_NOT_SUPPORTED: string;
|
|
54
|
+
REPLAY: string;
|
|
55
|
+
ERROR: string;
|
|
56
|
+
PLAY_TIPS: string;
|
|
57
|
+
PAUSE_TIPS: string;
|
|
58
|
+
PLAYNEXT_TIPS: string;
|
|
59
|
+
DOWNLOAD_TIPS: string;
|
|
60
|
+
ROTATE_TIPS: string;
|
|
61
|
+
RELOAD_TIPS: string;
|
|
62
|
+
FULLSCREEN_TIPS: string;
|
|
63
|
+
EXITFULLSCREEN_TIPS: string;
|
|
64
|
+
CSSFULLSCREEN_TIPS: string;
|
|
65
|
+
EXITCSSFULLSCREEN_TIPS: string;
|
|
66
|
+
TEXTTRACK: string;
|
|
67
|
+
PIP: string;
|
|
68
|
+
SCREENSHOT: string;
|
|
69
|
+
LIVE: string;
|
|
70
|
+
OFF: string;
|
|
71
|
+
OPEN: string;
|
|
72
|
+
MINI_DRAG: string;
|
|
73
|
+
MINISCREEN: string;
|
|
74
|
+
REFRESH_TIPS: string;
|
|
75
|
+
REFRESH: string;
|
|
76
|
+
FORWARD: string;
|
|
77
|
+
LIVE_TIP: string;
|
|
78
|
+
};
|
|
79
|
+
}[];
|
|
80
|
+
}
|
|
81
|
+
import Poster from "../plugins/poster";
|
|
82
|
+
import Start from "../plugins/start";
|
|
83
|
+
import Enter from "../plugins/enter";
|
|
84
|
+
import Loading from "../plugins/loading";
|
|
85
|
+
import PlayIcon from "../plugins/play";
|
|
86
|
+
import FullScreen from "../plugins/fullscreen";
|
|
87
|
+
import TimeIcon from "../plugins/time";
|
|
88
|
+
import Volume from "../plugins/volume";
|
|
89
|
+
import RotateIcon from "../plugins/rotate";
|
|
90
|
+
import PIPIcon from "../plugins/pip";
|
|
91
|
+
import DefinitionIcon from "../plugins/definition";
|
|
92
|
+
import PlaybackRateIcon from "../plugins/playbackRate";
|
|
93
|
+
import CssFullScreen from "../plugins/cssFullScreen";
|
|
94
|
+
import Error from "../plugins/error";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { createClass as _createClass, classCallCheck as _classCallCheck } from "../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import sniffer from "../utils/sniffer.js";
|
|
3
|
+
import Poster from "../plugins/poster/index.js";
|
|
4
|
+
import Start from "../plugins/start/index.js";
|
|
5
|
+
import Enter from "../plugins/enter/index.js";
|
|
6
|
+
import PCPlugin from "../plugins/pc/index.js";
|
|
7
|
+
import MobilePlugin from "../plugins/mobile/index.js";
|
|
8
|
+
import Keyboard from "../plugins/keyboard/index.js";
|
|
9
|
+
import Loading from "../plugins/loading/index.js";
|
|
10
|
+
import Play from "../plugins/play/index.js";
|
|
11
|
+
import Fullscreen from "../plugins/fullscreen/index.js";
|
|
12
|
+
import Time from "../plugins/time/index.js";
|
|
13
|
+
import Volume from "../plugins/volume/index.js";
|
|
14
|
+
import Rotate from "../plugins/rotate/index.js";
|
|
15
|
+
import PIP from "../plugins/pip/index.js";
|
|
16
|
+
import CssFullScreen from "../plugins/cssFullScreen/index.js";
|
|
17
|
+
import DefinitionIcon from "../plugins/definition/index.js";
|
|
18
|
+
import PlaybackRate from "../plugins/playbackRate/index.js";
|
|
19
|
+
import ErrorPlugin from "../plugins/error/index.js";
|
|
20
|
+
import ZH from "../lang/zh-cn.js";
|
|
21
|
+
var DefaultPreset = /* @__PURE__ */ _createClass(function DefaultPreset2() {
|
|
22
|
+
var _this$plugins, _this$plugins2;
|
|
23
|
+
_classCallCheck(this, DefaultPreset2);
|
|
24
|
+
var contolsIcons = [Play, Fullscreen, Time, Volume, Rotate, DefinitionIcon, PlaybackRate, CssFullScreen, PIP];
|
|
25
|
+
this.plugins = [Poster, Start, Loading, Enter, ErrorPlugin].concat(contolsIcons);
|
|
26
|
+
switch (sniffer.device) {
|
|
27
|
+
case "pc":
|
|
28
|
+
(_this$plugins = this.plugins).push.apply(_this$plugins, [Keyboard, PCPlugin]);
|
|
29
|
+
break;
|
|
30
|
+
case "mobile":
|
|
31
|
+
this.plugins.push(MobilePlugin);
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
(_this$plugins2 = this.plugins).push.apply(_this$plugins2, [Keyboard, PCPlugin]);
|
|
35
|
+
}
|
|
36
|
+
this.ignores = [];
|
|
37
|
+
this.i18n = [ZH];
|
|
38
|
+
});
|
|
39
|
+
export { DefaultPreset as default };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export default class DefaultPreset {
|
|
2
|
+
plugins: (typeof Xglogger | typeof Replay | typeof Poster | typeof Start | typeof Enter | typeof Mobile | typeof Loading | typeof Progress | typeof PlayIcon | typeof FullScreen | typeof TimeIcon | typeof Volume | typeof RotateIcon | typeof PIPIcon | typeof PlayNextIcon | typeof DownLoadIcon | typeof ScreenShotIcon | typeof DefinitionIcon | typeof PlaybackRateIcon | typeof Error | typeof Prompt | typeof Thumbnail | typeof MiniProgress)[];
|
|
3
|
+
ignores: any[];
|
|
4
|
+
i18n: {
|
|
5
|
+
LANG: string;
|
|
6
|
+
TEXT: {
|
|
7
|
+
ERROR_TYPES: {
|
|
8
|
+
network: {
|
|
9
|
+
code: number;
|
|
10
|
+
msg: string;
|
|
11
|
+
};
|
|
12
|
+
mse: {
|
|
13
|
+
code: number;
|
|
14
|
+
msg: string;
|
|
15
|
+
};
|
|
16
|
+
parse: {
|
|
17
|
+
code: number;
|
|
18
|
+
msg: string;
|
|
19
|
+
};
|
|
20
|
+
format: {
|
|
21
|
+
code: number;
|
|
22
|
+
msg: string;
|
|
23
|
+
};
|
|
24
|
+
decoder: {
|
|
25
|
+
code: number;
|
|
26
|
+
msg: string;
|
|
27
|
+
};
|
|
28
|
+
runtime: {
|
|
29
|
+
code: number;
|
|
30
|
+
msg: string;
|
|
31
|
+
};
|
|
32
|
+
timeout: {
|
|
33
|
+
code: number;
|
|
34
|
+
msg: string;
|
|
35
|
+
};
|
|
36
|
+
other: {
|
|
37
|
+
code: number;
|
|
38
|
+
msg: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
HAVE_NOTHING: string;
|
|
42
|
+
HAVE_METADATA: string;
|
|
43
|
+
HAVE_CURRENT_DATA: string;
|
|
44
|
+
HAVE_FUTURE_DATA: string;
|
|
45
|
+
HAVE_ENOUGH_DATA: string;
|
|
46
|
+
NETWORK_EMPTY: string;
|
|
47
|
+
NETWORK_IDLE: string;
|
|
48
|
+
NETWORK_LOADING: string;
|
|
49
|
+
NETWORK_NO_SOURCE: string;
|
|
50
|
+
MEDIA_ERR_ABORTED: string;
|
|
51
|
+
MEDIA_ERR_NETWORK: string;
|
|
52
|
+
MEDIA_ERR_DECODE: string;
|
|
53
|
+
MEDIA_ERR_SRC_NOT_SUPPORTED: string;
|
|
54
|
+
REPLAY: string;
|
|
55
|
+
ERROR: string;
|
|
56
|
+
PLAY_TIPS: string;
|
|
57
|
+
PAUSE_TIPS: string;
|
|
58
|
+
PLAYNEXT_TIPS: string;
|
|
59
|
+
DOWNLOAD_TIPS: string;
|
|
60
|
+
ROTATE_TIPS: string;
|
|
61
|
+
RELOAD_TIPS: string;
|
|
62
|
+
FULLSCREEN_TIPS: string;
|
|
63
|
+
EXITFULLSCREEN_TIPS: string;
|
|
64
|
+
CSSFULLSCREEN_TIPS: string;
|
|
65
|
+
EXITCSSFULLSCREEN_TIPS: string;
|
|
66
|
+
TEXTTRACK: string;
|
|
67
|
+
PIP: string;
|
|
68
|
+
SCREENSHOT: string;
|
|
69
|
+
LIVE: string;
|
|
70
|
+
OFF: string;
|
|
71
|
+
OPEN: string;
|
|
72
|
+
MINI_DRAG: string;
|
|
73
|
+
MINISCREEN: string;
|
|
74
|
+
REFRESH_TIPS: string;
|
|
75
|
+
REFRESH: string;
|
|
76
|
+
FORWARD: string;
|
|
77
|
+
LIVE_TIP: string;
|
|
78
|
+
};
|
|
79
|
+
}[];
|
|
80
|
+
}
|
|
81
|
+
import Xglogger from "../plugins/logger";
|
|
82
|
+
import Replay from "../plugins/replay";
|
|
83
|
+
import Poster from "../plugins/poster";
|
|
84
|
+
import Start from "../plugins/start";
|
|
85
|
+
import Enter from "../plugins/enter";
|
|
86
|
+
import Mobile from "../plugins/mobile";
|
|
87
|
+
import Loading from "../plugins/loading";
|
|
88
|
+
import Progress from "../plugins/progress";
|
|
89
|
+
import PlayIcon from "../plugins/play";
|
|
90
|
+
import FullScreen from "../plugins/fullscreen";
|
|
91
|
+
import TimeIcon from "../plugins/time";
|
|
92
|
+
import Volume from "../plugins/volume";
|
|
93
|
+
import RotateIcon from "../plugins/rotate";
|
|
94
|
+
import PIPIcon from "../plugins/pip";
|
|
95
|
+
import PlayNextIcon from "../plugins/playNext";
|
|
96
|
+
import DownLoadIcon from "../plugins/download";
|
|
97
|
+
import ScreenShotIcon from "../plugins/screenShot";
|
|
98
|
+
import DefinitionIcon from "../plugins/definition";
|
|
99
|
+
import PlaybackRateIcon from "../plugins/playbackRate";
|
|
100
|
+
import Error from "../plugins/error";
|
|
101
|
+
import Prompt from "../plugins/prompt";
|
|
102
|
+
import Thumbnail from "../plugins/common/thumbnail";
|
|
103
|
+
import MiniProgress from "../plugins/progress/miniProgress";
|