@volcengine/veplayer 1.15.1 → 1.15.2-rc.1
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.
Potentially problematic release.
This version of @volcengine/veplayer might be problematic. Click here for more details.
- package/.changeset/config.json +11 -0
- package/.changeset/curvy-yaks-smoke.md +5 -0
- package/.changeset/neat-eyes-search.md +5 -0
- package/.codebase/pipelines/create-api-doc.yaml +16 -0
- package/.eslintignore +5 -0
- package/.eslintrc.json +53 -0
- package/.stylelintrc.js +51 -0
- package/CHANGELOG.md +5665 -0
- package/DEV_README.md +39 -0
- package/LICENSE +20 -0
- package/README_EN.md +46 -0
- package/build.sh +44 -0
- package/docg.config.js +65 -0
- package/env/byteplus.js +30 -0
- package/env/volcengine.js +50 -0
- package/fixtures/favicon.ico +0 -0
- package/fixtures/index.base.js +59 -0
- package/fixtures/index.html +41 -0
- package/fixtures/index.js +185 -0
- package/libd.config.js +147 -0
- package/localhost+2-key.pem +28 -0
- package/localhost+2.pem +26 -0
- package/lux.config.mjs +37 -0
- package/package.json +123 -4
- package/sdkhub.config.json +10 -0
- package/src/@types/global.d.ts +35 -0
- package/src/assets/common/error.svg +3 -0
- package/src/assets/common/errorImg.png +0 -0
- package/src/assets/common/errorImg.svg +12 -0
- package/src/assets/icons/mobile/definition.svg +3 -0
- package/src/assets/icons/mobile/line.svg +3 -0
- package/src/assets/icons/mobile/mobileDanmu.svg +1 -0
- package/src/assets/icons/mobile/mobileDanmuAcitive.svg +1 -0
- package/src/assets/icons/mobile/mobileDanmuSetting.svg +1 -0
- package/src/assets/icons/mobile/mobileExitFullscreen.svg +1 -0
- package/src/assets/icons/mobile/mobileFullscreen.svg +1 -0
- package/src/assets/icons/mobile/mobilePause.svg +4 -0
- package/src/assets/icons/mobile/mobilePlay.svg +4 -0
- package/src/assets/icons/mobile/mobilePlaynext.svg +1 -0
- package/src/assets/icons/mobile/mobileRefresh.svg +1 -0
- package/src/assets/icons/mobile/more.svg +3 -0
- package/src/assets/icons/mobile/muted.svg +22 -0
- package/src/assets/icons/mobile/playbackrate.svg +3 -0
- package/src/assets/icons/pc/danmu.svg +1 -0
- package/src/assets/icons/pc/danmuActive.svg +1 -0
- package/src/assets/icons/pc/danmuSettings.svg +1 -0
- package/src/assets/icons/pc/download.svg +14 -0
- package/src/assets/icons/pc/exitFullscreen.svg +1 -0
- package/src/assets/icons/pc/exitMirror.svg +10 -0
- package/src/assets/icons/pc/extend.svg +1 -0
- package/src/assets/icons/pc/fullscreen.svg +1 -0
- package/src/assets/icons/pc/getMirror.svg +10 -0
- package/src/assets/icons/pc/list.svg +20 -0
- package/src/assets/icons/pc/noPoster.svg +119 -0
- package/src/assets/icons/pc/pause.svg +1 -0
- package/src/assets/icons/pc/pip.svg +1 -0
- package/src/assets/icons/pc/pipExit.svg +1 -0
- package/src/assets/icons/pc/play-next-btn.svg +4 -0
- package/src/assets/icons/pc/play.svg +1 -0
- package/src/assets/icons/pc/playNext.svg +1 -0
- package/src/assets/icons/pc/playerLoading.svg +1 -0
- package/src/assets/icons/pc/refresh.svg +1 -0
- package/src/assets/icons/pc/replay.svg +1 -0
- package/src/assets/icons/pc/reset.svg +6 -0
- package/src/assets/icons/pc/startPlay.svg +1 -0
- package/src/assets/icons/pc/subtitleclose.svg +5 -0
- package/src/assets/icons/pc/subtitleopen.svg +3 -0
- package/src/assets/icons/pc/theaterEnter.svg +1 -0
- package/src/assets/icons/pc/theaterExit.svg +1 -0
- package/src/assets/icons/pc/volumeLarge.svg +1 -0
- package/src/assets/icons/pc/volumeMuted.svg +1 -0
- package/src/assets/icons/pc/volumeSmall.svg +1 -0
- package/src/config/defaultPreset.ts +110 -0
- package/src/config/playerOptionMobile.ts +166 -0
- package/src/config/playerOptionPc.ts +147 -0
- package/src/config/playerPreset.ts +242 -0
- package/src/constants/api.ts +13 -0
- package/src/constants/event.ts +577 -0
- package/src/constants/player.ts +84 -0
- package/src/constants/plugin.ts +19 -0
- package/src/constants/umdMap.ts +137 -0
- package/src/constants/umdPlugins.json +68 -0
- package/src/core/index.ts +7 -0
- package/src/core/player.ts +2713 -0
- package/src/core/playerData.ts +812 -0
- package/src/env.d.ts +47 -0
- package/src/index.ts +24 -0
- package/src/index.umd.ts +54 -0
- package/src/interface/adaptRange.d.ts +33 -0
- package/src/interface/api.ts +132 -0
- package/src/interface/autoBitrate.d.ts +41 -0
- package/src/interface/index.ts +1685 -0
- package/src/interface/rtm.ts +56 -0
- package/src/interface/sdkErrorPlugin.ts +145 -0
- package/src/interface/subtitle.ts +381 -0
- package/src/interface/video.ts +107 -0
- package/src/interface/xgplayer.ts +748 -0
- package/src/lang/constants.ts +69 -0
- package/src/lang/en.ts +98 -0
- package/src/lang/index.ts +33 -0
- package/src/lang/jp.ts +100 -0
- package/src/lang/zh-hk.ts +80 -0
- package/src/lang/zh.ts +79 -0
- package/src/license/index.ts +315 -0
- package/src/license/ttlicense2.js +15 -0
- package/src/license/ttlicense2.wasm +0 -0
- package/src/music/icons/back.svg +3 -0
- package/src/music/icons/forward.svg +3 -0
- package/src/music/icons/loop.svg +10 -0
- package/src/music/icons/order.svg +10 -0
- package/src/music/icons/pause-circle.svg +23 -0
- package/src/music/icons/play-circle.svg +22 -0
- package/src/music/icons/random.svg +10 -0
- package/src/music/icons/sloop.svg +10 -0
- package/src/music/index.ts +5 -0
- package/src/music/music.ts +550 -0
- package/src/music/plugins/index.less +185 -0
- package/src/music/plugins/index.ts +6 -0
- package/src/music/plugins/musicBackward.ts +82 -0
- package/src/music/plugins/musicCover.ts +45 -0
- package/src/music/plugins/musicForward.ts +82 -0
- package/src/music/plugins/musicMeta.ts +32 -0
- package/src/music/plugins/musicMode.ts +152 -0
- package/src/music/plugins/musicNext.ts +93 -0
- package/src/music/plugins/musicPrev.ts +94 -0
- package/src/music/preset.ts +69 -0
- package/src/music/xhr.ts +37 -0
- package/src/plugins/common/extendPluginFactory.ts +132 -0
- package/src/plugins/common/mobilePlayerPanel.ts +253 -0
- package/src/plugins/external/LiveInfoPanel.ts +340 -0
- package/src/plugins/external/ad/adsPlugin.ts +1 -0
- package/src/plugins/external/aiSubtitleIconPlugin.ts +270 -0
- package/src/plugins/external/aiSubtitlePlugin.ts +452 -0
- package/src/plugins/external/definitionDemotePlugin.ts +591 -0
- package/src/plugins/external/memoryPlay.ts +247 -0
- package/src/plugins/external/mirrorPlugin.ts +141 -0
- package/src/plugins/external/playList/OptionList.ts +204 -0
- package/src/plugins/external/playList/index.ts +743 -0
- package/src/plugins/external/subtitle/index.ts +672 -0
- package/src/plugins/external/subtitle/nativeSubTitle.ts +115 -0
- package/src/plugins/external/timeShiftPlugin.ts +484 -0
- package/src/plugins/external/watermark/dynamicWatermark.less +13 -0
- package/src/plugins/external/watermark/dynamicWatermark.ts +449 -0
- package/src/plugins/external/watermark/dynamicWatermarkPlugin.ts +185 -0
- package/src/plugins/inner/common/autoplayPlugin.ts +435 -0
- package/src/plugins/inner/common/danmu/container.ts +120 -0
- package/src/plugins/inner/common/danmu/index.ts +683 -0
- package/src/plugins/inner/common/danmu/lang.ts +139 -0
- package/src/plugins/inner/common/danmu/panel.ts +20 -0
- package/src/plugins/inner/common/danmu/slider.ts +210 -0
- package/src/plugins/inner/common/danmu/state.ts +118 -0
- package/src/plugins/inner/common/danmu/switch.ts +74 -0
- package/src/plugins/inner/common/definitionBasePlugin.ts +353 -0
- package/src/plugins/inner/common/errorPlugin.ts +544 -0
- package/src/plugins/inner/common/liveLogger.ts +137 -0
- package/src/plugins/inner/common/poster/index.less +66 -0
- package/src/plugins/inner/common/poster/index.ts +178 -0
- package/src/plugins/inner/common/refreshPlugin.ts +88 -0
- package/src/plugins/inner/common/rtmPlugin.ts +62 -0
- package/src/plugins/inner/common/toastPlugin.ts +90 -0
- package/src/plugins/inner/common/unmutePlugin.ts +133 -0
- package/src/plugins/inner/common/vodLogger.ts +80 -0
- package/src/plugins/inner/mobile/DefinitionMobilePlugin.ts +217 -0
- package/src/plugins/inner/mobile/LineMobilePlugins.ts +169 -0
- package/src/plugins/inner/mobile/MoreButtonPlugin.ts +176 -0
- package/src/plugins/inner/mobile/PlaybackRatePlugin.ts +199 -0
- package/src/plugins/inner/pc/definitionPlugin.ts +203 -0
- package/src/plugins/inner/pc/multilinePlugin.ts +93 -0
- package/src/sdkPlugin/abr.ts +67 -0
- package/src/sdkPlugin/adaptRange.ts +49 -0
- package/src/sdkPlugin/authToken.ts +557 -0
- package/src/sdkPlugin/sdkPlugin.ts +125 -0
- package/src/sdkPlugin/sdkPluginManager.ts +157 -0
- package/src/sdkPlugin/strategy.ts +47 -0
- package/src/strategy/index.ts +740 -0
- package/src/strategy/vestrategy-h265-wrapper.ts +34 -0
- package/src/strategy/vestrategy-preload-wrapper.ts +414 -0
- package/src/streamAdapters/base.ts +89 -0
- package/src/streamAdapters/dash.ts +230 -0
- package/src/streamAdapters/default.ts +53 -0
- package/src/streamAdapters/hls.ts +278 -0
- package/src/streamAdapters/index.ts +40 -0
- package/src/streamAdapters/mp4.ts +214 -0
- package/src/style/bytelive/danmu.less +293 -0
- package/src/style/bytelive/definitionIcon.less +80 -0
- package/src/style/bytelive/error.less +165 -0
- package/src/style/bytelive/index.less +62 -0
- package/src/style/bytelive/loading.less +5 -0
- package/src/style/bytelive/mobiePlugin.less +2 -0
- package/src/style/bytelive/mobile.less +76 -0
- package/src/style/bytelive/moreButton.less +79 -0
- package/src/style/bytelive/panel.less +259 -0
- package/src/style/bytelive/pc.less +161 -0
- package/src/style/bytelive/refresh.less +3 -0
- package/src/style/bytelive/reset.less +4 -0
- package/src/style/bytelive/toast.less +61 -0
- package/src/style/bytelive/unmute.less +65 -0
- package/src/style/external/LiveInfoPanel.less +41 -0
- package/src/style/external/aisub.less +139 -0
- package/src/style/external/aisubIcon.less +25 -0
- package/src/style/external/index.less +5 -0
- package/src/style/external/larkWindow.less +36 -0
- package/src/style/external/mirror.less +27 -0
- package/src/style/external/playList.less +258 -0
- package/src/style/external/timeShift.less +102 -0
- package/src/style/external/vttSubtitle.less +25 -0
- package/src/utils/debug.ts +62 -0
- package/src/utils/definition.ts +61 -0
- package/src/utils/escapeHtml.ts +93 -0
- package/src/utils/eventMiddleWare.ts +108 -0
- package/src/utils/index.ts +621 -0
- package/src/utils/intervalTimer.ts +38 -0
- package/src/utils/isHijackBrowser.ts +71 -0
- package/src/utils/proxy.ts +139 -0
- package/src/utils/storage.ts +34 -0
- package/src/utils/time.ts +19 -0
- package/src/utils/toast/index.less +20 -0
- package/src/utils/toast/index.ts +21 -0
- package/src/utils/token.ts +395 -0
- package/src/utils/u8a.ts +4 -0
- package/src/utils/umdLoader.ts +193 -0
- package/src/utils/video.ts +43 -0
- package/src/utils/xhr.ts +160 -0
- package/src/veError/error.ts +301 -0
- package/src/veError/index.ts +681 -0
- package/src/veError/playerProxy.ts +69 -0
- package/tsconfig.json +27 -0
- package/index.d.ts +0 -6874
- package/index.min.css +0 -1
- package/index.min.js +0 -2
- package/plugin/DashAbralgo.js +0 -2
- package/plugin/XGVideo.js +0 -2
- package/plugin/danmuMask.js +0 -2
- package/plugin/danmujs.js +0 -3
- package/plugin/dash.js +0 -2
- package/plugin/flv.js +0 -2
- package/plugin/hls.js +0 -2
- package/plugin/hlsEncrypt.js +0 -2
- package/plugin/mp4Encrypt.js +0 -2
- package/plugin/preloader.js +0 -2
- package/plugin/streamprobe.js +0 -2
- package/plugin/vestrategy.js +0 -1
- package/plugin/vestrategy_adapt_range.js +0 -1
- package/plugin/vestrategy_h265.js +0 -1
- package/plugin/vestrategy_preload.js +0 -1
package/src/env.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
// vite 全局变量类型定义文件,无法export,否则类型无法引用
|
|
4
|
+
// API 服务区域配置
|
|
5
|
+
type TAPIRegionConfig = {
|
|
6
|
+
__PLAY_DOMAIN__: string;
|
|
7
|
+
__BACKUP_PLAY_DOMAIN__?: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
// 用户相关区域配置,包括tea及umd拉取域名配置
|
|
11
|
+
type TUserRegionConfig = {
|
|
12
|
+
__LOG_TEA_ID__: number;
|
|
13
|
+
__LOG_CHANNEL__: TLogChannel;
|
|
14
|
+
__LOG_CUSTOM_REGION__?: string;
|
|
15
|
+
__UMD_PRE_PATH__: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type TLogChannel = 'cn' | 'va' | 'sg';
|
|
19
|
+
type TRegionType = 'cn' | 'mya' | 'va' | 'sg';
|
|
20
|
+
|
|
21
|
+
type TPlatoform = 'volcengine' | 'byteplus';
|
|
22
|
+
|
|
23
|
+
interface ImportMetaEnv {
|
|
24
|
+
readonly __SDK_VERSION__?: string;
|
|
25
|
+
readonly __PLATFORM__: TPlatoform;
|
|
26
|
+
|
|
27
|
+
// LIVE
|
|
28
|
+
readonly __LIVE_LOG_TEA_ID__: number;
|
|
29
|
+
readonly __LIVE_LOG_CHANNEL__: 'cn' | 'va' | 'sg';
|
|
30
|
+
|
|
31
|
+
// VOD config
|
|
32
|
+
// readonly __API_DEFAULT_REGION__: string;
|
|
33
|
+
readonly __API_DEFAULT_REGION__: TRegionType;
|
|
34
|
+
// readonly __API_REGION_CONFIG__: Record<TRegionType, TAPIRegionConfig>;
|
|
35
|
+
readonly __API_REGION_CONFIG__: Record<TRegionType, TAPIRegionConfig>;
|
|
36
|
+
|
|
37
|
+
// readonly __USER_DEFAULT_REGION__: string;
|
|
38
|
+
readonly __USER_DEFAULT_REGION__: TRegionType;
|
|
39
|
+
// readonly __USER_REGION_CONFIG__: Record<TRegionType, TUserRegionConfig>;
|
|
40
|
+
readonly __USER_REGION_CONFIG__: Record<TRegionType, TUserRegionConfig>;
|
|
41
|
+
|
|
42
|
+
// 更多环境变量...
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
interface ImportMeta {
|
|
46
|
+
readonly env: ImportMetaEnv;
|
|
47
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import VePlayer from './core/index';
|
|
2
|
+
|
|
3
|
+
export default VePlayer;
|
|
4
|
+
|
|
5
|
+
export * from './interface';
|
|
6
|
+
|
|
7
|
+
export { default as Music } from './music';
|
|
8
|
+
export { default as LiveSubtitlesIconPlugin } from './plugins/external/aiSubtitleIconPlugin';
|
|
9
|
+
export { default as LiveSubtitlesPlugin } from './plugins/external/aiSubtitlePlugin';
|
|
10
|
+
export { default as Subtitle } from './plugins/external/subtitle';
|
|
11
|
+
export { default as AdsPlugin } from './plugins/external/ad/adsPlugin';
|
|
12
|
+
export { default as DynamicWatermarkPlugin } from './plugins/external/watermark/dynamicWatermarkPlugin';
|
|
13
|
+
export { default as DefinitionDemotePlugin } from './plugins/external/definitionDemotePlugin';
|
|
14
|
+
export { default as TimeShiftPlugin } from './plugins/external/timeShiftPlugin';
|
|
15
|
+
export { default as MirrorPlugin } from './plugins/external/mirrorPlugin';
|
|
16
|
+
export { default as MemoryPlay } from './plugins/external/memoryPlay';
|
|
17
|
+
export { default as PlayListPlugin } from './plugins/external/playList';
|
|
18
|
+
export { default as Service } from 'xgplayer-service';
|
|
19
|
+
export { default as LiveInfoPanel } from './plugins/external/LiveInfoPanel';
|
|
20
|
+
export { default as SdkPlugin } from './sdkPlugin/sdkPlugin';
|
|
21
|
+
|
|
22
|
+
export { default as Events, Event } from './constants/event';
|
|
23
|
+
export { getI18N } from './core/player';
|
|
24
|
+
export * from 'xgplayer';
|
package/src/index.umd.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import VePlayer, { getI18N } from './index';
|
|
2
|
+
|
|
3
|
+
import Music from './music';
|
|
4
|
+
import LiveSubtitlesIconPlugin from './plugins/external/aiSubtitleIconPlugin';
|
|
5
|
+
import LiveSubtitlesPlugin from './plugins/external/aiSubtitlePlugin';
|
|
6
|
+
import DefinitionDemotePlugin from './plugins/external/definitionDemotePlugin';
|
|
7
|
+
import TimeShiftPlugin from './plugins/external/timeShiftPlugin';
|
|
8
|
+
import MirrorPlugin from './plugins/external/mirrorPlugin';
|
|
9
|
+
import MemoryPlay from './plugins/external/memoryPlay';
|
|
10
|
+
import Subtitle from './plugins/external/subtitle';
|
|
11
|
+
import DynamicWatermarkPlugin from './plugins/external/watermark/dynamicWatermarkPlugin';
|
|
12
|
+
import PlayListPlugin from './plugins/external/playList';
|
|
13
|
+
import Service from 'xgplayer-service';
|
|
14
|
+
import LiveInfoPanel from './plugins/external/LiveInfoPanel';
|
|
15
|
+
import AdsPlugin from './plugins/external/ad/adsPlugin';
|
|
16
|
+
import SdkPlugin from './sdkPlugin/sdkPlugin';
|
|
17
|
+
import { default as Events, Event } from './constants/event';
|
|
18
|
+
import {
|
|
19
|
+
BasePlugin,
|
|
20
|
+
Plugin,
|
|
21
|
+
Sniffer,
|
|
22
|
+
Util,
|
|
23
|
+
STATE_CLASS,
|
|
24
|
+
I18N,
|
|
25
|
+
STATES,
|
|
26
|
+
} from 'xgplayer';
|
|
27
|
+
|
|
28
|
+
export default class VePlayerUmd extends VePlayer {
|
|
29
|
+
static Music = Music;
|
|
30
|
+
static LiveSubtitlesIconPlugin = LiveSubtitlesIconPlugin;
|
|
31
|
+
static LiveSubtitlesPlugin = LiveSubtitlesPlugin;
|
|
32
|
+
static DefinitionDemotePlugin = DefinitionDemotePlugin;
|
|
33
|
+
static TimeShiftPlugin = TimeShiftPlugin;
|
|
34
|
+
static MirrorPlugin = MirrorPlugin;
|
|
35
|
+
static MemoryPlay = MemoryPlay;
|
|
36
|
+
static Subtitle = Subtitle;
|
|
37
|
+
static DynamicWatermarkPlugin = DynamicWatermarkPlugin;
|
|
38
|
+
static PlayListPlugin = PlayListPlugin;
|
|
39
|
+
static Service = Service;
|
|
40
|
+
static LiveInfoPanel = LiveInfoPanel;
|
|
41
|
+
static AdsPlugin = AdsPlugin;
|
|
42
|
+
static Events = Events;
|
|
43
|
+
// 兼容旧的导出
|
|
44
|
+
static Event = Event;
|
|
45
|
+
static getI18N = getI18N;
|
|
46
|
+
static BasePlugin = BasePlugin;
|
|
47
|
+
static Plugin = Plugin;
|
|
48
|
+
static Sniffer = Sniffer;
|
|
49
|
+
static Util = Util;
|
|
50
|
+
static STATE_CLASS = STATE_CLASS;
|
|
51
|
+
static I18N = I18N;
|
|
52
|
+
static STATES = STATES;
|
|
53
|
+
static SdkPlugin = SdkPlugin;
|
|
54
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** {zh}
|
|
2
|
+
* @list Options
|
|
3
|
+
* @brief Range拆分(动态Buffer)
|
|
4
|
+
* @kind property
|
|
5
|
+
* @hidden
|
|
6
|
+
*/
|
|
7
|
+
export interface IAdaptRange {
|
|
8
|
+
/** {zh}
|
|
9
|
+
* @brief 是否开启Range拆分
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
enable: boolean;
|
|
13
|
+
/** {zh}
|
|
14
|
+
* @brief 最小剩余Buffer缓存时长
|
|
15
|
+
* @default 30s
|
|
16
|
+
*/
|
|
17
|
+
minCacheDuration?: number;
|
|
18
|
+
/** {zh}
|
|
19
|
+
* @brief 最大剩余Buffer缓存时长
|
|
20
|
+
* @default 60s
|
|
21
|
+
*/
|
|
22
|
+
maxCacheDuration?: number;
|
|
23
|
+
/**
|
|
24
|
+
* @hidden
|
|
25
|
+
* @brief 最小range长度
|
|
26
|
+
*/
|
|
27
|
+
minRangeDuration?: number;
|
|
28
|
+
/**
|
|
29
|
+
* @hidden
|
|
30
|
+
* @brief 最大range长度
|
|
31
|
+
*/
|
|
32
|
+
maxRangeDuration?: number;
|
|
33
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ICodecType,
|
|
3
|
+
EVideoFormat,
|
|
4
|
+
EAudioFormat,
|
|
5
|
+
EDRMTYPE,
|
|
6
|
+
} from '@/interface/index';
|
|
7
|
+
|
|
8
|
+
export interface IVolume {
|
|
9
|
+
Loudness: number;
|
|
10
|
+
Peak: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** {zh}
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export interface IPlayInfoListItem {
|
|
17
|
+
BackupPlayUrl: string;
|
|
18
|
+
BackupUrlExpire: string;
|
|
19
|
+
BarrageMaskOffset: string;
|
|
20
|
+
Bitrate: number;
|
|
21
|
+
CheckInfo: string;
|
|
22
|
+
Codec: ICodecType;
|
|
23
|
+
Definition: string;
|
|
24
|
+
Duration: number;
|
|
25
|
+
FileId: string;
|
|
26
|
+
FileType: string;
|
|
27
|
+
Format: EVideoFormat | EAudioFormat;
|
|
28
|
+
Height: number;
|
|
29
|
+
IndexRange: string;
|
|
30
|
+
InitRange: string;
|
|
31
|
+
KeyFrameAlignment: string;
|
|
32
|
+
LogoType: string;
|
|
33
|
+
MainPlayUrl: string;
|
|
34
|
+
MainUrlExpire: string;
|
|
35
|
+
Md5: string;
|
|
36
|
+
PlayAuth: string;
|
|
37
|
+
PlayAuthId: string;
|
|
38
|
+
Quality: string;
|
|
39
|
+
Size: number;
|
|
40
|
+
Volume?: number;
|
|
41
|
+
Width: number;
|
|
42
|
+
DrmType?: EDRMTYPE;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** {zh}
|
|
46
|
+
* @hidden
|
|
47
|
+
* @brief 音频封装格式
|
|
48
|
+
*/
|
|
49
|
+
export interface ISubtitleInfoList {
|
|
50
|
+
CreateTime: string;
|
|
51
|
+
FileId: string;
|
|
52
|
+
Format: string;
|
|
53
|
+
Language: string;
|
|
54
|
+
LanguageId: number;
|
|
55
|
+
Source: string;
|
|
56
|
+
Status: string;
|
|
57
|
+
StoreUri: string;
|
|
58
|
+
SubtitleId: string;
|
|
59
|
+
SubtitleUrl: string;
|
|
60
|
+
Tag: string;
|
|
61
|
+
Title: string;
|
|
62
|
+
Version: string;
|
|
63
|
+
Vid: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** {zh}
|
|
67
|
+
* @hidden
|
|
68
|
+
*/
|
|
69
|
+
export interface IThumbInfoItem {
|
|
70
|
+
CaptureNum: number;
|
|
71
|
+
CellHeight: number;
|
|
72
|
+
CellWidth: number;
|
|
73
|
+
Format: string;
|
|
74
|
+
ImgXLen: number;
|
|
75
|
+
ImgYLen: number;
|
|
76
|
+
Interval: number;
|
|
77
|
+
StoreUrls: string[];
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** {zh}
|
|
81
|
+
* @brief 蒙版弹幕信息
|
|
82
|
+
* @hidden
|
|
83
|
+
*/
|
|
84
|
+
export interface IBarrageMaskInfo {
|
|
85
|
+
Version: string;
|
|
86
|
+
BarrageMaskUrl: string;
|
|
87
|
+
FileId: string;
|
|
88
|
+
FileSize: number;
|
|
89
|
+
FileHash: string;
|
|
90
|
+
UpdatedAt: string;
|
|
91
|
+
Bitrate: number;
|
|
92
|
+
HeadLen: number;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** {zh}
|
|
96
|
+
* @hidden
|
|
97
|
+
*/
|
|
98
|
+
interface DashAdaptiveInfo {
|
|
99
|
+
AdaptiveType: string;
|
|
100
|
+
BackupPlayUrl: string;
|
|
101
|
+
MainPlayUrl: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** {zh}
|
|
105
|
+
* @hidden
|
|
106
|
+
*/
|
|
107
|
+
export interface ABRInfo {
|
|
108
|
+
AbrFormat: string;
|
|
109
|
+
BackupPlayUrl: string;
|
|
110
|
+
MainPlayUrl: string;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** {zh}
|
|
114
|
+
* @hidden
|
|
115
|
+
*/
|
|
116
|
+
export interface IGetPlayInfoRes {
|
|
117
|
+
Vid: string;
|
|
118
|
+
AdaptiveInfo?: DashAdaptiveInfo;
|
|
119
|
+
AdaptiveBitrateStreamingInfo?: ABRInfo;
|
|
120
|
+
BarrageMaskInfo?: IBarrageMaskInfo;
|
|
121
|
+
BarrageMaskUrl: string;
|
|
122
|
+
Duration: number;
|
|
123
|
+
EnableAdaptive: boolean;
|
|
124
|
+
FileType: string;
|
|
125
|
+
PlayInfoList: IPlayInfoListItem[];
|
|
126
|
+
PosterUrl: string;
|
|
127
|
+
Status: number;
|
|
128
|
+
SubtitleInfoList: ISubtitleInfoList[];
|
|
129
|
+
ThumbInfoList: IThumbInfoItem[];
|
|
130
|
+
TotalCount: number;
|
|
131
|
+
Version: number;
|
|
132
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** {zh}
|
|
2
|
+
* @list Options
|
|
3
|
+
* @brief 自适应码率配置。
|
|
4
|
+
* @kind property
|
|
5
|
+
*/
|
|
6
|
+
export interface IAutoBitrateOpts {
|
|
7
|
+
/** {zh}
|
|
8
|
+
* @brief 是否开启自适应码率功能。
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
enable: boolean;
|
|
12
|
+
/** {zh}
|
|
13
|
+
* @brief 是否以自动清晰度档位起播。开启自适应码率功能且 `defaultDefinition` 为 `auto` 时,才会以自动清晰度档位起播。
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
startWithAuto?: boolean;
|
|
17
|
+
/** {zh}
|
|
18
|
+
* @brief 自动清晰度档位是否展示当前实际清晰度,如自动(720p)。
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
showRealDefinition?: boolean;
|
|
22
|
+
/** {zh}
|
|
23
|
+
* @brief 自动清晰度档位的显示文案。
|
|
24
|
+
* @default 自动
|
|
25
|
+
*/
|
|
26
|
+
/** {en}
|
|
27
|
+
* @brief the show text of auto definition
|
|
28
|
+
* @default auto
|
|
29
|
+
*/
|
|
30
|
+
autoDefinitionText?: string;
|
|
31
|
+
/** {zh}
|
|
32
|
+
* @brief 自动清晰度档位的多语言 key。
|
|
33
|
+
* @default DEFINITION_AUTO
|
|
34
|
+
*/
|
|
35
|
+
definitionTextKey?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @hidden
|
|
38
|
+
* @brief 软解module
|
|
39
|
+
*/
|
|
40
|
+
module?: unknown;
|
|
41
|
+
}
|