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
package/es/player.d.ts
ADDED
|
@@ -0,0 +1,825 @@
|
|
|
1
|
+
export type IPlayerOptions = import('./defaultConfig').IPlayerOptions;
|
|
2
|
+
export type IDefinition = import('./defaultConfig').IDefinition;
|
|
3
|
+
export type IUrl = import('./defaultConfig').IUrl;
|
|
4
|
+
declare class Player extends MediaProxy {
|
|
5
|
+
/**
|
|
6
|
+
* @type {number}
|
|
7
|
+
* @description set debugger level
|
|
8
|
+
* 1 - only print error logs
|
|
9
|
+
* 2 - print warn logs and error logs
|
|
10
|
+
* 3 - print all debug logs and error stack logs
|
|
11
|
+
*/
|
|
12
|
+
static set debugger(arg: number);
|
|
13
|
+
static get debugger(): number;
|
|
14
|
+
/**
|
|
15
|
+
* 获取当前处理激活态的实例id
|
|
16
|
+
* @returns { number | string | null }
|
|
17
|
+
*/
|
|
18
|
+
static getCurrentUserActivePlayerId(): number | string | null;
|
|
19
|
+
/**
|
|
20
|
+
* 设置实例的用户行为激活状态
|
|
21
|
+
* @param { number | string } playerId
|
|
22
|
+
* @param { boolean } isActive
|
|
23
|
+
*/
|
|
24
|
+
static setCurrentUserActive(playerId: number | string, isActive: boolean): void;
|
|
25
|
+
/**
|
|
26
|
+
* 当前浏览器是否支持hevc编码
|
|
27
|
+
* @returns {boolean}
|
|
28
|
+
*/
|
|
29
|
+
static isHevcSupported(): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* 检测编码参数是否被当前浏览器支持
|
|
32
|
+
* @doc https://developer.mozilla.org/en-US/docs/Web/API/MediaCapabilities/decodingInfo
|
|
33
|
+
* @param {MediaDecodingConfiguration} info
|
|
34
|
+
* @returns {MediaCapabilitiesDecodingInfo}
|
|
35
|
+
*/
|
|
36
|
+
static probeConfigSupported(info: MediaDecodingConfiguration): MediaCapabilitiesDecodingInfo;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated
|
|
39
|
+
* 插件全部迁移完成再做删除
|
|
40
|
+
*/
|
|
41
|
+
static install(name: any, descriptor: any): void;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated
|
|
44
|
+
* 插件全部迁移完成再做删除
|
|
45
|
+
*/
|
|
46
|
+
static use(name: any, descriptor: any): void;
|
|
47
|
+
static defaultPreset: any;
|
|
48
|
+
/**
|
|
49
|
+
* @description 自定义media构造函数
|
|
50
|
+
*/
|
|
51
|
+
static XgVideoProxy: any;
|
|
52
|
+
/**
|
|
53
|
+
* @param { IPlayerOptions } options
|
|
54
|
+
*/
|
|
55
|
+
constructor(options: IPlayerOptions);
|
|
56
|
+
/**
|
|
57
|
+
* @type { IPlayerOptions }
|
|
58
|
+
* @description 当前播放器的配置信息
|
|
59
|
+
*/
|
|
60
|
+
config: IPlayerOptions;
|
|
61
|
+
/**
|
|
62
|
+
* @type { string }
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
private _pluginInfoId;
|
|
66
|
+
userTimer: any;
|
|
67
|
+
/**
|
|
68
|
+
* @private
|
|
69
|
+
*/
|
|
70
|
+
private waitTimer;
|
|
71
|
+
/**
|
|
72
|
+
* @private
|
|
73
|
+
*/
|
|
74
|
+
private _state;
|
|
75
|
+
/**
|
|
76
|
+
* @public
|
|
77
|
+
* @readonly
|
|
78
|
+
* @type { boolean }
|
|
79
|
+
*/
|
|
80
|
+
public readonly isError: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Whether the player is in the seeking state
|
|
83
|
+
* @type { boolean }
|
|
84
|
+
* @readonly
|
|
85
|
+
*/
|
|
86
|
+
readonly isSeeking: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* @type { boolean }
|
|
89
|
+
* @readonly
|
|
90
|
+
*/
|
|
91
|
+
readonly isCanplay: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* @private
|
|
94
|
+
* @readonly
|
|
95
|
+
*/
|
|
96
|
+
private readonly _useAutoplay;
|
|
97
|
+
/**
|
|
98
|
+
* @type { number }
|
|
99
|
+
*/
|
|
100
|
+
rotateDeg: number;
|
|
101
|
+
/**
|
|
102
|
+
* Whether the player is focus
|
|
103
|
+
* @type { boolean }
|
|
104
|
+
* @readonly
|
|
105
|
+
*/
|
|
106
|
+
readonly isActive: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Whether player is currently in fullscreen
|
|
109
|
+
* @type { boolean }
|
|
110
|
+
* @readonly
|
|
111
|
+
*/
|
|
112
|
+
readonly fullscreen: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* @type { boolean }
|
|
115
|
+
* @readonly
|
|
116
|
+
*/
|
|
117
|
+
readonly cssfullscreen: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* @type { boolean }
|
|
120
|
+
* @readonly
|
|
121
|
+
*/
|
|
122
|
+
readonly isRotateFullscreen: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* fullscreenElement
|
|
125
|
+
* @type { HTMLElement | null }
|
|
126
|
+
* @readonly
|
|
127
|
+
*/
|
|
128
|
+
readonly _fullscreenEl: HTMLElement | null;
|
|
129
|
+
timeSegments: any[];
|
|
130
|
+
/**
|
|
131
|
+
* cssfullscreen target Element
|
|
132
|
+
* @type { HTMLElement | null }
|
|
133
|
+
* @readonly
|
|
134
|
+
*/
|
|
135
|
+
readonly _cssfullscreenEl: HTMLElement | null;
|
|
136
|
+
/**
|
|
137
|
+
* @type { IDefinition | null }
|
|
138
|
+
* @readonly
|
|
139
|
+
*/
|
|
140
|
+
readonly curDefinition: IDefinition | null;
|
|
141
|
+
/**
|
|
142
|
+
* @private
|
|
143
|
+
* @type { string }
|
|
144
|
+
*/
|
|
145
|
+
private _orgCss;
|
|
146
|
+
/**
|
|
147
|
+
* @readonly
|
|
148
|
+
* @type { number }
|
|
149
|
+
*/
|
|
150
|
+
readonly _fullScreenOffset: number;
|
|
151
|
+
/**
|
|
152
|
+
* @private
|
|
153
|
+
* @type { number }
|
|
154
|
+
*/
|
|
155
|
+
private _videoHeight;
|
|
156
|
+
/**
|
|
157
|
+
* @private
|
|
158
|
+
* @type { number }
|
|
159
|
+
*/
|
|
160
|
+
private _videoWidth;
|
|
161
|
+
videoPos: {
|
|
162
|
+
pi: number;
|
|
163
|
+
scale: number;
|
|
164
|
+
rotate: number;
|
|
165
|
+
x: number;
|
|
166
|
+
y: number;
|
|
167
|
+
h: number;
|
|
168
|
+
w: number;
|
|
169
|
+
vy: number;
|
|
170
|
+
vx: number;
|
|
171
|
+
};
|
|
172
|
+
sizeInfo: {
|
|
173
|
+
width: number;
|
|
174
|
+
height: number;
|
|
175
|
+
left: number;
|
|
176
|
+
top: number;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* @private
|
|
180
|
+
* @type { { t: number, acc:number, acc: number, loopAcc: number, [propName: string]: any;} }
|
|
181
|
+
*/
|
|
182
|
+
private _accPlayed;
|
|
183
|
+
/**
|
|
184
|
+
* @description 播放器时长、播放时间偏移信息
|
|
185
|
+
*/
|
|
186
|
+
_offsetInfo: {
|
|
187
|
+
currentTime: number;
|
|
188
|
+
duration: number;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* @type { null | HTMLElement }
|
|
192
|
+
* @readonly
|
|
193
|
+
* @description 控制栏和video不同布局的时候内部容器
|
|
194
|
+
*/
|
|
195
|
+
readonly innerContainer: null | HTMLElement;
|
|
196
|
+
/**
|
|
197
|
+
* @type { null | Object }
|
|
198
|
+
* @readonly
|
|
199
|
+
* @description 控制栏插件
|
|
200
|
+
*/
|
|
201
|
+
readonly controls: null | any;
|
|
202
|
+
/**
|
|
203
|
+
* @type { null | HTMLElement }
|
|
204
|
+
* @readonly
|
|
205
|
+
*/
|
|
206
|
+
readonly topBar: null | HTMLElement;
|
|
207
|
+
/**
|
|
208
|
+
* @type { null | HTMLElement }
|
|
209
|
+
* @readonly
|
|
210
|
+
* @description 当前播放器根节点
|
|
211
|
+
*/
|
|
212
|
+
readonly root: null | HTMLElement;
|
|
213
|
+
__i18n: import("./lang/i18n").IXGI18n;
|
|
214
|
+
/**
|
|
215
|
+
* @readonly
|
|
216
|
+
* @type {any}
|
|
217
|
+
*/
|
|
218
|
+
readonly database: any;
|
|
219
|
+
/**
|
|
220
|
+
* @readonly
|
|
221
|
+
* @type { boolean }
|
|
222
|
+
*/
|
|
223
|
+
readonly isUserActive: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* @private
|
|
226
|
+
* @description seek之后canplay回调函数定义
|
|
227
|
+
* @type { Function | null }
|
|
228
|
+
*/
|
|
229
|
+
private _onceSeekCanplay;
|
|
230
|
+
/**
|
|
231
|
+
* @description 记录seek之前是否处于暂停状态
|
|
232
|
+
* @type { number }
|
|
233
|
+
* @private
|
|
234
|
+
*/
|
|
235
|
+
private _isPauseBeforeSeek;
|
|
236
|
+
/**
|
|
237
|
+
* @description 内部状态记录
|
|
238
|
+
* @type { {
|
|
239
|
+
* isActiveLocked: boolean;
|
|
240
|
+
* } }
|
|
241
|
+
* @readonly
|
|
242
|
+
*/
|
|
243
|
+
readonly innerStates: {
|
|
244
|
+
isActiveLocked: boolean;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* init control domElement
|
|
248
|
+
* @private
|
|
249
|
+
*/
|
|
250
|
+
private _initDOM;
|
|
251
|
+
/**
|
|
252
|
+
* @private
|
|
253
|
+
*/
|
|
254
|
+
private _initBaseDoms;
|
|
255
|
+
/**
|
|
256
|
+
* @readonly
|
|
257
|
+
* @type { HTMLElement |null }
|
|
258
|
+
*/
|
|
259
|
+
readonly leftBar: HTMLElement | null;
|
|
260
|
+
/**
|
|
261
|
+
* @readonly
|
|
262
|
+
* @type { HTMLElement | null }
|
|
263
|
+
*/
|
|
264
|
+
readonly rightBar: HTMLElement | null;
|
|
265
|
+
/**
|
|
266
|
+
* @private
|
|
267
|
+
*/
|
|
268
|
+
private _bindEvents;
|
|
269
|
+
playFunc: () => void;
|
|
270
|
+
/**
|
|
271
|
+
* @private
|
|
272
|
+
*/
|
|
273
|
+
private _unbindEvents;
|
|
274
|
+
/**
|
|
275
|
+
*
|
|
276
|
+
* @param { any } url
|
|
277
|
+
* @returns
|
|
278
|
+
*/
|
|
279
|
+
_startInit(url: any): void;
|
|
280
|
+
set hasStart(arg: boolean);
|
|
281
|
+
/**
|
|
282
|
+
* @type { boolean }
|
|
283
|
+
* @description 是否开始播放
|
|
284
|
+
*/
|
|
285
|
+
get hasStart(): boolean;
|
|
286
|
+
/**
|
|
287
|
+
* @description 注册组件 组件列表config.plugins
|
|
288
|
+
* @param { {boolean} } [isInit] 是否是首次初始化
|
|
289
|
+
* @private
|
|
290
|
+
*/
|
|
291
|
+
private _registerPlugins;
|
|
292
|
+
/**
|
|
293
|
+
* @private
|
|
294
|
+
*/
|
|
295
|
+
private _loadingPlugins;
|
|
296
|
+
/**
|
|
297
|
+
* @private
|
|
298
|
+
*/
|
|
299
|
+
private _registerPresets;
|
|
300
|
+
/**
|
|
301
|
+
* @private
|
|
302
|
+
* @param { string } position ]
|
|
303
|
+
*/
|
|
304
|
+
private _getRootByPosition;
|
|
305
|
+
/**
|
|
306
|
+
*
|
|
307
|
+
* @param { {plugin: function, options:object} | function } plugin
|
|
308
|
+
* @param { {[propName: string]: any;} } [config]
|
|
309
|
+
* @returns { any } plugin
|
|
310
|
+
*/
|
|
311
|
+
registerPlugin(plugin: Function | {
|
|
312
|
+
plugin: Function;
|
|
313
|
+
options: object;
|
|
314
|
+
}, config?: {
|
|
315
|
+
[propName: string]: any;
|
|
316
|
+
}): any;
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
* @param { any } plugin
|
|
320
|
+
*/
|
|
321
|
+
deregister(plugin: any): void;
|
|
322
|
+
/**
|
|
323
|
+
*
|
|
324
|
+
* @param { any } plugin
|
|
325
|
+
* @param { boolean } removedFromConfig
|
|
326
|
+
*/
|
|
327
|
+
unRegisterPlugin(plugin: any, removedFromConfig?: boolean): void;
|
|
328
|
+
removePluginFromConfig(plugin: any): void;
|
|
329
|
+
/**
|
|
330
|
+
* 当前播放器挂载的插件实例列表
|
|
331
|
+
* @type { {[propName: string]: any | null } }
|
|
332
|
+
*/
|
|
333
|
+
get plugins(): {
|
|
334
|
+
[propName: string]: any;
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* get a plugin instance
|
|
338
|
+
* @param { string } pluginName
|
|
339
|
+
* @return { null | any } plugin
|
|
340
|
+
*/
|
|
341
|
+
getPlugin(pluginName: string): null | any;
|
|
342
|
+
/**
|
|
343
|
+
*
|
|
344
|
+
* @param { string } className
|
|
345
|
+
*/
|
|
346
|
+
addClass(className: string): void;
|
|
347
|
+
/**
|
|
348
|
+
*
|
|
349
|
+
* @param { string } className
|
|
350
|
+
* @returns
|
|
351
|
+
*/
|
|
352
|
+
removeClass(className: string): void;
|
|
353
|
+
/**
|
|
354
|
+
*
|
|
355
|
+
* @param { string } className
|
|
356
|
+
* @returns { boolean } has
|
|
357
|
+
*/
|
|
358
|
+
hasClass(className: string): boolean;
|
|
359
|
+
/**
|
|
360
|
+
*
|
|
361
|
+
* @param { string } key
|
|
362
|
+
* @param { any } value
|
|
363
|
+
* @returns void
|
|
364
|
+
*/
|
|
365
|
+
setAttribute(key: string, value: any): void;
|
|
366
|
+
/**
|
|
367
|
+
*
|
|
368
|
+
* @param { string } key
|
|
369
|
+
* @param { any } value
|
|
370
|
+
* @returns void
|
|
371
|
+
*/
|
|
372
|
+
removeAttribute(key: string, value: any): void;
|
|
373
|
+
/**
|
|
374
|
+
*
|
|
375
|
+
* @param { any } url
|
|
376
|
+
* @returns { Promise<void> | void }
|
|
377
|
+
* @description 启动播放器,start一般都是播放器内部隐式调用,主要功能是将video添加到DOM
|
|
378
|
+
*/
|
|
379
|
+
start(url: any): Promise<void> | void;
|
|
380
|
+
/**
|
|
381
|
+
* @param { string | object } url
|
|
382
|
+
* @param { boolean | {
|
|
383
|
+
* seamless?: boolean,
|
|
384
|
+
* currentTime?: number,
|
|
385
|
+
* bitrate?: number
|
|
386
|
+
* } } [options]
|
|
387
|
+
* @returns { Promise | null } 执行结果
|
|
388
|
+
*/
|
|
389
|
+
switchURL(url: string | object, options?: boolean | {
|
|
390
|
+
seamless?: boolean;
|
|
391
|
+
currentTime?: number;
|
|
392
|
+
bitrate?: number;
|
|
393
|
+
}): Promise<any> | null;
|
|
394
|
+
currentTime: any;
|
|
395
|
+
/**
|
|
396
|
+
* @description call play without play hook
|
|
397
|
+
* @deprecated this api renamed to mediaPlay, you can call it as player.mediaPlay()
|
|
398
|
+
*/
|
|
399
|
+
videoPlay(): void;
|
|
400
|
+
/**
|
|
401
|
+
* @description call play without play hook
|
|
402
|
+
*/
|
|
403
|
+
mediaPlay(): Promise<void>;
|
|
404
|
+
/**
|
|
405
|
+
* @private
|
|
406
|
+
*/
|
|
407
|
+
private _errorTimer;
|
|
408
|
+
/**
|
|
409
|
+
* @description call play without pause hook
|
|
410
|
+
*/
|
|
411
|
+
mediaPause(): void;
|
|
412
|
+
/**
|
|
413
|
+
* @description call play without pause hook
|
|
414
|
+
* @deprecated this api renamed to mediaPause, you can call it as player.mediaPause()
|
|
415
|
+
*/
|
|
416
|
+
videoPause(): void;
|
|
417
|
+
play(): any;
|
|
418
|
+
/**
|
|
419
|
+
*
|
|
420
|
+
* @param { number } time
|
|
421
|
+
* @param { 'play' | 'pause' | 'auto' } [status]
|
|
422
|
+
* @returns
|
|
423
|
+
*/
|
|
424
|
+
seek(time: number, status?: 'play' | 'pause' | 'auto'): void;
|
|
425
|
+
getInitDefinition(): void;
|
|
426
|
+
/**
|
|
427
|
+
* @typedef { import('./defaultConfig').IDefinition } definition
|
|
428
|
+
*/
|
|
429
|
+
/**
|
|
430
|
+
* @description change the definition of the current playback
|
|
431
|
+
* @param { definition } to
|
|
432
|
+
* @param { definition } [from]
|
|
433
|
+
*/
|
|
434
|
+
changeDefinition(to: import("./defaultConfig").IDefinition, from?: import("./defaultConfig").IDefinition): void;
|
|
435
|
+
reload(): void;
|
|
436
|
+
/**
|
|
437
|
+
* @private
|
|
438
|
+
*/
|
|
439
|
+
private reloadFunc;
|
|
440
|
+
resetState(): void;
|
|
441
|
+
/**
|
|
442
|
+
* 重置播放实例
|
|
443
|
+
* @param { Array<string> } unregisterPlugins 重置的时候需要卸载重新初始化的插件列表
|
|
444
|
+
* @param { boolean } [isResetConfig] 是否需要重置配置列表
|
|
445
|
+
* @returns
|
|
446
|
+
*/
|
|
447
|
+
reset(unregisterPlugins?: Array<string>, isResetConfig?: boolean): void;
|
|
448
|
+
replay(): void;
|
|
449
|
+
retry(): void;
|
|
450
|
+
/**
|
|
451
|
+
*
|
|
452
|
+
* @param { HTMLElement } root
|
|
453
|
+
* @param { HTMLElement } [el]
|
|
454
|
+
* @param { string } [rootClass]
|
|
455
|
+
* @param { string } [pClassName]
|
|
456
|
+
*/
|
|
457
|
+
changeFullStyle(root: HTMLElement, el?: HTMLElement, rootClass?: string, pClassName?: string): void;
|
|
458
|
+
/**
|
|
459
|
+
* @private
|
|
460
|
+
*/
|
|
461
|
+
private _orgPCss;
|
|
462
|
+
/**
|
|
463
|
+
*
|
|
464
|
+
* @param { HTMLElement } root
|
|
465
|
+
* @param { HTMLElement } [el]
|
|
466
|
+
* @param { string } [rootClass]
|
|
467
|
+
* @param { string } [pClassName]
|
|
468
|
+
*/
|
|
469
|
+
recoverFullStyle(root: HTMLElement, el?: HTMLElement, rootClass?: string, pClassName?: string): void;
|
|
470
|
+
/**
|
|
471
|
+
* @param { HTMLElement } [el]
|
|
472
|
+
* @returns { Promise<void> }
|
|
473
|
+
*/
|
|
474
|
+
getFullscreen(el?: HTMLElement): Promise<void>;
|
|
475
|
+
/**
|
|
476
|
+
* @private
|
|
477
|
+
*/
|
|
478
|
+
private _fullActionFrom;
|
|
479
|
+
/**
|
|
480
|
+
* @param { HTMLElement } [el]
|
|
481
|
+
* @returns { Promise<void> }
|
|
482
|
+
*/
|
|
483
|
+
exitFullscreen(el?: HTMLElement): Promise<void>;
|
|
484
|
+
/**
|
|
485
|
+
* @param { HTMLElement } [el]
|
|
486
|
+
* @returns
|
|
487
|
+
*/
|
|
488
|
+
getCssFullscreen(el?: HTMLElement): void;
|
|
489
|
+
/**
|
|
490
|
+
* @param { HTMLElement } [el]
|
|
491
|
+
* @returns
|
|
492
|
+
*/
|
|
493
|
+
exitCssFullscreen(): void;
|
|
494
|
+
/**
|
|
495
|
+
* 进入旋转全屏
|
|
496
|
+
* @param { HTMLElement } [el]
|
|
497
|
+
*/
|
|
498
|
+
getRotateFullscreen(el?: HTMLElement): void;
|
|
499
|
+
_rootStyle: string | boolean;
|
|
500
|
+
/**
|
|
501
|
+
* 退出旋转全屏
|
|
502
|
+
* @param { HTMLElement } [el]
|
|
503
|
+
*/
|
|
504
|
+
exitRotateFullscreen(el?: HTMLElement): void;
|
|
505
|
+
setRotateDeg(deg: any): void;
|
|
506
|
+
/**
|
|
507
|
+
* @description 播放器焦点状态,控制栏显示
|
|
508
|
+
* @param { {
|
|
509
|
+
* autoHide?: boolean, // 是否可以自动隐藏
|
|
510
|
+
* delay?: number // 自动隐藏的延迟时间, ms, 不传默认使用3000ms
|
|
511
|
+
* isLock?: boolean // 是否锁定, 锁定之后自动呼出和blur调用都不生效, 默认值false
|
|
512
|
+
* } } [data]
|
|
513
|
+
*/
|
|
514
|
+
focus(data?: {
|
|
515
|
+
autoHide?: boolean;
|
|
516
|
+
delay?: number;
|
|
517
|
+
isLock?: boolean;
|
|
518
|
+
}): void;
|
|
519
|
+
/**
|
|
520
|
+
* @description 取消播放器当前焦点状态
|
|
521
|
+
* @param { { ignorePaused?: boolean } } [data]
|
|
522
|
+
*/
|
|
523
|
+
blur(data?: {
|
|
524
|
+
ignorePaused?: boolean;
|
|
525
|
+
}): void;
|
|
526
|
+
/**
|
|
527
|
+
* @protected
|
|
528
|
+
* @param { { autoHide?: boolean, delay?: number, isLock?: boolean } } [data]
|
|
529
|
+
* @returns
|
|
530
|
+
*/
|
|
531
|
+
protected onFocus(data?: {
|
|
532
|
+
autoHide?: boolean;
|
|
533
|
+
delay?: number;
|
|
534
|
+
isLock?: boolean;
|
|
535
|
+
}): void;
|
|
536
|
+
/**
|
|
537
|
+
* @protected
|
|
538
|
+
* @param {{ ignorePaused?: boolean }} [data]
|
|
539
|
+
* @returns
|
|
540
|
+
*/
|
|
541
|
+
protected onBlur({ ignorePaused }?: {
|
|
542
|
+
ignorePaused?: boolean;
|
|
543
|
+
}): void;
|
|
544
|
+
canPlayFunc: () => void;
|
|
545
|
+
/**
|
|
546
|
+
*
|
|
547
|
+
*/
|
|
548
|
+
onFullscreenChange: (event: any, isFullScreen: any) => void;
|
|
549
|
+
_onWebkitbeginfullscreen: (e: any) => void;
|
|
550
|
+
_onWebkitendfullscreen: (e: any) => void;
|
|
551
|
+
onEmptied(): void;
|
|
552
|
+
/**
|
|
553
|
+
* @protected
|
|
554
|
+
*/
|
|
555
|
+
protected onCanplay(): void;
|
|
556
|
+
onLoadeddata(): void;
|
|
557
|
+
onLoadstart(): void;
|
|
558
|
+
/**
|
|
559
|
+
* @protected
|
|
560
|
+
*/
|
|
561
|
+
protected onPlay(): void;
|
|
562
|
+
/**
|
|
563
|
+
* @protected
|
|
564
|
+
*/
|
|
565
|
+
protected onPause(): void;
|
|
566
|
+
/**
|
|
567
|
+
* @protected
|
|
568
|
+
*/
|
|
569
|
+
protected onEnded(): void;
|
|
570
|
+
/**
|
|
571
|
+
* @protected
|
|
572
|
+
*/
|
|
573
|
+
protected onError(): void;
|
|
574
|
+
/**
|
|
575
|
+
* @protected
|
|
576
|
+
*/
|
|
577
|
+
protected onSeeking(): void;
|
|
578
|
+
/**
|
|
579
|
+
* @protected
|
|
580
|
+
*/
|
|
581
|
+
protected onSeeked(): void;
|
|
582
|
+
/**
|
|
583
|
+
* @protected
|
|
584
|
+
*/
|
|
585
|
+
protected onWaiting(): void;
|
|
586
|
+
/**
|
|
587
|
+
* @protected
|
|
588
|
+
*/
|
|
589
|
+
protected onPlaying(): void;
|
|
590
|
+
/**
|
|
591
|
+
* @protected
|
|
592
|
+
*/
|
|
593
|
+
protected onTimeupdate(): void;
|
|
594
|
+
onVolumechange(): void;
|
|
595
|
+
onRatechange(): void;
|
|
596
|
+
/**
|
|
597
|
+
* 触发用户行为事件,第一个参数是Dom事件
|
|
598
|
+
* @param { Event } event
|
|
599
|
+
* @param { string } action
|
|
600
|
+
* @param {[propName: string]: any; } [params]
|
|
601
|
+
* @returns
|
|
602
|
+
*/
|
|
603
|
+
emitUserAction(event: Event, action: string, params: any): void;
|
|
604
|
+
updateAcc(endType: any): void;
|
|
605
|
+
/**
|
|
606
|
+
*
|
|
607
|
+
* @param { number } time
|
|
608
|
+
* @returns { boolean }
|
|
609
|
+
*/
|
|
610
|
+
checkBuffer(time: number): boolean;
|
|
611
|
+
resizePosition(): void;
|
|
612
|
+
/**
|
|
613
|
+
* @description position video/audio according to height ratio and y coordinate
|
|
614
|
+
* @param { { h: number, y?: number, x?:number, w?:number} } pos
|
|
615
|
+
* @returns
|
|
616
|
+
*/
|
|
617
|
+
position(pos?: {
|
|
618
|
+
h: number;
|
|
619
|
+
y?: number;
|
|
620
|
+
x?: number;
|
|
621
|
+
w?: number;
|
|
622
|
+
}): void;
|
|
623
|
+
/**
|
|
624
|
+
* @description Update configuration parameters
|
|
625
|
+
* @param { IPlayerOptions } config
|
|
626
|
+
*/
|
|
627
|
+
setConfig(config: IPlayerOptions): void;
|
|
628
|
+
/**
|
|
629
|
+
* @description play another video resource
|
|
630
|
+
* @param { IPlayerOptions } config
|
|
631
|
+
*/
|
|
632
|
+
playNext(config: IPlayerOptions): void;
|
|
633
|
+
resize(): void;
|
|
634
|
+
/**
|
|
635
|
+
*
|
|
636
|
+
* @param { number } left
|
|
637
|
+
* @param { number } top
|
|
638
|
+
* @returns
|
|
639
|
+
*/
|
|
640
|
+
updateObjectPosition(left?: number, top?: number): void;
|
|
641
|
+
/**
|
|
642
|
+
* @protected
|
|
643
|
+
* @param { number } newState
|
|
644
|
+
*/
|
|
645
|
+
protected setState(newState: number): void;
|
|
646
|
+
/**
|
|
647
|
+
* @description url preprocessing
|
|
648
|
+
* @param { IUrl } url
|
|
649
|
+
* @param { {[propName: string]: any} } [ext]
|
|
650
|
+
* @returns { url: IUrl, [propName: string]: any }
|
|
651
|
+
*/
|
|
652
|
+
preProcessUrl(url: IUrl, ext?: {
|
|
653
|
+
[propName: string]: any;
|
|
654
|
+
}): import("./defaultConfig").IUrl;
|
|
655
|
+
/**
|
|
656
|
+
* @type { number }
|
|
657
|
+
*/
|
|
658
|
+
get state(): number;
|
|
659
|
+
/**
|
|
660
|
+
* @type { boolean }
|
|
661
|
+
*/
|
|
662
|
+
get isFullscreen(): boolean;
|
|
663
|
+
/**
|
|
664
|
+
* @type { boolean }
|
|
665
|
+
*/
|
|
666
|
+
get isCssfullScreen(): boolean;
|
|
667
|
+
set isPlaying(arg: boolean);
|
|
668
|
+
/**
|
|
669
|
+
* @type { boolean }
|
|
670
|
+
* @description 是否已经进入起播状态
|
|
671
|
+
*/
|
|
672
|
+
get isPlaying(): boolean;
|
|
673
|
+
/**
|
|
674
|
+
* @type { Array.<IDefinition> }
|
|
675
|
+
*/
|
|
676
|
+
set definitionList(arg: import("./defaultConfig").IDefinition[]);
|
|
677
|
+
get definitionList(): import("./defaultConfig").IDefinition[];
|
|
678
|
+
/**
|
|
679
|
+
* @description VideoFrames infos
|
|
680
|
+
* @type { {
|
|
681
|
+
* total: number,
|
|
682
|
+
* dropped: number,
|
|
683
|
+
* corrupted: number,
|
|
684
|
+
* droppedRate: number,
|
|
685
|
+
* droppedDuration: number
|
|
686
|
+
* } }
|
|
687
|
+
*/
|
|
688
|
+
get videoFrameInfo(): {
|
|
689
|
+
total: number;
|
|
690
|
+
dropped: number;
|
|
691
|
+
corrupted: number;
|
|
692
|
+
droppedRate: number;
|
|
693
|
+
droppedDuration: number;
|
|
694
|
+
};
|
|
695
|
+
/**
|
|
696
|
+
* @type { string }
|
|
697
|
+
*/
|
|
698
|
+
set lang(arg: string);
|
|
699
|
+
get lang(): string;
|
|
700
|
+
get i18n(): import("./lang/i18n").IXGI18nText;
|
|
701
|
+
get i18nKeys(): {
|
|
702
|
+
[propName: string]: string;
|
|
703
|
+
};
|
|
704
|
+
/**
|
|
705
|
+
* @type { string }
|
|
706
|
+
*/
|
|
707
|
+
get version(): string;
|
|
708
|
+
/**
|
|
709
|
+
* @type { number | string }
|
|
710
|
+
*/
|
|
711
|
+
get playerId(): string | number;
|
|
712
|
+
/**
|
|
713
|
+
* @type { any }
|
|
714
|
+
*/
|
|
715
|
+
set url(arg: any);
|
|
716
|
+
get url(): any;
|
|
717
|
+
/**
|
|
718
|
+
* @private
|
|
719
|
+
*/
|
|
720
|
+
private __url;
|
|
721
|
+
/**
|
|
722
|
+
* @type { string }
|
|
723
|
+
*/
|
|
724
|
+
set poster(arg: any);
|
|
725
|
+
get poster(): any;
|
|
726
|
+
get error(): any;
|
|
727
|
+
/**
|
|
728
|
+
* @type { boolean }
|
|
729
|
+
*/
|
|
730
|
+
get fullscreenChanging(): boolean;
|
|
731
|
+
/**
|
|
732
|
+
* 累计观看时长
|
|
733
|
+
* @type number
|
|
734
|
+
*/
|
|
735
|
+
get cumulateTime(): number;
|
|
736
|
+
/**
|
|
737
|
+
* @type { number }
|
|
738
|
+
*/
|
|
739
|
+
set zoom(arg: number);
|
|
740
|
+
/**
|
|
741
|
+
* @type { number }
|
|
742
|
+
*/
|
|
743
|
+
get zoom(): number;
|
|
744
|
+
/**
|
|
745
|
+
* @type {number}
|
|
746
|
+
* @description Media element rotation angle, Only multiples of 90 degrees are supported
|
|
747
|
+
*/
|
|
748
|
+
set videoRotateDeg(arg: number);
|
|
749
|
+
get videoRotateDeg(): number;
|
|
750
|
+
/**
|
|
751
|
+
* @description 均衡下载速度,单位kb/s, 根据10条最新下载速度计算出来的加权值,如果没有测速能力则默认是0
|
|
752
|
+
* @type { number }
|
|
753
|
+
*/
|
|
754
|
+
set avgSpeed(arg: number);
|
|
755
|
+
get avgSpeed(): number;
|
|
756
|
+
/**
|
|
757
|
+
* @type { number }
|
|
758
|
+
* 最新一次下载速度,单位kb/s, 如果没有测速能力则默认是0
|
|
759
|
+
*/
|
|
760
|
+
set realTimeSpeed(arg: number);
|
|
761
|
+
get realTimeSpeed(): number;
|
|
762
|
+
set offsetCurrentTime(arg: number);
|
|
763
|
+
get offsetCurrentTime(): number;
|
|
764
|
+
set offsetDuration(arg: number);
|
|
765
|
+
get offsetDuration(): number;
|
|
766
|
+
/**
|
|
767
|
+
* @param { string } hookName
|
|
768
|
+
* @param { Function } handler
|
|
769
|
+
* @param { {pre: Function| null , next: Function | null} } preset
|
|
770
|
+
* @returns
|
|
771
|
+
*/
|
|
772
|
+
hook(hookName: string, handler: Function, preset?: {
|
|
773
|
+
pre: Function | null;
|
|
774
|
+
next: Function | null;
|
|
775
|
+
}, ...args: any[]): any;
|
|
776
|
+
/**
|
|
777
|
+
* @param { string } hookName
|
|
778
|
+
* @param { (player: any, ...args) => boolean | Promise<any> } handler
|
|
779
|
+
* @param {...any} args
|
|
780
|
+
* @returns {boolean} isSuccess
|
|
781
|
+
*/
|
|
782
|
+
useHooks(hookName: string, handler: (player: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
|
|
783
|
+
/**
|
|
784
|
+
*
|
|
785
|
+
* @param { string } hookName
|
|
786
|
+
* @param { (player: any, ...args) => boolean | Promise<any> } handler
|
|
787
|
+
* @returns
|
|
788
|
+
*/
|
|
789
|
+
removeHooks(hookName: string, handler: (player: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): any;
|
|
790
|
+
/**
|
|
791
|
+
*
|
|
792
|
+
* @param { string } pluginName
|
|
793
|
+
* @param { string } hookName
|
|
794
|
+
* @param { (plugin: any, ...args) => boolean | Promise<any> } handler
|
|
795
|
+
* @param {...any} args
|
|
796
|
+
* @returns { boolean } isSuccess
|
|
797
|
+
*/
|
|
798
|
+
usePluginHooks(pluginName: string, hookName: string, handler: (plugin: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
|
|
799
|
+
/**
|
|
800
|
+
*
|
|
801
|
+
* @param { string } pluginName
|
|
802
|
+
* @param { string } hookName
|
|
803
|
+
* @param { (plugin: any, ...args) => boolean | Promise<any> } handler
|
|
804
|
+
* @param {...any} args
|
|
805
|
+
* @returns { boolean } isSuccess
|
|
806
|
+
*/
|
|
807
|
+
removePluginHooks(pluginName: string, hookName: string, handler: (plugin: any, ...args: any[]) => boolean | Promise<any>, ...args: any[]): boolean;
|
|
808
|
+
/**
|
|
809
|
+
* 设置当前实例的用户激活态
|
|
810
|
+
* @param { boolean } isActive
|
|
811
|
+
* @param { boolean } [isMuted]
|
|
812
|
+
*/
|
|
813
|
+
setUserActive(isActive: boolean, isMuted?: boolean): void;
|
|
814
|
+
muted: any;
|
|
815
|
+
}
|
|
816
|
+
import Plugin from "./plugin/plugin";
|
|
817
|
+
import BasePlugin from "./plugin/basePlugin";
|
|
818
|
+
import * as Events from "./events";
|
|
819
|
+
import Errors from "./error";
|
|
820
|
+
import Sniffer from "./utils/sniffer";
|
|
821
|
+
import Util from "./utils/util";
|
|
822
|
+
import STATE_CLASS from "./stateClassMap";
|
|
823
|
+
import I18N from "./lang/i18n";
|
|
824
|
+
import MediaProxy from "./mediaProxy";
|
|
825
|
+
export { Player as default, Plugin, BasePlugin, Events, Errors, Sniffer, Util, STATE_CLASS, I18N };
|