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,37 @@
|
|
|
1
|
+
export default PIP;
|
|
2
|
+
declare class PIP extends IconPlugin {
|
|
3
|
+
static get defaultConfig(): {
|
|
4
|
+
position: string;
|
|
5
|
+
index: number;
|
|
6
|
+
showIcon: boolean;
|
|
7
|
+
};
|
|
8
|
+
static checkWebkitSetPresentationMode(video: any): boolean;
|
|
9
|
+
beforeCreate(args: any): void;
|
|
10
|
+
pMode: any;
|
|
11
|
+
registerIcons(): {
|
|
12
|
+
pipIcon: {
|
|
13
|
+
icon: any;
|
|
14
|
+
class: string;
|
|
15
|
+
};
|
|
16
|
+
pipIconExit: {
|
|
17
|
+
icon: any;
|
|
18
|
+
class: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
initIcons(): void;
|
|
22
|
+
initPipEvents(): void;
|
|
23
|
+
leavePIPCallback: () => void;
|
|
24
|
+
enterPIPCallback: (e: any) => void;
|
|
25
|
+
pipWindow: any;
|
|
26
|
+
onWebkitpresentationmodechanged: (e: any) => void;
|
|
27
|
+
switchPIP: (e: any) => boolean;
|
|
28
|
+
requestPIP(): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 退出画中画
|
|
31
|
+
*/
|
|
32
|
+
exitPIP(): boolean;
|
|
33
|
+
get isPip(): boolean;
|
|
34
|
+
isPIPAvailable(): boolean;
|
|
35
|
+
render(): string;
|
|
36
|
+
}
|
|
37
|
+
import IconPlugin from "../common/iconPlugin";
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { inherits as _inherits, createSuper as _createSuper, classCallCheck as _classCallCheck, defineProperty as _defineProperty, assertThisInitialized as _assertThisInitialized, createClass as _createClass, get as _get, getPrototypeOf as _getPrototypeOf } from "../../_virtual/_rollupPluginBabelHelpers.js";
|
|
2
|
+
import util from "../../utils/util.js";
|
|
3
|
+
import { COMPLETE, PIP_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 PipIcon from "../assets/pipIcon.js";
|
|
9
|
+
import PipIconExit from "../assets/pipIconExit.js";
|
|
10
|
+
var PresentationMode = {
|
|
11
|
+
PIP: "picture-in-picture",
|
|
12
|
+
INLINE: "inline",
|
|
13
|
+
FULLSCREEN: "fullscreen"
|
|
14
|
+
};
|
|
15
|
+
var PIP = /* @__PURE__ */ function(_IconPlugin) {
|
|
16
|
+
_inherits(PIP2, _IconPlugin);
|
|
17
|
+
var _super = _createSuper(PIP2);
|
|
18
|
+
function PIP2() {
|
|
19
|
+
var _this;
|
|
20
|
+
_classCallCheck(this, PIP2);
|
|
21
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
22
|
+
args[_key] = arguments[_key];
|
|
23
|
+
}
|
|
24
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
25
|
+
_defineProperty(_assertThisInitialized(_this), "switchPIP", function(e) {
|
|
26
|
+
if (!_this.isPIPAvailable()) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
e.stopPropagation && e.stopPropagation();
|
|
30
|
+
if (_this.isPip) {
|
|
31
|
+
_this.exitPIP();
|
|
32
|
+
_this.emitUserAction(e, "change_pip", {
|
|
33
|
+
props: "pip",
|
|
34
|
+
from: true,
|
|
35
|
+
to: false
|
|
36
|
+
});
|
|
37
|
+
_this.setAttr("data-state", "normal");
|
|
38
|
+
} else if (_this.player.media.readyState === 4) {
|
|
39
|
+
_this.requestPIP();
|
|
40
|
+
_this.emitUserAction(e, "change_pip", {
|
|
41
|
+
props: "pip",
|
|
42
|
+
from: false,
|
|
43
|
+
to: true
|
|
44
|
+
});
|
|
45
|
+
_this.setAttr("data-state", "pip");
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
return _this;
|
|
49
|
+
}
|
|
50
|
+
_createClass(PIP2, [{
|
|
51
|
+
key: "beforeCreate",
|
|
52
|
+
value: function beforeCreate(args) {
|
|
53
|
+
if (typeof args.player.config.pip === "boolean") {
|
|
54
|
+
args.config.showIcon = args.player.config.pip;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
key: "afterCreate",
|
|
59
|
+
value: function afterCreate() {
|
|
60
|
+
var _this2 = this;
|
|
61
|
+
if (!this.isPIPAvailable()) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
_get(_getPrototypeOf(PIP2.prototype), "afterCreate", this).call(this);
|
|
65
|
+
this.pMode = PresentationMode.INLINE;
|
|
66
|
+
this.initPipEvents();
|
|
67
|
+
if (this.config.showIcon) {
|
|
68
|
+
this.initIcons();
|
|
69
|
+
}
|
|
70
|
+
this.once(COMPLETE, function() {
|
|
71
|
+
if (_this2.config.showIcon) {
|
|
72
|
+
util.removeClass(_this2.find(".xgplayer-icon"), "xg-icon-disable");
|
|
73
|
+
_this2.bind("click", _this2.switchPIP);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
key: "registerIcons",
|
|
79
|
+
value: function registerIcons() {
|
|
80
|
+
return {
|
|
81
|
+
pipIcon: {
|
|
82
|
+
icon: PipIcon,
|
|
83
|
+
class: "xg-get-pip"
|
|
84
|
+
},
|
|
85
|
+
pipIconExit: {
|
|
86
|
+
icon: PipIconExit,
|
|
87
|
+
class: "xg-exit-pip"
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
key: "initIcons",
|
|
93
|
+
value: function initIcons() {
|
|
94
|
+
var icons = this.icons;
|
|
95
|
+
this.appendChild(".xgplayer-icon", icons.pipIcon);
|
|
96
|
+
this.appendChild(".xgplayer-icon", icons.pipIconExit);
|
|
97
|
+
}
|
|
98
|
+
}, {
|
|
99
|
+
key: "initPipEvents",
|
|
100
|
+
value: function initPipEvents() {
|
|
101
|
+
var _this3 = this;
|
|
102
|
+
var player = this.player;
|
|
103
|
+
this.leavePIPCallback = function() {
|
|
104
|
+
var paused = player.paused;
|
|
105
|
+
util.setTimeout(_this3, function() {
|
|
106
|
+
!paused && player.mediaPlay();
|
|
107
|
+
}, 0);
|
|
108
|
+
!paused && player.mediaPlay();
|
|
109
|
+
_this3.setAttr("data-state", "normal");
|
|
110
|
+
player.emit(PIP_CHANGE, false);
|
|
111
|
+
};
|
|
112
|
+
this.enterPIPCallback = function(e) {
|
|
113
|
+
player.emit(PIP_CHANGE, true);
|
|
114
|
+
_this3.pipWindow = e.pictureInPictureWindow;
|
|
115
|
+
_this3.setAttr("data-state", "pip");
|
|
116
|
+
};
|
|
117
|
+
this.onWebkitpresentationmodechanged = function(e) {
|
|
118
|
+
var mode = player.media.webkitPresentationMode;
|
|
119
|
+
if (_this3.pMode === PresentationMode.FULLSCREEN && mode !== PresentationMode.FULLSCREEN) {
|
|
120
|
+
player.onFullscreenChange(null, false);
|
|
121
|
+
}
|
|
122
|
+
_this3.pMode = mode;
|
|
123
|
+
if (mode === PresentationMode.PIP) {
|
|
124
|
+
_this3.enterPIPCallback(e);
|
|
125
|
+
} else if (mode === PresentationMode.INLINE) {
|
|
126
|
+
_this3.leavePIPCallback(e);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
if (player.media) {
|
|
130
|
+
player.media.addEventListener("enterpictureinpicture", this.enterPIPCallback);
|
|
131
|
+
player.media.addEventListener("leavepictureinpicture", this.leavePIPCallback);
|
|
132
|
+
PIP2.checkWebkitSetPresentationMode(player.media) && player.media.addEventListener("webkitpresentationmodechanged", this.onWebkitpresentationmodechanged);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
key: "requestPIP",
|
|
137
|
+
value: function requestPIP() {
|
|
138
|
+
var player = this.player, playerConfig = this.playerConfig;
|
|
139
|
+
if (!this.isPIPAvailable() || this.isPip) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
var poster = playerConfig.poster;
|
|
144
|
+
if (poster) {
|
|
145
|
+
player.media.poster = util.typeOf(poster) === "String" ? poster : poster.poster;
|
|
146
|
+
}
|
|
147
|
+
PIP2.checkWebkitSetPresentationMode(player.media) ? player.media.webkitSetPresentationMode("picture-in-picture") : player.media.requestPictureInPicture();
|
|
148
|
+
return true;
|
|
149
|
+
} catch (reason) {
|
|
150
|
+
console.error("requestPiP", reason);
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}, {
|
|
155
|
+
key: "exitPIP",
|
|
156
|
+
value: function exitPIP() {
|
|
157
|
+
var player = this.player;
|
|
158
|
+
try {
|
|
159
|
+
if (this.isPIPAvailable() && this.isPip) {
|
|
160
|
+
PIP2.checkWebkitSetPresentationMode(player.media) ? player.media.webkitSetPresentationMode("inline") : document.exitPictureInPicture();
|
|
161
|
+
}
|
|
162
|
+
return true;
|
|
163
|
+
} catch (reason) {
|
|
164
|
+
console.error("exitPIP", reason);
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}, {
|
|
169
|
+
key: "isPip",
|
|
170
|
+
get: function get() {
|
|
171
|
+
var player = this.player;
|
|
172
|
+
return document.pictureInPictureElement && document.pictureInPictureElement === player.media || player.media.webkitPresentationMode === PresentationMode.PIP;
|
|
173
|
+
}
|
|
174
|
+
}, {
|
|
175
|
+
key: "isPIPAvailable",
|
|
176
|
+
value: function isPIPAvailable() {
|
|
177
|
+
var video = this.player.media;
|
|
178
|
+
var _isEnabled = util.typeOf(document.pictureInPictureEnabled) === "Boolean" ? document.pictureInPictureEnabled : true;
|
|
179
|
+
return _isEnabled && (util.typeOf(video.disablePictureInPicture) === "Boolean" && !video.disablePictureInPicture || video.webkitSupportsPresentationMode && util.typeOf(video.webkitSetPresentationMode) === "Function");
|
|
180
|
+
}
|
|
181
|
+
}, {
|
|
182
|
+
key: "destroy",
|
|
183
|
+
value: function destroy() {
|
|
184
|
+
_get(_getPrototypeOf(PIP2.prototype), "destroy", this).call(this);
|
|
185
|
+
var player = this.player;
|
|
186
|
+
player.media.removeEventListener("enterpictureinpicture", this.enterPIPCallback);
|
|
187
|
+
player.media.removeEventListener("leavepictureinpicture", this.leavePIPCallback);
|
|
188
|
+
PIP2.checkWebkitSetPresentationMode(player.media) && player.media.removeEventListener("webkitpresentationmodechanged", this.onWebkitpresentationmodechanged);
|
|
189
|
+
this.exitPIP();
|
|
190
|
+
this.unbind("click", this.btnClick);
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
key: "render",
|
|
194
|
+
value: function render() {
|
|
195
|
+
if (!this.config.showIcon || !this.isPIPAvailable()) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
return '<xg-icon class="xgplayer-pip">\n <div class="xgplayer-icon xg-icon-disable">\n </div>\n '.concat(xgIconTips(this, "PIP", this.playerConfig.isHideTips), "\n </xg-icon>");
|
|
199
|
+
}
|
|
200
|
+
}], [{
|
|
201
|
+
key: "pluginName",
|
|
202
|
+
get: function get() {
|
|
203
|
+
return "pip";
|
|
204
|
+
}
|
|
205
|
+
}, {
|
|
206
|
+
key: "defaultConfig",
|
|
207
|
+
get: function get() {
|
|
208
|
+
return {
|
|
209
|
+
position: POSITIONS.CONTROLS_RIGHT,
|
|
210
|
+
index: 6,
|
|
211
|
+
showIcon: false
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
}, {
|
|
215
|
+
key: "checkWebkitSetPresentationMode",
|
|
216
|
+
value: function checkWebkitSetPresentationMode(video) {
|
|
217
|
+
return typeof video.webkitSetPresentationMode === "function";
|
|
218
|
+
}
|
|
219
|
+
}]);
|
|
220
|
+
return PIP2;
|
|
221
|
+
}(Icon);
|
|
222
|
+
export { PIP as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.xgplayer .xgplayer-play .xg-icon-play {
|
|
2
|
+
display: none;
|
|
3
|
+
}
|
|
4
|
+
.xgplayer .xgplayer-play .xg-icon-pause {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
.xgplayer .xgplayer-play[data-state=pause] .xg-icon-play {
|
|
8
|
+
display: block;
|
|
9
|
+
}
|
|
10
|
+
.xgplayer .xgplayer-play[data-state=pause] .xg-icon-pause {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default Play;
|
|
2
|
+
declare class Play extends IconPlugin {
|
|
3
|
+
static get defaultConfig(): {
|
|
4
|
+
position: string;
|
|
5
|
+
index: number;
|
|
6
|
+
disable: boolean;
|
|
7
|
+
};
|
|
8
|
+
btnClick(e: any): boolean;
|
|
9
|
+
registerIcons(): {
|
|
10
|
+
play: {
|
|
11
|
+
icon: any;
|
|
12
|
+
class: string;
|
|
13
|
+
};
|
|
14
|
+
pause: {
|
|
15
|
+
icon: any;
|
|
16
|
+
class: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
initIcons(): void;
|
|
20
|
+
animate(paused: any): void;
|
|
21
|
+
render(): string;
|
|
22
|
+
}
|
|
23
|
+
import IconPlugin from "../common/iconPlugin";
|
|
@@ -0,0 +1,127 @@
|
|
|
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 { PAUSE, ERROR, EMPTIED, PLAY } 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 PlaySvg from "../assets/play.js";
|
|
9
|
+
import PauseSvg from "../assets/pause.js";
|
|
10
|
+
var Play = /* @__PURE__ */ function(_IconPlugin) {
|
|
11
|
+
_inherits(Play2, _IconPlugin);
|
|
12
|
+
var _super = _createSuper(Play2);
|
|
13
|
+
function Play2() {
|
|
14
|
+
_classCallCheck(this, Play2);
|
|
15
|
+
return _super.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
_createClass(Play2, [{
|
|
18
|
+
key: "afterCreate",
|
|
19
|
+
value: function afterCreate() {
|
|
20
|
+
var _this = this;
|
|
21
|
+
_get(_getPrototypeOf(Play2.prototype), "afterCreate", this).call(this);
|
|
22
|
+
var player = this.player, config = this.config;
|
|
23
|
+
if (config.disable) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
this.initIcons();
|
|
27
|
+
this.btnClick = this.btnClick.bind(this);
|
|
28
|
+
this.bind(["touchend", "click"], this.btnClick);
|
|
29
|
+
this.on([PAUSE, ERROR, EMPTIED], function() {
|
|
30
|
+
_this.animate(player.paused);
|
|
31
|
+
});
|
|
32
|
+
this.on(PLAY, function() {
|
|
33
|
+
_this.animate(player.paused);
|
|
34
|
+
});
|
|
35
|
+
this.animate(true);
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
key: "registerIcons",
|
|
39
|
+
value: function registerIcons() {
|
|
40
|
+
return {
|
|
41
|
+
play: {
|
|
42
|
+
icon: PlaySvg,
|
|
43
|
+
class: "xg-icon-play"
|
|
44
|
+
},
|
|
45
|
+
pause: {
|
|
46
|
+
icon: PauseSvg,
|
|
47
|
+
class: "xg-icon-pause"
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
key: "btnClick",
|
|
53
|
+
value: function btnClick(e) {
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
e.stopPropagation();
|
|
56
|
+
var player = this.player;
|
|
57
|
+
this.emitUserAction(e, "switch_play_pause", {
|
|
58
|
+
prop: "paused",
|
|
59
|
+
from: player.paused,
|
|
60
|
+
to: !player.paused
|
|
61
|
+
});
|
|
62
|
+
if (player.ended) {
|
|
63
|
+
player.replay();
|
|
64
|
+
} else if (player.paused) {
|
|
65
|
+
player.play();
|
|
66
|
+
this.animate(false);
|
|
67
|
+
} else {
|
|
68
|
+
player.pause();
|
|
69
|
+
this.animate(true);
|
|
70
|
+
}
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
key: "initIcons",
|
|
75
|
+
value: function initIcons() {
|
|
76
|
+
var icons = this.icons;
|
|
77
|
+
this.appendChild(".xgplayer-icon", icons.play);
|
|
78
|
+
this.appendChild(".xgplayer-icon", icons.pause);
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
81
|
+
key: "animate",
|
|
82
|
+
value: function animate(paused) {
|
|
83
|
+
if (!this.player) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
var i18nKeys = this.i18nKeys;
|
|
87
|
+
var tipDom = this.find(".xg-tips");
|
|
88
|
+
if (paused) {
|
|
89
|
+
this.setAttr("data-state", "pause");
|
|
90
|
+
tipDom && this.changeLangTextKey(tipDom, i18nKeys.PLAY_TIPS);
|
|
91
|
+
} else {
|
|
92
|
+
this.setAttr("data-state", "play");
|
|
93
|
+
tipDom && this.changeLangTextKey(tipDom, i18nKeys.PAUSE_TIPS);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}, {
|
|
97
|
+
key: "destroy",
|
|
98
|
+
value: function destroy() {
|
|
99
|
+
_get(_getPrototypeOf(Play2.prototype), "destroy", this).call(this);
|
|
100
|
+
this.unbind(["touchend", "click"], this.btnClick);
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
key: "render",
|
|
104
|
+
value: function render() {
|
|
105
|
+
if (this.config.disable) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
return '<xg-icon class="xgplayer-play">\n <div class="xgplayer-icon">\n </div>\n '.concat(xgIconTips(this, "PLAY_TIPS", this.playerConfig.isHideTips), "\n </xg-icon>");
|
|
109
|
+
}
|
|
110
|
+
}], [{
|
|
111
|
+
key: "pluginName",
|
|
112
|
+
get: function get() {
|
|
113
|
+
return "play";
|
|
114
|
+
}
|
|
115
|
+
}, {
|
|
116
|
+
key: "defaultConfig",
|
|
117
|
+
get: function get() {
|
|
118
|
+
return {
|
|
119
|
+
position: POSITIONS.CONTROLS_LEFT,
|
|
120
|
+
index: 0,
|
|
121
|
+
disable: false
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}]);
|
|
125
|
+
return Play2;
|
|
126
|
+
}(Icon);
|
|
127
|
+
export { Play as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.xgplayer .xgplayer-playnext {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: none;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
}
|
|
6
|
+
.xgplayer .xgplayer-playnext .xgplayer-tips .xgplayer-tip-playnext {
|
|
7
|
+
display: block;
|
|
8
|
+
}
|
|
9
|
+
.xgplayer .xgplayer-playnext:hover {
|
|
10
|
+
opacity: 0.85;
|
|
11
|
+
}
|
|
12
|
+
.xgplayer .xgplayer-playnext:hover .xgplayer-tips {
|
|
13
|
+
display: block;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.lang-is-en .xgplayer-playnext .xgplayer-tips {
|
|
17
|
+
margin-left: -25px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.lang-is-jp .xgplayer-playnext .xgplayer-tips {
|
|
21
|
+
margin-left: -38px;
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default class PlayNextIcon extends Plugin {
|
|
2
|
+
static get defaultConfig(): {
|
|
3
|
+
position: string;
|
|
4
|
+
index: number;
|
|
5
|
+
url: any;
|
|
6
|
+
urlList: any[];
|
|
7
|
+
};
|
|
8
|
+
constructor(options: any);
|
|
9
|
+
idx: number;
|
|
10
|
+
registerIcons(): {
|
|
11
|
+
playNext: any;
|
|
12
|
+
};
|
|
13
|
+
initEvents(): void;
|
|
14
|
+
nextHandler: any;
|
|
15
|
+
playNext: (e: any) => void;
|
|
16
|
+
changeSrc(url: any): void;
|
|
17
|
+
render(): string;
|
|
18
|
+
}
|
|
19
|
+
import Plugin from "../../plugin";
|
|
@@ -0,0 +1,104 @@
|
|
|
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 sniffer from "../../utils/sniffer.js";
|
|
4
|
+
import { PLAYNEXT } from "../../events.js";
|
|
5
|
+
import "../../utils/debug.js";
|
|
6
|
+
import Plugin, { POSITIONS } from "../../plugin/plugin.js";
|
|
7
|
+
import { xgIconTips } from "../common/iconTools.js";
|
|
8
|
+
import Next from "../assets/playNext.js";
|
|
9
|
+
var PlayNextIcon = /* @__PURE__ */ function(_Plugin) {
|
|
10
|
+
_inherits(PlayNextIcon2, _Plugin);
|
|
11
|
+
var _super = _createSuper(PlayNextIcon2);
|
|
12
|
+
function PlayNextIcon2(options) {
|
|
13
|
+
var _this;
|
|
14
|
+
_classCallCheck(this, PlayNextIcon2);
|
|
15
|
+
_this = _super.call(this, options);
|
|
16
|
+
_defineProperty(_assertThisInitialized(_this), "playNext", function(e) {
|
|
17
|
+
var _assertThisInitialize = _assertThisInitialized(_this), player = _assertThisInitialize.player;
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
e.stopPropagation();
|
|
20
|
+
if (_this.idx + 1 < _this.config.urlList.length) {
|
|
21
|
+
_this.idx++;
|
|
22
|
+
_this.nextHandler(_this.config.urlList[_this.idx], _this.idx);
|
|
23
|
+
player.emit(PLAYNEXT, _this.idx + 1);
|
|
24
|
+
} else {
|
|
25
|
+
_this.nextHandler();
|
|
26
|
+
player.emit(PLAYNEXT);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
_this.idx = -1;
|
|
30
|
+
return _this;
|
|
31
|
+
}
|
|
32
|
+
_createClass(PlayNextIcon2, [{
|
|
33
|
+
key: "afterCreate",
|
|
34
|
+
value: function afterCreate() {
|
|
35
|
+
if (!this.config.urlList || this.config.urlList.length === 0) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.appendChild(".xgplayer-icon", this.icons.playNext);
|
|
39
|
+
this.initEvents();
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "registerIcons",
|
|
43
|
+
value: function registerIcons() {
|
|
44
|
+
return {
|
|
45
|
+
playNext: Next
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
key: "initEvents",
|
|
50
|
+
value: function initEvents() {
|
|
51
|
+
this.nextHandler = this.hook("nextClick", this.changeSrc);
|
|
52
|
+
var event = sniffer.device === "mobile" ? "touchend" : "click";
|
|
53
|
+
this.bind(event, this.playNext);
|
|
54
|
+
this.show();
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "changeSrc",
|
|
58
|
+
value: function changeSrc(url) {
|
|
59
|
+
var player = this.player;
|
|
60
|
+
if (!url) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
player.pause();
|
|
64
|
+
player.currentTime = 0;
|
|
65
|
+
if (player.switchURL) {
|
|
66
|
+
player.switchURL(url);
|
|
67
|
+
} else {
|
|
68
|
+
player.src = url;
|
|
69
|
+
}
|
|
70
|
+
player.config.url = url;
|
|
71
|
+
player.play();
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
key: "destroy",
|
|
75
|
+
value: function destroy() {
|
|
76
|
+
this.unbind(["touchend", "click"], this.playNext);
|
|
77
|
+
}
|
|
78
|
+
}, {
|
|
79
|
+
key: "render",
|
|
80
|
+
value: function render() {
|
|
81
|
+
if (!this.config.urlList || this.config.urlList.length === 0) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
return '\n <xg-icon class="xgplayer-playnext">\n <div class="xgplayer-icon">\n </div>\n '.concat(xgIconTips(this, "PLAYNEXT_TIPS", this.playerConfig.isHideTips), "\n </xg-icon>\n ");
|
|
85
|
+
}
|
|
86
|
+
}], [{
|
|
87
|
+
key: "pluginName",
|
|
88
|
+
get: function get() {
|
|
89
|
+
return "playNext";
|
|
90
|
+
}
|
|
91
|
+
}, {
|
|
92
|
+
key: "defaultConfig",
|
|
93
|
+
get: function get() {
|
|
94
|
+
return {
|
|
95
|
+
position: POSITIONS.CONTROLS_LEFT,
|
|
96
|
+
index: 1,
|
|
97
|
+
url: null,
|
|
98
|
+
urlList: []
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}]);
|
|
102
|
+
return PlayNextIcon2;
|
|
103
|
+
}(Plugin);
|
|
104
|
+
export { PlayNextIcon as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.xgplayer {
|
|
2
|
+
.xgplayer-playnext {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: none;
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
// .xgplayer-icon {
|
|
7
|
+
// width: 24px;
|
|
8
|
+
// }
|
|
9
|
+
.xgplayer-tips {
|
|
10
|
+
.xgplayer-tip-playnext {
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
&:hover {
|
|
15
|
+
opacity: 0.85;
|
|
16
|
+
.xgplayer-tips {
|
|
17
|
+
display: block;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
.lang-is-en {
|
|
23
|
+
.xgplayer-playnext {
|
|
24
|
+
.xgplayer-tips {
|
|
25
|
+
margin-left: -25px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
.lang-is-jp {
|
|
30
|
+
.xgplayer-playnext {
|
|
31
|
+
.xgplayer-tips {
|
|
32
|
+
margin-left: -38px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {{
|
|
3
|
+
* position?: string,
|
|
4
|
+
* index?: number,
|
|
5
|
+
* list?: Array<number | { [propName: string]: any }>,
|
|
6
|
+
* className?: string,
|
|
7
|
+
* hidePortrait?: boolean,
|
|
8
|
+
* [propName: string]: any
|
|
9
|
+
* }} IPlaybackRateConfig
|
|
10
|
+
*/
|
|
11
|
+
export default class PlaybackRate extends OptionsIcon {
|
|
12
|
+
/**
|
|
13
|
+
* @type IPlaybackRateConfig
|
|
14
|
+
*/
|
|
15
|
+
static get defaultConfig(): IPlaybackRateConfig;
|
|
16
|
+
curRate: number;
|
|
17
|
+
beforeCreate(args: any): void;
|
|
18
|
+
onItemClick(e: any, data: any, ...args: any[]): boolean;
|
|
19
|
+
renderItemList(): void;
|
|
20
|
+
}
|
|
21
|
+
export type IPlaybackRateConfig = {
|
|
22
|
+
[propName: string]: any;
|
|
23
|
+
position?: string;
|
|
24
|
+
index?: number;
|
|
25
|
+
list?: (number | {
|
|
26
|
+
[propName: string]: any;
|
|
27
|
+
})[];
|
|
28
|
+
className?: string;
|
|
29
|
+
hidePortrait?: boolean;
|
|
30
|
+
};
|
|
31
|
+
import OptionsIcon from "../common/optionsIcon";
|