@volcengine/veplayer 1.15.3-rc.3 → 1.15.3-rc.31
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 +866 -135
- package/index.min.css +1 -1
- package/index.min.js +2 -2
- package/package.json +1 -1
- package/plugin/XGVideo.js +1 -1
- package/plugin/mp4Encrypt.js +2 -2
- package/plugin/vestrategy.js +1 -1
- package/plugin/vestrategy_preload.js +1 -1
package/index.d.ts
CHANGED
|
@@ -669,6 +669,11 @@ export interface ISubTitleItem {
|
|
|
669
669
|
* @brief 字幕名称
|
|
670
670
|
*/
|
|
671
671
|
text?: string;
|
|
672
|
+
/**
|
|
673
|
+
* @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
|
|
674
|
+
* @default -
|
|
675
|
+
*/
|
|
676
|
+
label?: string | number;
|
|
672
677
|
/**
|
|
673
678
|
* @brief 外挂字幕 URL 地址。
|
|
674
679
|
* @default -
|
|
@@ -697,6 +702,20 @@ export interface ISubTitleItem {
|
|
|
697
702
|
*/
|
|
698
703
|
list?: IListItem[];
|
|
699
704
|
}
|
|
705
|
+
export declare type IAutoSubtitleSourceItem = Record<string, any> | string;
|
|
706
|
+
export declare type IAutoSubtitleFormatterResult = string | number | boolean | null | undefined | {
|
|
707
|
+
label?: string | number;
|
|
708
|
+
text?: string | number;
|
|
709
|
+
show?: boolean;
|
|
710
|
+
visible?: boolean;
|
|
711
|
+
/** 排序权重,值越小越靠前。未指定时保持原始顺序。 */
|
|
712
|
+
order?: number;
|
|
713
|
+
/** 是否为默认选中的字幕。 */
|
|
714
|
+
isDefault?: boolean;
|
|
715
|
+
/** 是否为默认选中的字幕,与 `isDefault` 等价。 */
|
|
716
|
+
default?: boolean;
|
|
717
|
+
};
|
|
718
|
+
export declare type IAutoSubtitleItemFormatter = (item: IAutoSubtitleSourceItem, index: number) => IAutoSubtitleFormatterResult;
|
|
700
719
|
/**
|
|
701
720
|
* @brief 字幕内容项。
|
|
702
721
|
* @list Options
|
|
@@ -2185,6 +2204,7 @@ export interface ISubtitleInfoList {
|
|
|
2185
2204
|
Version: string;
|
|
2186
2205
|
Vid: string;
|
|
2187
2206
|
}
|
|
2207
|
+
export declare type ISubtitleInfoListItem = ISubtitleInfoList | string;
|
|
2188
2208
|
/** {zh}
|
|
2189
2209
|
* @hidden
|
|
2190
2210
|
*/
|
|
@@ -2243,11 +2263,102 @@ export interface IGetPlayInfoRes {
|
|
|
2243
2263
|
PlayInfoList: IPlayInfoListItem[];
|
|
2244
2264
|
PosterUrl: string;
|
|
2245
2265
|
Status: number;
|
|
2246
|
-
SubtitleInfoList
|
|
2266
|
+
SubtitleInfoList?: ISubtitleInfoListItem[];
|
|
2247
2267
|
ThumbInfoList: IThumbInfoItem[];
|
|
2248
2268
|
TotalCount: number;
|
|
2249
2269
|
Version: number;
|
|
2250
2270
|
}
|
|
2271
|
+
/**
|
|
2272
|
+
* 短剧环境配置接口
|
|
2273
|
+
*/
|
|
2274
|
+
export interface ITTDramaEnv {
|
|
2275
|
+
/** 云服务商,默认从构建时 env.__PLATFORM__ 获取,未注入时默认为 byteplus */
|
|
2276
|
+
channel?: "volcengine" | "byteplus";
|
|
2277
|
+
/**
|
|
2278
|
+
* @brief 应用版本号
|
|
2279
|
+
* @type {string}
|
|
2280
|
+
*/
|
|
2281
|
+
appVersion: string;
|
|
2282
|
+
/**
|
|
2283
|
+
* @brief 小程序三方id
|
|
2284
|
+
* @type {string}
|
|
2285
|
+
*/
|
|
2286
|
+
clientKey: string;
|
|
2287
|
+
/**
|
|
2288
|
+
* @brief 是否支持获取短剧信息
|
|
2289
|
+
* @type {boolean}
|
|
2290
|
+
*/
|
|
2291
|
+
canIUseGetDramaInfo: boolean;
|
|
2292
|
+
/**
|
|
2293
|
+
* @brief Android 是否支持批量获取短剧信息(高版本 app)
|
|
2294
|
+
* @type {boolean}
|
|
2295
|
+
*/
|
|
2296
|
+
canAndroidBatchGetDramaInfo?: boolean;
|
|
2297
|
+
/**
|
|
2298
|
+
* @brief 获取短剧信息
|
|
2299
|
+
* @type {function}
|
|
2300
|
+
*/
|
|
2301
|
+
getDramaInfo: (callback: (res: IJSBCallbackResult) => void, options: IGetDramaInfoOptions) => void;
|
|
2302
|
+
videoSecurityModule?: any;
|
|
2303
|
+
/**
|
|
2304
|
+
* @brief 日志发送接口
|
|
2305
|
+
* @type {function}
|
|
2306
|
+
*/
|
|
2307
|
+
sendLog: (EventName: string, params: Record<string, any>) => void;
|
|
2308
|
+
/**
|
|
2309
|
+
* 低版本 app 下验证 TTOP 签发的 playAuthToken 时使用的密钥
|
|
2310
|
+
* 通过 JSB(如 minis.getSecret)从 Native 获取,用于 HMAC-SHA256 签名校验
|
|
2311
|
+
*/
|
|
2312
|
+
getTokenVerifySecret?: () => Promise<string>;
|
|
2313
|
+
}
|
|
2314
|
+
/**
|
|
2315
|
+
* JSB 获取短剧信息请求参数
|
|
2316
|
+
*/
|
|
2317
|
+
export interface IGetDramaInfoOptions {
|
|
2318
|
+
clientKey: string;
|
|
2319
|
+
albumId: string;
|
|
2320
|
+
episodeId: string;
|
|
2321
|
+
vid: string;
|
|
2322
|
+
}
|
|
2323
|
+
export interface MinisError {
|
|
2324
|
+
error_code: number;
|
|
2325
|
+
error_msg: string;
|
|
2326
|
+
error_extra?: unknown;
|
|
2327
|
+
}
|
|
2328
|
+
/**
|
|
2329
|
+
* JSB getDramaInfo 返回的客户端耗时信息,单位 ms。
|
|
2330
|
+
*/
|
|
2331
|
+
export interface IGetDramaInfoPerfInfo {
|
|
2332
|
+
prepare_cost?: number;
|
|
2333
|
+
request_cost?: number;
|
|
2334
|
+
parse_cost?: number;
|
|
2335
|
+
total_cost?: number;
|
|
2336
|
+
[propName: string]: any;
|
|
2337
|
+
}
|
|
2338
|
+
/**
|
|
2339
|
+
* JSB 获取短剧信息返回结果
|
|
2340
|
+
*/
|
|
2341
|
+
export interface IJSBCallbackResult {
|
|
2342
|
+
is_success: number | boolean;
|
|
2343
|
+
error?: MinisError;
|
|
2344
|
+
data?: {
|
|
2345
|
+
status: number;
|
|
2346
|
+
drama_info: {
|
|
2347
|
+
album_id: string;
|
|
2348
|
+
drama_name: string;
|
|
2349
|
+
drama_cover: string;
|
|
2350
|
+
drama_description: string;
|
|
2351
|
+
};
|
|
2352
|
+
episode_info: {
|
|
2353
|
+
episode_id: string;
|
|
2354
|
+
episode_name: string;
|
|
2355
|
+
episode_cover: string;
|
|
2356
|
+
episode_description: string;
|
|
2357
|
+
};
|
|
2358
|
+
video_info: IGetPlayInfoRes | Record<string, any>;
|
|
2359
|
+
perf_info?: IGetDramaInfoPerfInfo;
|
|
2360
|
+
};
|
|
2361
|
+
}
|
|
2251
2362
|
/** {zh}
|
|
2252
2363
|
* @list Options
|
|
2253
2364
|
* @brief 视频编码格式。
|
|
@@ -2282,7 +2393,7 @@ export declare const CodecType: {
|
|
|
2282
2393
|
*/
|
|
2283
2394
|
readonly UNKNOWN: "unknown";
|
|
2284
2395
|
};
|
|
2285
|
-
export declare type ICodecType =
|
|
2396
|
+
export declare type ICodecType = typeof CodecType[keyof typeof CodecType];
|
|
2286
2397
|
export declare const ContentType: {
|
|
2287
2398
|
h265: string;
|
|
2288
2399
|
h264: string;
|
|
@@ -2673,6 +2784,86 @@ export declare type Url = string | Array<{
|
|
|
2673
2784
|
type?: string;
|
|
2674
2785
|
[propName: string]: any;
|
|
2675
2786
|
}>;
|
|
2787
|
+
/** {zh}
|
|
2788
|
+
* @list Options
|
|
2789
|
+
* @kind property
|
|
2790
|
+
* @brief 获取到媒体信息时的回调参数。
|
|
2791
|
+
*/
|
|
2792
|
+
/** {en}
|
|
2793
|
+
* @list Options
|
|
2794
|
+
* @kind property
|
|
2795
|
+
* @brief Callback payload when media information is obtained.
|
|
2796
|
+
*/
|
|
2797
|
+
export interface IGetMediaInfoCallbackPayload {
|
|
2798
|
+
/** {zh}
|
|
2799
|
+
* @brief 媒体信息。
|
|
2800
|
+
*/
|
|
2801
|
+
/** {en}
|
|
2802
|
+
* @brief Media information.
|
|
2803
|
+
*/
|
|
2804
|
+
data: {
|
|
2805
|
+
playList?: Stream[];
|
|
2806
|
+
type?: string;
|
|
2807
|
+
poster?: string;
|
|
2808
|
+
vid?: string;
|
|
2809
|
+
duration?: number;
|
|
2810
|
+
[propName: string]: any;
|
|
2811
|
+
};
|
|
2812
|
+
/** {zh}
|
|
2813
|
+
* @brief 媒体信息是否来自缓存。
|
|
2814
|
+
*/
|
|
2815
|
+
/** {en}
|
|
2816
|
+
* @brief Whether the media information comes from cache.
|
|
2817
|
+
*/
|
|
2818
|
+
fromCache: boolean;
|
|
2819
|
+
}
|
|
2820
|
+
/** {zh}
|
|
2821
|
+
* @list Options
|
|
2822
|
+
* @kind property
|
|
2823
|
+
* @brief JSB getDramaInfo 客户端耗时回调参数。
|
|
2824
|
+
*/
|
|
2825
|
+
/** {en}
|
|
2826
|
+
* @list Options
|
|
2827
|
+
* @kind property
|
|
2828
|
+
* @brief Callback payload for client-side getDramaInfo timing returned by JSB.
|
|
2829
|
+
*/
|
|
2830
|
+
export interface IGetDramaInfoPerfCallbackPayload {
|
|
2831
|
+
/** {zh}
|
|
2832
|
+
* @brief JSB 返回的客户端耗时信息,单位 ms。
|
|
2833
|
+
*/
|
|
2834
|
+
/** {en}
|
|
2835
|
+
* @brief Client-side timing returned by JSB, in milliseconds.
|
|
2836
|
+
*/
|
|
2837
|
+
perfInfo: IGetDramaInfoPerfInfo;
|
|
2838
|
+
/** {zh}
|
|
2839
|
+
* @brief 剧 ID。
|
|
2840
|
+
*/
|
|
2841
|
+
albumId?: string;
|
|
2842
|
+
/** {zh}
|
|
2843
|
+
* @brief 剧集 ID。
|
|
2844
|
+
*/
|
|
2845
|
+
episodeId?: string;
|
|
2846
|
+
/** {zh}
|
|
2847
|
+
* @brief 视频 ID。
|
|
2848
|
+
*/
|
|
2849
|
+
vid?: string;
|
|
2850
|
+
/** {zh}
|
|
2851
|
+
* @brief JSB 是否请求成功。
|
|
2852
|
+
*/
|
|
2853
|
+
isSuccess: boolean;
|
|
2854
|
+
/** {zh}
|
|
2855
|
+
* @brief 短剧审核状态。
|
|
2856
|
+
*/
|
|
2857
|
+
status?: number;
|
|
2858
|
+
/** {zh}
|
|
2859
|
+
* @brief 是否来自缓存。getDramaInfo 实际请求返回时固定为 false。
|
|
2860
|
+
*/
|
|
2861
|
+
fromCache: boolean;
|
|
2862
|
+
/** {zh}
|
|
2863
|
+
* @brief SDK 收到回调时的时间戳。
|
|
2864
|
+
*/
|
|
2865
|
+
timestamp: number;
|
|
2866
|
+
}
|
|
2676
2867
|
/** {zh}
|
|
2677
2868
|
* @list Options
|
|
2678
2869
|
* @kind property
|
|
@@ -2718,12 +2909,48 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
2718
2909
|
* @default -
|
|
2719
2910
|
*/
|
|
2720
2911
|
vid?: string;
|
|
2912
|
+
/**
|
|
2913
|
+
* @brief 剧id,Minis 短剧播放需要
|
|
2914
|
+
*/
|
|
2915
|
+
albumId?: string;
|
|
2916
|
+
/**
|
|
2917
|
+
* @brief 剧集id,Minis 短剧播放需要
|
|
2918
|
+
*/
|
|
2919
|
+
episodeId?: string;
|
|
2721
2920
|
/** {zh}
|
|
2722
2921
|
* @brief Vid 播放配置项。应用服务端需通过 `vid` 生成临时临时播放 Token,下发给客户端。
|
|
2723
2922
|
* @type {IPlayAuthTokenConfig}
|
|
2724
2923
|
* @memberof IPlayerConfig
|
|
2725
2924
|
*/
|
|
2726
2925
|
getVideoByToken?: IPlayAuthTokenConfig;
|
|
2926
|
+
/** {zh}
|
|
2927
|
+
* @brief 通过 `playAuthToken` 或缓存获取到媒体信息时触发的回调。
|
|
2928
|
+
* @default -
|
|
2929
|
+
*/
|
|
2930
|
+
/** {en}
|
|
2931
|
+
* @brief Callback fired when media information is obtained from `playAuthToken` or cache.
|
|
2932
|
+
* @default -
|
|
2933
|
+
*/
|
|
2934
|
+
onGetMediaInfo?: (payload: IGetMediaInfoCallbackPayload) => void;
|
|
2935
|
+
/** {zh}
|
|
2936
|
+
* @brief JSB `getDramaInfo` 返回客户端耗时信息时触发的回调。
|
|
2937
|
+
* @default -
|
|
2938
|
+
*/
|
|
2939
|
+
/** {en}
|
|
2940
|
+
* @brief Callback fired when JSB `getDramaInfo` returns client-side timing.
|
|
2941
|
+
* @default -
|
|
2942
|
+
*/
|
|
2943
|
+
onGetDramaInfoPerf?: (payload: IGetDramaInfoPerfCallbackPayload) => void;
|
|
2944
|
+
/** {zh}
|
|
2945
|
+
* @brief 是否自动使用 `playAuthToken` 或短剧信息返回的字幕列表。
|
|
2946
|
+
* @default false
|
|
2947
|
+
*/
|
|
2948
|
+
autoSubtitle?: boolean;
|
|
2949
|
+
/** {zh}
|
|
2950
|
+
* @brief 自动字幕项格式化回调。返回字符串或数字时作为字幕名称;返回 `false` 或 `{ show: false }` 时不展示该项;返回 `{ isDefault: true }` 或 `{ default: true }` 时设为默认字幕。
|
|
2951
|
+
* @default -
|
|
2952
|
+
*/
|
|
2953
|
+
formatAutoSubtitleItem?: IAutoSubtitleItemFormatter;
|
|
2727
2954
|
/** {zh}
|
|
2728
2955
|
* @brief 视频加密类型
|
|
2729
2956
|
* @default -
|
|
@@ -3261,6 +3488,31 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
3261
3488
|
* @default -
|
|
3262
3489
|
*/
|
|
3263
3490
|
sdkErrorPlugin?: ISdkErrorConfig;
|
|
3491
|
+
/** {zh}
|
|
3492
|
+
* @brief 原生媒体错误(如网络类 code 2/4)自动重试的最大次数,对应 {@link VeErrorOptions.oriErrRetryCount}。
|
|
3493
|
+
* @default 3
|
|
3494
|
+
*/
|
|
3495
|
+
oriErrRetryCount?: number;
|
|
3496
|
+
/** {zh}
|
|
3497
|
+
* @brief 上述重试计数的清零周期(毫秒),超时后重试次数重新统计,对应 {@link VeErrorOptions.oriErrRetryCycle}。
|
|
3498
|
+
* @default 10000
|
|
3499
|
+
*/
|
|
3500
|
+
oriErrRetryCycle?: number;
|
|
3501
|
+
/** {zh}
|
|
3502
|
+
* @brief 是否在原生媒体错误时自动重试拉流,对应 {@link VeErrorOptions.enableOriErrRetry}。
|
|
3503
|
+
* @default true
|
|
3504
|
+
*/
|
|
3505
|
+
enableOriErrRetry?: boolean;
|
|
3506
|
+
/** {zh}
|
|
3507
|
+
* @brief 是否在错误时同步分析网络/流(如 XHR 探测),对应 {@link VeErrorOptions.needSyncAnalyzeError}。
|
|
3508
|
+
* @default true
|
|
3509
|
+
*/
|
|
3510
|
+
needSyncAnalyzeError?: boolean;
|
|
3511
|
+
/** {zh}
|
|
3512
|
+
* @brief 错误分析请求超时时间(毫秒),对应 {@link VeErrorOptions.analyzeTimeout}。
|
|
3513
|
+
* @default 3000
|
|
3514
|
+
*/
|
|
3515
|
+
analyzeTimeout?: number;
|
|
3264
3516
|
/** {zh}
|
|
3265
3517
|
* @brief rtm配置,配置rtm拉流参数
|
|
3266
3518
|
* @notes 传入rtm流url时才生效
|
|
@@ -3972,6 +4224,174 @@ export interface ApiMapConfig {
|
|
|
3972
4224
|
playDomain: string;
|
|
3973
4225
|
backupPlayDomain?: string;
|
|
3974
4226
|
}
|
|
4227
|
+
/**
|
|
4228
|
+
* @list Options
|
|
4229
|
+
* @brief 字幕项。
|
|
4230
|
+
* @kind property
|
|
4231
|
+
*/
|
|
4232
|
+
/** {en}
|
|
4233
|
+
* @brief 字幕项配置
|
|
4234
|
+
*/
|
|
4235
|
+
export interface ISubTitleItem {
|
|
4236
|
+
/**
|
|
4237
|
+
* @brief 字幕语言。
|
|
4238
|
+
* @default -
|
|
4239
|
+
*/
|
|
4240
|
+
/** {en}
|
|
4241
|
+
* @brief 字幕语言
|
|
4242
|
+
*/
|
|
4243
|
+
language?: string | number;
|
|
4244
|
+
/**
|
|
4245
|
+
* @brief 字幕 ID。
|
|
4246
|
+
* @default -
|
|
4247
|
+
*/
|
|
4248
|
+
/** {en}
|
|
4249
|
+
* @brief 字幕id
|
|
4250
|
+
*/
|
|
4251
|
+
id?: number | string;
|
|
4252
|
+
/**
|
|
4253
|
+
* @brief 是否为默认选择的字幕。
|
|
4254
|
+
* @default false
|
|
4255
|
+
*/
|
|
4256
|
+
/** {en}
|
|
4257
|
+
* @brief 是否是默认选择的字幕
|
|
4258
|
+
*/
|
|
4259
|
+
isDefault?: boolean;
|
|
4260
|
+
/**
|
|
4261
|
+
* @brief 字幕名称。
|
|
4262
|
+
* @default -
|
|
4263
|
+
*/
|
|
4264
|
+
/** {en}
|
|
4265
|
+
* @brief 字幕名称
|
|
4266
|
+
*/
|
|
4267
|
+
text?: string;
|
|
4268
|
+
/**
|
|
4269
|
+
* @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
|
|
4270
|
+
* @default -
|
|
4271
|
+
*/
|
|
4272
|
+
label?: string | number;
|
|
4273
|
+
/**
|
|
4274
|
+
* @brief 外挂字幕 URL 地址。
|
|
4275
|
+
* @default -
|
|
4276
|
+
*/
|
|
4277
|
+
/** {en}
|
|
4278
|
+
* @brief 外挂字幕地址
|
|
4279
|
+
*/
|
|
4280
|
+
url?: string;
|
|
4281
|
+
/**
|
|
4282
|
+
* stringContent
|
|
4283
|
+
* @default 无
|
|
4284
|
+
* @hidden
|
|
4285
|
+
* @type {string}
|
|
4286
|
+
* @memberof ISubTitleItem
|
|
4287
|
+
*/
|
|
4288
|
+
stringContent?: string;
|
|
4289
|
+
/**
|
|
4290
|
+
* 字幕内容列表,非url形式时使用
|
|
4291
|
+
* @default 无
|
|
4292
|
+
* @type {Array<Object>}
|
|
4293
|
+
* @memberof ISubTitleItem
|
|
4294
|
+
* @brief 字幕内容列表。非 `url` 形式时使用。
|
|
4295
|
+
*/
|
|
4296
|
+
/** {en}
|
|
4297
|
+
* @brief 字幕内容列表,非url形式时使用
|
|
4298
|
+
*/
|
|
4299
|
+
list?: IListItem[];
|
|
4300
|
+
}
|
|
4301
|
+
/**
|
|
4302
|
+
* @brief 字幕内容项。
|
|
4303
|
+
* @list Options
|
|
4304
|
+
* @kind property
|
|
4305
|
+
* @export
|
|
4306
|
+
* @interface IListItem
|
|
4307
|
+
*/
|
|
4308
|
+
/** {en}
|
|
4309
|
+
* @brief 字幕内容项配置
|
|
4310
|
+
*/
|
|
4311
|
+
export interface IListItem {
|
|
4312
|
+
/**
|
|
4313
|
+
* 开始时间
|
|
4314
|
+
* @type {number}
|
|
4315
|
+
* @brief 开始时间,单位为秒。
|
|
4316
|
+
*/
|
|
4317
|
+
/** {en}
|
|
4318
|
+
* @brief 开始时间
|
|
4319
|
+
*/
|
|
4320
|
+
start: number;
|
|
4321
|
+
/**
|
|
4322
|
+
* 结束时间
|
|
4323
|
+
* @type {number}
|
|
4324
|
+
* @brief 结束时间,单位为秒。
|
|
4325
|
+
*/
|
|
4326
|
+
/** {en}
|
|
4327
|
+
* @brief 结束时间
|
|
4328
|
+
*/
|
|
4329
|
+
end: number;
|
|
4330
|
+
/**
|
|
4331
|
+
* 字幕数据列表
|
|
4332
|
+
* @type {Array<ITextItem>}
|
|
4333
|
+
* @brief 字幕数据列表。
|
|
4334
|
+
*/
|
|
4335
|
+
/** {en}
|
|
4336
|
+
* @brief 字幕数据列表
|
|
4337
|
+
*/
|
|
4338
|
+
list: Array<ITextItem>;
|
|
4339
|
+
/**
|
|
4340
|
+
* @default 无
|
|
4341
|
+
* @hidden
|
|
4342
|
+
* @type {any}
|
|
4343
|
+
*/
|
|
4344
|
+
[propName: string]: any;
|
|
4345
|
+
}
|
|
4346
|
+
/**
|
|
4347
|
+
* @breif 字幕文案配置
|
|
4348
|
+
* @list Options
|
|
4349
|
+
* @kind property
|
|
4350
|
+
*/
|
|
4351
|
+
export interface ITextItem {
|
|
4352
|
+
/**
|
|
4353
|
+
* @default 无
|
|
4354
|
+
* @hidden
|
|
4355
|
+
* @type {any}
|
|
4356
|
+
*/
|
|
4357
|
+
[propName: string]: any;
|
|
4358
|
+
/**
|
|
4359
|
+
* 开始时间
|
|
4360
|
+
* @type {number}
|
|
4361
|
+
* @brief 开始时间,单位为秒。
|
|
4362
|
+
*/
|
|
4363
|
+
/** {en}
|
|
4364
|
+
* @brief 开始时间
|
|
4365
|
+
*/
|
|
4366
|
+
start: number;
|
|
4367
|
+
/**
|
|
4368
|
+
* 结束时间
|
|
4369
|
+
* @type {number}
|
|
4370
|
+
* @brief 结束时间,单位为秒。
|
|
4371
|
+
*/
|
|
4372
|
+
/** {en}
|
|
4373
|
+
* @brief 结束时间
|
|
4374
|
+
*/
|
|
4375
|
+
end: number;
|
|
4376
|
+
/**
|
|
4377
|
+
* 字幕文案数组
|
|
4378
|
+
* @type {string[]}
|
|
4379
|
+
* @brief 字幕文案数组。
|
|
4380
|
+
*/
|
|
4381
|
+
/** {en}
|
|
4382
|
+
* @brief 字幕文案数组
|
|
4383
|
+
*/
|
|
4384
|
+
text: string[];
|
|
4385
|
+
/**
|
|
4386
|
+
* 字幕顺序
|
|
4387
|
+
* @type {number}
|
|
4388
|
+
* @brief 字幕顺序。
|
|
4389
|
+
*/
|
|
4390
|
+
/** {en}
|
|
4391
|
+
* @brief 字幕顺序
|
|
4392
|
+
*/
|
|
4393
|
+
index?: number;
|
|
4394
|
+
}
|
|
3975
4395
|
export type TLogChannel = "cn" | "va" | "sg";
|
|
3976
4396
|
declare enum PreloadScene {
|
|
3977
4397
|
/**
|
|
@@ -4233,7 +4653,7 @@ export declare type IPreloadUpdateConfig = {
|
|
|
4233
4653
|
* 预加载视频资源
|
|
4234
4654
|
* @detail Options
|
|
4235
4655
|
*/
|
|
4236
|
-
export declare type
|
|
4656
|
+
export declare type IPreloadResolvedStream = {
|
|
4237
4657
|
/**
|
|
4238
4658
|
* 视频唯一ID
|
|
4239
4659
|
* @brief 视频 ID
|
|
@@ -4295,6 +4715,43 @@ export declare type IPreloadStream = {
|
|
|
4295
4715
|
*/
|
|
4296
4716
|
size: number;
|
|
4297
4717
|
};
|
|
4718
|
+
export declare type IPreloadDramaStream = {
|
|
4719
|
+
/**
|
|
4720
|
+
* 视频唯一ID
|
|
4721
|
+
*/
|
|
4722
|
+
vid?: string;
|
|
4723
|
+
/**
|
|
4724
|
+
* 短剧剧 ID
|
|
4725
|
+
*/
|
|
4726
|
+
albumId: string;
|
|
4727
|
+
/**
|
|
4728
|
+
* 短剧剧集 ID
|
|
4729
|
+
*/
|
|
4730
|
+
episodeId: string;
|
|
4731
|
+
/**
|
|
4732
|
+
* 默认清晰度,用于缓存 key 和预加载流选择
|
|
4733
|
+
*/
|
|
4734
|
+
defaultDefinition?: string;
|
|
4735
|
+
/**
|
|
4736
|
+
* Vid 播放配置。短剧预加载会复用 playAuthToken 等配置请求短剧信息。
|
|
4737
|
+
*/
|
|
4738
|
+
getVideoByToken?: IPlayAuthTokenConfig;
|
|
4739
|
+
};
|
|
4740
|
+
export declare type IPreloadAuthTokenStream = {
|
|
4741
|
+
/**
|
|
4742
|
+
* 视频唯一ID
|
|
4743
|
+
*/
|
|
4744
|
+
vid?: string;
|
|
4745
|
+
/**
|
|
4746
|
+
* 默认清晰度,用于选择预加载流
|
|
4747
|
+
*/
|
|
4748
|
+
defaultDefinition?: string;
|
|
4749
|
+
/**
|
|
4750
|
+
* Vid 播放配置。预加载会复用 playAuthToken 请求媒体信息。
|
|
4751
|
+
*/
|
|
4752
|
+
getVideoByToken: IPlayAuthTokenConfig;
|
|
4753
|
+
};
|
|
4754
|
+
export declare type IPreloadStream = IPreloadResolvedStream | IPreloadDramaStream | IPreloadAuthTokenStream;
|
|
4298
4755
|
declare class VeStrategyWrapper {
|
|
4299
4756
|
private tea;
|
|
4300
4757
|
private static mapStrategyNameToUmdKey;
|
|
@@ -4373,6 +4830,8 @@ export declare type UMDMap = Record<UmdKeys, {
|
|
|
4373
4830
|
declare class UMDLoader {
|
|
4374
4831
|
private static jsLoadMap;
|
|
4375
4832
|
private static jsLoadPromiseMap;
|
|
4833
|
+
/** 清除指定插件的加载缓存,使下次 loadPlugins 重新触发加载(用于修复首次加载失败的情况) */
|
|
4834
|
+
clearPluginCache(pluginName: UmdKeys): void;
|
|
4376
4835
|
umdMap: UMDMap;
|
|
4377
4836
|
backupUmdUrlMap: Record<string, string>;
|
|
4378
4837
|
failCallback: (umdName: string, err: any) => any;
|
|
@@ -4454,6 +4913,129 @@ export declare class SdkPlugin {
|
|
|
4454
4913
|
*/
|
|
4455
4914
|
__destroy(): void;
|
|
4456
4915
|
}
|
|
4916
|
+
/**
|
|
4917
|
+
* @author bytedance
|
|
4918
|
+
* @version 1.0
|
|
4919
|
+
* @Description
|
|
4920
|
+
* @date 2024/12/16 17:59
|
|
4921
|
+
*/
|
|
4922
|
+
export declare const enum LangTextKey {
|
|
4923
|
+
NETWORK = "NETWORK",
|
|
4924
|
+
NETWORK_TIMEOUT = "NETWORK_TIMEOUT",
|
|
4925
|
+
NETWORK_FORBIDDEN = "NETWORK_FORBIDDEN",
|
|
4926
|
+
NETWORK_NOTFOUND = "NETWORK_NOTFOUND",
|
|
4927
|
+
NETWORK_RANGE_NOT_SATISFIABLE = "NETWORK_RANGE_NOT_SATISFIABLE",
|
|
4928
|
+
NETWORK_PROTOCOL = "NETWORK_PROTOCOL",
|
|
4929
|
+
NETWORK_URL_EXPIRE = "NETWORK_URL_EXPIRE",
|
|
4930
|
+
NETWORK_URL_SIGN = "NETWORK_URL_SIGN",
|
|
4931
|
+
NETWORK_ENCRYPT_HLS_ERR = "NETWORK_ENCRYPT_HLS_ERR",
|
|
4932
|
+
MEDIA_ERR = "MEDIA_ERR",
|
|
4933
|
+
MEDIA_ERR_ABORTED = "MEDIA_ERR_ABORTED",
|
|
4934
|
+
MEDIA_ERR_NETWORK = "MEDIA_ERR_NETWORK",
|
|
4935
|
+
MEDIA_ERR_DECODE = "MEDIA_ERR_DECODE",
|
|
4936
|
+
MEDIA_ERR_SRC_NOT_SUPPORTED = "MEDIA_ERR_SRC_NOT_SUPPORTED",
|
|
4937
|
+
MEDIA_ERR_NOT_SUPPORTED = "MEDIA_ERR_NOT_SUPPORTED",
|
|
4938
|
+
MEDIA_ERR_URL_EMPTY = "MEDIA_ERR_URL_EMPTY",
|
|
4939
|
+
MEDIA_ERR_FILE_NOT_SUPPORTED = "MEDIA_ERR_FILE_NOT_SUPPORTED",
|
|
4940
|
+
MEDIA_ERR_PLAY_ERR = "MEDIA_ERR_PLAY_ERR",
|
|
4941
|
+
MEDIA_SOURCE_CANNOT_PLAY_TYPE = "MEDIA_SOURCE_CANNOT_PLAY_TYPE",
|
|
4942
|
+
BUSINESS_DRM_NOT_SUPPORT = "BUSINESS_DRM_NOT_SUPPORT",
|
|
4943
|
+
BUSINESS_DRM_NOT_SUPPORT_UN_RECORD = "BUSINESS_DRM_NOT_SUPPORT_UN_RECORD",
|
|
4944
|
+
BUSINESS_DRM_LACK_MEDIA_KEY = "BUSINESS_DRM_LACK_MEDIA_KEY",
|
|
4945
|
+
BUSINESS_DRM_LACK_KEY_SESSION = "BUSINESS_DRM_LACK_KEY_SESSION",
|
|
4946
|
+
BUSINESS_DRM_GENERATE_REQUEST_FAIL = "BUSINESS_DRM_GENERATE_REQUEST_FAIL",
|
|
4947
|
+
BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH = "BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH",
|
|
4948
|
+
BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH = "BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH",
|
|
4949
|
+
BUSINESS_DRM_LICENSE_FAIL = "BUSINESS_DRM_LICENSE_FAIL",
|
|
4950
|
+
BUSINESS_DRM_KEY_ERROR = "BUSINESS_DRM_KEY_ERROR",
|
|
4951
|
+
BUSINESS_DRM_CERT_FAIL = "BUSINESS_DRM_CERT_FAIL",
|
|
4952
|
+
PRIVATE_DRM_KEY_GET_FAILED = "PRIVATE_DRM_KEY_GET_FAILED",
|
|
4953
|
+
PRIVATE_DRM_CRYPTO_NOT_SUPPORT = "PRIVATE_DRM_CRYPTO_NOT_SUPPORT",
|
|
4954
|
+
PRIVATE_DRM_RSA_FAIL = "PRIVATE_DRM_RSA_FAIL",
|
|
4955
|
+
OTHER = "OTHER",
|
|
4956
|
+
VOD_LOG_NOT_CONFIGURED = "VOD_LOG_NOT_CONFIGURED",
|
|
4957
|
+
PLAY_AUTH_TOKEN_EXPIRED = "PLAY_AUTH_TOKEN_EXPIRED",
|
|
4958
|
+
HLS_KEY_TOKEN_EXPIRED = "HLS_KEY_TOKEN_EXPIRED",
|
|
4959
|
+
THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED = "THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED",
|
|
4960
|
+
GET_PLAY_INFO_ERR = "GET_PLAY_INFO_ERR",
|
|
4961
|
+
GET_HLS_DECRYPTION_KEY_ERR = "GET_HLS_DECRYPTION_KEY_ERR",
|
|
4962
|
+
LICENSE_VALIDATE_FAIL = "LICENSE_VALIDATE_FAIL",
|
|
4963
|
+
DEFINITION_AUTO = "DEFINITION_AUTO",
|
|
4964
|
+
LICENSE_STATUS_INVALID = "LICENSE_STATUS_INVALID",
|
|
4965
|
+
LICENSE_STATUS_ERROR_DOMAIN_NOT_MATCH = "LICENSE_STATUS_ERROR_DOMAIN_NOT_MATCH",
|
|
4966
|
+
BASE_LICENSE_NOT_SUPPORT_265 = "BASE_LICENSE_NOT_SUPPORT_265",
|
|
4967
|
+
BASE_LICENSE_NOT_SUPPORT_ABR = "BASE_LICENSE_NOT_SUPPORT_ABR",
|
|
4968
|
+
BASE_LICENSE_NOT_SUPPORT_ADAPT_BUFFER = "BASE_LICENSE_NOT_SUPPORT_ADAPT_BUFFER",
|
|
4969
|
+
BASE_LICENSE_NOT_SUPPORT_PRELOAD = "BASE_LICENSE_NOT_SUPPORT_PRELOAD",
|
|
4970
|
+
EXPIRED_LICENSE_NOT_SUPPORT_265 = "EXPIRED_LICENSE_NOT_SUPPORT_265",
|
|
4971
|
+
EXPIRED_LICENSE_NOT_SUPPORT_ABR = "EXPIRED_LICENSE_NOT_SUPPORT_ABR",
|
|
4972
|
+
EXPIRED_LICENSE_NOT_SUPPORT_ADAPT_BUFFER = "EXPIRED_LICENSE_NOT_SUPPORT_ADAPT_BUFFER",
|
|
4973
|
+
EXPIRED_LICENSE_NOT_SUPPORT_PRELOAD = "EXPIRED_LICENSE_NOT_SUPPORT_PRELOAD",
|
|
4974
|
+
/** Short drama (Minis) errors — codes 93xx */
|
|
4975
|
+
DRAMA_INVALID_PARAM = "DRAMA_INVALID_PARAM",
|
|
4976
|
+
DRAMA_NO_INFO_FOUND = "DRAMA_NO_INFO_FOUND",
|
|
4977
|
+
DRAMA_NOT_SUBMITTED = "DRAMA_NOT_SUBMITTED",
|
|
4978
|
+
DRAMA_UNDER_REVIEW = "DRAMA_UNDER_REVIEW",
|
|
4979
|
+
DRAMA_FAILED_REVIEW = "DRAMA_FAILED_REVIEW",
|
|
4980
|
+
DRAMA_WITHDRAWN_REVIEW = "DRAMA_WITHDRAWN_REVIEW",
|
|
4981
|
+
DRAMA_FAILED_TO_QUERY = "DRAMA_FAILED_TO_QUERY",
|
|
4982
|
+
DRAMA_INVALID_TTOP_TOKEN = "DRAMA_INVALID_TTOP_TOKEN",
|
|
4983
|
+
DRAMA_NOT_ON_SHELF = "DRAMA_NOT_ON_SHELF",
|
|
4984
|
+
DRAMA_FAILED_GET_EPISODE_INFO = "DRAMA_FAILED_GET_EPISODE_INFO"
|
|
4985
|
+
}
|
|
4986
|
+
declare const DRAMA_ERROR_CODE: {
|
|
4987
|
+
/** 9301 - 短剧环境下参数不合法(如使用 url/playList 播放,或缺少 albumId / episodeId) */
|
|
4988
|
+
readonly INVALID_PARAM: {
|
|
4989
|
+
readonly code: 9301;
|
|
4990
|
+
readonly message: "Invalid parameter in short drama environment";
|
|
4991
|
+
readonly textKey: LangTextKey.DRAMA_INVALID_PARAM;
|
|
4992
|
+
};
|
|
4993
|
+
readonly NO_INFO_FOUND: {
|
|
4994
|
+
readonly code: 9302;
|
|
4995
|
+
readonly message: "No information found for this Episode";
|
|
4996
|
+
readonly textKey: LangTextKey.DRAMA_NO_INFO_FOUND;
|
|
4997
|
+
};
|
|
4998
|
+
readonly NOT_SUBMITTED: {
|
|
4999
|
+
readonly code: 9303;
|
|
5000
|
+
readonly message: "Episode not submitted for review";
|
|
5001
|
+
readonly textKey: LangTextKey.DRAMA_NOT_SUBMITTED;
|
|
5002
|
+
};
|
|
5003
|
+
readonly UNDER_REVIEW: {
|
|
5004
|
+
readonly code: 9304;
|
|
5005
|
+
readonly message: "Episode under for review";
|
|
5006
|
+
readonly textKey: LangTextKey.DRAMA_UNDER_REVIEW;
|
|
5007
|
+
};
|
|
5008
|
+
readonly FAILED_REVIEW: {
|
|
5009
|
+
readonly code: 9305;
|
|
5010
|
+
readonly message: "Episode failed review";
|
|
5011
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_REVIEW;
|
|
5012
|
+
};
|
|
5013
|
+
readonly WITHDRAWN_REVIEW: {
|
|
5014
|
+
readonly code: 9306;
|
|
5015
|
+
readonly message: "Episode withdrawn from review";
|
|
5016
|
+
readonly textKey: LangTextKey.DRAMA_WITHDRAWN_REVIEW;
|
|
5017
|
+
};
|
|
5018
|
+
readonly FAILED_TO_QUERY: {
|
|
5019
|
+
readonly code: 9307;
|
|
5020
|
+
readonly message: "Failed to query video playback information";
|
|
5021
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_TO_QUERY;
|
|
5022
|
+
};
|
|
5023
|
+
readonly INVALID_TTOP_TOKEN: {
|
|
5024
|
+
readonly code: 9308;
|
|
5025
|
+
readonly message: "Invalid playAuthToken or failed to verify TTOP token";
|
|
5026
|
+
readonly textKey: LangTextKey.DRAMA_INVALID_TTOP_TOKEN;
|
|
5027
|
+
};
|
|
5028
|
+
readonly NOT_ON_SHELF: {
|
|
5029
|
+
readonly code: 9310;
|
|
5030
|
+
readonly message: "Video is not on shelf";
|
|
5031
|
+
readonly textKey: LangTextKey.DRAMA_NOT_ON_SHELF;
|
|
5032
|
+
};
|
|
5033
|
+
readonly FAILED_GET_EPISODE_INFO: {
|
|
5034
|
+
readonly code: 9399;
|
|
5035
|
+
readonly message: "Failed get episode info";
|
|
5036
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_GET_EPISODE_INFO;
|
|
5037
|
+
};
|
|
5038
|
+
};
|
|
4457
5039
|
declare class AuthToken extends SdkPlugin {
|
|
4458
5040
|
static get pluginName(): string;
|
|
4459
5041
|
isPlayByToken: boolean;
|
|
@@ -4475,13 +5057,50 @@ declare class AuthToken extends SdkPlugin {
|
|
|
4475
5057
|
codec: ICodecType;
|
|
4476
5058
|
defaultDefinition: string;
|
|
4477
5059
|
}>;
|
|
5060
|
+
/**
|
|
5061
|
+
* 短剧 Minis 环境:通过 JSB getDramaInfo 获取媒体信息
|
|
5062
|
+
*/
|
|
5063
|
+
getDramaInfoViaJSB(): Promise<VideoInfoRes | undefined>;
|
|
5064
|
+
/**
|
|
5065
|
+
* 将审核状态映射到短剧错误码
|
|
5066
|
+
*/
|
|
5067
|
+
mapReviewStatusToErrorCode(status: number): keyof typeof DRAMA_ERROR_CODE;
|
|
5068
|
+
/**
|
|
5069
|
+
* 根据 JSB 返回的 msg 或 status 映射到错误码 key
|
|
5070
|
+
*/
|
|
5071
|
+
mapDramaErrorCode(msg: string, status?: number): keyof typeof DRAMA_ERROR_CODE;
|
|
5072
|
+
/**
|
|
5073
|
+
* 将 JSB 返回的 video_info 转换为 VideoInfoRes 格式
|
|
5074
|
+
*/
|
|
5075
|
+
transformDramaVideoInfoToRes(videoInfo: any, config: IPlayAuthTokenConfig): VideoInfoRes;
|
|
5076
|
+
callOnGetMediaInfo(mediaInfo: VideoInfoRes | undefined, fromCache: boolean): void;
|
|
5077
|
+
reportGetDramaInfoPerf(res: IJSBCallbackResult | undefined, request: {
|
|
5078
|
+
albumId?: string;
|
|
5079
|
+
episodeId?: string;
|
|
5080
|
+
vid?: string;
|
|
5081
|
+
}): void;
|
|
4478
5082
|
getVideos(): Promise<any>;
|
|
4479
5083
|
getPrivateDrmInfo(playList: Stream[], vid: string, streamType: string): Promise<void>;
|
|
4480
5084
|
getThumbnailConfig(thumbs: IThumbInfoItem[]): void;
|
|
4481
5085
|
getBarrageMaskUrl(url: string): void;
|
|
5086
|
+
setSubtitleConfig(mediaInfo: VideoInfoRes | undefined): void;
|
|
5087
|
+
getAutoSubtitleList(mediaInfo: VideoInfoRes): ISubTitleItem[];
|
|
5088
|
+
getSubtitleSourceData(mediaInfo: VideoInfoRes): any;
|
|
5089
|
+
getAutoSubtitleItem(item: any, index: number): ISubTitleItem | undefined;
|
|
5090
|
+
getStringAutoSubtitleItem(item: string, index: number): ISubTitleItem;
|
|
5091
|
+
getObjectAutoSubtitleItem(item: any, index: number): ISubTitleItem | undefined;
|
|
5092
|
+
formatAutoSubtitleItem(subtitleItem: ISubTitleItem, rawItem: any, index: number): ISubTitleItem | undefined;
|
|
4482
5093
|
getDrmConfig(videoInfo: IVideoInfo): void;
|
|
5094
|
+
/**
|
|
5095
|
+
* 是否处于短剧 Minis 环境(通过剧 ID + 剧集 ID 获取视频)
|
|
5096
|
+
*/
|
|
5097
|
+
get isMinisDramaMode(): boolean;
|
|
4483
5098
|
init(): void;
|
|
4484
5099
|
initConfig(getVideoByToken: IPlayAuthTokenConfig): void;
|
|
5100
|
+
/**
|
|
5101
|
+
* 剧集切换:configs 已由 player 更新 album_id/episode_id,重新拉取媒体信息
|
|
5102
|
+
*/
|
|
5103
|
+
updateDramaEpisode(isNewVideo: boolean): Promise<void>;
|
|
4485
5104
|
/**
|
|
4486
5105
|
* @description 更新playAuthToken
|
|
4487
5106
|
* @param {IPlayAuthTokenConfig} getVideoByToken token信息
|
|
@@ -4601,9 +5220,7 @@ declare class PlayerData {
|
|
|
4601
5220
|
* @brief 私有加密会话id
|
|
4602
5221
|
*/
|
|
4603
5222
|
encryptSessionId?: string;
|
|
4604
|
-
constructor(configs: IPlayerConfig
|
|
4605
|
-
licensSupportModuleList: string[];
|
|
4606
|
-
}, sdk: VePlayer);
|
|
5223
|
+
constructor(configs: IPlayerConfig, sdk: VePlayer);
|
|
4607
5224
|
/**
|
|
4608
5225
|
* 初始化播放数据
|
|
4609
5226
|
* @param configs { IPlayerConfig } 播放器配置
|
|
@@ -4730,34 +5347,62 @@ declare class MobilePlayerPanel {
|
|
|
4730
5347
|
bind(event: string, eventHandle: any, isBubble?: boolean): void;
|
|
4731
5348
|
destroy(): void;
|
|
4732
5349
|
}
|
|
4733
|
-
export
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
}
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
5350
|
+
export declare type MediaInfoCacheType = "memory" | "localStorage";
|
|
5351
|
+
/** {zh}
|
|
5352
|
+
* @brief 媒体信息本地缓存配置。
|
|
5353
|
+
* @list Options
|
|
5354
|
+
* @kind property
|
|
5355
|
+
*/
|
|
5356
|
+
/** {en}
|
|
5357
|
+
* @brief Local media info cache config.
|
|
5358
|
+
* @list Options
|
|
5359
|
+
* @kind property
|
|
5360
|
+
*/
|
|
5361
|
+
export interface MediaInfoCacheConfig {
|
|
5362
|
+
/** {zh}
|
|
5363
|
+
* @brief 是否启用媒体信息本地缓存。默认关闭。
|
|
5364
|
+
* @default false
|
|
5365
|
+
*/
|
|
5366
|
+
/** {en}
|
|
5367
|
+
* @brief Whether to enable local media info cache. Disabled by default.
|
|
5368
|
+
* @default false
|
|
5369
|
+
*/
|
|
5370
|
+
enable?: boolean;
|
|
5371
|
+
/** {zh}
|
|
5372
|
+
* @brief 缓存方式。默认使用内存缓存,设置为 localStorage 时写入浏览器本地存储。
|
|
5373
|
+
* @default memory
|
|
5374
|
+
*/
|
|
5375
|
+
/** {en}
|
|
5376
|
+
* @brief Cache storage type. Memory cache is used by default. Set to localStorage to write browser local storage.
|
|
5377
|
+
* @default memory
|
|
5378
|
+
*/
|
|
5379
|
+
cacheType?: MediaInfoCacheType;
|
|
5380
|
+
/** {zh}
|
|
5381
|
+
* @brief 缓存过期时间,单位毫秒。默认 30 分钟。
|
|
5382
|
+
* @default 1800000
|
|
5383
|
+
*/
|
|
5384
|
+
/** {en}
|
|
5385
|
+
* @brief Cache expiration time in milliseconds. Defaults to 30 minutes.
|
|
5386
|
+
* @default 1800000
|
|
5387
|
+
*/
|
|
5388
|
+
expireTime?: number;
|
|
5389
|
+
/** {zh}
|
|
5390
|
+
* @brief 最多缓存的媒体信息条数,默认 100。
|
|
5391
|
+
* @default 100
|
|
5392
|
+
*/
|
|
5393
|
+
/** {en}
|
|
5394
|
+
* @brief Maximum number of media info entries to cache. Defaults to 100.
|
|
5395
|
+
* @default 100
|
|
5396
|
+
*/
|
|
5397
|
+
maxEntries?: number;
|
|
4760
5398
|
}
|
|
5399
|
+
export declare type NormalizedMediaInfoCacheConfig = {
|
|
5400
|
+
enable: boolean;
|
|
5401
|
+
expireTime: number;
|
|
5402
|
+
cacheType: MediaInfoCacheType;
|
|
5403
|
+
maxEntries: number;
|
|
5404
|
+
};
|
|
5405
|
+
declare function getMediaInfoCacheConfig(): NormalizedMediaInfoCacheConfig;
|
|
4761
5406
|
/** {zh}
|
|
4762
5407
|
* @hidden
|
|
4763
5408
|
*/
|
|
@@ -4773,10 +5418,6 @@ export declare type PlayerCore = Player & {
|
|
|
4773
5418
|
panel?: MobilePlayerPanel;
|
|
4774
5419
|
emitExpireTimestamp?: number;
|
|
4775
5420
|
vodLogger?: VodLogger;
|
|
4776
|
-
licenseLogInfo?: {
|
|
4777
|
-
licenseStatus: LicenseStatus;
|
|
4778
|
-
licenseType: LicenseEdition;
|
|
4779
|
-
};
|
|
4780
5421
|
};
|
|
4781
5422
|
/**
|
|
4782
5423
|
* @brief 加密混淆信息
|
|
@@ -4849,6 +5490,18 @@ declare class VePlayer {
|
|
|
4849
5490
|
* @memberof VePlayer
|
|
4850
5491
|
*/
|
|
4851
5492
|
private _emitter;
|
|
5493
|
+
/**
|
|
5494
|
+
* @hidden
|
|
5495
|
+
* createPlayer 阶段耗时采集器(仅在 createPlayer 执行期间存在)
|
|
5496
|
+
*/
|
|
5497
|
+
_createPlayerPerf?: CreatePlayerPerfCollector;
|
|
5498
|
+
/**
|
|
5499
|
+
* @hidden
|
|
5500
|
+
* 最近一次 createPlayer 性能报告
|
|
5501
|
+
*/
|
|
5502
|
+
private _lastCreatePlayerPerfReport?;
|
|
5503
|
+
private _isCollectingCreatePlayerPerf;
|
|
5504
|
+
private _getDramaInfoPerfRecords;
|
|
4852
5505
|
/**
|
|
4853
5506
|
*
|
|
4854
5507
|
*
|
|
@@ -4891,6 +5544,22 @@ declare class VePlayer {
|
|
|
4891
5544
|
* @memberof VePlayer
|
|
4892
5545
|
*/
|
|
4893
5546
|
delayError: any[];
|
|
5547
|
+
/** {zh}
|
|
5548
|
+
* @brief 设置是否为通过短剧信息或 playAuthToken 获取到的视频地址追加时间戳 query(t=Date.now())。
|
|
5549
|
+
* @param enable true=追加时间戳,false=不追加
|
|
5550
|
+
*/
|
|
5551
|
+
/** {en}
|
|
5552
|
+
* @brief Set whether to append a timestamp query (t=Date.now()) to video URLs from drama info or playAuthToken.
|
|
5553
|
+
* @param enable true=append timestamp, false=do not append
|
|
5554
|
+
*/
|
|
5555
|
+
static setAppendVideoUrlTimestamp(enable?: boolean): void;
|
|
5556
|
+
/** {zh}
|
|
5557
|
+
* @hidden
|
|
5558
|
+
*/
|
|
5559
|
+
/** {en}
|
|
5560
|
+
* @hidden
|
|
5561
|
+
*/
|
|
5562
|
+
static getAppendVideoUrlTimestamp(): boolean;
|
|
4894
5563
|
/**
|
|
4895
5564
|
* @hidden
|
|
4896
5565
|
* umd加载器
|
|
@@ -4906,7 +5575,6 @@ declare class VePlayer {
|
|
|
4906
5575
|
/**
|
|
4907
5576
|
* @hidden
|
|
4908
5577
|
*/
|
|
4909
|
-
static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
|
|
4910
5578
|
/**
|
|
4911
5579
|
* @hidden
|
|
4912
5580
|
*/
|
|
@@ -4917,6 +5585,51 @@ declare class VePlayer {
|
|
|
4917
5585
|
* @memberof VePlayer
|
|
4918
5586
|
*/
|
|
4919
5587
|
static sdkVersion: string;
|
|
5588
|
+
/**
|
|
5589
|
+
* @brief TT短剧环境配置
|
|
5590
|
+
* @type {ITTDramaEnv | null}
|
|
5591
|
+
* @memberof VePlayer
|
|
5592
|
+
*/
|
|
5593
|
+
static ttDramaEnv: ITTDramaEnv | null;
|
|
5594
|
+
/** {zh}
|
|
5595
|
+
* @brief 设置TT短剧播放环境
|
|
5596
|
+
* @param env 短剧环境配置,详情见{@link ITTDramaEnv}
|
|
5597
|
+
*/
|
|
5598
|
+
static setTTDramaEnv(env: ITTDramaEnv): void;
|
|
5599
|
+
/** {zh}
|
|
5600
|
+
* @brief 设置媒体信息本地缓存配置,默认关闭。开启后,通过短剧信息或 playAuthToken 获取媒体信息时优先使用缓存。
|
|
5601
|
+
* @param config 缓存配置
|
|
5602
|
+
*/
|
|
5603
|
+
/** {en}
|
|
5604
|
+
* @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.
|
|
5605
|
+
* @param config Cache config
|
|
5606
|
+
*/
|
|
5607
|
+
static setMediaInfoCacheConfig(config: MediaInfoCacheConfig): void;
|
|
5608
|
+
/** {zh}
|
|
5609
|
+
* @brief 获取当前媒体信息本地缓存配置。
|
|
5610
|
+
* @returns 当前媒体信息缓存配置。
|
|
5611
|
+
*/
|
|
5612
|
+
/** {en}
|
|
5613
|
+
* @brief Get current local media info cache config.
|
|
5614
|
+
* @returns Current media info cache config.
|
|
5615
|
+
*/
|
|
5616
|
+
static getMediaInfoCacheConfig(): ReturnType<typeof getMediaInfoCacheConfig>;
|
|
5617
|
+
/** {zh}
|
|
5618
|
+
* @brief 清除媒体信息缓存,会同时清除内存缓存和 localStorage 缓存。
|
|
5619
|
+
*/
|
|
5620
|
+
/** {en}
|
|
5621
|
+
* @brief Clear media info cache from both memory cache and localStorage cache.
|
|
5622
|
+
*/
|
|
5623
|
+
static clearMediaInfoCache(): void;
|
|
5624
|
+
/** {zh}
|
|
5625
|
+
* @brief 设置全局日志开关。开启后会输出 VE_DEBUG.log 级别日志。
|
|
5626
|
+
* @param enable 是否开启详细日志
|
|
5627
|
+
*/
|
|
5628
|
+
/** {en}
|
|
5629
|
+
* @brief Set the global log switch. When enabled, VE_DEBUG.log level logs are printed.
|
|
5630
|
+
* @param enable Whether to enable verbose logs
|
|
5631
|
+
*/
|
|
5632
|
+
static setDebug(enable: boolean): void;
|
|
4920
5633
|
/**
|
|
4921
5634
|
* @hidden
|
|
4922
5635
|
*/
|
|
@@ -4949,7 +5662,7 @@ declare class VePlayer {
|
|
|
4949
5662
|
* @brief 添加待预加载视频列表
|
|
4950
5663
|
* @param list 待预加载视频列表,详情见{@link IPreloadStream[]}。
|
|
4951
5664
|
*/
|
|
4952
|
-
static addPreloadList(list: IPreloadStream[]): void
|
|
5665
|
+
static addPreloadList(list: IPreloadStream[]): Promise<void>;
|
|
4953
5666
|
/** {zh}
|
|
4954
5667
|
* @brief 设置待预加载视频列表,替换当前已设置的待预加载列表
|
|
4955
5668
|
* @param list 待预加载视频列表,详情见{@link IPreloadStream[]}
|
|
@@ -4960,14 +5673,6 @@ declare class VePlayer {
|
|
|
4960
5673
|
* @param codec
|
|
4961
5674
|
* @param options
|
|
4962
5675
|
*/
|
|
4963
|
-
static isRTMSupportCodec: (codec: RTMCodec, options: {
|
|
4964
|
-
targetProfileLevel?: string;
|
|
4965
|
-
}) => Promise<boolean>;
|
|
4966
|
-
static setLicenseConfig(config: ILicenseConfig): Promise<void>;
|
|
4967
|
-
static checkLicense(): Promise<LicenseEdition>;
|
|
4968
|
-
static checkModuleList(): Promise<string[]>;
|
|
4969
|
-
static checkLicenseStatus(): Promise<LicenseStatus>;
|
|
4970
|
-
static checkLicenseModuleAuth(module: string, featureName: LicenseFeature): Promise<boolean>;
|
|
4971
5676
|
/**
|
|
4972
5677
|
* @breif 生成加密混淆的数据信息
|
|
4973
5678
|
* @param unionId 用户唯一id
|
|
@@ -5115,7 +5820,6 @@ declare class VePlayer {
|
|
|
5115
5820
|
* @hidden
|
|
5116
5821
|
*/
|
|
5117
5822
|
createPlayer: () => Promise<PlayerCore>;
|
|
5118
|
-
private checkLicenseCallback;
|
|
5119
5823
|
/** {zh}
|
|
5120
5824
|
* @hidden
|
|
5121
5825
|
* @brief 设置合并开发者的插件配置,如果开发者从初始化的configs里传了插件配置,则只用开发者的配置,并补齐其他参数
|
|
@@ -5181,6 +5885,28 @@ declare class VePlayer {
|
|
|
5181
5885
|
* @memberof VePlayer
|
|
5182
5886
|
*/
|
|
5183
5887
|
beforePlayerCreate(): Promise<void>;
|
|
5888
|
+
/** {zh}
|
|
5889
|
+
* @hidden
|
|
5890
|
+
* @brief 获取最近一次 createPlayer 的性能报告。
|
|
5891
|
+
*/
|
|
5892
|
+
/** {en}
|
|
5893
|
+
* @hidden
|
|
5894
|
+
* @brief Get the perf report of the latest createPlayer.
|
|
5895
|
+
*/
|
|
5896
|
+
getCreatePlayerPerfReport(): ICreatePlayerPerfReport;
|
|
5897
|
+
/**
|
|
5898
|
+
* @brief 记录一次 JSB getDramaInfo 返回的客户端耗时信息。
|
|
5899
|
+
*/
|
|
5900
|
+
recordGetDramaInfoPerf(payload: IGetDramaInfoPerfCallbackPayload): void;
|
|
5901
|
+
/**
|
|
5902
|
+
* @brief 获取当前播放器实例记录到的 getDramaInfo 客户端耗时列表。
|
|
5903
|
+
*/
|
|
5904
|
+
getDramaInfoPerfRecords(): IGetDramaInfoPerfCallbackPayload[];
|
|
5905
|
+
/**
|
|
5906
|
+
* @brief 获取最近一次 getDramaInfo 客户端耗时。
|
|
5907
|
+
*/
|
|
5908
|
+
getLastDramaInfoPerf(): IGetDramaInfoPerfCallbackPayload | undefined;
|
|
5909
|
+
private _markGetDramaInfoClientPerf;
|
|
5184
5910
|
private prepareStrategies;
|
|
5185
5911
|
/**
|
|
5186
5912
|
* @hidden
|
|
@@ -5227,6 +5953,7 @@ declare class VePlayer {
|
|
|
5227
5953
|
* @memberof VePlayer
|
|
5228
5954
|
*/
|
|
5229
5955
|
private _bindPlayerEvents;
|
|
5956
|
+
private _onMp4PreloadInfo;
|
|
5230
5957
|
private _proxyError;
|
|
5231
5958
|
private _onError;
|
|
5232
5959
|
/** {zh}
|
|
@@ -5335,17 +6062,45 @@ declare class VePlayer {
|
|
|
5335
6062
|
* @hidden
|
|
5336
6063
|
*/
|
|
5337
6064
|
next(config: IPlayerConfig, isNewVideo?: boolean): Promise<void>;
|
|
6065
|
+
/** {zh}
|
|
6066
|
+
* @brief 当前播放器命中预加载的情况
|
|
6067
|
+
* @type {{
|
|
6068
|
+
* hit: number, // 0-未命中 1-命中
|
|
6069
|
+
* duration: 0, // 预加载时长
|
|
6070
|
+
* length: 0 // 预加载数据长度
|
|
6071
|
+
* }}
|
|
6072
|
+
*/
|
|
6073
|
+
/** {en}
|
|
6074
|
+
* @brief Whether the current playback hit preloaded data.
|
|
6075
|
+
* @type {{
|
|
6076
|
+
* hit: number, // 0-miss 1-hit
|
|
6077
|
+
* duration: number, // preloaded duration
|
|
6078
|
+
* length: number // preloaded data length in bytes
|
|
6079
|
+
* }}
|
|
6080
|
+
*/
|
|
6081
|
+
get preLoadData(): {
|
|
6082
|
+
hit: number;
|
|
6083
|
+
duration?: number;
|
|
6084
|
+
length?: number;
|
|
6085
|
+
};
|
|
5338
6086
|
/** {zh}
|
|
5339
6087
|
* @brief 播放下一视频。
|
|
5340
6088
|
* @return{Promise<any>}
|
|
5341
6089
|
* @memberof VePlayer
|
|
5342
6090
|
* @notes - 成功更换视频源后,默认是暂停状态。如果设置了自动播放,则会自动播放。
|
|
5343
6091
|
* - 此接口不支持切换火山引擎私有加密视频。
|
|
5344
|
-
* @param config
|
|
6092
|
+
* @param config 播放器实例化配置
|
|
5345
6093
|
* @param isNewVideo 是否为新视频。为 `false` 时,更换后,会从更换前的时间点继续播放。
|
|
5346
6094
|
*/
|
|
5347
6095
|
playNext(config: IPlayerConfig, isNewVideo?: boolean): Promise<any>;
|
|
6096
|
+
private updatePlayNextSubtitleConfig;
|
|
5348
6097
|
private _playNext;
|
|
6098
|
+
/** 从 playerData.configs 取出短剧 id,供 XGPlayer setConfig / playNext 与切换后 configs 一致 */
|
|
6099
|
+
private _getDramaConfigPatchForPlayer;
|
|
6100
|
+
private _buildDramaInvalidParamError;
|
|
6101
|
+
private _getDramaAlbumIdFromConfig;
|
|
6102
|
+
private _getDramaEpisodeIdFromConfig;
|
|
6103
|
+
private switchDramaEpisode;
|
|
5349
6104
|
/** {zh}
|
|
5350
6105
|
* @brief 销毁xgplayer实例
|
|
5351
6106
|
*
|
|
@@ -5546,6 +6301,32 @@ declare class VePlayer {
|
|
|
5546
6301
|
* @param pluginName 插件名。
|
|
5547
6302
|
*/
|
|
5548
6303
|
getPlugin(pluginName: string): null | BasePlugin;
|
|
6304
|
+
/** {zh}
|
|
6305
|
+
* @brief 获取字幕列表。需配置 `Subtitle` 插件后调用。
|
|
6306
|
+
* @return 当前字幕列表,每项包含 `id`、`language`、`text`(显示名称)等字段。列表为空时返回空数组。
|
|
6307
|
+
* @memberof VePlayer
|
|
6308
|
+
*/
|
|
6309
|
+
getSubtitleList(): ISubTitleItem[];
|
|
6310
|
+
/** {zh}
|
|
6311
|
+
* @brief 切换字幕。需配置 `Subtitle` 插件后调用。
|
|
6312
|
+
* @param subtitle 目标字幕的 id 或 language,任意一个非空即可定位字幕项。
|
|
6313
|
+
* @return 切换成功时 resolve,失败(未找到、切换被中止)时 reject。
|
|
6314
|
+
* @memberof VePlayer
|
|
6315
|
+
*/
|
|
6316
|
+
switchSubtitle(subtitle: {
|
|
6317
|
+
id?: string | number;
|
|
6318
|
+
language?: string | number;
|
|
6319
|
+
}): Promise<void>;
|
|
6320
|
+
/** {zh}
|
|
6321
|
+
* @brief 开启字幕展示。恢复上次选中的字幕项;若从未选中过则默认选第一项。需配置 `Subtitle` 插件后调用。
|
|
6322
|
+
* @memberof VePlayer
|
|
6323
|
+
*/
|
|
6324
|
+
showSubtitle(): void;
|
|
6325
|
+
/** {zh}
|
|
6326
|
+
* @brief 关闭字幕展示。字幕数据保留,可通过 `showSubtitle` 重新开启。需配置 `Subtitle` 插件后调用。
|
|
6327
|
+
* @memberof VePlayer
|
|
6328
|
+
*/
|
|
6329
|
+
hideSubtitle(): void;
|
|
5549
6330
|
/** {zh}
|
|
5550
6331
|
* @memberof VePlayer
|
|
5551
6332
|
* @brief 销毁当前播放器实例。
|
|
@@ -5964,91 +6745,6 @@ export declare class MirrorPlugin extends Plugin {
|
|
|
5964
6745
|
destroy(): void;
|
|
5965
6746
|
render(): string;
|
|
5966
6747
|
}
|
|
5967
|
-
export declare type InfoItem = {
|
|
5968
|
-
key: string;
|
|
5969
|
-
label: string;
|
|
5970
|
-
labelTextKey?: string;
|
|
5971
|
-
value?: any;
|
|
5972
|
-
render?: (key: any) => string;
|
|
5973
|
-
type?: string;
|
|
5974
|
-
dom?: Element;
|
|
5975
|
-
};
|
|
5976
|
-
/**
|
|
5977
|
-
* 直播信息面板
|
|
5978
|
-
*/
|
|
5979
|
-
export declare class LiveInfoPanel extends Plugin {
|
|
5980
|
-
private _pollTimer;
|
|
5981
|
-
private _infoItems;
|
|
5982
|
-
static get pluginName(): string;
|
|
5983
|
-
static get defaultConfig(): {
|
|
5984
|
-
visible: boolean;
|
|
5985
|
-
showH265Info: boolean;
|
|
5986
|
-
};
|
|
5987
|
-
get streamType(): any;
|
|
5988
|
-
afterCreate(): void;
|
|
5989
|
-
registerLanguageTexts(): {
|
|
5990
|
-
DECODEFPS: {
|
|
5991
|
-
en: string;
|
|
5992
|
-
zh: string;
|
|
5993
|
-
};
|
|
5994
|
-
DECODECOST: {
|
|
5995
|
-
en: string;
|
|
5996
|
-
zh: string;
|
|
5997
|
-
};
|
|
5998
|
-
FORMAT: {
|
|
5999
|
-
en: string;
|
|
6000
|
-
zh: string;
|
|
6001
|
-
};
|
|
6002
|
-
FPS: {
|
|
6003
|
-
en: string;
|
|
6004
|
-
zh: string;
|
|
6005
|
-
};
|
|
6006
|
-
BITRATE: {
|
|
6007
|
-
en: string;
|
|
6008
|
-
zh: string;
|
|
6009
|
-
};
|
|
6010
|
-
GOP: {
|
|
6011
|
-
en: string;
|
|
6012
|
-
zh: string;
|
|
6013
|
-
};
|
|
6014
|
-
RESOLUTION: {
|
|
6015
|
-
en: string;
|
|
6016
|
-
zh: string;
|
|
6017
|
-
};
|
|
6018
|
-
ENCODETYPE: {
|
|
6019
|
-
en: string;
|
|
6020
|
-
zh: string;
|
|
6021
|
-
};
|
|
6022
|
-
BUFFEREND: {
|
|
6023
|
-
en: string;
|
|
6024
|
-
zh: string;
|
|
6025
|
-
};
|
|
6026
|
-
CURRENTTIME: {
|
|
6027
|
-
en: string;
|
|
6028
|
-
zh: string;
|
|
6029
|
-
};
|
|
6030
|
-
};
|
|
6031
|
-
_getDefaultInfo(data: any): Record<string, InfoItem>;
|
|
6032
|
-
_init(): void;
|
|
6033
|
-
_getStats(): any;
|
|
6034
|
-
_getInfoListData(): Record<string, InfoItem>;
|
|
6035
|
-
_initDom(infoItems: any): any;
|
|
6036
|
-
_updateTitle(rowDom: Element, item: InfoItem): void;
|
|
6037
|
-
_updateDom(rowdom: Element, newItem: InfoItem): void;
|
|
6038
|
-
_renderLabel(item: InfoItem): any;
|
|
6039
|
-
_renderValue(item: InfoItem): any;
|
|
6040
|
-
_handleDataChange(): void;
|
|
6041
|
-
_tick(): void;
|
|
6042
|
-
_poll(): void;
|
|
6043
|
-
destroy(): void;
|
|
6044
|
-
_handleError(): void;
|
|
6045
|
-
_handleLoadedData(): void;
|
|
6046
|
-
_open(): void;
|
|
6047
|
-
_close(): void;
|
|
6048
|
-
open(): void;
|
|
6049
|
-
close(): void;
|
|
6050
|
-
render(): string;
|
|
6051
|
-
}
|
|
6052
6748
|
export declare const Events: {
|
|
6053
6749
|
/** {zh}
|
|
6054
6750
|
* @brief 弹幕配置发生变化。
|
|
@@ -6190,6 +6886,13 @@ export declare const Events: {
|
|
|
6190
6886
|
* @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
|
|
6191
6887
|
*/
|
|
6192
6888
|
ABR_AUTO_DESC_CHANGE: string;
|
|
6889
|
+
/** {zh}
|
|
6890
|
+
* @brief mp4 加密插件命中预加载数据时触发。data 为预加载缓存对象,含 `byteLength`、`duration`、`mediaSegList` 等字段。
|
|
6891
|
+
*/
|
|
6892
|
+
/** {en}
|
|
6893
|
+
* @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`.
|
|
6894
|
+
*/
|
|
6895
|
+
PRELOAD_INFO: string;
|
|
6193
6896
|
/** {zh}
|
|
6194
6897
|
* @brief 播放器实例创建完成时触发。
|
|
6195
6898
|
*/
|
|
@@ -6340,10 +7043,21 @@ export declare const Events: {
|
|
|
6340
7043
|
* @brief Autoplay fails to start.
|
|
6341
7044
|
*/
|
|
6342
7045
|
AUTOPLAY_PREVENTED: string;
|
|
7046
|
+
/** {zh}
|
|
7047
|
+
* @brief 播放器准备创建。
|
|
7048
|
+
*/
|
|
7049
|
+
READY_CREATE_PLAYER: string;
|
|
6343
7050
|
/** {zh}
|
|
6344
7051
|
* @brief 播放器完成创建。
|
|
6345
7052
|
*/
|
|
6346
7053
|
PLAYER_CREATED_FINISH: string;
|
|
7054
|
+
/** {zh}
|
|
7055
|
+
* @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
|
|
7056
|
+
*/
|
|
7057
|
+
/** {en}
|
|
7058
|
+
* @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
|
|
7059
|
+
*/
|
|
7060
|
+
CREATE_PLAYER_PERF: string;
|
|
6347
7061
|
/** {zh}
|
|
6348
7062
|
* @brief 播放器重建。
|
|
6349
7063
|
*/
|
|
@@ -6663,10 +7377,21 @@ export declare const Event: {
|
|
|
6663
7377
|
* @brief Autoplay fails to start.
|
|
6664
7378
|
*/
|
|
6665
7379
|
AUTOPLAY_PREVENTED: string;
|
|
7380
|
+
/** {zh}
|
|
7381
|
+
* @brief 播放器准备创建。
|
|
7382
|
+
*/
|
|
7383
|
+
READY_CREATE_PLAYER: string;
|
|
6666
7384
|
/** {zh}
|
|
6667
7385
|
* @brief 播放器完成创建。
|
|
6668
7386
|
*/
|
|
6669
7387
|
PLAYER_CREATED_FINISH: string;
|
|
7388
|
+
/** {zh}
|
|
7389
|
+
* @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
|
|
7390
|
+
*/
|
|
7391
|
+
/** {en}
|
|
7392
|
+
* @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
|
|
7393
|
+
*/
|
|
7394
|
+
CREATE_PLAYER_PERF: string;
|
|
6670
7395
|
/** {zh}
|
|
6671
7396
|
* @brief 播放器重建。
|
|
6672
7397
|
*/
|
|
@@ -6861,12 +7586,18 @@ export declare const Event: {
|
|
|
6861
7586
|
* @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
|
|
6862
7587
|
*/
|
|
6863
7588
|
ABR_AUTO_DESC_CHANGE: string;
|
|
7589
|
+
/** {zh}
|
|
7590
|
+
* @brief mp4 加密插件命中预加载数据时触发。data 为预加载缓存对象,含 `byteLength`、`duration`、`mediaSegList` 等字段。
|
|
7591
|
+
*/
|
|
7592
|
+
/** {en}
|
|
7593
|
+
* @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`.
|
|
7594
|
+
*/
|
|
7595
|
+
PRELOAD_INFO: string;
|
|
6864
7596
|
};
|
|
6865
7597
|
};
|
|
6866
7598
|
export * from "xgplayer";
|
|
6867
7599
|
|
|
6868
7600
|
export {
|
|
6869
|
-
LiveSubTitlesPlugin as LiveSubtitlesPlugin,
|
|
6870
7601
|
MusicPreset as Music,
|
|
6871
7602
|
VePlayer as default,
|
|
6872
7603
|
};
|