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,204 @@
|
|
|
1
|
+
@import "../../style/variable";
|
|
2
|
+
//controls
|
|
3
|
+
$controlHeight: 48px;
|
|
4
|
+
// tips
|
|
5
|
+
// $tipsColor: #fff;
|
|
6
|
+
// $tipsBgColor: rgba(0, 0, 0, 0.8);
|
|
7
|
+
// $tipsFontsize: 12px;
|
|
8
|
+
|
|
9
|
+
.xgplayer {
|
|
10
|
+
&.not-allow-autoplay,
|
|
11
|
+
&.xgplayer-nostart {
|
|
12
|
+
// .xgplayer-controls, .flex-controls {
|
|
13
|
+
.xgplayer-controls {
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
visibility: hidden;
|
|
16
|
+
cursor: default;
|
|
17
|
+
opacity: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.xgplayer-inactive {
|
|
22
|
+
.controls-autohide {
|
|
23
|
+
// display: none;
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
visibility: hidden;
|
|
26
|
+
cursor: default;
|
|
27
|
+
opacity: 0;
|
|
28
|
+
}
|
|
29
|
+
// .controls-permanent {
|
|
30
|
+
// pointer-events: auto;
|
|
31
|
+
// visibility: visible;
|
|
32
|
+
// opacity: 1;
|
|
33
|
+
// }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.not-allow-autoplay,
|
|
37
|
+
&.xgplayer-nostart {
|
|
38
|
+
.xgplayer-controls-initshow {
|
|
39
|
+
pointer-events: auto;
|
|
40
|
+
visibility: visible;
|
|
41
|
+
opacity: 1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.xgplayer-controls {
|
|
46
|
+
display: block;
|
|
47
|
+
position: absolute;
|
|
48
|
+
visibility: visible;
|
|
49
|
+
height: $controlHeight;
|
|
50
|
+
left: 0;
|
|
51
|
+
right: 0;
|
|
52
|
+
bottom: 0;
|
|
53
|
+
opacity: 1;
|
|
54
|
+
z-index: 10;
|
|
55
|
+
background-image: linear-gradient(180deg,transparent,rgba(0,0,0,.37),rgba(0,0,0,.75),rgba(0,0,0,.75));
|
|
56
|
+
transition: opacity .5s ease,visibility .5s ease;
|
|
57
|
+
&.show {
|
|
58
|
+
display: block;
|
|
59
|
+
opacity: 1;
|
|
60
|
+
visibility: visible;
|
|
61
|
+
pointer-events: auto;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.xg-inner-controls {
|
|
66
|
+
position: absolute;
|
|
67
|
+
height: 40px;
|
|
68
|
+
bottom: 0;
|
|
69
|
+
justify-content: space-between;
|
|
70
|
+
display: flex;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.xg-left-grid, .xg-right-grid {
|
|
74
|
+
position: relative;
|
|
75
|
+
// float: left;
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
flex-shrink: 1;
|
|
79
|
+
height: 100%;
|
|
80
|
+
z-index: 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.xg-right-grid {
|
|
84
|
+
// float: right;
|
|
85
|
+
flex-direction: row-reverse;
|
|
86
|
+
> :first-child {
|
|
87
|
+
margin-right: 0;
|
|
88
|
+
}
|
|
89
|
+
xg-icon {
|
|
90
|
+
margin-left: 0;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.xg-left-grid {
|
|
95
|
+
> :first-child {
|
|
96
|
+
margin-left: 0;
|
|
97
|
+
}
|
|
98
|
+
xg-icon {
|
|
99
|
+
margin-right: 0;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.xg-center-grid {
|
|
104
|
+
display: block;
|
|
105
|
+
position: absolute;
|
|
106
|
+
left: 0;
|
|
107
|
+
right: 0;
|
|
108
|
+
outline: none;
|
|
109
|
+
// top: -5px;
|
|
110
|
+
top: -20px;
|
|
111
|
+
padding: 5px 0;
|
|
112
|
+
text-align: center;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.flex-controls {
|
|
116
|
+
.xg-inner-controls {
|
|
117
|
+
justify-content: space-around;
|
|
118
|
+
display: flex;
|
|
119
|
+
bottom: 8px;
|
|
120
|
+
}
|
|
121
|
+
.xg-center-grid {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex: 1;
|
|
124
|
+
position: relative;
|
|
125
|
+
top: 0;
|
|
126
|
+
height: 100%;
|
|
127
|
+
justify-content: space-between;
|
|
128
|
+
align-items: center;
|
|
129
|
+
left: 0;
|
|
130
|
+
right: 0;
|
|
131
|
+
padding: 0 16px;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
&.xgplayer-mobile {
|
|
135
|
+
.xg-center-grid {
|
|
136
|
+
z-index: 2;
|
|
137
|
+
}
|
|
138
|
+
.flex-controls {
|
|
139
|
+
.xg-center-grid {
|
|
140
|
+
padding: 0 8px;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.bottom-controls {
|
|
146
|
+
.xg-center-grid {
|
|
147
|
+
top: 20px;
|
|
148
|
+
padding:0;
|
|
149
|
+
}
|
|
150
|
+
.xg-left-grid, .xg-right-grid {
|
|
151
|
+
bottom: 10px;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.mini-controls {
|
|
156
|
+
background-image: none;
|
|
157
|
+
.xg-inner-controls {
|
|
158
|
+
bottom: 0;
|
|
159
|
+
left: 0;
|
|
160
|
+
right: 0;
|
|
161
|
+
}
|
|
162
|
+
.xg-center-grid {
|
|
163
|
+
bottom: -28px;
|
|
164
|
+
top: auto;
|
|
165
|
+
padding: 0;
|
|
166
|
+
}
|
|
167
|
+
.xg-left-grid, .xg-right-grid {
|
|
168
|
+
display: none;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// class witch position follow controls start
|
|
173
|
+
.controls-follow {
|
|
174
|
+
bottom: 70px;
|
|
175
|
+
transition: bottom .3s ease;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&.flex-controls {
|
|
179
|
+
.controls-follow {
|
|
180
|
+
bottom: 45px;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&.xgplayer-inactive, &.no-controls, &.mini-controls {
|
|
185
|
+
.controls-follow {
|
|
186
|
+
bottom: 10px;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
// class witch position follow controls end
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// @supports (bottom: constant(safe-area-inset-bottom)) or (bottom: env(safe-area-inset-bottom)) {
|
|
193
|
+
// .xgplayer-mobile {
|
|
194
|
+
// &.xgplayer-is-fullscreen, &.xgplayer-is-cssfullscreen{
|
|
195
|
+
// .flex-controls {
|
|
196
|
+
// /* bottom: 34px; */
|
|
197
|
+
// /* iOS 11.0 */
|
|
198
|
+
// bottom: constant(safe-area-inset-bottom);
|
|
199
|
+
// /* 11.2+ */
|
|
200
|
+
// bottom: env(Safe-area-inset-bottom, 20px);
|
|
201
|
+
// }
|
|
202
|
+
// }
|
|
203
|
+
// }
|
|
204
|
+
// }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.xgplayer .xgplayer-cssfullscreen .xg-get-cssfull {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
.xgplayer .xgplayer-cssfullscreen .xg-exit-cssfull {
|
|
5
|
+
display: none;
|
|
6
|
+
}
|
|
7
|
+
.xgplayer .xgplayer-cssfullscreen[data-state=full] .xg-get-cssfull {
|
|
8
|
+
display: none;
|
|
9
|
+
}
|
|
10
|
+
.xgplayer .xgplayer-cssfullscreen[data-state=full] .xg-exit-cssfull {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef { {
|
|
3
|
+
* position: string,
|
|
4
|
+
* index: number,
|
|
5
|
+
* disable: boolean,
|
|
6
|
+
* target: null | HTMLElement,
|
|
7
|
+
* [propName: string]: any
|
|
8
|
+
* } } ICssConfig
|
|
9
|
+
*/
|
|
10
|
+
export default class CssFullScreen extends IconPlugin {
|
|
11
|
+
/**
|
|
12
|
+
* @type ICssConfig
|
|
13
|
+
*/
|
|
14
|
+
static get defaultConfig(): ICssConfig;
|
|
15
|
+
beforeCreate(args: any): void;
|
|
16
|
+
btnClick(e: any): void;
|
|
17
|
+
handleCssFullscreen: any;
|
|
18
|
+
initIcons(): void;
|
|
19
|
+
animate(isFullScreen: any): void;
|
|
20
|
+
switchTips(isFullScreen: any): void;
|
|
21
|
+
registerIcons(): {
|
|
22
|
+
cssFullscreen: {
|
|
23
|
+
icon: any;
|
|
24
|
+
class: string;
|
|
25
|
+
};
|
|
26
|
+
exitCssFullscreen: {
|
|
27
|
+
icon: any;
|
|
28
|
+
class: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
render(): string;
|
|
32
|
+
}
|
|
33
|
+
export type ICssConfig = {
|
|
34
|
+
[propName: string]: any;
|
|
35
|
+
position: string;
|
|
36
|
+
index: number;
|
|
37
|
+
disable: boolean;
|
|
38
|
+
target: null | HTMLElement;
|
|
39
|
+
};
|
|
40
|
+
import IconPlugin from "../common/iconPlugin";
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, createClass as _createClass, get as _get, getPrototypeOf as _getPrototypeOf } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import "../../utils/util.js";
|
|
3
|
+
import { CSS_FULLSCREEN_CHANGE } from "../../events.js";
|
|
4
|
+
import "../../utils/debug.js";
|
|
5
|
+
import { POSITIONS } from "../../plugin/plugin.js";
|
|
6
|
+
import { xgIconTips } from "../common/iconTools.js";
|
|
7
|
+
import Icon from "../common/iconPlugin.js";
|
|
8
|
+
import CssFullSceenSvg from "../assets/requestCssFull.js";
|
|
9
|
+
import ExitCssFullSceenSvg from "../assets/exitCssFull.js";
|
|
10
|
+
var CssFullScreen = /* @__PURE__ */ function(_IconPlugin) {
|
|
11
|
+
_inherits(CssFullScreen2, _IconPlugin);
|
|
12
|
+
var _super = _createSuper(CssFullScreen2);
|
|
13
|
+
function CssFullScreen2() {
|
|
14
|
+
_classCallCheck(this, CssFullScreen2);
|
|
15
|
+
return _super.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
_createClass(CssFullScreen2, [{
|
|
18
|
+
key: "beforeCreate",
|
|
19
|
+
value: function beforeCreate(args) {
|
|
20
|
+
if (typeof args.player.config.cssFullscreen === "boolean") {
|
|
21
|
+
args.config.disable = !args.player.config.cssFullscreen;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}, {
|
|
25
|
+
key: "afterCreate",
|
|
26
|
+
value: function afterCreate() {
|
|
27
|
+
var _this = this;
|
|
28
|
+
_get(_getPrototypeOf(CssFullScreen2.prototype), "afterCreate", this).call(this);
|
|
29
|
+
if (this.config.disable) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (this.config.target) {
|
|
33
|
+
this.playerConfig.fullscreenTarget = this.config.target;
|
|
34
|
+
}
|
|
35
|
+
this.initIcons();
|
|
36
|
+
this.on(CSS_FULLSCREEN_CHANGE, function(isCssfullScreen) {
|
|
37
|
+
_this.animate(isCssfullScreen);
|
|
38
|
+
});
|
|
39
|
+
this.btnClick = this.btnClick.bind(this);
|
|
40
|
+
this.handleCssFullscreen = this.hook("cssFullscreen_change", this.btnClick, {
|
|
41
|
+
pre: function pre(e) {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
e.stopPropagation();
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
this.bind(["click", "touchend"], this.handleCssFullscreen);
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
key: "initIcons",
|
|
50
|
+
value: function initIcons() {
|
|
51
|
+
var icons = this.icons;
|
|
52
|
+
var contentIcon = this.find(".xgplayer-icon");
|
|
53
|
+
contentIcon.appendChild(icons.cssFullscreen);
|
|
54
|
+
contentIcon.appendChild(icons.exitCssFullscreen);
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "btnClick",
|
|
58
|
+
value: function btnClick(e) {
|
|
59
|
+
e.preventDefault();
|
|
60
|
+
e.stopPropagation();
|
|
61
|
+
var isCssfullScreen = this.player.isCssfullScreen;
|
|
62
|
+
this.emitUserAction(e, "switch_cssfullscreen", {
|
|
63
|
+
cssfullscreen: isCssfullScreen
|
|
64
|
+
});
|
|
65
|
+
if (!isCssfullScreen) {
|
|
66
|
+
this.player.getCssFullscreen();
|
|
67
|
+
} else {
|
|
68
|
+
this.player.exitCssFullscreen();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
key: "animate",
|
|
73
|
+
value: function animate(isFullScreen) {
|
|
74
|
+
if (!this.root) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
isFullScreen ? this.setAttr("data-state", "full") : this.setAttr("data-state", "normal");
|
|
78
|
+
this.switchTips(isFullScreen);
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
81
|
+
key: "switchTips",
|
|
82
|
+
value: function switchTips(isFullScreen) {
|
|
83
|
+
var i18nKeys = this.i18nKeys;
|
|
84
|
+
var tipDom = this.find(".xg-tips");
|
|
85
|
+
tipDom && this.changeLangTextKey(tipDom, isFullScreen ? i18nKeys.EXITCSSFULLSCREEN_TIPS : i18nKeys.CSSFULLSCREEN_TIPS);
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "registerIcons",
|
|
89
|
+
value: function registerIcons() {
|
|
90
|
+
return {
|
|
91
|
+
cssFullscreen: {
|
|
92
|
+
icon: CssFullSceenSvg,
|
|
93
|
+
class: "xg-get-cssfull"
|
|
94
|
+
},
|
|
95
|
+
exitCssFullscreen: {
|
|
96
|
+
icon: ExitCssFullSceenSvg,
|
|
97
|
+
class: "xg-exit-cssfull"
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
key: "destroy",
|
|
103
|
+
value: function destroy() {
|
|
104
|
+
_get(_getPrototypeOf(CssFullScreen2.prototype), "destroy", this).call(this);
|
|
105
|
+
this.unbind(["click", "touchend"], this.btnClick);
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
key: "render",
|
|
109
|
+
value: function render() {
|
|
110
|
+
if (this.config.disable) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
return `<xg-icon class='xgplayer-cssfullscreen'>
|
|
114
|
+
<div class="xgplayer-icon">
|
|
115
|
+
</div>
|
|
116
|
+
`.concat(xgIconTips(this, "CSSFULLSCREEN_TIPS", this.playerConfig.isHideTips), "\n </xg-icon>");
|
|
117
|
+
}
|
|
118
|
+
}], [{
|
|
119
|
+
key: "pluginName",
|
|
120
|
+
get: function get() {
|
|
121
|
+
return "cssFullscreen";
|
|
122
|
+
}
|
|
123
|
+
}, {
|
|
124
|
+
key: "defaultConfig",
|
|
125
|
+
get: function get() {
|
|
126
|
+
return {
|
|
127
|
+
position: POSITIONS.CONTROLS_RIGHT,
|
|
128
|
+
index: 1,
|
|
129
|
+
disable: false,
|
|
130
|
+
target: null
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}]);
|
|
134
|
+
return CssFullScreen2;
|
|
135
|
+
}(Icon);
|
|
136
|
+
export { CssFullScreen as default };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.xgplayer {
|
|
2
|
+
.xgplayer-cssfullscreen {
|
|
3
|
+
.xg-get-cssfull {
|
|
4
|
+
display: block;
|
|
5
|
+
}
|
|
6
|
+
.xg-exit-cssfull {
|
|
7
|
+
display: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&[data-state=full] {
|
|
11
|
+
.xg-get-cssfull{
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
.xg-exit-cssfull {
|
|
15
|
+
display: block;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default DanmuIcon;
|
|
2
|
+
declare class DanmuIcon extends Plugin {
|
|
3
|
+
static get defaultConfig(): {
|
|
4
|
+
position: string;
|
|
5
|
+
index: number;
|
|
6
|
+
onSwitch: (event: any, state: any) => void;
|
|
7
|
+
};
|
|
8
|
+
onStateChange(e: any): void;
|
|
9
|
+
registerIcons(): {
|
|
10
|
+
openDanmu: {
|
|
11
|
+
icon: string;
|
|
12
|
+
class: string;
|
|
13
|
+
};
|
|
14
|
+
closeDanmu: {
|
|
15
|
+
icon: string;
|
|
16
|
+
class: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
switchState(isOpen: any): void;
|
|
20
|
+
initIcons(): void;
|
|
21
|
+
switchTips(isOpen: any): void;
|
|
22
|
+
render(): string;
|
|
23
|
+
}
|
|
24
|
+
import Plugin from "../../plugin";
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import "../../utils/util.js";
|
|
3
|
+
import "../../utils/debug.js";
|
|
4
|
+
import Plugin, { POSITIONS } from "../../plugin/plugin.js";
|
|
5
|
+
import { xgIconTips } from "../common/iconTools.js";
|
|
6
|
+
var DANMU_OPEN = '<dk-switch class="danmu-switch">\n<span class="txt">\u5F39</span>\n</dk-switch>';
|
|
7
|
+
var DanmuIcon = /* @__PURE__ */ function(_Plugin) {
|
|
8
|
+
_inherits(DanmuIcon2, _Plugin);
|
|
9
|
+
var _super = _createSuper(DanmuIcon2);
|
|
10
|
+
function DanmuIcon2() {
|
|
11
|
+
_classCallCheck(this, DanmuIcon2);
|
|
12
|
+
return _super.apply(this, arguments);
|
|
13
|
+
}
|
|
14
|
+
_createClass(DanmuIcon2, [{
|
|
15
|
+
key: "afterCreate",
|
|
16
|
+
value: function afterCreate() {
|
|
17
|
+
this.initIcons();
|
|
18
|
+
this.onStateChange = this.onStateChange.bind(this);
|
|
19
|
+
this.bind(["click", "touchend"], this.onStateChange);
|
|
20
|
+
}
|
|
21
|
+
}, {
|
|
22
|
+
key: "registerIcons",
|
|
23
|
+
value: function registerIcons() {
|
|
24
|
+
return {
|
|
25
|
+
openDanmu: {
|
|
26
|
+
icon: DANMU_OPEN,
|
|
27
|
+
class: "danmu-switch-open"
|
|
28
|
+
},
|
|
29
|
+
closeDanmu: {
|
|
30
|
+
icon: DANMU_OPEN,
|
|
31
|
+
class: "danmu-switch-closed"
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
key: "switchState",
|
|
37
|
+
value: function switchState(isOpen) {
|
|
38
|
+
if (isOpen) {
|
|
39
|
+
this.setAttr("data-state", "active");
|
|
40
|
+
} else {
|
|
41
|
+
this.setAttr("data-state", "normal");
|
|
42
|
+
}
|
|
43
|
+
this.switchTips(isOpen);
|
|
44
|
+
}
|
|
45
|
+
}, {
|
|
46
|
+
key: "initIcons",
|
|
47
|
+
value: function initIcons() {
|
|
48
|
+
var icons = this.icons;
|
|
49
|
+
var contentIcon = this.find(".xgplayer-icon");
|
|
50
|
+
contentIcon.appendChild(icons.openDanmu);
|
|
51
|
+
contentIcon.appendChild(icons.closeDanmu);
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
key: "switchTips",
|
|
55
|
+
value: function switchTips(isOpen) {
|
|
56
|
+
var tipDom = this.find(".xg-tips");
|
|
57
|
+
tipDom && this.changeLangTextKey(tipDom, isOpen ? "OFF" : "OPEN");
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
key: "onStateChange",
|
|
61
|
+
value: function onStateChange(e) {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
e.stopPropagation();
|
|
64
|
+
var state = this.root.getAttribute("data-state");
|
|
65
|
+
var isOpen = state === "active";
|
|
66
|
+
this.switchState(!isOpen);
|
|
67
|
+
this.config.onSwitch && this.config.onSwitch(e, !isOpen);
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
key: "destroy",
|
|
71
|
+
value: function destroy() {
|
|
72
|
+
this.unbind(["click", "touchend"], this.getMini);
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
key: "render",
|
|
76
|
+
value: function render() {
|
|
77
|
+
var langKey = "OPEN";
|
|
78
|
+
return '\n <xg-icon class="danmu-icon">\n <div class="xgplayer-icon">\n </div>\n '.concat(xgIconTips(this, langKey, this.playerConfig.isHideTips), "\n </xg-icon>");
|
|
79
|
+
}
|
|
80
|
+
}], [{
|
|
81
|
+
key: "pluginName",
|
|
82
|
+
get: function get() {
|
|
83
|
+
return "danmuIcon";
|
|
84
|
+
}
|
|
85
|
+
}, {
|
|
86
|
+
key: "defaultConfig",
|
|
87
|
+
get: function get() {
|
|
88
|
+
return {
|
|
89
|
+
position: POSITIONS.CONTROLS_RIGHT,
|
|
90
|
+
index: 11,
|
|
91
|
+
onSwitch: function onSwitch(event, state) {
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}]);
|
|
96
|
+
return DanmuIcon2;
|
|
97
|
+
}(Plugin);
|
|
98
|
+
export { DanmuIcon as default };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default DanmuPanel;
|
|
2
|
+
export type IDanmuPanelConfig = {
|
|
3
|
+
position?: string;
|
|
4
|
+
index?: number;
|
|
5
|
+
onChangeSet?: () => any;
|
|
6
|
+
speed?: number;
|
|
7
|
+
area?: any;
|
|
8
|
+
opacity?: number;
|
|
9
|
+
fonSize?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @typedef {{
|
|
13
|
+
* position?: string,
|
|
14
|
+
* index?: number,
|
|
15
|
+
* onChangeSet?: () => any,
|
|
16
|
+
* speed?: number,
|
|
17
|
+
* area?: any,
|
|
18
|
+
* opacity?: number,
|
|
19
|
+
* fonSize?: number
|
|
20
|
+
* }} IDanmuPanelConfig
|
|
21
|
+
*/
|
|
22
|
+
declare class DanmuPanel extends Plugin {
|
|
23
|
+
/**
|
|
24
|
+
* @type IDanmuPanelConfig
|
|
25
|
+
*/
|
|
26
|
+
static get defaultConfig(): IDanmuPanelConfig;
|
|
27
|
+
constructor(args: any);
|
|
28
|
+
set: {
|
|
29
|
+
speed: number;
|
|
30
|
+
area: {};
|
|
31
|
+
opacity: number;
|
|
32
|
+
fonSize: string;
|
|
33
|
+
};
|
|
34
|
+
activeEvent: string;
|
|
35
|
+
onStateChange(e: any): void;
|
|
36
|
+
onToggle(e: any): void;
|
|
37
|
+
render(): string;
|
|
38
|
+
}
|
|
39
|
+
import Plugin from "../../plugin";
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import util from "../../utils/util.js";
|
|
3
|
+
import sniffer from "../../utils/sniffer.js";
|
|
4
|
+
import "../../utils/debug.js";
|
|
5
|
+
import Plugin, { POSITIONS } from "../../plugin/plugin.js";
|
|
6
|
+
import PanelIcon from "../assets/panel.js";
|
|
7
|
+
var DanmuPanel = /* @__PURE__ */ function(_Plugin) {
|
|
8
|
+
_inherits(DanmuPanel2, _Plugin);
|
|
9
|
+
var _super = _createSuper(DanmuPanel2);
|
|
10
|
+
function DanmuPanel2(args) {
|
|
11
|
+
var _this;
|
|
12
|
+
_classCallCheck(this, DanmuPanel2);
|
|
13
|
+
_this = _super.call(this, args);
|
|
14
|
+
_this.set = {
|
|
15
|
+
speed: 1,
|
|
16
|
+
area: {},
|
|
17
|
+
opacity: 1,
|
|
18
|
+
fonSize: "middle"
|
|
19
|
+
};
|
|
20
|
+
return _this;
|
|
21
|
+
}
|
|
22
|
+
_createClass(DanmuPanel2, [{
|
|
23
|
+
key: "afterCreate",
|
|
24
|
+
value: function afterCreate() {
|
|
25
|
+
if (sniffer.device === "mobile") {
|
|
26
|
+
this.activeEvent = "click";
|
|
27
|
+
} else {
|
|
28
|
+
this.activeEvent = "mouseenter";
|
|
29
|
+
}
|
|
30
|
+
this.onStateChange = this.onStateChange.bind(this);
|
|
31
|
+
this.onToggle = this.onToggle.bind(this);
|
|
32
|
+
this.bind(this.activeEvent, this.onToggle);
|
|
33
|
+
this.bind("mouseleave", this.onToggle);
|
|
34
|
+
this.appendChild(".xgplayer-panel-icon", PanelIcon());
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
key: "onStateChange",
|
|
38
|
+
value: function onStateChange(e) {
|
|
39
|
+
this.config.onChangeSet && this.config.onChangeSet(this.set);
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "onToggle",
|
|
43
|
+
value: function onToggle(e) {
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
e.stopPropagation();
|
|
46
|
+
util.hasClass(this.root, "slider-show") ? util.removeClass(this.root, "slider-show") : util.addClass(this.root, "slider-show");
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
key: "destroy",
|
|
50
|
+
value: function destroy() {
|
|
51
|
+
this.unbind(["click", "touchend"], this.onStateChange);
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
key: "render",
|
|
55
|
+
value: function render() {
|
|
56
|
+
return '\n <xg-icon class="xgplayer-panel">\n <xg-panel-icon class="xgplayer-panel-icon">\n </xg-panel-icon>\n <xg-panel-slider class="xgplayer-panel-slider">\n <xg-hidemode class="xgplayer-hidemode">\n <p class="xgplayer-hidemode-font">\u5C4F\u853D\u7C7B\u578B</p>\n <ul class="xgplayer-hidemode-radio">\n <li class="xgplayer-hidemode-scroll" id="false">\u6EDA\u52A8</li><li class="xgplayer-hidemode-top" id="false">\u9876\u90E8</li><li class="xgplayer-hidemode-bottom" id="false">\u5E95\u90E8</li><li class="xgplayer-hidemode-color" id="false">\u8272\u5F69</li>\n </ul>\n </xg-hidemode>\n <xg-transparency class="xgplayer-transparency">\n <span>\u4E0D\u900F\u660E\u5EA6</span>\n <input class="xgplayer-transparency-line xgplayer-transparency-color xgplayer-transparency-bar xgplayer-transparency-gradient" type="range" min="0" max="100" step="0.1" value="50"></input>\n </xg-transparency>\n <xg-showarea class="xgplayer-showarea">\n <div class="xgplayer-showarea-name">\u663E\u793A\u533A\u57DF</div>\n <div class="xgplayer-showarea-control">\n <div class="xgplayer-showarea-control-up">\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-onequarters">1/4</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-twoquarters selected-color">1/2</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-threequarters">3/4</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-full">1</span>\n </div>\n <div class="xgplayer-showarea-control-down">\n <div class="xgplayer-showarea-control-down-dots">\n <span class="xgplayer-showarea-onequarters-dot"></span>\n <span class="xgplayer-showarea-twoquarters-dot"></span>\n <span class="xgplayer-showarea-threequarters-dot"></span>\n <span class="xgplayer-showarea-full-dot"></span>\n </div>\n <input class="xgplayer-showarea-line xgplayer-showarea-color xgplayer-showarea-bar xgplayer-gradient" type="range" min="1" max="4" step="1" value="1">\n </div>\n </div>\n </xg-showarea>\n <xg-danmuspeed class="xgplayer-danmuspeed">\n <div class="xgplayer-danmuspeed-name">\u5F39\u5E55\u901F\u5EA6</div>\n <div class="xgplayer-danmuspeed-control">\n <div class="xgplayer-danmuspeed-control-up">\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-small">\u6162</span>\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-middle selected-color">\u4E2D</span>\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-large">\u5FEB</span>\n </div>\n <div class="xgplayer-danmuspeed-control-down">\n <div class="xgplayer-danmuspeed-control-down-dots">\n <span class="xgplayer-danmuspeed-small-dot"></span>\n <span class="xgplayer-danmuspeed-middle-dot"></span>\n <span class="xgplayer-danmuspeed-large-dot"></span>\n </div>\n <input class="xgplayer-danmuspeed-line xgplayer-danmuspeed-color xgplayer-danmuspeed-bar xgplayer-gradient" type="range" min="50" max="150" step="50" value="100">\n </div>\n </div>\n </xg-danmuspeed>\n <xg-danmufont class="xgplayer-danmufont">\n <div class="xgplayer-danmufont-name">\u5B57\u4F53\u5927\u5C0F</div>\n <div class="xgplayer-danmufont-control">\n <div class="xgplayer-danmufont-control-up">\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-small">\u5C0F</span>\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-middle">\u4E2D</span>\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-large selected-color">\u5927</span>\n </div>\n <div class="xgplayer-danmufont-control-down">\n <div class="xgplayer-danmufont-control-down-dots">\n <span class="xgplayer-danmufont-small-dot"></span>\n <span class="xgplayer-danmufont-middle-dot"></span>\n <span class="xgplayer-danmufont-large-dot"></span>\n </div>\n <input class="xgplayer-danmufont-line xgplayer-danmufont-color xgplayer-danmufont-bar xgplayer-gradient" type="range" min="20" max="30" step="5" value="25">\n </div>\n </div>\n </xg-danmufont>\n </xg-panel-slider>\n </xg-icon>';
|
|
57
|
+
}
|
|
58
|
+
}], [{
|
|
59
|
+
key: "pluginName",
|
|
60
|
+
get: function get() {
|
|
61
|
+
return "danmuPanel";
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
key: "defaultConfig",
|
|
65
|
+
get: function get() {
|
|
66
|
+
return {
|
|
67
|
+
position: POSITIONS.CONTROLS_RIGHT,
|
|
68
|
+
index: 11,
|
|
69
|
+
onChangeSet: function onChangeSet(set) {
|
|
70
|
+
console.log("DanmuPanel:".concat(set));
|
|
71
|
+
},
|
|
72
|
+
speed: 1,
|
|
73
|
+
area: {},
|
|
74
|
+
opacity: 1,
|
|
75
|
+
fonSize: "middle"
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}]);
|
|
79
|
+
return DanmuPanel2;
|
|
80
|
+
}(Plugin);
|
|
81
|
+
export { DanmuPanel as default };
|