@byteplus/veplayer 1.18.0-rc.4 → 1.18.0-rc.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/index.d.ts +1086 -375
- package/index.min.css +1 -1
- package/index.min.js +2 -2
- package/lite.cjs +2 -0
- package/lite.cjs.css +1 -0
- package/lite.d.ts +644 -0
- package/lite.esm.css +1 -0
- package/lite.esm.mjs +2 -0
- package/lite.min.css +1 -0
- package/lite.min.js +2 -0
- package/package.json +25 -1
- package/plugin/hlsjs.js +1 -0
- package/plugin/modules/DashAbralgo.d.ts +2 -0
- package/plugin/modules/DashAbralgo.mjs +2 -0
- package/plugin/modules/XGVideo.d.ts +2 -0
- package/plugin/modules/XGVideo.mjs +2 -0
- package/plugin/modules/danmuMask.d.ts +2 -0
- package/plugin/modules/danmuMask.mjs +2 -0
- package/plugin/modules/danmujs.d.ts +2 -0
- package/plugin/modules/danmujs.mjs +3 -0
- package/plugin/modules/dash.d.ts +2 -0
- package/plugin/modules/dash.mjs +2 -0
- package/plugin/modules/flv.d.ts +2 -0
- package/plugin/modules/flv.mjs +2 -0
- package/plugin/modules/hls.d.ts +2 -0
- package/plugin/modules/hls.mjs +2 -0
- package/plugin/modules/hlsEncrypt.d.ts +2 -0
- package/plugin/modules/hlsEncrypt.mjs +2 -0
- package/plugin/modules/hlsjs.d.ts +2 -0
- package/plugin/modules/hlsjs.mjs +2 -0
- package/plugin/modules/hlsjsPro.d.ts +2 -0
- package/plugin/modules/hlsjsPro.mjs +2 -0
- package/plugin/modules/mp4Encrypt.d.ts +2 -0
- package/plugin/modules/mp4Encrypt.mjs +2 -0
- package/plugin/modules/preloader.d.ts +2 -0
- package/plugin/modules/preloader.mjs +2 -0
- package/plugin/modules/streamprobe.d.ts +2 -0
- package/plugin/modules/streamprobe.mjs +2 -0
- package/plugin/modules/vestrategy.d.ts +2 -0
- package/plugin/modules/vestrategy.mjs +2 -0
- package/plugin/modules/vestrategy_adapt_range.d.ts +2 -0
- package/plugin/modules/vestrategy_adapt_range.mjs +2 -0
- package/plugin/modules/vestrategy_h265.d.ts +2 -0
- package/plugin/modules/vestrategy_h265.mjs +2 -0
- package/plugin/modules/vestrategy_preload.d.ts +2 -0
- package/plugin/modules/vestrategy_preload.mjs +2 -0
- package/plugin/vestrategy.js +1 -1
package/index.d.ts
CHANGED
|
@@ -805,6 +805,15 @@ export interface ISubTitleItem {
|
|
|
805
805
|
* @default -
|
|
806
806
|
*/
|
|
807
807
|
text?: string;
|
|
808
|
+
/** {zh}
|
|
809
|
+
* @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
|
|
810
|
+
* @default -
|
|
811
|
+
*/
|
|
812
|
+
/** {en}
|
|
813
|
+
* @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
|
|
814
|
+
* @default -
|
|
815
|
+
*/
|
|
816
|
+
label?: string | number;
|
|
808
817
|
/** {zh}
|
|
809
818
|
* @brief 外挂字幕 URL 地址。
|
|
810
819
|
* @default -
|
|
@@ -834,6 +843,20 @@ export interface ISubTitleItem {
|
|
|
834
843
|
*/
|
|
835
844
|
list?: IListItem[];
|
|
836
845
|
}
|
|
846
|
+
export declare type IAutoSubtitleSourceItem = Record<string, any> | string;
|
|
847
|
+
export declare type IAutoSubtitleFormatterResult = string | number | boolean | null | undefined | {
|
|
848
|
+
label?: string | number;
|
|
849
|
+
text?: string | number;
|
|
850
|
+
show?: boolean;
|
|
851
|
+
visible?: boolean;
|
|
852
|
+
/** 排序权重,值越小越靠前。未指定时保持原始顺序。 */
|
|
853
|
+
order?: number;
|
|
854
|
+
/** 是否为默认选中的字幕。 */
|
|
855
|
+
isDefault?: boolean;
|
|
856
|
+
/** 是否为默认选中的字幕,与 `isDefault` 等价。 */
|
|
857
|
+
default?: boolean;
|
|
858
|
+
};
|
|
859
|
+
export declare type IAutoSubtitleItemFormatter = (item: IAutoSubtitleSourceItem, index: number) => IAutoSubtitleFormatterResult;
|
|
837
860
|
/** {zh}
|
|
838
861
|
* @brief 字幕内容项。
|
|
839
862
|
* @list Options
|
|
@@ -3052,6 +3075,7 @@ export interface ISubtitleInfoList {
|
|
|
3052
3075
|
Version: string;
|
|
3053
3076
|
Vid: string;
|
|
3054
3077
|
}
|
|
3078
|
+
export declare type ISubtitleInfoListItem = ISubtitleInfoList | string;
|
|
3055
3079
|
/** {zh}
|
|
3056
3080
|
* @hidden
|
|
3057
3081
|
*/
|
|
@@ -3126,11 +3150,102 @@ export interface IGetPlayInfoRes {
|
|
|
3126
3150
|
PlayInfoList: IPlayInfoListItem[];
|
|
3127
3151
|
PosterUrl: string;
|
|
3128
3152
|
Status: number;
|
|
3129
|
-
SubtitleInfoList
|
|
3153
|
+
SubtitleInfoList?: ISubtitleInfoListItem[];
|
|
3130
3154
|
ThumbInfoList: IThumbInfoItem[];
|
|
3131
3155
|
TotalCount: number;
|
|
3132
3156
|
Version: number;
|
|
3133
3157
|
}
|
|
3158
|
+
/**
|
|
3159
|
+
* 短剧环境配置接口
|
|
3160
|
+
*/
|
|
3161
|
+
export interface ITTDramaEnv {
|
|
3162
|
+
/** 云服务商,默认从构建时 env.__PLATFORM__ 获取,未注入时默认为 byteplus */
|
|
3163
|
+
channel?: "volcengine" | "byteplus";
|
|
3164
|
+
/**
|
|
3165
|
+
* @brief 应用版本号
|
|
3166
|
+
* @type {string}
|
|
3167
|
+
*/
|
|
3168
|
+
appVersion: string;
|
|
3169
|
+
/**
|
|
3170
|
+
* @brief 小程序三方id
|
|
3171
|
+
* @type {string}
|
|
3172
|
+
*/
|
|
3173
|
+
clientKey: string;
|
|
3174
|
+
/**
|
|
3175
|
+
* @brief 是否支持获取短剧信息
|
|
3176
|
+
* @type {boolean}
|
|
3177
|
+
*/
|
|
3178
|
+
canIUseGetDramaInfo: boolean;
|
|
3179
|
+
/**
|
|
3180
|
+
* @brief Android 是否支持批量获取短剧信息(高版本 app)
|
|
3181
|
+
* @type {boolean}
|
|
3182
|
+
*/
|
|
3183
|
+
canAndroidBatchGetDramaInfo?: boolean;
|
|
3184
|
+
/**
|
|
3185
|
+
* @brief 获取短剧信息
|
|
3186
|
+
* @type {function}
|
|
3187
|
+
*/
|
|
3188
|
+
getDramaInfo: (callback: (res: IJSBCallbackResult) => void, options: IGetDramaInfoOptions) => void;
|
|
3189
|
+
videoSecurityModule?: any;
|
|
3190
|
+
/**
|
|
3191
|
+
* @brief 日志发送接口
|
|
3192
|
+
* @type {function}
|
|
3193
|
+
*/
|
|
3194
|
+
sendLog: (EventName: string, params: Record<string, any>) => void;
|
|
3195
|
+
/**
|
|
3196
|
+
* 低版本 app 下验证 TTOP 签发的 playAuthToken 时使用的密钥
|
|
3197
|
+
* 通过 JSB(如 minis.getSecret)从 Native 获取,用于 HMAC-SHA256 签名校验
|
|
3198
|
+
*/
|
|
3199
|
+
getTokenVerifySecret?: () => Promise<string>;
|
|
3200
|
+
}
|
|
3201
|
+
/**
|
|
3202
|
+
* JSB 获取短剧信息请求参数
|
|
3203
|
+
*/
|
|
3204
|
+
export interface IGetDramaInfoOptions {
|
|
3205
|
+
clientKey: string;
|
|
3206
|
+
albumId: string;
|
|
3207
|
+
episodeId: string;
|
|
3208
|
+
vid: string;
|
|
3209
|
+
}
|
|
3210
|
+
export interface MinisError {
|
|
3211
|
+
error_code: number;
|
|
3212
|
+
error_msg: string;
|
|
3213
|
+
error_extra?: unknown;
|
|
3214
|
+
}
|
|
3215
|
+
/**
|
|
3216
|
+
* JSB getDramaInfo 返回的客户端耗时信息,单位 ms。
|
|
3217
|
+
*/
|
|
3218
|
+
export interface IGetDramaInfoPerfInfo {
|
|
3219
|
+
prepare_cost?: number;
|
|
3220
|
+
request_cost?: number;
|
|
3221
|
+
parse_cost?: number;
|
|
3222
|
+
total_cost?: number;
|
|
3223
|
+
[propName: string]: any;
|
|
3224
|
+
}
|
|
3225
|
+
/**
|
|
3226
|
+
* JSB 获取短剧信息返回结果
|
|
3227
|
+
*/
|
|
3228
|
+
export interface IJSBCallbackResult {
|
|
3229
|
+
is_success: number | boolean;
|
|
3230
|
+
error?: MinisError;
|
|
3231
|
+
data?: {
|
|
3232
|
+
status: number;
|
|
3233
|
+
drama_info: {
|
|
3234
|
+
album_id: string;
|
|
3235
|
+
drama_name: string;
|
|
3236
|
+
drama_cover: string;
|
|
3237
|
+
drama_description: string;
|
|
3238
|
+
};
|
|
3239
|
+
episode_info: {
|
|
3240
|
+
episode_id: string;
|
|
3241
|
+
episode_name: string;
|
|
3242
|
+
episode_cover: string;
|
|
3243
|
+
episode_description: string;
|
|
3244
|
+
};
|
|
3245
|
+
video_info: IGetPlayInfoRes | Record<string, any>;
|
|
3246
|
+
perf_info?: IGetDramaInfoPerfInfo;
|
|
3247
|
+
};
|
|
3248
|
+
}
|
|
3134
3249
|
/** {zh}
|
|
3135
3250
|
* @list Options
|
|
3136
3251
|
* @brief 视频编码格式。
|
|
@@ -3775,6 +3890,86 @@ export declare type Url = string | Array<{
|
|
|
3775
3890
|
type?: string;
|
|
3776
3891
|
[propName: string]: any;
|
|
3777
3892
|
}>;
|
|
3893
|
+
/** {zh}
|
|
3894
|
+
* @list Options
|
|
3895
|
+
* @kind property
|
|
3896
|
+
* @brief 获取到媒体信息时的回调参数。
|
|
3897
|
+
*/
|
|
3898
|
+
/** {en}
|
|
3899
|
+
* @list Options
|
|
3900
|
+
* @kind property
|
|
3901
|
+
* @brief Callback payload when media information is obtained.
|
|
3902
|
+
*/
|
|
3903
|
+
export interface IGetMediaInfoCallbackPayload {
|
|
3904
|
+
/** {zh}
|
|
3905
|
+
* @brief 媒体信息。
|
|
3906
|
+
*/
|
|
3907
|
+
/** {en}
|
|
3908
|
+
* @brief Media information.
|
|
3909
|
+
*/
|
|
3910
|
+
data: {
|
|
3911
|
+
playList?: Stream[];
|
|
3912
|
+
type?: string;
|
|
3913
|
+
poster?: string;
|
|
3914
|
+
vid?: string;
|
|
3915
|
+
duration?: number;
|
|
3916
|
+
[propName: string]: any;
|
|
3917
|
+
};
|
|
3918
|
+
/** {zh}
|
|
3919
|
+
* @brief 媒体信息是否来自缓存。
|
|
3920
|
+
*/
|
|
3921
|
+
/** {en}
|
|
3922
|
+
* @brief Whether the media information comes from cache.
|
|
3923
|
+
*/
|
|
3924
|
+
fromCache: boolean;
|
|
3925
|
+
}
|
|
3926
|
+
/** {zh}
|
|
3927
|
+
* @list Options
|
|
3928
|
+
* @kind property
|
|
3929
|
+
* @brief JSB getDramaInfo 客户端耗时回调参数。
|
|
3930
|
+
*/
|
|
3931
|
+
/** {en}
|
|
3932
|
+
* @list Options
|
|
3933
|
+
* @kind property
|
|
3934
|
+
* @brief Callback payload for client-side getDramaInfo timing returned by JSB.
|
|
3935
|
+
*/
|
|
3936
|
+
export interface IGetDramaInfoPerfCallbackPayload {
|
|
3937
|
+
/** {zh}
|
|
3938
|
+
* @brief JSB 返回的客户端耗时信息,单位 ms。
|
|
3939
|
+
*/
|
|
3940
|
+
/** {en}
|
|
3941
|
+
* @brief Client-side timing returned by JSB, in milliseconds.
|
|
3942
|
+
*/
|
|
3943
|
+
perfInfo: IGetDramaInfoPerfInfo;
|
|
3944
|
+
/** {zh}
|
|
3945
|
+
* @brief 剧 ID。
|
|
3946
|
+
*/
|
|
3947
|
+
albumId?: string;
|
|
3948
|
+
/** {zh}
|
|
3949
|
+
* @brief 剧集 ID。
|
|
3950
|
+
*/
|
|
3951
|
+
episodeId?: string;
|
|
3952
|
+
/** {zh}
|
|
3953
|
+
* @brief 视频 ID。
|
|
3954
|
+
*/
|
|
3955
|
+
vid?: string;
|
|
3956
|
+
/** {zh}
|
|
3957
|
+
* @brief JSB 是否请求成功。
|
|
3958
|
+
*/
|
|
3959
|
+
isSuccess: boolean;
|
|
3960
|
+
/** {zh}
|
|
3961
|
+
* @brief 短剧审核状态。
|
|
3962
|
+
*/
|
|
3963
|
+
status?: number;
|
|
3964
|
+
/** {zh}
|
|
3965
|
+
* @brief 是否来自缓存。getDramaInfo 实际请求返回时固定为 false。
|
|
3966
|
+
*/
|
|
3967
|
+
fromCache: boolean;
|
|
3968
|
+
/** {zh}
|
|
3969
|
+
* @brief SDK 收到回调时的时间戳。
|
|
3970
|
+
*/
|
|
3971
|
+
timestamp: number;
|
|
3972
|
+
}
|
|
3778
3973
|
/** {zh}
|
|
3779
3974
|
* @list Options
|
|
3780
3975
|
* @kind property
|
|
@@ -3838,6 +4033,14 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
3838
4033
|
* @default -
|
|
3839
4034
|
*/
|
|
3840
4035
|
vid?: string;
|
|
4036
|
+
/**
|
|
4037
|
+
* @brief 剧id,Minis 短剧播放需要
|
|
4038
|
+
*/
|
|
4039
|
+
albumId?: string;
|
|
4040
|
+
/**
|
|
4041
|
+
* @brief 剧集id,Minis 短剧播放需要
|
|
4042
|
+
*/
|
|
4043
|
+
episodeId?: string;
|
|
3841
4044
|
/** {zh}
|
|
3842
4045
|
* @brief Vid 播放配置项。应用服务端需通过 `vid` 生成临时临时播放 Token,下发给客户端。
|
|
3843
4046
|
* @type {IPlayAuthTokenConfig}
|
|
@@ -3847,6 +4050,34 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
3847
4050
|
* @brief Vid playback configuration. The app server generates a temporary play token from `vid` and passes it to the client.
|
|
3848
4051
|
*/
|
|
3849
4052
|
getVideoByToken?: IPlayAuthTokenConfig;
|
|
4053
|
+
/** {zh}
|
|
4054
|
+
* @brief 通过 `playAuthToken` 或缓存获取到媒体信息时触发的回调。
|
|
4055
|
+
* @default -
|
|
4056
|
+
*/
|
|
4057
|
+
/** {en}
|
|
4058
|
+
* @brief Callback fired when media information is obtained from `playAuthToken` or cache.
|
|
4059
|
+
* @default -
|
|
4060
|
+
*/
|
|
4061
|
+
onGetMediaInfo?: (payload: IGetMediaInfoCallbackPayload) => void;
|
|
4062
|
+
/** {zh}
|
|
4063
|
+
* @brief JSB `getDramaInfo` 返回客户端耗时信息时触发的回调。
|
|
4064
|
+
* @default -
|
|
4065
|
+
*/
|
|
4066
|
+
/** {en}
|
|
4067
|
+
* @brief Callback fired when JSB `getDramaInfo` returns client-side timing.
|
|
4068
|
+
* @default -
|
|
4069
|
+
*/
|
|
4070
|
+
onGetDramaInfoPerf?: (payload: IGetDramaInfoPerfCallbackPayload) => void;
|
|
4071
|
+
/** {zh}
|
|
4072
|
+
* @brief 是否自动使用 `playAuthToken` 或短剧信息返回的字幕列表。
|
|
4073
|
+
* @default false
|
|
4074
|
+
*/
|
|
4075
|
+
autoSubtitle?: boolean;
|
|
4076
|
+
/** {zh}
|
|
4077
|
+
* @brief 自动字幕项格式化回调。返回字符串或数字时作为字幕名称;返回 `false` 或 `{ show: false }` 时不展示该项;返回 `{ isDefault: true }` 或 `{ default: true }` 时设为默认字幕。
|
|
4078
|
+
* @default -
|
|
4079
|
+
*/
|
|
4080
|
+
formatAutoSubtitleItem?: IAutoSubtitleItemFormatter;
|
|
3850
4081
|
/** {zh}
|
|
3851
4082
|
* @brief 视频加密类型
|
|
3852
4083
|
* @default -
|
|
@@ -4724,6 +4955,15 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
4724
4955
|
* @default 0
|
|
4725
4956
|
*/
|
|
4726
4957
|
oriErrMaxTotalRetry?: number;
|
|
4958
|
+
/** {zh}
|
|
4959
|
+
* @brief 是否在原生媒体错误时自动重试拉流。
|
|
4960
|
+
* @default true
|
|
4961
|
+
*/
|
|
4962
|
+
/** {en}
|
|
4963
|
+
* @brief Whether to automatically retry playback after native media errors.
|
|
4964
|
+
* @default true
|
|
4965
|
+
*/
|
|
4966
|
+
enableOriErrRetry?: boolean;
|
|
4727
4967
|
/** {zh}
|
|
4728
4968
|
* @brief 是否在重试耗尽后发起错误诊断请求,以细化错误码。
|
|
4729
4969
|
* @default true
|
|
@@ -5891,7 +6131,8 @@ export interface ApiMapConfig {
|
|
|
5891
6131
|
playDomain: string;
|
|
5892
6132
|
backupPlayDomain?: string;
|
|
5893
6133
|
}
|
|
5894
|
-
|
|
6134
|
+
/** UMD modules that can be loaded or explicitly pre-registered. */
|
|
6135
|
+
export declare enum UmdKeys {
|
|
5895
6136
|
HLS = "hls",
|
|
5896
6137
|
HLSJS = "hlsjs",
|
|
5897
6138
|
FLV = "flv",
|
|
@@ -5910,11 +6151,13 @@ declare enum UmdKeys {
|
|
|
5910
6151
|
Preloader = "preloader",
|
|
5911
6152
|
HLSjsPro = "hlsjsPro"
|
|
5912
6153
|
}
|
|
6154
|
+
/** Resolved UMD module values keyed by their public UMD key. */
|
|
6155
|
+
export declare type UmdModules = Partial<Record<UmdKeys, unknown>>;
|
|
5913
6156
|
/**
|
|
5914
6157
|
* @hidden
|
|
5915
|
-
* @breif umdmap
|
|
6158
|
+
* @breif umdmap 单项配置
|
|
5916
6159
|
*/
|
|
5917
|
-
export
|
|
6160
|
+
export interface UMDMapEntry {
|
|
5918
6161
|
/**
|
|
5919
6162
|
* umd Module 的名称,即在window下暴露的接口名称
|
|
5920
6163
|
*/
|
|
@@ -5931,10 +6174,20 @@ export declare type UMDMap = Record<UmdKeys, {
|
|
|
5931
6174
|
* npm包中umd入口文件路径,用于打包上传到cdn目录
|
|
5932
6175
|
*/
|
|
5933
6176
|
devPath: string;
|
|
5934
|
-
}
|
|
6177
|
+
}
|
|
6178
|
+
/**
|
|
6179
|
+
* @hidden
|
|
6180
|
+
* @breif umdmap 配置;精简构建可只提供其支持的依赖。
|
|
6181
|
+
*/
|
|
6182
|
+
export declare type UMDMap = Partial<Record<UmdKeys, UMDMapEntry>>;
|
|
5935
6183
|
declare class UMDLoader {
|
|
5936
6184
|
private static jsLoadMap;
|
|
5937
6185
|
private static jsLoadPromiseMap;
|
|
6186
|
+
private static registeredModules;
|
|
6187
|
+
/** 注册业务已打包的 UMD 模块,优先于缓存、window 全局和 script 加载。 */
|
|
6188
|
+
static registerModules(modules: UmdModules): void;
|
|
6189
|
+
/** 清除指定插件的加载缓存,使下次 loadPlugins 重新触发加载。 */
|
|
6190
|
+
clearPluginCache(pluginName: UmdKeys): void;
|
|
5938
6191
|
umdMap: UMDMap;
|
|
5939
6192
|
backupUmdUrlMap: Record<string, string>;
|
|
5940
6193
|
failCallback: (umdName: string, err: any) => any;
|
|
@@ -6036,6 +6289,129 @@ export declare class SdkPlugin {
|
|
|
6036
6289
|
*/
|
|
6037
6290
|
__destroy(): void;
|
|
6038
6291
|
}
|
|
6292
|
+
/**
|
|
6293
|
+
* @author bytedance
|
|
6294
|
+
* @version 1.0
|
|
6295
|
+
* @Description
|
|
6296
|
+
* @date 2024/12/16 17:59
|
|
6297
|
+
*/
|
|
6298
|
+
export declare const enum LangTextKey {
|
|
6299
|
+
NETWORK = "NETWORK",
|
|
6300
|
+
NETWORK_TIMEOUT = "NETWORK_TIMEOUT",
|
|
6301
|
+
NETWORK_FORBIDDEN = "NETWORK_FORBIDDEN",
|
|
6302
|
+
NETWORK_NOTFOUND = "NETWORK_NOTFOUND",
|
|
6303
|
+
NETWORK_RANGE_NOT_SATISFIABLE = "NETWORK_RANGE_NOT_SATISFIABLE",
|
|
6304
|
+
NETWORK_PROTOCOL = "NETWORK_PROTOCOL",
|
|
6305
|
+
NETWORK_URL_EXPIRE = "NETWORK_URL_EXPIRE",
|
|
6306
|
+
NETWORK_URL_SIGN = "NETWORK_URL_SIGN",
|
|
6307
|
+
NETWORK_ENCRYPT_HLS_ERR = "NETWORK_ENCRYPT_HLS_ERR",
|
|
6308
|
+
MEDIA_ERR = "MEDIA_ERR",
|
|
6309
|
+
MEDIA_ERR_ABORTED = "MEDIA_ERR_ABORTED",
|
|
6310
|
+
MEDIA_ERR_NETWORK = "MEDIA_ERR_NETWORK",
|
|
6311
|
+
MEDIA_ERR_DECODE = "MEDIA_ERR_DECODE",
|
|
6312
|
+
MEDIA_ERR_SRC_NOT_SUPPORTED = "MEDIA_ERR_SRC_NOT_SUPPORTED",
|
|
6313
|
+
MEDIA_ERR_NOT_SUPPORTED = "MEDIA_ERR_NOT_SUPPORTED",
|
|
6314
|
+
MEDIA_ERR_URL_EMPTY = "MEDIA_ERR_URL_EMPTY",
|
|
6315
|
+
MEDIA_ERR_FILE_NOT_SUPPORTED = "MEDIA_ERR_FILE_NOT_SUPPORTED",
|
|
6316
|
+
MEDIA_ERR_PLAY_ERR = "MEDIA_ERR_PLAY_ERR",
|
|
6317
|
+
MEDIA_SOURCE_CANNOT_PLAY_TYPE = "MEDIA_SOURCE_CANNOT_PLAY_TYPE",
|
|
6318
|
+
BUSINESS_DRM_NOT_SUPPORT = "BUSINESS_DRM_NOT_SUPPORT",
|
|
6319
|
+
BUSINESS_DRM_NOT_SUPPORT_UN_RECORD = "BUSINESS_DRM_NOT_SUPPORT_UN_RECORD",
|
|
6320
|
+
BUSINESS_DRM_LACK_MEDIA_KEY = "BUSINESS_DRM_LACK_MEDIA_KEY",
|
|
6321
|
+
BUSINESS_DRM_LACK_KEY_SESSION = "BUSINESS_DRM_LACK_KEY_SESSION",
|
|
6322
|
+
BUSINESS_DRM_GENERATE_REQUEST_FAIL = "BUSINESS_DRM_GENERATE_REQUEST_FAIL",
|
|
6323
|
+
BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH = "BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH",
|
|
6324
|
+
BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH = "BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH",
|
|
6325
|
+
BUSINESS_DRM_LICENSE_FAIL = "BUSINESS_DRM_LICENSE_FAIL",
|
|
6326
|
+
BUSINESS_DRM_KEY_ERROR = "BUSINESS_DRM_KEY_ERROR",
|
|
6327
|
+
BUSINESS_DRM_CERT_FAIL = "BUSINESS_DRM_CERT_FAIL",
|
|
6328
|
+
PRIVATE_DRM_KEY_GET_FAILED = "PRIVATE_DRM_KEY_GET_FAILED",
|
|
6329
|
+
PRIVATE_DRM_CRYPTO_NOT_SUPPORT = "PRIVATE_DRM_CRYPTO_NOT_SUPPORT",
|
|
6330
|
+
PRIVATE_DRM_RSA_FAIL = "PRIVATE_DRM_RSA_FAIL",
|
|
6331
|
+
OTHER = "OTHER",
|
|
6332
|
+
VOD_LOG_NOT_CONFIGURED = "VOD_LOG_NOT_CONFIGURED",
|
|
6333
|
+
PLAY_AUTH_TOKEN_EXPIRED = "PLAY_AUTH_TOKEN_EXPIRED",
|
|
6334
|
+
HLS_KEY_TOKEN_EXPIRED = "HLS_KEY_TOKEN_EXPIRED",
|
|
6335
|
+
THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED = "THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED",
|
|
6336
|
+
GET_PLAY_INFO_ERR = "GET_PLAY_INFO_ERR",
|
|
6337
|
+
GET_HLS_DECRYPTION_KEY_ERR = "GET_HLS_DECRYPTION_KEY_ERR",
|
|
6338
|
+
LICENSE_VALIDATE_FAIL = "LICENSE_VALIDATE_FAIL",
|
|
6339
|
+
DEFINITION_AUTO = "DEFINITION_AUTO",
|
|
6340
|
+
LICENSE_STATUS_INVALID = "LICENSE_STATUS_INVALID",
|
|
6341
|
+
LICENSE_STATUS_ERROR_DOMAIN_NOT_MATCH = "LICENSE_STATUS_ERROR_DOMAIN_NOT_MATCH",
|
|
6342
|
+
BASE_LICENSE_NOT_SUPPORT_265 = "BASE_LICENSE_NOT_SUPPORT_265",
|
|
6343
|
+
BASE_LICENSE_NOT_SUPPORT_ABR = "BASE_LICENSE_NOT_SUPPORT_ABR",
|
|
6344
|
+
BASE_LICENSE_NOT_SUPPORT_ADAPT_BUFFER = "BASE_LICENSE_NOT_SUPPORT_ADAPT_BUFFER",
|
|
6345
|
+
BASE_LICENSE_NOT_SUPPORT_PRELOAD = "BASE_LICENSE_NOT_SUPPORT_PRELOAD",
|
|
6346
|
+
EXPIRED_LICENSE_NOT_SUPPORT_265 = "EXPIRED_LICENSE_NOT_SUPPORT_265",
|
|
6347
|
+
EXPIRED_LICENSE_NOT_SUPPORT_ABR = "EXPIRED_LICENSE_NOT_SUPPORT_ABR",
|
|
6348
|
+
EXPIRED_LICENSE_NOT_SUPPORT_ADAPT_BUFFER = "EXPIRED_LICENSE_NOT_SUPPORT_ADAPT_BUFFER",
|
|
6349
|
+
EXPIRED_LICENSE_NOT_SUPPORT_PRELOAD = "EXPIRED_LICENSE_NOT_SUPPORT_PRELOAD",
|
|
6350
|
+
/** Short drama (Minis) errors — codes 93xx */
|
|
6351
|
+
DRAMA_INVALID_PARAM = "DRAMA_INVALID_PARAM",
|
|
6352
|
+
DRAMA_NO_INFO_FOUND = "DRAMA_NO_INFO_FOUND",
|
|
6353
|
+
DRAMA_NOT_SUBMITTED = "DRAMA_NOT_SUBMITTED",
|
|
6354
|
+
DRAMA_UNDER_REVIEW = "DRAMA_UNDER_REVIEW",
|
|
6355
|
+
DRAMA_FAILED_REVIEW = "DRAMA_FAILED_REVIEW",
|
|
6356
|
+
DRAMA_WITHDRAWN_REVIEW = "DRAMA_WITHDRAWN_REVIEW",
|
|
6357
|
+
DRAMA_FAILED_TO_QUERY = "DRAMA_FAILED_TO_QUERY",
|
|
6358
|
+
DRAMA_INVALID_TTOP_TOKEN = "DRAMA_INVALID_TTOP_TOKEN",
|
|
6359
|
+
DRAMA_NOT_ON_SHELF = "DRAMA_NOT_ON_SHELF",
|
|
6360
|
+
DRAMA_FAILED_GET_EPISODE_INFO = "DRAMA_FAILED_GET_EPISODE_INFO"
|
|
6361
|
+
}
|
|
6362
|
+
declare const DRAMA_ERROR_CODE: {
|
|
6363
|
+
/** 9301 - 短剧环境下参数不合法(如使用 url/playList 播放,或缺少 albumId / episodeId) */
|
|
6364
|
+
readonly INVALID_PARAM: {
|
|
6365
|
+
readonly code: 9301;
|
|
6366
|
+
readonly message: "Invalid parameter in short drama environment";
|
|
6367
|
+
readonly textKey: LangTextKey.DRAMA_INVALID_PARAM;
|
|
6368
|
+
};
|
|
6369
|
+
readonly NO_INFO_FOUND: {
|
|
6370
|
+
readonly code: 9302;
|
|
6371
|
+
readonly message: "No information found for this Episode";
|
|
6372
|
+
readonly textKey: LangTextKey.DRAMA_NO_INFO_FOUND;
|
|
6373
|
+
};
|
|
6374
|
+
readonly NOT_SUBMITTED: {
|
|
6375
|
+
readonly code: 9303;
|
|
6376
|
+
readonly message: "Episode not submitted for review";
|
|
6377
|
+
readonly textKey: LangTextKey.DRAMA_NOT_SUBMITTED;
|
|
6378
|
+
};
|
|
6379
|
+
readonly UNDER_REVIEW: {
|
|
6380
|
+
readonly code: 9304;
|
|
6381
|
+
readonly message: "Episode under for review";
|
|
6382
|
+
readonly textKey: LangTextKey.DRAMA_UNDER_REVIEW;
|
|
6383
|
+
};
|
|
6384
|
+
readonly FAILED_REVIEW: {
|
|
6385
|
+
readonly code: 9305;
|
|
6386
|
+
readonly message: "Episode failed review";
|
|
6387
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_REVIEW;
|
|
6388
|
+
};
|
|
6389
|
+
readonly WITHDRAWN_REVIEW: {
|
|
6390
|
+
readonly code: 9306;
|
|
6391
|
+
readonly message: "Episode withdrawn from review";
|
|
6392
|
+
readonly textKey: LangTextKey.DRAMA_WITHDRAWN_REVIEW;
|
|
6393
|
+
};
|
|
6394
|
+
readonly FAILED_TO_QUERY: {
|
|
6395
|
+
readonly code: 9307;
|
|
6396
|
+
readonly message: "Failed to query video playback information";
|
|
6397
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_TO_QUERY;
|
|
6398
|
+
};
|
|
6399
|
+
readonly INVALID_TTOP_TOKEN: {
|
|
6400
|
+
readonly code: 9308;
|
|
6401
|
+
readonly message: "Invalid playAuthToken or failed to verify TTOP token";
|
|
6402
|
+
readonly textKey: LangTextKey.DRAMA_INVALID_TTOP_TOKEN;
|
|
6403
|
+
};
|
|
6404
|
+
readonly NOT_ON_SHELF: {
|
|
6405
|
+
readonly code: 9310;
|
|
6406
|
+
readonly message: "Video is not on shelf";
|
|
6407
|
+
readonly textKey: LangTextKey.DRAMA_NOT_ON_SHELF;
|
|
6408
|
+
};
|
|
6409
|
+
readonly FAILED_GET_EPISODE_INFO: {
|
|
6410
|
+
readonly code: 9399;
|
|
6411
|
+
readonly message: "Failed get episode info";
|
|
6412
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_GET_EPISODE_INFO;
|
|
6413
|
+
};
|
|
6414
|
+
};
|
|
6039
6415
|
declare class AuthToken extends SdkPlugin {
|
|
6040
6416
|
static get pluginName(): string;
|
|
6041
6417
|
isPlayByToken: boolean;
|
|
@@ -6057,14 +6433,51 @@ declare class AuthToken extends SdkPlugin {
|
|
|
6057
6433
|
codec: ICodecType;
|
|
6058
6434
|
defaultDefinition: string;
|
|
6059
6435
|
}>;
|
|
6436
|
+
/**
|
|
6437
|
+
* 短剧 Minis 环境:通过 JSB getDramaInfo 获取媒体信息
|
|
6438
|
+
*/
|
|
6439
|
+
getDramaInfoViaJSB(): Promise<VideoInfoRes | undefined>;
|
|
6440
|
+
/**
|
|
6441
|
+
* 将审核状态映射到短剧错误码
|
|
6442
|
+
*/
|
|
6443
|
+
mapReviewStatusToErrorCode(status: number): keyof typeof DRAMA_ERROR_CODE;
|
|
6444
|
+
/**
|
|
6445
|
+
* 根据 JSB 返回的 msg 或 status 映射到错误码 key
|
|
6446
|
+
*/
|
|
6447
|
+
mapDramaErrorCode(msg: string, status?: number): keyof typeof DRAMA_ERROR_CODE;
|
|
6448
|
+
/**
|
|
6449
|
+
* 将 JSB 返回的 video_info 转换为 VideoInfoRes 格式
|
|
6450
|
+
*/
|
|
6451
|
+
transformDramaVideoInfoToRes(videoInfo: any, config: IPlayAuthTokenConfig): VideoInfoRes;
|
|
6452
|
+
callOnGetMediaInfo(mediaInfo: VideoInfoRes | undefined, fromCache: boolean): void;
|
|
6453
|
+
reportGetDramaInfoPerf(res: IJSBCallbackResult | undefined, request: {
|
|
6454
|
+
albumId?: string;
|
|
6455
|
+
episodeId?: string;
|
|
6456
|
+
vid?: string;
|
|
6457
|
+
}): void;
|
|
6060
6458
|
getVideos(): Promise<any>;
|
|
6061
6459
|
getPrivateDrmInfo(playList: Stream[], vid: string, streamType: string): Promise<void>;
|
|
6062
6460
|
getThumbnailConfig(thumbs: IThumbInfoItem[]): void;
|
|
6063
6461
|
getBarrageMaskUrl(url: string): void;
|
|
6462
|
+
setSubtitleConfig(mediaInfo: VideoInfoRes | undefined): void;
|
|
6463
|
+
getAutoSubtitleList(mediaInfo: VideoInfoRes): ISubTitleItem[];
|
|
6464
|
+
getSubtitleSourceData(mediaInfo: VideoInfoRes): any;
|
|
6465
|
+
getAutoSubtitleItem(item: any, index: number): ISubTitleItem | undefined;
|
|
6466
|
+
getStringAutoSubtitleItem(item: string, index: number): ISubTitleItem;
|
|
6467
|
+
getObjectAutoSubtitleItem(item: any, index: number): ISubTitleItem | undefined;
|
|
6468
|
+
formatAutoSubtitleItem(subtitleItem: ISubTitleItem, rawItem: any, index: number): ISubTitleItem | undefined;
|
|
6064
6469
|
getDrmConfig(videoInfo: IVideoInfo): void;
|
|
6470
|
+
/**
|
|
6471
|
+
* 是否处于短剧 Minis 环境(通过剧 ID + 剧集 ID 获取视频)
|
|
6472
|
+
*/
|
|
6473
|
+
get isMinisDramaMode(): boolean;
|
|
6065
6474
|
init(): void;
|
|
6066
6475
|
initConfig(getVideoByToken: IPlayAuthTokenConfig): void;
|
|
6067
|
-
/**
|
|
6476
|
+
/**
|
|
6477
|
+
* 剧集切换:configs 已由 player 更新 album_id/episode_id,重新拉取媒体信息
|
|
6478
|
+
*/
|
|
6479
|
+
updateDramaEpisode(isNewVideo: boolean): Promise<void>;
|
|
6480
|
+
/**
|
|
6068
6481
|
* @description 更新playAuthToken
|
|
6069
6482
|
* @param {IPlayAuthTokenConfig} getVideoByToken token信息
|
|
6070
6483
|
* @param {boolean} isNewVideo 是否新视频,即是否为切换视频
|
|
@@ -6186,9 +6599,7 @@ declare class PlayerData {
|
|
|
6186
6599
|
* @brief 私有加密会话id
|
|
6187
6600
|
*/
|
|
6188
6601
|
encryptSessionId?: string;
|
|
6189
|
-
constructor(configs: IPlayerConfig
|
|
6190
|
-
licensSupportModuleList: string[];
|
|
6191
|
-
}, sdk: VePlayer);
|
|
6602
|
+
constructor(configs: IPlayerConfig, sdk: VePlayer);
|
|
6192
6603
|
/**
|
|
6193
6604
|
* 初始化播放数据
|
|
6194
6605
|
* @param configs { IPlayerConfig } 播放器配置
|
|
@@ -6455,7 +6866,7 @@ export declare type IPreloadUpdateConfig = {
|
|
|
6455
6866
|
* @brief Preload video resource.
|
|
6456
6867
|
* @detail Options
|
|
6457
6868
|
*/
|
|
6458
|
-
export declare type
|
|
6869
|
+
export declare type IPreloadResolvedStream = {
|
|
6459
6870
|
/** {zh}
|
|
6460
6871
|
* @brief 视频 ID
|
|
6461
6872
|
*/
|
|
@@ -6513,92 +6924,291 @@ export declare type IPreloadStream = {
|
|
|
6513
6924
|
*/
|
|
6514
6925
|
size: number;
|
|
6515
6926
|
};
|
|
6516
|
-
export type
|
|
6927
|
+
export declare type IPreloadDramaStream = {
|
|
6928
|
+
vid?: string;
|
|
6929
|
+
albumId: string;
|
|
6930
|
+
episodeId: string;
|
|
6931
|
+
defaultDefinition?: string;
|
|
6932
|
+
getVideoByToken?: IPlayAuthTokenConfig;
|
|
6933
|
+
};
|
|
6934
|
+
export declare type IPreloadAuthTokenStream = {
|
|
6935
|
+
vid?: string;
|
|
6936
|
+
defaultDefinition?: string;
|
|
6937
|
+
getVideoByToken: IPlayAuthTokenConfig;
|
|
6938
|
+
};
|
|
6939
|
+
export declare type IPreloadStream = IPreloadResolvedStream | IPreloadDramaStream | IPreloadAuthTokenStream;
|
|
6517
6940
|
/** {zh}
|
|
6518
|
-
* @
|
|
6519
|
-
*
|
|
6520
|
-
* @
|
|
6941
|
+
* @list Options
|
|
6942
|
+
* @brief 字幕项。
|
|
6943
|
+
* @kind property
|
|
6521
6944
|
*/
|
|
6522
6945
|
/** {en}
|
|
6523
|
-
* @
|
|
6524
|
-
* @brief
|
|
6525
|
-
* @
|
|
6946
|
+
* @list Options
|
|
6947
|
+
* @brief Subtitle item.
|
|
6948
|
+
* @kind property
|
|
6526
6949
|
*/
|
|
6527
|
-
export
|
|
6950
|
+
export interface ISubTitleItem {
|
|
6528
6951
|
/** {zh}
|
|
6529
|
-
* @brief
|
|
6952
|
+
* @brief 字幕语言。
|
|
6953
|
+
* @default -
|
|
6530
6954
|
*/
|
|
6531
6955
|
/** {en}
|
|
6532
|
-
* @brief
|
|
6956
|
+
* @brief Subtitle language.
|
|
6957
|
+
* @default -
|
|
6533
6958
|
*/
|
|
6534
|
-
|
|
6959
|
+
language?: string | number;
|
|
6535
6960
|
/** {zh}
|
|
6536
|
-
* @brief
|
|
6961
|
+
* @brief 字幕 ID。
|
|
6962
|
+
* @default -
|
|
6537
6963
|
*/
|
|
6538
6964
|
/** {en}
|
|
6539
|
-
* @brief
|
|
6965
|
+
* @brief Subtitle ID.
|
|
6966
|
+
* @default -
|
|
6540
6967
|
*/
|
|
6541
|
-
|
|
6542
|
-
} & VeStrategyH265Config;
|
|
6543
|
-
/** {zh}
|
|
6544
|
-
* 预加载初始配置
|
|
6545
|
-
* @detail Options
|
|
6546
|
-
*/
|
|
6547
|
-
/** {en}
|
|
6548
|
-
* @brief Preload initial configuration.
|
|
6549
|
-
* @detail Options
|
|
6550
|
-
*/
|
|
6551
|
-
export declare type IPreloadConfig = {
|
|
6968
|
+
id?: number | string;
|
|
6552
6969
|
/** {zh}
|
|
6553
|
-
*
|
|
6554
|
-
*
|
|
6555
|
-
* - 1:字段执行
|
|
6556
|
-
* @default 0
|
|
6970
|
+
* @brief 是否为默认选择的字幕。
|
|
6971
|
+
* @default false
|
|
6557
6972
|
*/
|
|
6558
6973
|
/** {en}
|
|
6559
|
-
* @brief
|
|
6560
|
-
*
|
|
6561
|
-
* - 1: automatic execution
|
|
6562
|
-
* @default 0
|
|
6974
|
+
* @brief Whether this is the default selected subtitle.
|
|
6975
|
+
* @default false
|
|
6563
6976
|
*/
|
|
6564
|
-
|
|
6977
|
+
isDefault?: boolean;
|
|
6565
6978
|
/** {zh}
|
|
6566
|
-
* @brief
|
|
6567
|
-
* -
|
|
6568
|
-
* - hls: hls格式
|
|
6569
|
-
* @default mp4
|
|
6979
|
+
* @brief 字幕名称。
|
|
6980
|
+
* @default -
|
|
6570
6981
|
*/
|
|
6571
6982
|
/** {en}
|
|
6572
|
-
* @brief
|
|
6573
|
-
* @default
|
|
6983
|
+
* @brief Subtitle display name.
|
|
6984
|
+
* @default -
|
|
6574
6985
|
*/
|
|
6575
|
-
|
|
6986
|
+
text?: string;
|
|
6576
6987
|
/** {zh}
|
|
6577
|
-
*
|
|
6578
|
-
* @default
|
|
6579
|
-
* @brief 向前预加载视频个数。Feed 流场景时生效。
|
|
6988
|
+
* @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
|
|
6989
|
+
* @default -
|
|
6580
6990
|
*/
|
|
6581
6991
|
/** {en}
|
|
6582
|
-
* @brief
|
|
6583
|
-
* @default
|
|
6992
|
+
* @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
|
|
6993
|
+
* @default -
|
|
6584
6994
|
*/
|
|
6585
|
-
|
|
6995
|
+
label?: string | number;
|
|
6586
6996
|
/** {zh}
|
|
6587
|
-
* @brief
|
|
6588
|
-
* @default
|
|
6997
|
+
* @brief 外挂字幕 URL 地址。
|
|
6998
|
+
* @default -
|
|
6589
6999
|
*/
|
|
6590
7000
|
/** {en}
|
|
6591
|
-
* @brief
|
|
6592
|
-
* @default
|
|
7001
|
+
* @brief External subtitle URL.
|
|
7002
|
+
* @default -
|
|
6593
7003
|
*/
|
|
6594
|
-
|
|
6595
|
-
/**
|
|
6596
|
-
* @
|
|
6597
|
-
* @
|
|
7004
|
+
url?: string;
|
|
7005
|
+
/**
|
|
7006
|
+
* @hidden
|
|
7007
|
+
* @type {string}
|
|
7008
|
+
* @memberof ISubTitleItem
|
|
6598
7009
|
*/
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
* @
|
|
7010
|
+
stringContent?: string;
|
|
7011
|
+
/** {zh}
|
|
7012
|
+
* @brief 字幕内容列表。非 `url` 形式时使用。
|
|
7013
|
+
* @default -
|
|
7014
|
+
* @type {Array<Object>}
|
|
7015
|
+
* @memberof ISubTitleItem
|
|
7016
|
+
*/
|
|
7017
|
+
/** {en}
|
|
7018
|
+
* @brief Subtitle content list when not using URL.
|
|
7019
|
+
* @default -
|
|
7020
|
+
* @type {Array<Object>}
|
|
7021
|
+
* @memberof ISubTitleItem
|
|
7022
|
+
*/
|
|
7023
|
+
list?: IListItem[];
|
|
7024
|
+
}
|
|
7025
|
+
/** {zh}
|
|
7026
|
+
* @brief 字幕内容项。
|
|
7027
|
+
* @list Options
|
|
7028
|
+
* @kind property
|
|
7029
|
+
* @export
|
|
7030
|
+
* @interface IListItem
|
|
7031
|
+
*/
|
|
7032
|
+
/** {en}
|
|
7033
|
+
* @brief Subtitle content item.
|
|
7034
|
+
* @list Options
|
|
7035
|
+
* @kind property
|
|
7036
|
+
* @export
|
|
7037
|
+
* @interface IListItem
|
|
7038
|
+
*/
|
|
7039
|
+
export interface IListItem {
|
|
7040
|
+
/** {zh}
|
|
7041
|
+
* @brief 开始时间,单位为秒。
|
|
7042
|
+
* @type {number}
|
|
7043
|
+
*/
|
|
7044
|
+
/** {en}
|
|
7045
|
+
* @brief Start time in seconds.
|
|
7046
|
+
* @type {number}
|
|
7047
|
+
*/
|
|
7048
|
+
start: number;
|
|
7049
|
+
/** {zh}
|
|
7050
|
+
* @brief 结束时间,单位为秒。
|
|
7051
|
+
* @type {number}
|
|
7052
|
+
*/
|
|
7053
|
+
/** {en}
|
|
7054
|
+
* @brief End time in seconds.
|
|
7055
|
+
* @type {number}
|
|
7056
|
+
*/
|
|
7057
|
+
end: number;
|
|
7058
|
+
/** {zh}
|
|
7059
|
+
* @brief 字幕数据列表。
|
|
7060
|
+
* @type {Array<ITextItem>}
|
|
7061
|
+
*/
|
|
7062
|
+
/** {en}
|
|
7063
|
+
* @brief Subtitle cue data list.
|
|
7064
|
+
* @type {Array<ITextItem>}
|
|
7065
|
+
*/
|
|
7066
|
+
list: Array<ITextItem>;
|
|
7067
|
+
/**
|
|
7068
|
+
* @hidden
|
|
7069
|
+
* @type {any}
|
|
7070
|
+
*/
|
|
7071
|
+
[propName: string]: any;
|
|
7072
|
+
}
|
|
7073
|
+
/** {zh}
|
|
7074
|
+
* @brief 字幕文案配置。
|
|
7075
|
+
* @list Options
|
|
7076
|
+
* @kind property
|
|
7077
|
+
*/
|
|
7078
|
+
/** {en}
|
|
7079
|
+
* @brief Subtitle text item configuration.
|
|
7080
|
+
* @list Options
|
|
7081
|
+
* @kind property
|
|
7082
|
+
*/
|
|
7083
|
+
export interface ITextItem {
|
|
7084
|
+
/**
|
|
7085
|
+
* @hidden
|
|
7086
|
+
* @type {any}
|
|
7087
|
+
*/
|
|
7088
|
+
[propName: string]: any;
|
|
7089
|
+
/** {zh}
|
|
7090
|
+
* @brief 开始时间,单位为秒。
|
|
7091
|
+
* @type {number}
|
|
7092
|
+
*/
|
|
7093
|
+
/** {en}
|
|
7094
|
+
* @brief Start time in seconds.
|
|
7095
|
+
* @type {number}
|
|
7096
|
+
*/
|
|
7097
|
+
start: number;
|
|
7098
|
+
/** {zh}
|
|
7099
|
+
* @brief 结束时间,单位为秒。
|
|
7100
|
+
* @type {number}
|
|
7101
|
+
*/
|
|
7102
|
+
/** {en}
|
|
7103
|
+
* @brief End time in seconds.
|
|
7104
|
+
* @type {number}
|
|
7105
|
+
*/
|
|
7106
|
+
end: number;
|
|
7107
|
+
/** {zh}
|
|
7108
|
+
* @brief 字幕文案数组。
|
|
7109
|
+
* @type {string[]}
|
|
7110
|
+
*/
|
|
7111
|
+
/** {en}
|
|
7112
|
+
* @brief Subtitle text array.
|
|
7113
|
+
* @type {string[]}
|
|
7114
|
+
*/
|
|
7115
|
+
text: string[];
|
|
7116
|
+
/** {zh}
|
|
7117
|
+
* @brief 字幕顺序。
|
|
7118
|
+
* @type {number}
|
|
7119
|
+
*/
|
|
7120
|
+
/** {en}
|
|
7121
|
+
* @brief Subtitle display order.
|
|
7122
|
+
* @type {number}
|
|
7123
|
+
*/
|
|
7124
|
+
index?: number;
|
|
7125
|
+
}
|
|
7126
|
+
export type TLogChannel = "cn" | "va" | "sg";
|
|
7127
|
+
/** {zh}
|
|
7128
|
+
* @hidden
|
|
7129
|
+
* h265策略配置
|
|
7130
|
+
* @detail Options
|
|
7131
|
+
*/
|
|
7132
|
+
/** {en}
|
|
7133
|
+
* @hidden
|
|
7134
|
+
* @brief H.265 strategy configuration.
|
|
7135
|
+
* @detail Options
|
|
7136
|
+
*/
|
|
7137
|
+
export declare type IH265Config = {
|
|
7138
|
+
/** {zh}
|
|
7139
|
+
* @brief h265策略依赖Module
|
|
7140
|
+
*/
|
|
7141
|
+
/** {en}
|
|
7142
|
+
* @brief H.265 strategy dependency module.
|
|
7143
|
+
*/
|
|
7144
|
+
Strategy?: any;
|
|
7145
|
+
/** {zh}
|
|
7146
|
+
* @brief 是否禁用265策略
|
|
7147
|
+
*/
|
|
7148
|
+
/** {en}
|
|
7149
|
+
* @brief Whether to disable the H.265 strategy.
|
|
7150
|
+
*/
|
|
7151
|
+
disabled?: boolean;
|
|
7152
|
+
} & VeStrategyH265Config;
|
|
7153
|
+
/** {zh}
|
|
7154
|
+
* 预加载初始配置
|
|
7155
|
+
* @detail Options
|
|
7156
|
+
*/
|
|
7157
|
+
/** {en}
|
|
7158
|
+
* @brief Preload initial configuration.
|
|
7159
|
+
* @detail Options
|
|
7160
|
+
*/
|
|
7161
|
+
export declare type IPreloadConfig = {
|
|
7162
|
+
/** {zh}
|
|
7163
|
+
* 预加载场景
|
|
7164
|
+
* - 0:手动执行
|
|
7165
|
+
* - 1:字段执行
|
|
7166
|
+
* @default 0
|
|
7167
|
+
*/
|
|
7168
|
+
/** {en}
|
|
7169
|
+
* @brief Preload scene.
|
|
7170
|
+
* - 0: manual execution
|
|
7171
|
+
* - 1: automatic execution
|
|
7172
|
+
* @default 0
|
|
7173
|
+
*/
|
|
7174
|
+
preloadScene?: PreloadScene;
|
|
7175
|
+
/** {zh}
|
|
7176
|
+
* @brief 视频格式
|
|
7177
|
+
* - mp4: mp4格式
|
|
7178
|
+
* - hls: hls格式
|
|
7179
|
+
* @default mp4
|
|
7180
|
+
*/
|
|
7181
|
+
/** {en}
|
|
7182
|
+
* @brief Video format.
|
|
7183
|
+
* @default mp4
|
|
7184
|
+
*/
|
|
7185
|
+
format?: PreloadFormat;
|
|
7186
|
+
/** {zh}
|
|
7187
|
+
* 向前预加载视频个数,Feed流场景时生效
|
|
7188
|
+
* @default 1
|
|
7189
|
+
* @brief 向前预加载视频个数。Feed 流场景时生效。
|
|
7190
|
+
*/
|
|
7191
|
+
/** {en}
|
|
7192
|
+
* @brief Number of videos to preload ahead. Effective in Feed scenarios.
|
|
7193
|
+
* @default 1
|
|
7194
|
+
*/
|
|
7195
|
+
prevCount?: number;
|
|
7196
|
+
/** {zh}
|
|
7197
|
+
* @brief 向后预加载视频个数。Feed 流场景生效
|
|
7198
|
+
* @default 2
|
|
7199
|
+
*/
|
|
7200
|
+
/** {en}
|
|
7201
|
+
* @brief Number of videos to preload behind. Effective in Feed scenarios.
|
|
7202
|
+
* @default 2
|
|
7203
|
+
*/
|
|
7204
|
+
nextCount?: number;
|
|
7205
|
+
/** {zh}
|
|
7206
|
+
* @brief 单个视频预加载时长
|
|
7207
|
+
* @default 5
|
|
7208
|
+
*/
|
|
7209
|
+
/** {en}
|
|
7210
|
+
* @brief Preload duration per video (seconds).
|
|
7211
|
+
* @default 5
|
|
6602
7212
|
*/
|
|
6603
7213
|
preloadTime?: number;
|
|
6604
7214
|
/** {zh}
|
|
@@ -6750,8 +7360,8 @@ export declare type StrategyInitOptions = {
|
|
|
6750
7360
|
Module?: typeof VeStrategy;
|
|
6751
7361
|
};
|
|
6752
7362
|
declare class VeStrategyManager {
|
|
6753
|
-
tea:
|
|
6754
|
-
private
|
|
7363
|
+
tea: InstanceType<CollectorConstructor> | undefined;
|
|
7364
|
+
private collector;
|
|
6755
7365
|
teaId: number;
|
|
6756
7366
|
teaChannel: TLogChannel;
|
|
6757
7367
|
private sdkUmdLoader;
|
|
@@ -6811,6 +7421,62 @@ export interface ILicenseConfig {
|
|
|
6811
7421
|
expireDiffTime?: number;
|
|
6812
7422
|
expireCallback?: (expireDiffTime?: number) => void;
|
|
6813
7423
|
}
|
|
7424
|
+
export declare type MediaInfoCacheType = "memory" | "localStorage";
|
|
7425
|
+
/** {zh}
|
|
7426
|
+
* @brief 媒体信息本地缓存配置。
|
|
7427
|
+
* @list Options
|
|
7428
|
+
* @kind property
|
|
7429
|
+
*/
|
|
7430
|
+
/** {en}
|
|
7431
|
+
* @brief Local media info cache config.
|
|
7432
|
+
* @list Options
|
|
7433
|
+
* @kind property
|
|
7434
|
+
*/
|
|
7435
|
+
export interface MediaInfoCacheConfig {
|
|
7436
|
+
/** {zh}
|
|
7437
|
+
* @brief 是否启用媒体信息本地缓存。默认关闭。
|
|
7438
|
+
* @default false
|
|
7439
|
+
*/
|
|
7440
|
+
/** {en}
|
|
7441
|
+
* @brief Whether to enable local media info cache. Disabled by default.
|
|
7442
|
+
* @default false
|
|
7443
|
+
*/
|
|
7444
|
+
enable?: boolean;
|
|
7445
|
+
/** {zh}
|
|
7446
|
+
* @brief 缓存方式。默认使用内存缓存,设置为 localStorage 时写入浏览器本地存储。
|
|
7447
|
+
* @default memory
|
|
7448
|
+
*/
|
|
7449
|
+
/** {en}
|
|
7450
|
+
* @brief Cache storage type. Memory cache is used by default. Set to localStorage to write browser local storage.
|
|
7451
|
+
* @default memory
|
|
7452
|
+
*/
|
|
7453
|
+
cacheType?: MediaInfoCacheType;
|
|
7454
|
+
/** {zh}
|
|
7455
|
+
* @brief 缓存过期时间,单位毫秒。默认 30 分钟。
|
|
7456
|
+
* @default 1800000
|
|
7457
|
+
*/
|
|
7458
|
+
/** {en}
|
|
7459
|
+
* @brief Cache expiration time in milliseconds. Defaults to 30 minutes.
|
|
7460
|
+
* @default 1800000
|
|
7461
|
+
*/
|
|
7462
|
+
expireTime?: number;
|
|
7463
|
+
/** {zh}
|
|
7464
|
+
* @brief 最多缓存的媒体信息条数,默认 100。
|
|
7465
|
+
* @default 100
|
|
7466
|
+
*/
|
|
7467
|
+
/** {en}
|
|
7468
|
+
* @brief Maximum number of media info entries to cache. Defaults to 100.
|
|
7469
|
+
* @default 100
|
|
7470
|
+
*/
|
|
7471
|
+
maxEntries?: number;
|
|
7472
|
+
}
|
|
7473
|
+
export declare type NormalizedMediaInfoCacheConfig = {
|
|
7474
|
+
enable: boolean;
|
|
7475
|
+
expireTime: number;
|
|
7476
|
+
cacheType: MediaInfoCacheType;
|
|
7477
|
+
maxEntries: number;
|
|
7478
|
+
};
|
|
7479
|
+
declare function getMediaInfoCacheConfig(): NormalizedMediaInfoCacheConfig;
|
|
6814
7480
|
/** {zh}
|
|
6815
7481
|
* @hidden
|
|
6816
7482
|
*/
|
|
@@ -6863,6 +7529,10 @@ export interface EncryptInfo {
|
|
|
6863
7529
|
unionInfo: string;
|
|
6864
7530
|
}
|
|
6865
7531
|
declare class VePlayer {
|
|
7532
|
+
/**
|
|
7533
|
+
* 注册业务已打包的 UMD 模块,供所有后续创建的播放器共享使用。
|
|
7534
|
+
*/
|
|
7535
|
+
static registerModules(modules: UmdModules): void;
|
|
6866
7536
|
/** {zh}
|
|
6867
7537
|
* @brief 播放相关配置数据
|
|
6868
7538
|
* @hidden
|
|
@@ -6946,6 +7616,18 @@ declare class VePlayer {
|
|
|
6946
7616
|
private _suppressAudioTrackMemoryTimer;
|
|
6947
7617
|
/** playNext 后置为 true,直到新视频首个 addtrack 到达前屏蔽旧视频 change 事件的干扰 */
|
|
6948
7618
|
private _playNextPending;
|
|
7619
|
+
/**
|
|
7620
|
+
* @hidden
|
|
7621
|
+
* createPlayer 阶段耗时采集器(仅在 createPlayer 执行期间存在)
|
|
7622
|
+
*/
|
|
7623
|
+
_createPlayerPerf?: CreatePlayerPerfCollector;
|
|
7624
|
+
/**
|
|
7625
|
+
* @hidden
|
|
7626
|
+
* 最近一次 createPlayer 性能报告
|
|
7627
|
+
*/
|
|
7628
|
+
private _lastCreatePlayerPerfReport?;
|
|
7629
|
+
private _isCollectingCreatePlayerPerf;
|
|
7630
|
+
private _getDramaInfoPerfRecords;
|
|
6949
7631
|
/**
|
|
6950
7632
|
*
|
|
6951
7633
|
*
|
|
@@ -6988,6 +7670,22 @@ declare class VePlayer {
|
|
|
6988
7670
|
* @memberof VePlayer
|
|
6989
7671
|
*/
|
|
6990
7672
|
delayError: any[];
|
|
7673
|
+
/** {zh}
|
|
7674
|
+
* @brief 设置是否为通过短剧信息或 playAuthToken 获取到的视频地址追加时间戳 query(t=Date.now())。
|
|
7675
|
+
* @param enable true=追加时间戳,false=不追加
|
|
7676
|
+
*/
|
|
7677
|
+
/** {en}
|
|
7678
|
+
* @brief Set whether to append a timestamp query (t=Date.now()) to video URLs from drama info or playAuthToken.
|
|
7679
|
+
* @param enable true=append timestamp, false=do not append
|
|
7680
|
+
*/
|
|
7681
|
+
static setAppendVideoUrlTimestamp(enable?: boolean): void;
|
|
7682
|
+
/** {zh}
|
|
7683
|
+
* @hidden
|
|
7684
|
+
*/
|
|
7685
|
+
/** {en}
|
|
7686
|
+
* @hidden
|
|
7687
|
+
*/
|
|
7688
|
+
static getAppendVideoUrlTimestamp(): boolean;
|
|
6991
7689
|
/**
|
|
6992
7690
|
* @hidden
|
|
6993
7691
|
* umd加载器
|
|
@@ -7003,7 +7701,6 @@ declare class VePlayer {
|
|
|
7003
7701
|
/**
|
|
7004
7702
|
* @hidden
|
|
7005
7703
|
*/
|
|
7006
|
-
static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
|
|
7007
7704
|
/**
|
|
7008
7705
|
* @hidden
|
|
7009
7706
|
*/
|
|
@@ -7019,6 +7716,62 @@ declare class VePlayer {
|
|
|
7019
7716
|
* @memberof VePlayer
|
|
7020
7717
|
*/
|
|
7021
7718
|
static sdkVersion: string;
|
|
7719
|
+
/**
|
|
7720
|
+
* @brief TT短剧环境配置
|
|
7721
|
+
* @type {ITTDramaEnv | null}
|
|
7722
|
+
* @memberof VePlayer
|
|
7723
|
+
*/
|
|
7724
|
+
static ttDramaEnv: ITTDramaEnv | null;
|
|
7725
|
+
/** {zh}
|
|
7726
|
+
* @brief 设置TT短剧播放环境
|
|
7727
|
+
* @param env 短剧环境配置,详情见{@link ITTDramaEnv}
|
|
7728
|
+
*/
|
|
7729
|
+
static setTTDramaEnv(env: ITTDramaEnv): void;
|
|
7730
|
+
/** {zh}
|
|
7731
|
+
* @brief 设置媒体信息本地缓存配置,默认关闭。开启后,通过短剧信息或 playAuthToken 获取媒体信息时优先使用缓存。
|
|
7732
|
+
* @param config 缓存配置
|
|
7733
|
+
*/
|
|
7734
|
+
/** {en}
|
|
7735
|
+
* @brief Set the local media info cache config. It is disabled by default. When enabled, media info from drama info or playAuthToken prefers cached data.
|
|
7736
|
+
* @param config Cache config
|
|
7737
|
+
*/
|
|
7738
|
+
static setMediaInfoCacheConfig(config: MediaInfoCacheConfig): void;
|
|
7739
|
+
/** {zh}
|
|
7740
|
+
* @brief 获取当前媒体信息本地缓存配置。
|
|
7741
|
+
* @returns 当前媒体信息缓存配置。
|
|
7742
|
+
*/
|
|
7743
|
+
/** {en}
|
|
7744
|
+
* @brief Get current local media info cache config.
|
|
7745
|
+
* @returns Current media info cache config.
|
|
7746
|
+
*/
|
|
7747
|
+
static getMediaInfoCacheConfig(): ReturnType<typeof getMediaInfoCacheConfig>;
|
|
7748
|
+
/** {zh}
|
|
7749
|
+
* @brief 清除媒体信息缓存,会同时清除内存缓存和 localStorage 缓存。
|
|
7750
|
+
*/
|
|
7751
|
+
/** {en}
|
|
7752
|
+
* @brief Clear media info cache from both memory cache and localStorage cache.
|
|
7753
|
+
*/
|
|
7754
|
+
static clearMediaInfoCache(): void;
|
|
7755
|
+
/** {zh}
|
|
7756
|
+
* @brief 设置全局日志开关。开启后会输出 VE_DEBUG.log 级别日志。
|
|
7757
|
+
* @param enable 是否开启详细日志
|
|
7758
|
+
*/
|
|
7759
|
+
/** {en}
|
|
7760
|
+
* @brief Set the global log switch. When enabled, VE_DEBUG.log level logs are printed.
|
|
7761
|
+
* @param enable Whether to enable verbose logs
|
|
7762
|
+
*/
|
|
7763
|
+
static setDebug(enable: boolean): void;
|
|
7764
|
+
/** {zh}
|
|
7765
|
+
* @brief 设置可选的 Tea Collector 构造函数。传入 undefined 可清除后续实例的注册。
|
|
7766
|
+
* @param Collector Tea Collector 构造函数
|
|
7767
|
+
*/
|
|
7768
|
+
/** {en}
|
|
7769
|
+
* @brief Set the optional Tea Collector constructor. Pass undefined to clear it for subsequent instances.
|
|
7770
|
+
* @param Collector Tea Collector constructor
|
|
7771
|
+
*/
|
|
7772
|
+
static setCollector(Collector?: CollectorConstructor): void;
|
|
7773
|
+
/** @hidden 短剧 Minis 环境与 Lite 构建均不执行 License 校验。 */
|
|
7774
|
+
private static shouldCheckLicense;
|
|
7022
7775
|
/**
|
|
7023
7776
|
* @hidden
|
|
7024
7777
|
*/
|
|
@@ -7068,7 +7821,7 @@ declare class VePlayer {
|
|
|
7068
7821
|
/** {en}
|
|
7069
7822
|
* @brief Add videos to the preload list.
|
|
7070
7823
|
*/
|
|
7071
|
-
static addPreloadList(list: IPreloadStream[]): void
|
|
7824
|
+
static addPreloadList(list: IPreloadStream[]): Promise<void>;
|
|
7072
7825
|
/** {zh}
|
|
7073
7826
|
* @brief 设置待预加载视频列表,替换当前已设置的待预加载列表
|
|
7074
7827
|
* @param list 待预加载视频列表,详情见{@link IPreloadStream[]}
|
|
@@ -7089,9 +7842,7 @@ declare class VePlayer {
|
|
|
7089
7842
|
* @param codec
|
|
7090
7843
|
* @param options
|
|
7091
7844
|
*/
|
|
7092
|
-
static
|
|
7093
|
-
targetProfileLevel?: string;
|
|
7094
|
-
}) => Promise<boolean>;
|
|
7845
|
+
static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
|
|
7095
7846
|
static setLicenseConfig(config: ILicenseConfig): Promise<void>;
|
|
7096
7847
|
static checkLicense(): Promise<LicenseEdition>;
|
|
7097
7848
|
static checkModuleList(): Promise<string[]>;
|
|
@@ -7126,6 +7877,8 @@ declare class VePlayer {
|
|
|
7126
7877
|
* @brief Constructor.
|
|
7127
7878
|
*/
|
|
7128
7879
|
constructor(configs: IPlayerConfig);
|
|
7880
|
+
/** @hidden */
|
|
7881
|
+
assertLiteConfig(config?: Partial<IPlayerConfig>): void;
|
|
7129
7882
|
/**
|
|
7130
7883
|
*
|
|
7131
7884
|
* @hidden
|
|
@@ -7344,6 +8097,28 @@ declare class VePlayer {
|
|
|
7344
8097
|
* @memberof VePlayer
|
|
7345
8098
|
*/
|
|
7346
8099
|
beforePlayerCreate(): Promise<void>;
|
|
8100
|
+
/** {zh}
|
|
8101
|
+
* @hidden
|
|
8102
|
+
* @brief 获取最近一次 createPlayer 的性能报告。
|
|
8103
|
+
*/
|
|
8104
|
+
/** {en}
|
|
8105
|
+
* @hidden
|
|
8106
|
+
* @brief Get the perf report of the latest createPlayer.
|
|
8107
|
+
*/
|
|
8108
|
+
getCreatePlayerPerfReport(): ICreatePlayerPerfReport;
|
|
8109
|
+
/**
|
|
8110
|
+
* @brief 记录一次 JSB getDramaInfo 返回的客户端耗时信息。
|
|
8111
|
+
*/
|
|
8112
|
+
recordGetDramaInfoPerf(payload: IGetDramaInfoPerfCallbackPayload): void;
|
|
8113
|
+
/**
|
|
8114
|
+
* @brief 获取当前播放器实例记录到的 getDramaInfo 客户端耗时列表。
|
|
8115
|
+
*/
|
|
8116
|
+
getDramaInfoPerfRecords(): IGetDramaInfoPerfCallbackPayload[];
|
|
8117
|
+
/**
|
|
8118
|
+
* @brief 获取最近一次 getDramaInfo 客户端耗时。
|
|
8119
|
+
*/
|
|
8120
|
+
getLastDramaInfoPerf(): IGetDramaInfoPerfCallbackPayload | undefined;
|
|
8121
|
+
private _markGetDramaInfoClientPerf;
|
|
7347
8122
|
private prepareStrategies;
|
|
7348
8123
|
/**
|
|
7349
8124
|
* @hidden
|
|
@@ -7390,6 +8165,7 @@ declare class VePlayer {
|
|
|
7390
8165
|
* @memberof VePlayer
|
|
7391
8166
|
*/
|
|
7392
8167
|
private _bindPlayerEvents;
|
|
8168
|
+
private _onMp4PreloadInfo;
|
|
7393
8169
|
private _proxyError;
|
|
7394
8170
|
private _onError;
|
|
7395
8171
|
/** {zh}
|
|
@@ -7567,7 +8343,7 @@ declare class VePlayer {
|
|
|
7567
8343
|
* @memberof VePlayer
|
|
7568
8344
|
* @notes - 成功更换视频源后,默认是暂停状态。如果设置了自动播放,则会自动播放。
|
|
7569
8345
|
* - 此接口不支持切换火山引擎私有加密视频。
|
|
7570
|
-
* @param config
|
|
8346
|
+
* @param config 播放器实例化配置
|
|
7571
8347
|
* @param isNewVideo 是否为新视频。为 `false` 时,更换后,会从更换前的时间点继续播放。
|
|
7572
8348
|
*/
|
|
7573
8349
|
/** {en}
|
|
@@ -7576,7 +8352,14 @@ declare class VePlayer {
|
|
|
7576
8352
|
* @memberof VePlayer
|
|
7577
8353
|
*/
|
|
7578
8354
|
playNext(config: IPlayerConfig, isNewVideo?: boolean): Promise<any>;
|
|
8355
|
+
private updatePlayNextSubtitleConfig;
|
|
7579
8356
|
private _playNext;
|
|
8357
|
+
/** 从 playerData.configs 取出短剧 id,供 XGPlayer setConfig / playNext 与切换后 configs 一致 */
|
|
8358
|
+
private _getDramaConfigPatchForPlayer;
|
|
8359
|
+
private _buildDramaInvalidParamError;
|
|
8360
|
+
private _getDramaAlbumIdFromConfig;
|
|
8361
|
+
private _getDramaEpisodeIdFromConfig;
|
|
8362
|
+
private switchDramaEpisode;
|
|
7580
8363
|
/** {zh}
|
|
7581
8364
|
* @brief 销毁xgplayer实例
|
|
7582
8365
|
*
|
|
@@ -7926,6 +8709,32 @@ declare class VePlayer {
|
|
|
7926
8709
|
* @brief Get a plugin instance.
|
|
7927
8710
|
*/
|
|
7928
8711
|
getPlugin(pluginName: string): null | BasePlugin;
|
|
8712
|
+
/** {zh}
|
|
8713
|
+
* @brief 获取字幕列表。需配置 `Subtitle` 插件后调用。
|
|
8714
|
+
* @return 当前字幕列表,每项包含 `id`、`language`、`text`(显示名称)等字段。列表为空时返回空数组。
|
|
8715
|
+
* @memberof VePlayer
|
|
8716
|
+
*/
|
|
8717
|
+
getSubtitleList(): ISubTitleItem[];
|
|
8718
|
+
/** {zh}
|
|
8719
|
+
* @brief 切换字幕。需配置 `Subtitle` 插件后调用。
|
|
8720
|
+
* @param subtitle 目标字幕的 id 或 language,任意一个非空即可定位字幕项。
|
|
8721
|
+
* @return 切换成功时 resolve,失败(未找到、切换被中止)时 reject。
|
|
8722
|
+
* @memberof VePlayer
|
|
8723
|
+
*/
|
|
8724
|
+
switchSubtitle(subtitle: {
|
|
8725
|
+
id?: string | number;
|
|
8726
|
+
language?: string | number;
|
|
8727
|
+
}): Promise<void>;
|
|
8728
|
+
/** {zh}
|
|
8729
|
+
* @brief 开启字幕展示。恢复上次选中的字幕项;若从未选中过则默认选第一项。需配置 `Subtitle` 插件后调用。
|
|
8730
|
+
* @memberof VePlayer
|
|
8731
|
+
*/
|
|
8732
|
+
showSubtitle(): void;
|
|
8733
|
+
/** {zh}
|
|
8734
|
+
* @brief 关闭字幕展示。字幕数据保留,可通过 `showSubtitle` 重新开启。需配置 `Subtitle` 插件后调用。
|
|
8735
|
+
* @memberof VePlayer
|
|
8736
|
+
*/
|
|
8737
|
+
hideSubtitle(): void;
|
|
7929
8738
|
/** {zh}
|
|
7930
8739
|
* @memberof VePlayer
|
|
7931
8740
|
* @brief 销毁当前播放器实例。
|
|
@@ -8350,344 +9159,242 @@ export declare class MirrorPlugin extends Plugin {
|
|
|
8350
9159
|
destroy(): void;
|
|
8351
9160
|
render(): string;
|
|
8352
9161
|
}
|
|
8353
|
-
export declare type InfoItem = {
|
|
8354
|
-
key: string;
|
|
8355
|
-
label: string;
|
|
8356
|
-
labelTextKey?: string;
|
|
8357
|
-
value?: any;
|
|
8358
|
-
render?: (key: any) => string;
|
|
8359
|
-
type?: string;
|
|
8360
|
-
dom?: Element;
|
|
8361
|
-
};
|
|
8362
|
-
/**
|
|
8363
|
-
* 直播信息面板
|
|
8364
|
-
*/
|
|
8365
|
-
export declare class LiveInfoPanel extends Plugin {
|
|
8366
|
-
private _pollTimer;
|
|
8367
|
-
private _infoItems;
|
|
8368
|
-
static get pluginName(): string;
|
|
8369
|
-
static get defaultConfig(): {
|
|
8370
|
-
visible: boolean;
|
|
8371
|
-
showH265Info: boolean;
|
|
8372
|
-
};
|
|
8373
|
-
get streamType(): any;
|
|
8374
|
-
afterCreate(): void;
|
|
8375
|
-
registerLanguageTexts(): {
|
|
8376
|
-
DECODEFPS: {
|
|
8377
|
-
en: string;
|
|
8378
|
-
zh: string;
|
|
8379
|
-
};
|
|
8380
|
-
DECODECOST: {
|
|
8381
|
-
en: string;
|
|
8382
|
-
zh: string;
|
|
8383
|
-
};
|
|
8384
|
-
FORMAT: {
|
|
8385
|
-
en: string;
|
|
8386
|
-
zh: string;
|
|
8387
|
-
};
|
|
8388
|
-
FPS: {
|
|
8389
|
-
en: string;
|
|
8390
|
-
zh: string;
|
|
8391
|
-
};
|
|
8392
|
-
BITRATE: {
|
|
8393
|
-
en: string;
|
|
8394
|
-
zh: string;
|
|
8395
|
-
};
|
|
8396
|
-
GOP: {
|
|
8397
|
-
en: string;
|
|
8398
|
-
zh: string;
|
|
8399
|
-
};
|
|
8400
|
-
RESOLUTION: {
|
|
8401
|
-
en: string;
|
|
8402
|
-
zh: string;
|
|
8403
|
-
};
|
|
8404
|
-
ENCODETYPE: {
|
|
8405
|
-
en: string;
|
|
8406
|
-
zh: string;
|
|
8407
|
-
};
|
|
8408
|
-
BUFFEREND: {
|
|
8409
|
-
en: string;
|
|
8410
|
-
zh: string;
|
|
8411
|
-
};
|
|
8412
|
-
CURRENTTIME: {
|
|
8413
|
-
en: string;
|
|
8414
|
-
zh: string;
|
|
8415
|
-
};
|
|
8416
|
-
};
|
|
8417
|
-
_getDefaultInfo(data: any): Record<string, InfoItem>;
|
|
8418
|
-
_init(): void;
|
|
8419
|
-
_getStats(): any;
|
|
8420
|
-
_getInfoListData(): Record<string, InfoItem>;
|
|
8421
|
-
_initDom(infoItems: any): any;
|
|
8422
|
-
_updateTitle(rowDom: Element, item: InfoItem): void;
|
|
8423
|
-
_updateDom(rowdom: Element, newItem: InfoItem): void;
|
|
8424
|
-
_renderLabel(item: InfoItem): any;
|
|
8425
|
-
_renderValue(item: InfoItem): any;
|
|
8426
|
-
_handleDataChange(): void;
|
|
8427
|
-
_tick(): void;
|
|
8428
|
-
_poll(): void;
|
|
8429
|
-
destroy(): void;
|
|
8430
|
-
_handleError(): void;
|
|
8431
|
-
_handleLoadedData(): void;
|
|
8432
|
-
_open(): void;
|
|
8433
|
-
_close(): void;
|
|
8434
|
-
open(): void;
|
|
8435
|
-
close(): void;
|
|
8436
|
-
render(): string;
|
|
8437
|
-
}
|
|
8438
9162
|
export declare const Events: {
|
|
8439
9163
|
/** {zh}
|
|
8440
|
-
* @brief
|
|
8441
|
-
*/
|
|
8442
|
-
/** {en}
|
|
8443
|
-
* @brief Triggered when danmu (bullet comment) configuration changes.
|
|
8444
|
-
*/
|
|
8445
|
-
DANMU_CHANGE: string;
|
|
8446
|
-
/** {zh}
|
|
8447
|
-
* @hidden
|
|
8448
|
-
*/
|
|
8449
|
-
/** {en}
|
|
8450
|
-
* @hidden
|
|
8451
|
-
*/
|
|
8452
|
-
TIME_SHIFT_CHANGE: string;
|
|
8453
|
-
/** {zh}
|
|
8454
|
-
* @hidden
|
|
8455
|
-
*/
|
|
8456
|
-
/** {en}
|
|
8457
|
-
* @hidden
|
|
8458
|
-
*/
|
|
8459
|
-
AI_SUBTITLE_LANG_CHANGE: string;
|
|
8460
|
-
/** {zh}
|
|
8461
|
-
* @hidden
|
|
9164
|
+
* @brief 自动播放成功。
|
|
8462
9165
|
*/
|
|
8463
9166
|
/** {en}
|
|
8464
|
-
* @
|
|
9167
|
+
* @brief Triggered when autoplay succeeds.
|
|
8465
9168
|
*/
|
|
8466
|
-
|
|
9169
|
+
AUTOPLAY_SUCCESS: string;
|
|
8467
9170
|
/** {zh}
|
|
8468
|
-
* @brief
|
|
9171
|
+
* @brief 自动播放失败。
|
|
8469
9172
|
*/
|
|
8470
9173
|
/** {en}
|
|
8471
|
-
* @brief Triggered when
|
|
9174
|
+
* @brief Triggered when autoplay fails.
|
|
8472
9175
|
*/
|
|
8473
|
-
|
|
9176
|
+
AUTOPLAY_FAILED: string;
|
|
8474
9177
|
/** {zh}
|
|
8475
|
-
* @brief
|
|
9178
|
+
* @brief 右键菜单事件。事件 `data` 中包含具体信息。
|
|
8476
9179
|
*/
|
|
8477
9180
|
/** {en}
|
|
8478
|
-
* @brief Triggered
|
|
9181
|
+
* @brief Triggered for context menu actions. Event `data` contains details.
|
|
8479
9182
|
*/
|
|
8480
|
-
|
|
9183
|
+
MENU_LOG: string;
|
|
8481
9184
|
/** {zh}
|
|
8482
|
-
* @brief
|
|
9185
|
+
* @brief 点击了右键菜单的反馈按钮。
|
|
8483
9186
|
*/
|
|
8484
9187
|
/** {en}
|
|
8485
|
-
* @brief Triggered when
|
|
9188
|
+
* @brief Triggered when the context menu feedback button is clicked.
|
|
8486
9189
|
*/
|
|
8487
|
-
|
|
9190
|
+
MENU_REPORT: string;
|
|
8488
9191
|
/** {zh}
|
|
8489
|
-
* @brief
|
|
9192
|
+
* @brief 播放列表更新。
|
|
8490
9193
|
*/
|
|
8491
9194
|
/** {en}
|
|
8492
|
-
* @brief Triggered when
|
|
9195
|
+
* @brief Triggered when the playlist is updated.
|
|
8493
9196
|
*/
|
|
8494
|
-
|
|
9197
|
+
PLAY_LIST_CHANGE: string;
|
|
8495
9198
|
/** {zh}
|
|
8496
|
-
* @brief
|
|
9199
|
+
* @brief 播放列表播放项变更。
|
|
8497
9200
|
*/
|
|
8498
9201
|
/** {en}
|
|
8499
|
-
* @brief Triggered when the
|
|
9202
|
+
* @brief Triggered when the current playlist item changes.
|
|
8500
9203
|
*/
|
|
8501
|
-
|
|
9204
|
+
PLAY_LIST_ITEM_CHANGE: string;
|
|
8502
9205
|
/** {zh}
|
|
8503
|
-
* @brief
|
|
9206
|
+
* @brief `playNext` 开始。
|
|
8504
9207
|
*/
|
|
8505
9208
|
/** {en}
|
|
8506
|
-
* @brief Triggered when
|
|
9209
|
+
* @brief Triggered when `playNext` starts.
|
|
8507
9210
|
*/
|
|
8508
|
-
|
|
9211
|
+
PLAY_NEXT_START: string;
|
|
8509
9212
|
/** {zh}
|
|
8510
|
-
* @brief
|
|
9213
|
+
* @brief `playNext` 结束。
|
|
8511
9214
|
*/
|
|
8512
9215
|
/** {en}
|
|
8513
|
-
* @brief Triggered when
|
|
9216
|
+
* @brief Triggered when `playNext` ends.
|
|
8514
9217
|
*/
|
|
8515
|
-
|
|
9218
|
+
PLAY_NEXT_END: string;
|
|
8516
9219
|
/** {zh}
|
|
8517
|
-
* @
|
|
9220
|
+
* @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
|
|
8518
9221
|
*/
|
|
8519
9222
|
/** {en}
|
|
8520
|
-
* @
|
|
9223
|
+
* @brief Triggered when the actual definition behind the auto ABR level changes.
|
|
8521
9224
|
*/
|
|
8522
|
-
|
|
9225
|
+
ABR_AUTO_DESC_CHANGE: string;
|
|
8523
9226
|
/** {zh}
|
|
8524
|
-
* @brief
|
|
9227
|
+
* @brief 播放插件内核的扩展事件
|
|
8525
9228
|
*/
|
|
8526
9229
|
/** {en}
|
|
8527
|
-
* @brief
|
|
9230
|
+
* @brief Extension events from the playback plugin core.
|
|
8528
9231
|
*/
|
|
8529
|
-
|
|
9232
|
+
CORE_EVENT: string;
|
|
8530
9233
|
/** {zh}
|
|
8531
|
-
* @brief
|
|
9234
|
+
* @brief mp4 加密插件命中预加载数据时触发。data 为预加载缓存对象,含 `byteLength`、`duration`、`mediaSegList` 等字段。
|
|
8532
9235
|
*/
|
|
8533
9236
|
/** {en}
|
|
8534
|
-
* @brief
|
|
9237
|
+
* @brief Fired when the mp4 encrypt plugin finds a preload cache hit. The event data is the preload cache object, including fields such as `byteLength`, `duration`, and `mediaSegList`.
|
|
8535
9238
|
*/
|
|
8536
|
-
|
|
9239
|
+
PRELOAD_INFO: string;
|
|
9240
|
+
TIME_SCALE_CHANGE?: string;
|
|
9241
|
+
MUSIC_MODE_CHANGE?: string;
|
|
9242
|
+
MUSIC_CHANGE?: string;
|
|
9243
|
+
MUSIC_LIST_CHANGE?: string;
|
|
8537
9244
|
/** {zh}
|
|
8538
|
-
* @brief
|
|
9245
|
+
* @brief 弹幕配置发生变化。
|
|
8539
9246
|
*/
|
|
8540
9247
|
/** {en}
|
|
8541
|
-
* @brief Triggered when
|
|
9248
|
+
* @brief Triggered when danmu (bullet comment) configuration changes.
|
|
8542
9249
|
*/
|
|
8543
|
-
|
|
9250
|
+
DANMU_CHANGE: string;
|
|
8544
9251
|
/** {zh}
|
|
8545
9252
|
* @hidden
|
|
8546
9253
|
*/
|
|
8547
9254
|
/** {en}
|
|
8548
9255
|
* @hidden
|
|
8549
9256
|
*/
|
|
8550
|
-
|
|
9257
|
+
TIME_SHIFT_CHANGE: string;
|
|
8551
9258
|
/** {zh}
|
|
8552
9259
|
* @hidden
|
|
8553
9260
|
*/
|
|
8554
9261
|
/** {en}
|
|
8555
9262
|
* @hidden
|
|
8556
9263
|
*/
|
|
8557
|
-
|
|
9264
|
+
AI_SUBTITLE_LANG_CHANGE: string;
|
|
8558
9265
|
/** {zh}
|
|
8559
|
-
* @
|
|
9266
|
+
* @hidden
|
|
8560
9267
|
*/
|
|
8561
9268
|
/** {en}
|
|
8562
|
-
* @
|
|
9269
|
+
* @hidden
|
|
8563
9270
|
*/
|
|
8564
|
-
|
|
9271
|
+
AI_SUBTITLE_MATCH: string;
|
|
8565
9272
|
/** {zh}
|
|
8566
|
-
* @brief
|
|
9273
|
+
* @brief 取消静音。
|
|
8567
9274
|
*/
|
|
8568
9275
|
/** {en}
|
|
8569
|
-
* @brief Triggered when
|
|
9276
|
+
* @brief Triggered when unmute is cancelled.
|
|
8570
9277
|
*/
|
|
8571
|
-
|
|
9278
|
+
CANCEL_UNMUTE: string;
|
|
8572
9279
|
/** {zh}
|
|
8573
|
-
* @brief
|
|
9280
|
+
* @brief 刷新按钮被点击。
|
|
8574
9281
|
*/
|
|
8575
9282
|
/** {en}
|
|
8576
|
-
* @brief Triggered when
|
|
9283
|
+
* @brief Triggered when the refresh button is clicked.
|
|
8577
9284
|
*/
|
|
8578
|
-
|
|
9285
|
+
REFRESH_CLICK: string;
|
|
8579
9286
|
/** {zh}
|
|
8580
|
-
* @brief
|
|
9287
|
+
* @brief 报错时触发降级。
|
|
8581
9288
|
*/
|
|
8582
9289
|
/** {en}
|
|
8583
|
-
* @brief Triggered when
|
|
9290
|
+
* @brief Triggered when playback demotes to a backup URL after an error.
|
|
8584
9291
|
*/
|
|
8585
|
-
|
|
9292
|
+
PLAY_BACKUP_CHANGE: string;
|
|
8586
9293
|
/** {zh}
|
|
8587
|
-
* @brief
|
|
9294
|
+
* @brief 报错时触发的降级结束。
|
|
8588
9295
|
*/
|
|
8589
9296
|
/** {en}
|
|
8590
|
-
* @brief Triggered when
|
|
9297
|
+
* @brief Triggered when error-triggered demotion finishes.
|
|
8591
9298
|
*/
|
|
8592
|
-
|
|
9299
|
+
PLAY_BACKUP_CHANGE_FINISH: string;
|
|
8593
9300
|
/** {zh}
|
|
8594
|
-
* @brief
|
|
9301
|
+
* @brief 报错时触发重试。
|
|
8595
9302
|
*/
|
|
8596
9303
|
/** {en}
|
|
8597
|
-
* @brief Triggered when
|
|
9304
|
+
* @brief Triggered when the error retry button is clicked.
|
|
8598
9305
|
*/
|
|
8599
|
-
|
|
9306
|
+
PLAY_ERROR_BUTTON_CLICK: string;
|
|
8600
9307
|
/** {zh}
|
|
8601
|
-
* @brief
|
|
9308
|
+
* @brief 播放 URL 改变。
|
|
8602
9309
|
*/
|
|
8603
9310
|
/** {en}
|
|
8604
|
-
* @brief Triggered when
|
|
9311
|
+
* @brief Triggered when the playback URL changes.
|
|
8605
9312
|
*/
|
|
8606
|
-
|
|
9313
|
+
PlAY_URL_CHANGE: string;
|
|
8607
9314
|
/** {zh}
|
|
8608
|
-
* @brief
|
|
9315
|
+
* @brief 展示报错。
|
|
8609
9316
|
*/
|
|
8610
9317
|
/** {en}
|
|
8611
|
-
* @brief Triggered when
|
|
9318
|
+
* @brief Triggered when the error UI is shown.
|
|
8612
9319
|
*/
|
|
8613
|
-
|
|
9320
|
+
SHOW_PLAY_ERROR: string;
|
|
8614
9321
|
/** {zh}
|
|
8615
|
-
* @
|
|
9322
|
+
* @hidden
|
|
8616
9323
|
*/
|
|
8617
9324
|
/** {en}
|
|
8618
|
-
* @
|
|
9325
|
+
* @hidden
|
|
8619
9326
|
*/
|
|
8620
|
-
|
|
9327
|
+
PLAYER_EXTEND_BUTTON: string;
|
|
8621
9328
|
/** {zh}
|
|
8622
|
-
* @brief
|
|
9329
|
+
* @brief 发生长时间卡顿时触发。播放器会在事件发生时自动进行清晰度降级或提醒用户手动切换晰度降级。
|
|
8623
9330
|
*/
|
|
8624
9331
|
/** {en}
|
|
8625
|
-
* @brief Triggered
|
|
9332
|
+
* @brief Triggered on prolonged stalling. The player may auto-demote definition or prompt the user to switch manually.
|
|
8626
9333
|
*/
|
|
8627
|
-
|
|
9334
|
+
LONG_WAITING: string;
|
|
8628
9335
|
/** {zh}
|
|
8629
|
-
* @brief
|
|
9336
|
+
* @brief 发生频繁卡顿时触发。
|
|
8630
9337
|
*/
|
|
8631
9338
|
/** {en}
|
|
8632
|
-
* @brief Triggered
|
|
9339
|
+
* @brief Triggered on frequent stalling.
|
|
8633
9340
|
*/
|
|
8634
|
-
|
|
9341
|
+
OFTEN_WAITING: string;
|
|
8635
9342
|
/** {zh}
|
|
8636
|
-
* @brief
|
|
9343
|
+
* @brief 清晰度降级。
|
|
8637
9344
|
*/
|
|
8638
9345
|
/** {en}
|
|
8639
|
-
* @brief Triggered
|
|
9346
|
+
* @brief Triggered when definition is demoted.
|
|
8640
9347
|
*/
|
|
8641
|
-
|
|
9348
|
+
DEFINITION_DEMOTE: string;
|
|
8642
9349
|
/** {zh}
|
|
8643
|
-
* @
|
|
9350
|
+
* @hidden
|
|
8644
9351
|
*/
|
|
8645
9352
|
/** {en}
|
|
8646
|
-
* @
|
|
9353
|
+
* @hidden
|
|
8647
9354
|
*/
|
|
8648
|
-
|
|
9355
|
+
LARKWINDOW_CHANGE: string;
|
|
8649
9356
|
/** {zh}
|
|
8650
|
-
* @
|
|
9357
|
+
* @hidden
|
|
8651
9358
|
*/
|
|
8652
9359
|
/** {en}
|
|
8653
|
-
* @
|
|
9360
|
+
* @hidden
|
|
8654
9361
|
*/
|
|
8655
|
-
|
|
9362
|
+
PANEL_MODE_CHANGE: string;
|
|
8656
9363
|
/** {zh}
|
|
8657
|
-
* @brief
|
|
9364
|
+
* @brief 清晰度切换。
|
|
8658
9365
|
*/
|
|
8659
9366
|
/** {en}
|
|
8660
|
-
* @brief Triggered when
|
|
9367
|
+
* @brief Triggered when definition changes.
|
|
8661
9368
|
*/
|
|
8662
|
-
|
|
9369
|
+
INNER_DEFINITION_CHANGE: string;
|
|
8663
9370
|
/** {zh}
|
|
8664
|
-
* @brief
|
|
9371
|
+
* @brief 线路切换。
|
|
8665
9372
|
*/
|
|
8666
9373
|
/** {en}
|
|
8667
|
-
* @brief Triggered when
|
|
9374
|
+
* @brief Triggered when the CDN line (route) changes.
|
|
8668
9375
|
*/
|
|
8669
|
-
|
|
9376
|
+
LINE_CHANGE: string;
|
|
8670
9377
|
/** {zh}
|
|
8671
|
-
* @brief `
|
|
9378
|
+
* @brief 播放器通过 `playAuthToken` 获取 URL 失败。
|
|
8672
9379
|
*/
|
|
8673
9380
|
/** {en}
|
|
8674
|
-
* @brief Triggered when `
|
|
9381
|
+
* @brief Triggered when fetching the URL via `playAuthToken` fails.
|
|
8675
9382
|
*/
|
|
8676
|
-
|
|
9383
|
+
GET_PLAY_URL_ERR: string;
|
|
8677
9384
|
/** {zh}
|
|
8678
|
-
* @brief
|
|
9385
|
+
* @brief 资源过期。
|
|
8679
9386
|
*/
|
|
8680
9387
|
/** {en}
|
|
8681
|
-
* @brief Triggered when the
|
|
9388
|
+
* @brief Triggered when the media resource has expired.
|
|
8682
9389
|
*/
|
|
8683
|
-
|
|
9390
|
+
MEDIA_EXPIRED: string;
|
|
8684
9391
|
/** {zh}
|
|
8685
|
-
* @brief
|
|
9392
|
+
* @brief 镜像开启。
|
|
8686
9393
|
*/
|
|
8687
9394
|
/** {en}
|
|
8688
|
-
* @brief
|
|
9395
|
+
* @brief Triggered when mirror mode is enabled.
|
|
8689
9396
|
*/
|
|
8690
|
-
|
|
9397
|
+
MIRROR_CHANGE: string;
|
|
8691
9398
|
/** {zh}
|
|
8692
9399
|
* @brief 播放器实例创建完成时触发。
|
|
8693
9400
|
*/
|
|
@@ -8844,6 +9551,10 @@ export declare const Events: {
|
|
|
8844
9551
|
* @brief Triggered when autoplay fails.
|
|
8845
9552
|
*/
|
|
8846
9553
|
AUTOPLAY_PREVENTED: string;
|
|
9554
|
+
/** {zh}
|
|
9555
|
+
* @brief 播放器准备创建。
|
|
9556
|
+
*/
|
|
9557
|
+
READY_CREATE_PLAYER: string;
|
|
8847
9558
|
/** {zh}
|
|
8848
9559
|
* @brief 播放器完成创建。
|
|
8849
9560
|
*/
|
|
@@ -8851,6 +9562,13 @@ export declare const Events: {
|
|
|
8851
9562
|
* @brief Triggered when player creation completes.
|
|
8852
9563
|
*/
|
|
8853
9564
|
PLAYER_CREATED_FINISH: string;
|
|
9565
|
+
/** {zh}
|
|
9566
|
+
* @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
|
|
9567
|
+
*/
|
|
9568
|
+
/** {en}
|
|
9569
|
+
* @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
|
|
9570
|
+
*/
|
|
9571
|
+
CREATE_PLAYER_PERF: string;
|
|
8854
9572
|
/** {zh}
|
|
8855
9573
|
* @brief 播放器重建。
|
|
8856
9574
|
*/
|
|
@@ -9278,6 +9996,10 @@ export declare const Event: {
|
|
|
9278
9996
|
* @brief Triggered when autoplay fails.
|
|
9279
9997
|
*/
|
|
9280
9998
|
AUTOPLAY_PREVENTED: string;
|
|
9999
|
+
/** {zh}
|
|
10000
|
+
* @brief 播放器准备创建。
|
|
10001
|
+
*/
|
|
10002
|
+
READY_CREATE_PLAYER: string;
|
|
9281
10003
|
/** {zh}
|
|
9282
10004
|
* @brief 播放器完成创建。
|
|
9283
10005
|
*/
|
|
@@ -9285,6 +10007,13 @@ export declare const Event: {
|
|
|
9285
10007
|
* @brief Triggered when player creation completes.
|
|
9286
10008
|
*/
|
|
9287
10009
|
PLAYER_CREATED_FINISH: string;
|
|
10010
|
+
/** {zh}
|
|
10011
|
+
* @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
|
|
10012
|
+
*/
|
|
10013
|
+
/** {en}
|
|
10014
|
+
* @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
|
|
10015
|
+
*/
|
|
10016
|
+
CREATE_PLAYER_PERF: string;
|
|
9288
10017
|
/** {zh}
|
|
9289
10018
|
* @brief 播放器重建。
|
|
9290
10019
|
*/
|
|
@@ -9392,6 +10121,87 @@ export declare const Event: {
|
|
|
9392
10121
|
AUDIO_TRACK_CHANGE: string;
|
|
9393
10122
|
};
|
|
9394
10123
|
PluginEvents: {
|
|
10124
|
+
/** {zh}
|
|
10125
|
+
* @brief 自动播放成功。
|
|
10126
|
+
*/
|
|
10127
|
+
/** {en}
|
|
10128
|
+
* @brief Triggered when autoplay succeeds.
|
|
10129
|
+
*/
|
|
10130
|
+
AUTOPLAY_SUCCESS: string;
|
|
10131
|
+
/** {zh}
|
|
10132
|
+
* @brief 自动播放失败。
|
|
10133
|
+
*/
|
|
10134
|
+
/** {en}
|
|
10135
|
+
* @brief Triggered when autoplay fails.
|
|
10136
|
+
*/
|
|
10137
|
+
AUTOPLAY_FAILED: string;
|
|
10138
|
+
/** {zh}
|
|
10139
|
+
* @brief 右键菜单事件。事件 `data` 中包含具体信息。
|
|
10140
|
+
*/
|
|
10141
|
+
/** {en}
|
|
10142
|
+
* @brief Triggered for context menu actions. Event `data` contains details.
|
|
10143
|
+
*/
|
|
10144
|
+
MENU_LOG: string;
|
|
10145
|
+
/** {zh}
|
|
10146
|
+
* @brief 点击了右键菜单的反馈按钮。
|
|
10147
|
+
*/
|
|
10148
|
+
/** {en}
|
|
10149
|
+
* @brief Triggered when the context menu feedback button is clicked.
|
|
10150
|
+
*/
|
|
10151
|
+
MENU_REPORT: string;
|
|
10152
|
+
/** {zh}
|
|
10153
|
+
* @brief 播放列表更新。
|
|
10154
|
+
*/
|
|
10155
|
+
/** {en}
|
|
10156
|
+
* @brief Triggered when the playlist is updated.
|
|
10157
|
+
*/
|
|
10158
|
+
PLAY_LIST_CHANGE: string;
|
|
10159
|
+
/** {zh}
|
|
10160
|
+
* @brief 播放列表播放项变更。
|
|
10161
|
+
*/
|
|
10162
|
+
/** {en}
|
|
10163
|
+
* @brief Triggered when the current playlist item changes.
|
|
10164
|
+
*/
|
|
10165
|
+
PLAY_LIST_ITEM_CHANGE: string;
|
|
10166
|
+
/** {zh}
|
|
10167
|
+
* @brief `playNext` 开始。
|
|
10168
|
+
*/
|
|
10169
|
+
/** {en}
|
|
10170
|
+
* @brief Triggered when `playNext` starts.
|
|
10171
|
+
*/
|
|
10172
|
+
PLAY_NEXT_START: string;
|
|
10173
|
+
/** {zh}
|
|
10174
|
+
* @brief `playNext` 结束。
|
|
10175
|
+
*/
|
|
10176
|
+
/** {en}
|
|
10177
|
+
* @brief Triggered when `playNext` ends.
|
|
10178
|
+
*/
|
|
10179
|
+
PLAY_NEXT_END: string;
|
|
10180
|
+
/** {zh}
|
|
10181
|
+
* @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
|
|
10182
|
+
*/
|
|
10183
|
+
/** {en}
|
|
10184
|
+
* @brief Triggered when the actual definition behind the auto ABR level changes.
|
|
10185
|
+
*/
|
|
10186
|
+
ABR_AUTO_DESC_CHANGE: string;
|
|
10187
|
+
/** {zh}
|
|
10188
|
+
* @brief 播放插件内核的扩展事件
|
|
10189
|
+
*/
|
|
10190
|
+
/** {en}
|
|
10191
|
+
* @brief Extension events from the playback plugin core.
|
|
10192
|
+
*/
|
|
10193
|
+
CORE_EVENT: string;
|
|
10194
|
+
/** {zh}
|
|
10195
|
+
* @brief mp4 加密插件命中预加载数据时触发。data 为预加载缓存对象,含 `byteLength`、`duration`、`mediaSegList` 等字段。
|
|
10196
|
+
*/
|
|
10197
|
+
/** {en}
|
|
10198
|
+
* @brief Fired when the mp4 encrypt plugin finds a preload cache hit. The event data is the preload cache object, including fields such as `byteLength`, `duration`, and `mediaSegList`.
|
|
10199
|
+
*/
|
|
10200
|
+
PRELOAD_INFO: string;
|
|
10201
|
+
TIME_SCALE_CHANGE?: string;
|
|
10202
|
+
MUSIC_MODE_CHANGE?: string;
|
|
10203
|
+
MUSIC_CHANGE?: string;
|
|
10204
|
+
MUSIC_LIST_CHANGE?: string;
|
|
9395
10205
|
/** {zh}
|
|
9396
10206
|
* @brief 弹幕配置发生变化。
|
|
9397
10207
|
*/
|
|
@@ -9546,110 +10356,11 @@ export declare const Event: {
|
|
|
9546
10356
|
* @brief Triggered when mirror mode is enabled.
|
|
9547
10357
|
*/
|
|
9548
10358
|
MIRROR_CHANGE: string;
|
|
9549
|
-
/** {zh}
|
|
9550
|
-
* @brief 音乐播放器快进或快退。
|
|
9551
|
-
*/
|
|
9552
|
-
/** {en}
|
|
9553
|
-
* @brief Triggered when music playback seeks forward or backward.
|
|
9554
|
-
*/
|
|
9555
|
-
TIME_SCALE_CHANGE: string;
|
|
9556
|
-
/** {zh}
|
|
9557
|
-
* @brief 音乐播放模式切换。
|
|
9558
|
-
*/
|
|
9559
|
-
/** {en}
|
|
9560
|
-
* @brief Triggered when music play mode changes.
|
|
9561
|
-
*/
|
|
9562
|
-
MUSIC_MODE_CHANGE: string;
|
|
9563
|
-
/** {zh}
|
|
9564
|
-
* @brief 音乐播放模式下切换音乐。
|
|
9565
|
-
*/
|
|
9566
|
-
/** {en}
|
|
9567
|
-
* @brief Triggered when switching tracks in music mode.
|
|
9568
|
-
*/
|
|
9569
|
-
MUSIC_CHANGE: string;
|
|
9570
|
-
/** {zh}
|
|
9571
|
-
* @brief 音乐播放列表发生变化。
|
|
9572
|
-
*/
|
|
9573
|
-
/** {en}
|
|
9574
|
-
* @brief Triggered when the music playlist changes.
|
|
9575
|
-
*/
|
|
9576
|
-
MUSIC_LIST_CHANGE: string;
|
|
9577
|
-
/** {zh}
|
|
9578
|
-
* @brief 自动播放成功。
|
|
9579
|
-
*/
|
|
9580
|
-
/** {en}
|
|
9581
|
-
* @brief Triggered when autoplay succeeds.
|
|
9582
|
-
*/
|
|
9583
|
-
AUTOPLAY_SUCCESS: string;
|
|
9584
|
-
/** {zh}
|
|
9585
|
-
* @brief 自动播放失败。
|
|
9586
|
-
*/
|
|
9587
|
-
/** {en}
|
|
9588
|
-
* @brief Triggered when autoplay fails.
|
|
9589
|
-
*/
|
|
9590
|
-
AUTOPLAY_FAILED: string;
|
|
9591
|
-
/** {zh}
|
|
9592
|
-
* @brief 右键菜单事件。事件 `data` 中包含具体信息。
|
|
9593
|
-
*/
|
|
9594
|
-
/** {en}
|
|
9595
|
-
* @brief Triggered for context menu actions. Event `data` contains details.
|
|
9596
|
-
*/
|
|
9597
|
-
MENU_LOG: string;
|
|
9598
|
-
/** {zh}
|
|
9599
|
-
* @brief 点击了右键菜单的反馈按钮。
|
|
9600
|
-
*/
|
|
9601
|
-
/** {en}
|
|
9602
|
-
* @brief Triggered when the context menu feedback button is clicked.
|
|
9603
|
-
*/
|
|
9604
|
-
MENU_REPORT: string;
|
|
9605
|
-
/** {zh}
|
|
9606
|
-
* @brief 播放列表更新。
|
|
9607
|
-
*/
|
|
9608
|
-
/** {en}
|
|
9609
|
-
* @brief Triggered when the playlist is updated.
|
|
9610
|
-
*/
|
|
9611
|
-
PLAY_LIST_CHANGE: string;
|
|
9612
|
-
/** {zh}
|
|
9613
|
-
* @brief 播放列表播放项变更。
|
|
9614
|
-
*/
|
|
9615
|
-
/** {en}
|
|
9616
|
-
* @brief Triggered when the current playlist item changes.
|
|
9617
|
-
*/
|
|
9618
|
-
PLAY_LIST_ITEM_CHANGE: string;
|
|
9619
|
-
/** {zh}
|
|
9620
|
-
* @brief `playNext` 开始。
|
|
9621
|
-
*/
|
|
9622
|
-
/** {en}
|
|
9623
|
-
* @brief Triggered when `playNext` starts.
|
|
9624
|
-
*/
|
|
9625
|
-
PLAY_NEXT_START: string;
|
|
9626
|
-
/** {zh}
|
|
9627
|
-
* @brief `playNext` 结束。
|
|
9628
|
-
*/
|
|
9629
|
-
/** {en}
|
|
9630
|
-
* @brief Triggered when `playNext` ends.
|
|
9631
|
-
*/
|
|
9632
|
-
PLAY_NEXT_END: string;
|
|
9633
|
-
/** {zh}
|
|
9634
|
-
* @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
|
|
9635
|
-
*/
|
|
9636
|
-
/** {en}
|
|
9637
|
-
* @brief Triggered when the actual definition behind the auto ABR level changes.
|
|
9638
|
-
*/
|
|
9639
|
-
ABR_AUTO_DESC_CHANGE: string;
|
|
9640
|
-
/** {zh}
|
|
9641
|
-
* @brief 播放插件内核的扩展事件
|
|
9642
|
-
*/
|
|
9643
|
-
/** {en}
|
|
9644
|
-
* @brief Extension events from the playback plugin core.
|
|
9645
|
-
*/
|
|
9646
|
-
CORE_EVENT: string;
|
|
9647
10359
|
};
|
|
9648
10360
|
};
|
|
9649
10361
|
export * from "xgplayer";
|
|
9650
10362
|
|
|
9651
10363
|
export {
|
|
9652
|
-
LiveSubTitlesPlugin as LiveSubtitlesPlugin,
|
|
9653
10364
|
MusicPreset as Music,
|
|
9654
10365
|
VePlayer as default,
|
|
9655
10366
|
};
|