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,313 @@
|
|
|
1
|
+
import { inherits as _inherits, createSuper as _createSuper, createClass as _createClass, classCallCheck as _classCallCheck } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import DanmuJs from "danmu.js";
|
|
3
|
+
import util from "../../utils/util.js";
|
|
4
|
+
import { TIME_UPDATE, PAUSE, PLAY, SEEKING, VIDEO_RESIZE, SEEKED } from "../../events.js";
|
|
5
|
+
import "../../utils/debug.js";
|
|
6
|
+
import Plugin from "../../plugin/plugin.js";
|
|
7
|
+
import DanmuPanel from "./danmuPanel.js";
|
|
8
|
+
export { default as DanmuPanel } from "./danmuPanel.js";
|
|
9
|
+
import DanmuIcon from "./danmuIcon.js";
|
|
10
|
+
export { default as DanmuIcon } from "./danmuIcon.js";
|
|
11
|
+
var MIN_INTERVAL = 300;
|
|
12
|
+
var Danmu = /* @__PURE__ */ function(_Plugin) {
|
|
13
|
+
_inherits(Danmu2, _Plugin);
|
|
14
|
+
var _super = _createSuper(Danmu2);
|
|
15
|
+
function Danmu2(args) {
|
|
16
|
+
var _this;
|
|
17
|
+
_classCallCheck(this, Danmu2);
|
|
18
|
+
_this = _super.call(this, args);
|
|
19
|
+
_this.danmujs = null;
|
|
20
|
+
_this.danmuPanel = null;
|
|
21
|
+
_this.isOpen = false;
|
|
22
|
+
_this.seekCost = 0;
|
|
23
|
+
_this.intervalId = 0;
|
|
24
|
+
_this.isUseClose = false;
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
_createClass(Danmu2, [{
|
|
28
|
+
key: "afterCreate",
|
|
29
|
+
value: function afterCreate() {
|
|
30
|
+
var _this2 = this;
|
|
31
|
+
if (this.playerConfig.isLive) {
|
|
32
|
+
this.config.isLive = true;
|
|
33
|
+
}
|
|
34
|
+
this.initDanmu();
|
|
35
|
+
this.registerExtIcons();
|
|
36
|
+
this.once(TIME_UPDATE, function() {
|
|
37
|
+
_this2.config.defaultOpen && !_this2.isUseClose && _this2.start();
|
|
38
|
+
});
|
|
39
|
+
this.on(PAUSE, function() {
|
|
40
|
+
_this2.isOpen && _this2.danmujs && _this2.danmujs.pause();
|
|
41
|
+
});
|
|
42
|
+
this.on(PLAY, function() {
|
|
43
|
+
_this2.isOpen && _this2.danmujs && _this2.danmujs.play();
|
|
44
|
+
});
|
|
45
|
+
this.on(SEEKING, function() {
|
|
46
|
+
_this2.seekCost = window.performance.now();
|
|
47
|
+
!_this2.config.isLive && _this2.danmujs && _this2.danmujs.stop();
|
|
48
|
+
});
|
|
49
|
+
this.on(VIDEO_RESIZE, function() {
|
|
50
|
+
_this2.resize();
|
|
51
|
+
});
|
|
52
|
+
this.on(SEEKED, function() {
|
|
53
|
+
if (!_this2.danmujs || !_this2.isOpen) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (_this2.intervalId) {
|
|
57
|
+
util.clearTimeout(_this2, _this2.intervalId);
|
|
58
|
+
_this2.intervalId = null;
|
|
59
|
+
}
|
|
60
|
+
var now = window.performance.now();
|
|
61
|
+
if (now - _this2.seekCost > MIN_INTERVAL) {
|
|
62
|
+
_this2.danmujs.start();
|
|
63
|
+
} else {
|
|
64
|
+
_this2.intervalId = util.setTimeout(_this2, function() {
|
|
65
|
+
_this2.danmujs.start();
|
|
66
|
+
_this2.intervalId = null;
|
|
67
|
+
}, MIN_INTERVAL);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}, {
|
|
72
|
+
key: "onPluginsReady",
|
|
73
|
+
value: function onPluginsReady() {
|
|
74
|
+
var pcPlugin = this.player.plugins.pc;
|
|
75
|
+
if (pcPlugin) {
|
|
76
|
+
pcPlugin.onVideoDblClick && this.bind("dblclick", pcPlugin.onVideoDblClick);
|
|
77
|
+
pcPlugin.onVideoClick && this.bind("click", pcPlugin.onVideoClick);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
81
|
+
key: "initDanmu",
|
|
82
|
+
value: function initDanmu() {
|
|
83
|
+
var player = this.player, config = this.config;
|
|
84
|
+
var _this$config = this.config, channelSize = _this$config.channelSize, fontSize = _this$config.fontSize, opacity = _this$config.opacity, mouseControl = _this$config.mouseControl, mouseControlPause = _this$config.mouseControlPause, area = _this$config.area, defaultOff = _this$config.defaultOff;
|
|
85
|
+
var danmuConfig = {
|
|
86
|
+
container: this.root,
|
|
87
|
+
player: player.media,
|
|
88
|
+
comments: this.config.comments,
|
|
89
|
+
live: config.isLive,
|
|
90
|
+
defaultOff,
|
|
91
|
+
area,
|
|
92
|
+
mouseControl,
|
|
93
|
+
mouseControlPause
|
|
94
|
+
};
|
|
95
|
+
if (config.ext) {
|
|
96
|
+
Object.keys(config.ext).map(function(key) {
|
|
97
|
+
danmuConfig[key] = config.ext[key];
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
var danmu = new DanmuJs(danmuConfig);
|
|
101
|
+
this.danmujs = danmu;
|
|
102
|
+
player.danmu = danmu;
|
|
103
|
+
this.setFontSize(fontSize, channelSize);
|
|
104
|
+
this.setArea(area);
|
|
105
|
+
this.resize();
|
|
106
|
+
opacity !== 1 && this.setOpacity(opacity);
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
key: "registerExtIcons",
|
|
110
|
+
value: function registerExtIcons() {
|
|
111
|
+
var _this3 = this;
|
|
112
|
+
var player = this.player, config = this.config;
|
|
113
|
+
if (config.panel) {
|
|
114
|
+
var panelOptions = {
|
|
115
|
+
config: {
|
|
116
|
+
onChangeset: function onChangeset(set) {
|
|
117
|
+
_this3.changeSet(set);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
this.danmuPanel = player.controls.registerPlugin(DanmuPanel, panelOptions, DanmuPanel.pluginName);
|
|
122
|
+
}
|
|
123
|
+
var switchConfig = config.switchConfig;
|
|
124
|
+
if (!config.closeDefaultBtn) {
|
|
125
|
+
var buttonOptions = {
|
|
126
|
+
config: {
|
|
127
|
+
onSwitch: function onSwitch(event, isOpen) {
|
|
128
|
+
_this3.onSwitch(event, isOpen);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
Object.keys(switchConfig).map(function(key) {
|
|
133
|
+
buttonOptions.config[key] = switchConfig[key];
|
|
134
|
+
});
|
|
135
|
+
this.danmuButton = player.controls.registerPlugin(DanmuIcon, buttonOptions, DanmuIcon.pluginName);
|
|
136
|
+
this.config.defaultOpen && this.danmuButton.switchState(true);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
key: "changeSet",
|
|
141
|
+
value: function changeSet(set) {
|
|
142
|
+
}
|
|
143
|
+
}, {
|
|
144
|
+
key: "onSwitch",
|
|
145
|
+
value: function onSwitch(event, defaultOpen) {
|
|
146
|
+
this.emitUserAction(event, "switch_danmu", {
|
|
147
|
+
prop: "isOpen",
|
|
148
|
+
from: !defaultOpen,
|
|
149
|
+
to: defaultOpen
|
|
150
|
+
});
|
|
151
|
+
if (defaultOpen) {
|
|
152
|
+
this.start();
|
|
153
|
+
} else {
|
|
154
|
+
this.stop();
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}, {
|
|
158
|
+
key: "start",
|
|
159
|
+
value: function start() {
|
|
160
|
+
var _this4 = this;
|
|
161
|
+
if (this.isOpen || !this.danmujs) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
this.isUseClose = false;
|
|
165
|
+
this.show();
|
|
166
|
+
this.resize();
|
|
167
|
+
util.setTimeout(this, function() {
|
|
168
|
+
_this4.danmujs.start();
|
|
169
|
+
if (_this4.player.paused) {
|
|
170
|
+
_this4.danmujs.pause();
|
|
171
|
+
}
|
|
172
|
+
_this4.isOpen = true;
|
|
173
|
+
}, 0);
|
|
174
|
+
}
|
|
175
|
+
}, {
|
|
176
|
+
key: "stop",
|
|
177
|
+
value: function stop() {
|
|
178
|
+
this.isUseClose = true;
|
|
179
|
+
if (!this.isOpen || !this.danmujs) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
this.danmujs.stop();
|
|
183
|
+
this.config.isLive && this.clear();
|
|
184
|
+
this.isOpen = false;
|
|
185
|
+
this.hide();
|
|
186
|
+
}
|
|
187
|
+
}, {
|
|
188
|
+
key: "clear",
|
|
189
|
+
value: function clear() {
|
|
190
|
+
this.danmujs && this.danmujs.clear();
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
key: "setCommentLike",
|
|
194
|
+
value: function setCommentLike(id, data) {
|
|
195
|
+
this.danmujs && this.danmujs.setCommentLike(id, data);
|
|
196
|
+
}
|
|
197
|
+
}, {
|
|
198
|
+
key: "setCommentDuration",
|
|
199
|
+
value: function setCommentDuration(id, duration) {
|
|
200
|
+
this.danmujs && this.danmujs.setCommentDuration(id, duration);
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
key: "setAllDuration",
|
|
204
|
+
value: function setAllDuration(mode, duration) {
|
|
205
|
+
this.danmujs && this.danmujs.setAllDuration(mode, duration);
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
key: "setCommentID",
|
|
209
|
+
value: function setCommentID(oldID, newID) {
|
|
210
|
+
this.danmujs && this.danmujs.setCommentID(oldID, newID);
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
key: "hideMode",
|
|
214
|
+
value: function hideMode(mode) {
|
|
215
|
+
this.danmujs && this.danmujs.hide(mode);
|
|
216
|
+
}
|
|
217
|
+
}, {
|
|
218
|
+
key: "showMode",
|
|
219
|
+
value: function showMode(mode) {
|
|
220
|
+
this.danmujs && this.danmujs.show(mode);
|
|
221
|
+
}
|
|
222
|
+
}, {
|
|
223
|
+
key: "setArea",
|
|
224
|
+
value: function setArea(area) {
|
|
225
|
+
this.danmujs && this.danmujs.setArea(area);
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
key: "setOpacity",
|
|
229
|
+
value: function setOpacity(opacity) {
|
|
230
|
+
this.danmujs && this.danmujs.setOpacity(opacity);
|
|
231
|
+
}
|
|
232
|
+
}, {
|
|
233
|
+
key: "setFontSize",
|
|
234
|
+
value: function setFontSize(size, channelSize) {
|
|
235
|
+
this.danmujs && this.danmujs.setFontSize(size, channelSize);
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
key: "resize",
|
|
239
|
+
value: function resize() {
|
|
240
|
+
this.danmujs && this.danmujs.resize();
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
key: "sendComment",
|
|
244
|
+
value: function sendComment(comments) {
|
|
245
|
+
this.danmujs && this.danmujs.sendComment(comments);
|
|
246
|
+
}
|
|
247
|
+
}, {
|
|
248
|
+
key: "updateComments",
|
|
249
|
+
value: function updateComments(comments, isClear) {
|
|
250
|
+
this.danmujs && this.danmujs.updateComments(comments, isClear);
|
|
251
|
+
}
|
|
252
|
+
}, {
|
|
253
|
+
key: "hideIcon",
|
|
254
|
+
value: function hideIcon() {
|
|
255
|
+
this.danmuButton && this.danmuButton.hide();
|
|
256
|
+
}
|
|
257
|
+
}, {
|
|
258
|
+
key: "showIcon",
|
|
259
|
+
value: function showIcon() {
|
|
260
|
+
this.danmuButton && this.danmuButton.show();
|
|
261
|
+
}
|
|
262
|
+
}, {
|
|
263
|
+
key: "destroy",
|
|
264
|
+
value: function destroy() {
|
|
265
|
+
this.danmujs.stop();
|
|
266
|
+
this.danmujs.destroy();
|
|
267
|
+
this.danmujs = null;
|
|
268
|
+
this.player.danmu = null;
|
|
269
|
+
var danmuButton = this.danmuButton, danmuPanel = this.danmuPanel;
|
|
270
|
+
this.danmuButton && this.danmuButton.root && danmuButton.__destroy && danmuButton.__destroy();
|
|
271
|
+
this.danmuPanel && this.danmuPanel.root && danmuPanel.__destroy && danmuPanel.__destroy();
|
|
272
|
+
this.danmuButton = null;
|
|
273
|
+
this.danmuPanel = null;
|
|
274
|
+
}
|
|
275
|
+
}, {
|
|
276
|
+
key: "render",
|
|
277
|
+
value: function render() {
|
|
278
|
+
return '<xg-danmu class="xgplayer-danmu">\n </xg-danmu>';
|
|
279
|
+
}
|
|
280
|
+
}], [{
|
|
281
|
+
key: "pluginName",
|
|
282
|
+
get: function get() {
|
|
283
|
+
return "danmu";
|
|
284
|
+
}
|
|
285
|
+
}, {
|
|
286
|
+
key: "defaultConfig",
|
|
287
|
+
get: function get() {
|
|
288
|
+
return {
|
|
289
|
+
comments: [],
|
|
290
|
+
area: {
|
|
291
|
+
start: 0,
|
|
292
|
+
end: 1
|
|
293
|
+
},
|
|
294
|
+
closeDefaultBtn: false,
|
|
295
|
+
defaultOff: false,
|
|
296
|
+
panel: false,
|
|
297
|
+
panelConfig: {},
|
|
298
|
+
switchConfig: {},
|
|
299
|
+
defaultOpen: true,
|
|
300
|
+
isLive: false,
|
|
301
|
+
channelSize: 24,
|
|
302
|
+
fontSize: 14,
|
|
303
|
+
opacity: 1,
|
|
304
|
+
mouseControl: false,
|
|
305
|
+
mouseControlPause: false,
|
|
306
|
+
ext: {},
|
|
307
|
+
style: {}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
}]);
|
|
311
|
+
return Danmu2;
|
|
312
|
+
}(Plugin);
|
|
313
|
+
export { Danmu as default };
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
// definition
|
|
2
|
+
$definitionLiColor: rgba(255, 255, 255, 0.80);
|
|
3
|
+
$definitionLiActiveColor: #fff;
|
|
4
|
+
$definitionNameColor: rgba(255, 255, 255, 0.80);
|
|
5
|
+
$definitionNameBgColor: rgba(0, 0, 0, 0.38);
|
|
6
|
+
|
|
7
|
+
// slider
|
|
8
|
+
$sliderBgColor: rgba(0, 0, 0, 0.54);
|
|
9
|
+
$sliderBarBgColor: rgba(255, 255, 255, 0.30);
|
|
10
|
+
$sliderDragBgColor: #FA1F41;
|
|
11
|
+
$sliderDragAfterBgColor: #fff;
|
|
12
|
+
$sliderDragAfterShadow: 0 0 5px 0 rgba(0, 0, 0, 0.26);
|
|
13
|
+
.xgplayer {
|
|
14
|
+
.danmu-icon {
|
|
15
|
+
.danmu-switch {
|
|
16
|
+
margin:0 auto;
|
|
17
|
+
display: flex;
|
|
18
|
+
&-open {
|
|
19
|
+
display: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&-closed {
|
|
23
|
+
display: block;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
&[data-state=active] {
|
|
27
|
+
.danmu-switch {
|
|
28
|
+
padding-left: 12px;
|
|
29
|
+
background-color: #f85959;
|
|
30
|
+
&-open {
|
|
31
|
+
display: block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-closed {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.xgplayer-danmu {
|
|
42
|
+
display: none;
|
|
43
|
+
position: absolute;
|
|
44
|
+
top: 0;
|
|
45
|
+
left: 0;
|
|
46
|
+
right: 0;
|
|
47
|
+
height: 100%;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
outline: none;
|
|
51
|
+
> * {
|
|
52
|
+
position: absolute;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@mixin xgplayer($danmuHandle) {
|
|
60
|
+
.xgplayer-#{$danmuHandle}-line{
|
|
61
|
+
-webkit-appearance: none;
|
|
62
|
+
-moz-appearance: none;
|
|
63
|
+
appearance: none;
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
outline: none;
|
|
66
|
+
width: 150px;
|
|
67
|
+
height: 4px;
|
|
68
|
+
background: #aaa;
|
|
69
|
+
border-radius: 4px;
|
|
70
|
+
border-style: none;
|
|
71
|
+
margin-left: 10px;
|
|
72
|
+
margin-top: -2px;
|
|
73
|
+
}
|
|
74
|
+
.xgplayer-#{$danmuHandle}-line::-moz-focus-outer {
|
|
75
|
+
border: 0!important;
|
|
76
|
+
}
|
|
77
|
+
.xgplayer-#{$danmuHandle}-color::-webkit-slider-runnable-track{
|
|
78
|
+
outline: none;
|
|
79
|
+
width: 150px;
|
|
80
|
+
height: 4px;
|
|
81
|
+
border-radius: 4px;
|
|
82
|
+
}
|
|
83
|
+
.xgplayer-#{$danmuHandle}-color::-moz-range-track{
|
|
84
|
+
outline: none;
|
|
85
|
+
background-color: #aaa;
|
|
86
|
+
border-color: transparent;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
width: 150px;
|
|
89
|
+
height: 4px;
|
|
90
|
+
border-radius: 4px;
|
|
91
|
+
}
|
|
92
|
+
.xgplayer-#{$danmuHandle}-color::-ms-track{
|
|
93
|
+
outline: none;
|
|
94
|
+
background-color: #aaa;
|
|
95
|
+
color: transparent;
|
|
96
|
+
border-color: transparent;
|
|
97
|
+
width: 150px;
|
|
98
|
+
height: 4px;
|
|
99
|
+
border-radius: 4px;
|
|
100
|
+
}
|
|
101
|
+
.xgplayer-#{$danmuHandle}-bar::-webkit-slider-thumb{
|
|
102
|
+
outline: none;
|
|
103
|
+
-webkit-appearance: none;
|
|
104
|
+
-moz-appearance: none;
|
|
105
|
+
appearance: none;
|
|
106
|
+
border: 6px solid #f85959;
|
|
107
|
+
height: 6px;
|
|
108
|
+
width: 6px;
|
|
109
|
+
margin-top: -4px;
|
|
110
|
+
border-radius: 6px;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
}
|
|
113
|
+
.xgplayer-#{$danmuHandle}-bar::-moz-range-thumb{
|
|
114
|
+
outline: none;
|
|
115
|
+
-webkit-appearance: none;
|
|
116
|
+
-moz-appearance: none;
|
|
117
|
+
appearance: none;
|
|
118
|
+
border: 6px solid #f85959;
|
|
119
|
+
height: 0;
|
|
120
|
+
width: 0;
|
|
121
|
+
border-radius: 6px;
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
}
|
|
124
|
+
.xgplayer-#{$danmuHandle}-bar::-ms-thumb{
|
|
125
|
+
outline: none;
|
|
126
|
+
-webkit-appearance: none;
|
|
127
|
+
-moz-appearance: none;
|
|
128
|
+
appearance: none;
|
|
129
|
+
border: 6px solid #f85959;
|
|
130
|
+
height: 6px;
|
|
131
|
+
width: 6px;
|
|
132
|
+
border-radius: 6px;
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
@mixin dot($panelContent) {
|
|
137
|
+
.xgplayer-#{$panelContent}-dot{
|
|
138
|
+
width: 3px;
|
|
139
|
+
height: 3px;
|
|
140
|
+
border: 3px solid #aaa;
|
|
141
|
+
border-radius: 50%;
|
|
142
|
+
background-color: #aaa;
|
|
143
|
+
position: relative;
|
|
144
|
+
top: 16px;
|
|
145
|
+
z-index: -1;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
.xgplayer {
|
|
149
|
+
.xgplayer-panel{
|
|
150
|
+
outline: none;
|
|
151
|
+
width: 40px;
|
|
152
|
+
height: 40px;
|
|
153
|
+
display: inline-block;
|
|
154
|
+
position: relative;
|
|
155
|
+
font: {
|
|
156
|
+
size: 13px;
|
|
157
|
+
}
|
|
158
|
+
color: $definitionNameColor;
|
|
159
|
+
z-index: 36;
|
|
160
|
+
.xgplayer-panel-icon{
|
|
161
|
+
// margin-top: 14px;
|
|
162
|
+
cursor: pointer;
|
|
163
|
+
position: absolute;
|
|
164
|
+
// margin-left: 5px;
|
|
165
|
+
// top: 10px;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// .selected-color {
|
|
169
|
+
// color: #f85959;
|
|
170
|
+
// }
|
|
171
|
+
.xgplayer-panel-slider{
|
|
172
|
+
z-index: 36;
|
|
173
|
+
display: none;
|
|
174
|
+
position: absolute;
|
|
175
|
+
width: 230px;
|
|
176
|
+
height: 230px;
|
|
177
|
+
background: $sliderBgColor;
|
|
178
|
+
border-radius: 1px;
|
|
179
|
+
padding: 10px 20px;
|
|
180
|
+
outline: none;
|
|
181
|
+
left: -115px;
|
|
182
|
+
bottom: 42px;
|
|
183
|
+
.xgplayer-hidemode {
|
|
184
|
+
padding-bottom: 10px;
|
|
185
|
+
&-radio li{
|
|
186
|
+
display: inline;
|
|
187
|
+
list-style: none;
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
}
|
|
190
|
+
ul{
|
|
191
|
+
display: flex;
|
|
192
|
+
justify-content: space-around;
|
|
193
|
+
}
|
|
194
|
+
li{
|
|
195
|
+
margin: 0 12px;
|
|
196
|
+
font-size: 11px;
|
|
197
|
+
color: #aaa;
|
|
198
|
+
}
|
|
199
|
+
&-font{
|
|
200
|
+
margin-bottom: 10px;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
.xgplayer-transparency{
|
|
204
|
+
display: block;
|
|
205
|
+
margin-top: 10px;
|
|
206
|
+
@include xgplayer(transparency);
|
|
207
|
+
.xgplayer-transparency-bar::-moz-range-progress {
|
|
208
|
+
outline: none;
|
|
209
|
+
-webkit-appearance: none;
|
|
210
|
+
-moz-appearance: none;
|
|
211
|
+
appearance: none;
|
|
212
|
+
height: 4px;
|
|
213
|
+
border-radius: 4px;
|
|
214
|
+
background: linear-gradient(to right, #f85959, #f85959 100% , #aaa)
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
.xgplayer-showarea{
|
|
218
|
+
display: block;
|
|
219
|
+
margin-top: 8px;
|
|
220
|
+
&-name {
|
|
221
|
+
display: inline-block;
|
|
222
|
+
position: relative;
|
|
223
|
+
top: -10px;
|
|
224
|
+
}
|
|
225
|
+
&-control {
|
|
226
|
+
display: inline-block;
|
|
227
|
+
&-up {
|
|
228
|
+
width: 150px;
|
|
229
|
+
margin-left: 10px;
|
|
230
|
+
display: -moz-box;
|
|
231
|
+
display: -ms-flexbox;
|
|
232
|
+
display: -webkit-box;
|
|
233
|
+
display: flex;
|
|
234
|
+
-webkit-box-pack: justify;
|
|
235
|
+
-ms-flex-pack: justify;
|
|
236
|
+
justify-content: space-between;
|
|
237
|
+
color: #aaa;
|
|
238
|
+
}
|
|
239
|
+
&-down {
|
|
240
|
+
position: relative;
|
|
241
|
+
top: -10px;
|
|
242
|
+
}
|
|
243
|
+
&-down-dots {
|
|
244
|
+
display: -webkit-box;
|
|
245
|
+
display: -ms-flexbox;
|
|
246
|
+
display: flex;
|
|
247
|
+
width: 150px;
|
|
248
|
+
margin-left: 10px;
|
|
249
|
+
-webkit-box-pack: justify;
|
|
250
|
+
-ms-flex-pack: justify;
|
|
251
|
+
justify-content: space-between;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
&-twoquarters {
|
|
255
|
+
margin-left: -6px;
|
|
256
|
+
}
|
|
257
|
+
&-threequarters {
|
|
258
|
+
margin-left: -6px;
|
|
259
|
+
}
|
|
260
|
+
&-full {
|
|
261
|
+
margin-right: 3px;
|
|
262
|
+
}
|
|
263
|
+
@include xgplayer(showarea);
|
|
264
|
+
@include dot(showarea-zero);
|
|
265
|
+
@include dot(showarea-onequarters);
|
|
266
|
+
@include dot(showarea-twoquarters);
|
|
267
|
+
@include dot(showarea-threequarters);
|
|
268
|
+
@include dot(showarea-full);
|
|
269
|
+
}
|
|
270
|
+
.xgplayer-danmuspeed{
|
|
271
|
+
display: block;
|
|
272
|
+
&-name {
|
|
273
|
+
display: inline-block;
|
|
274
|
+
position: relative;
|
|
275
|
+
top: -10px;
|
|
276
|
+
}
|
|
277
|
+
&-control {
|
|
278
|
+
display: inline-block;
|
|
279
|
+
&-up {
|
|
280
|
+
width: 150px;
|
|
281
|
+
margin-left: 10px;
|
|
282
|
+
display: -moz-box;
|
|
283
|
+
display: -ms-flexbox;
|
|
284
|
+
display: -webkit-box;
|
|
285
|
+
display: flex;
|
|
286
|
+
-webkit-box-pack: justify;
|
|
287
|
+
-ms-flex-pack: justify;
|
|
288
|
+
justify-content: space-between;
|
|
289
|
+
color: #aaa;
|
|
290
|
+
}
|
|
291
|
+
&-down {
|
|
292
|
+
position: relative;
|
|
293
|
+
top: -10px;
|
|
294
|
+
}
|
|
295
|
+
&-down-dots {
|
|
296
|
+
display: -webkit-box;
|
|
297
|
+
display: -ms-flexbox;
|
|
298
|
+
display: flex;
|
|
299
|
+
width: 150px;
|
|
300
|
+
margin-left: 10px;
|
|
301
|
+
-webkit-box-pack: justify;
|
|
302
|
+
-ms-flex-pack: justify;
|
|
303
|
+
justify-content: space-between;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
@include xgplayer(danmuspeed);
|
|
307
|
+
@include dot(danmuspeed-small);
|
|
308
|
+
@include dot(danmuspeed-middle);
|
|
309
|
+
@include dot(danmuspeed-large);
|
|
310
|
+
}
|
|
311
|
+
.xgplayer-danmufont{
|
|
312
|
+
display: block;
|
|
313
|
+
&-name {
|
|
314
|
+
display: inline-block;
|
|
315
|
+
position: relative;
|
|
316
|
+
top: -10px;
|
|
317
|
+
}
|
|
318
|
+
&-control {
|
|
319
|
+
display: inline-block;
|
|
320
|
+
&-up {
|
|
321
|
+
width: 150px;
|
|
322
|
+
margin-left: 10px;
|
|
323
|
+
display: -moz-box;
|
|
324
|
+
display: -ms-flexbox;
|
|
325
|
+
display: -webkit-box;
|
|
326
|
+
display: flex;
|
|
327
|
+
-webkit-box-pack: justify;
|
|
328
|
+
-ms-flex-pack: justify;
|
|
329
|
+
justify-content: space-between;
|
|
330
|
+
color: #aaa;
|
|
331
|
+
}
|
|
332
|
+
&-down {
|
|
333
|
+
position: relative;
|
|
334
|
+
top: -10px;
|
|
335
|
+
}
|
|
336
|
+
&-down-dots {
|
|
337
|
+
display: -webkit-box;
|
|
338
|
+
display: -ms-flexbox;
|
|
339
|
+
display: flex;
|
|
340
|
+
width: 150px;
|
|
341
|
+
margin-left: 10px;
|
|
342
|
+
-webkit-box-pack: justify;
|
|
343
|
+
-ms-flex-pack: justify;
|
|
344
|
+
justify-content: space-between;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
@include xgplayer(danmufont);
|
|
348
|
+
@include dot(danmufont-small);
|
|
349
|
+
@include dot(danmufont-middle);
|
|
350
|
+
@include dot(danmufont-large);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
.slider-show .xgplayer-panel-slider{
|
|
354
|
+
display: block;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('../../defaultConfig').IDefinition} IDefinition
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {{
|
|
6
|
+
* position?: string,
|
|
7
|
+
* index?: number,
|
|
8
|
+
* list?: Array<IDefinition>,
|
|
9
|
+
* defaultDefinition?: any,
|
|
10
|
+
* disable?: any,
|
|
11
|
+
* hidePortrait?: boolean,
|
|
12
|
+
* className?: string
|
|
13
|
+
* }} IDefinitionConfig
|
|
14
|
+
*/
|
|
15
|
+
export default class DefinitionIcon extends OptionsIcon {
|
|
16
|
+
/**
|
|
17
|
+
* @type IDefinitionConfig
|
|
18
|
+
*/
|
|
19
|
+
static get defaultConfig(): IDefinitionConfig;
|
|
20
|
+
beforeCreate(args: any): void;
|
|
21
|
+
curTime: number;
|
|
22
|
+
isPaused: boolean;
|
|
23
|
+
initDefinition(): void;
|
|
24
|
+
changeDefinitionList(list: any): void;
|
|
25
|
+
changeDefinition(to: any, from: any): void;
|
|
26
|
+
onItemClick(e: any, data: any, ...args: any[]): void;
|
|
27
|
+
}
|
|
28
|
+
export type IDefinition = import('../../defaultConfig').IDefinition;
|
|
29
|
+
export type IDefinitionConfig = {
|
|
30
|
+
position?: string;
|
|
31
|
+
index?: number;
|
|
32
|
+
list?: Array<IDefinition>;
|
|
33
|
+
defaultDefinition?: any;
|
|
34
|
+
disable?: any;
|
|
35
|
+
hidePortrait?: boolean;
|
|
36
|
+
className?: string;
|
|
37
|
+
};
|
|
38
|
+
import OptionsIcon from "../common/optionsIcon";
|