@byteplus/veplayer 1.15.3-rc.2 → 1.15.3-rc.20
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 +855 -134
- 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,16 @@ 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
|
+
export declare type IAutoSubtitleItemFormatter = (item: IAutoSubtitleSourceItem, index: number) => IAutoSubtitleFormatterResult;
|
|
700
715
|
/**
|
|
701
716
|
* @brief 字幕内容项。
|
|
702
717
|
* @list Options
|
|
@@ -2185,6 +2200,7 @@ export interface ISubtitleInfoList {
|
|
|
2185
2200
|
Version: string;
|
|
2186
2201
|
Vid: string;
|
|
2187
2202
|
}
|
|
2203
|
+
export declare type ISubtitleInfoListItem = ISubtitleInfoList | string;
|
|
2188
2204
|
/** {zh}
|
|
2189
2205
|
* @hidden
|
|
2190
2206
|
*/
|
|
@@ -2243,11 +2259,97 @@ export interface IGetPlayInfoRes {
|
|
|
2243
2259
|
PlayInfoList: IPlayInfoListItem[];
|
|
2244
2260
|
PosterUrl: string;
|
|
2245
2261
|
Status: number;
|
|
2246
|
-
SubtitleInfoList
|
|
2262
|
+
SubtitleInfoList?: ISubtitleInfoListItem[];
|
|
2247
2263
|
ThumbInfoList: IThumbInfoItem[];
|
|
2248
2264
|
TotalCount: number;
|
|
2249
2265
|
Version: number;
|
|
2250
2266
|
}
|
|
2267
|
+
/**
|
|
2268
|
+
* 短剧环境配置接口
|
|
2269
|
+
*/
|
|
2270
|
+
export interface ITTDramaEnv {
|
|
2271
|
+
/** 云服务商,默认从构建时 env.__PLATFORM__ 获取,未注入时默认为 byteplus */
|
|
2272
|
+
channel?: "volcengine" | "byteplus";
|
|
2273
|
+
/**
|
|
2274
|
+
* @brief 应用版本号
|
|
2275
|
+
* @type {string}
|
|
2276
|
+
*/
|
|
2277
|
+
appVersion: string;
|
|
2278
|
+
/**
|
|
2279
|
+
* @brief 小程序三方id
|
|
2280
|
+
* @type {string}
|
|
2281
|
+
*/
|
|
2282
|
+
clientKey: string;
|
|
2283
|
+
/**
|
|
2284
|
+
* @brief 是否支持获取短剧信息
|
|
2285
|
+
* @type {boolean}
|
|
2286
|
+
*/
|
|
2287
|
+
canIUseGetDramaInfo: boolean;
|
|
2288
|
+
/**
|
|
2289
|
+
* @brief 获取短剧信息
|
|
2290
|
+
* @type {function}
|
|
2291
|
+
*/
|
|
2292
|
+
getDramaInfo: (callback: (res: IJSBCallbackResult) => void, options: IGetDramaInfoOptions) => void;
|
|
2293
|
+
videoSecurityModule?: any;
|
|
2294
|
+
/**
|
|
2295
|
+
* @brief 日志发送接口
|
|
2296
|
+
* @type {function}
|
|
2297
|
+
*/
|
|
2298
|
+
sendLog: (EventName: string, params: Record<string, any>) => void;
|
|
2299
|
+
/**
|
|
2300
|
+
* 低版本 app 下验证 TTOP 签发的 playAuthToken 时使用的密钥
|
|
2301
|
+
* 通过 JSB(如 minis.getSecret)从 Native 获取,用于 HMAC-SHA256 签名校验
|
|
2302
|
+
*/
|
|
2303
|
+
getTokenVerifySecret?: () => Promise<string>;
|
|
2304
|
+
}
|
|
2305
|
+
/**
|
|
2306
|
+
* JSB 获取短剧信息请求参数
|
|
2307
|
+
*/
|
|
2308
|
+
export interface IGetDramaInfoOptions {
|
|
2309
|
+
clientKey: string;
|
|
2310
|
+
albumId: string;
|
|
2311
|
+
episodeId: string;
|
|
2312
|
+
vid: string;
|
|
2313
|
+
}
|
|
2314
|
+
export interface MinisError {
|
|
2315
|
+
error_code: number;
|
|
2316
|
+
error_msg: string;
|
|
2317
|
+
error_extra?: unknown;
|
|
2318
|
+
}
|
|
2319
|
+
/**
|
|
2320
|
+
* JSB getDramaInfo 返回的客户端耗时信息,单位 ms。
|
|
2321
|
+
*/
|
|
2322
|
+
export interface IGetDramaInfoPerfInfo {
|
|
2323
|
+
prepare_cost?: number;
|
|
2324
|
+
request_cost?: number;
|
|
2325
|
+
parse_cost?: number;
|
|
2326
|
+
total_cost?: number;
|
|
2327
|
+
[propName: string]: any;
|
|
2328
|
+
}
|
|
2329
|
+
/**
|
|
2330
|
+
* JSB 获取短剧信息返回结果
|
|
2331
|
+
*/
|
|
2332
|
+
export interface IJSBCallbackResult {
|
|
2333
|
+
is_success: number | boolean;
|
|
2334
|
+
error?: MinisError;
|
|
2335
|
+
data?: {
|
|
2336
|
+
status: number;
|
|
2337
|
+
drama_info: {
|
|
2338
|
+
album_id: string;
|
|
2339
|
+
drama_name: string;
|
|
2340
|
+
drama_cover: string;
|
|
2341
|
+
drama_description: string;
|
|
2342
|
+
};
|
|
2343
|
+
episode_info: {
|
|
2344
|
+
episode_id: string;
|
|
2345
|
+
episode_name: string;
|
|
2346
|
+
episode_cover: string;
|
|
2347
|
+
episode_description: string;
|
|
2348
|
+
};
|
|
2349
|
+
video_info: IGetPlayInfoRes | Record<string, any>;
|
|
2350
|
+
perf_info?: IGetDramaInfoPerfInfo;
|
|
2351
|
+
};
|
|
2352
|
+
}
|
|
2251
2353
|
/** {zh}
|
|
2252
2354
|
* @list Options
|
|
2253
2355
|
* @brief 视频编码格式。
|
|
@@ -2282,7 +2384,7 @@ export declare const CodecType: {
|
|
|
2282
2384
|
*/
|
|
2283
2385
|
readonly UNKNOWN: "unknown";
|
|
2284
2386
|
};
|
|
2285
|
-
export declare type ICodecType =
|
|
2387
|
+
export declare type ICodecType = typeof CodecType[keyof typeof CodecType];
|
|
2286
2388
|
export declare const ContentType: {
|
|
2287
2389
|
h265: string;
|
|
2288
2390
|
h264: string;
|
|
@@ -2673,6 +2775,86 @@ export declare type Url = string | Array<{
|
|
|
2673
2775
|
type?: string;
|
|
2674
2776
|
[propName: string]: any;
|
|
2675
2777
|
}>;
|
|
2778
|
+
/** {zh}
|
|
2779
|
+
* @list Options
|
|
2780
|
+
* @kind property
|
|
2781
|
+
* @brief 获取到媒体信息时的回调参数。
|
|
2782
|
+
*/
|
|
2783
|
+
/** {en}
|
|
2784
|
+
* @list Options
|
|
2785
|
+
* @kind property
|
|
2786
|
+
* @brief Callback payload when media information is obtained.
|
|
2787
|
+
*/
|
|
2788
|
+
export interface IGetMediaInfoCallbackPayload {
|
|
2789
|
+
/** {zh}
|
|
2790
|
+
* @brief 媒体信息。
|
|
2791
|
+
*/
|
|
2792
|
+
/** {en}
|
|
2793
|
+
* @brief Media information.
|
|
2794
|
+
*/
|
|
2795
|
+
data: {
|
|
2796
|
+
playList?: Stream[];
|
|
2797
|
+
type?: string;
|
|
2798
|
+
poster?: string;
|
|
2799
|
+
vid?: string;
|
|
2800
|
+
duration?: number;
|
|
2801
|
+
[propName: string]: any;
|
|
2802
|
+
};
|
|
2803
|
+
/** {zh}
|
|
2804
|
+
* @brief 媒体信息是否来自缓存。
|
|
2805
|
+
*/
|
|
2806
|
+
/** {en}
|
|
2807
|
+
* @brief Whether the media information comes from cache.
|
|
2808
|
+
*/
|
|
2809
|
+
fromCache: boolean;
|
|
2810
|
+
}
|
|
2811
|
+
/** {zh}
|
|
2812
|
+
* @list Options
|
|
2813
|
+
* @kind property
|
|
2814
|
+
* @brief JSB getDramaInfo 客户端耗时回调参数。
|
|
2815
|
+
*/
|
|
2816
|
+
/** {en}
|
|
2817
|
+
* @list Options
|
|
2818
|
+
* @kind property
|
|
2819
|
+
* @brief Callback payload for client-side getDramaInfo timing returned by JSB.
|
|
2820
|
+
*/
|
|
2821
|
+
export interface IGetDramaInfoPerfCallbackPayload {
|
|
2822
|
+
/** {zh}
|
|
2823
|
+
* @brief JSB 返回的客户端耗时信息,单位 ms。
|
|
2824
|
+
*/
|
|
2825
|
+
/** {en}
|
|
2826
|
+
* @brief Client-side timing returned by JSB, in milliseconds.
|
|
2827
|
+
*/
|
|
2828
|
+
perfInfo: IGetDramaInfoPerfInfo;
|
|
2829
|
+
/** {zh}
|
|
2830
|
+
* @brief 剧 ID。
|
|
2831
|
+
*/
|
|
2832
|
+
albumId?: string;
|
|
2833
|
+
/** {zh}
|
|
2834
|
+
* @brief 剧集 ID。
|
|
2835
|
+
*/
|
|
2836
|
+
episodeId?: string;
|
|
2837
|
+
/** {zh}
|
|
2838
|
+
* @brief 视频 ID。
|
|
2839
|
+
*/
|
|
2840
|
+
vid?: string;
|
|
2841
|
+
/** {zh}
|
|
2842
|
+
* @brief JSB 是否请求成功。
|
|
2843
|
+
*/
|
|
2844
|
+
isSuccess: boolean;
|
|
2845
|
+
/** {zh}
|
|
2846
|
+
* @brief 短剧审核状态。
|
|
2847
|
+
*/
|
|
2848
|
+
status?: number;
|
|
2849
|
+
/** {zh}
|
|
2850
|
+
* @brief 是否来自缓存。getDramaInfo 实际请求返回时固定为 false。
|
|
2851
|
+
*/
|
|
2852
|
+
fromCache: boolean;
|
|
2853
|
+
/** {zh}
|
|
2854
|
+
* @brief SDK 收到回调时的时间戳。
|
|
2855
|
+
*/
|
|
2856
|
+
timestamp: number;
|
|
2857
|
+
}
|
|
2676
2858
|
/** {zh}
|
|
2677
2859
|
* @list Options
|
|
2678
2860
|
* @kind property
|
|
@@ -2718,12 +2900,48 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
2718
2900
|
* @default -
|
|
2719
2901
|
*/
|
|
2720
2902
|
vid?: string;
|
|
2903
|
+
/**
|
|
2904
|
+
* @brief 剧id,Minis 短剧播放需要
|
|
2905
|
+
*/
|
|
2906
|
+
albumId?: string;
|
|
2907
|
+
/**
|
|
2908
|
+
* @brief 剧集id,Minis 短剧播放需要
|
|
2909
|
+
*/
|
|
2910
|
+
episodeId?: string;
|
|
2721
2911
|
/** {zh}
|
|
2722
2912
|
* @brief Vid 播放配置项。应用服务端需通过 `vid` 生成临时临时播放 Token,下发给客户端。
|
|
2723
2913
|
* @type {IPlayAuthTokenConfig}
|
|
2724
2914
|
* @memberof IPlayerConfig
|
|
2725
2915
|
*/
|
|
2726
2916
|
getVideoByToken?: IPlayAuthTokenConfig;
|
|
2917
|
+
/** {zh}
|
|
2918
|
+
* @brief 通过 `playAuthToken` 或缓存获取到媒体信息时触发的回调。
|
|
2919
|
+
* @default -
|
|
2920
|
+
*/
|
|
2921
|
+
/** {en}
|
|
2922
|
+
* @brief Callback fired when media information is obtained from `playAuthToken` or cache.
|
|
2923
|
+
* @default -
|
|
2924
|
+
*/
|
|
2925
|
+
onGetMediaInfo?: (payload: IGetMediaInfoCallbackPayload) => void;
|
|
2926
|
+
/** {zh}
|
|
2927
|
+
* @brief JSB `getDramaInfo` 返回客户端耗时信息时触发的回调。
|
|
2928
|
+
* @default -
|
|
2929
|
+
*/
|
|
2930
|
+
/** {en}
|
|
2931
|
+
* @brief Callback fired when JSB `getDramaInfo` returns client-side timing.
|
|
2932
|
+
* @default -
|
|
2933
|
+
*/
|
|
2934
|
+
onGetDramaInfoPerf?: (payload: IGetDramaInfoPerfCallbackPayload) => void;
|
|
2935
|
+
/** {zh}
|
|
2936
|
+
* @brief 是否自动使用 `playAuthToken` 或短剧信息返回的字幕列表。
|
|
2937
|
+
* @default false
|
|
2938
|
+
*/
|
|
2939
|
+
autoSubtitle?: boolean;
|
|
2940
|
+
/** {zh}
|
|
2941
|
+
* @brief 自动字幕项格式化回调。返回字符串或数字时作为字幕名称;返回 `false` 或 `{ show: false }` 时不展示该项。
|
|
2942
|
+
* @default -
|
|
2943
|
+
*/
|
|
2944
|
+
formatAutoSubtitleItem?: IAutoSubtitleItemFormatter;
|
|
2727
2945
|
/** {zh}
|
|
2728
2946
|
* @brief 视频加密类型
|
|
2729
2947
|
* @default -
|
|
@@ -3261,6 +3479,31 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
3261
3479
|
* @default -
|
|
3262
3480
|
*/
|
|
3263
3481
|
sdkErrorPlugin?: ISdkErrorConfig;
|
|
3482
|
+
/** {zh}
|
|
3483
|
+
* @brief 原生媒体错误(如网络类 code 2/4)自动重试的最大次数,对应 {@link VeErrorOptions.oriErrRetryCount}。
|
|
3484
|
+
* @default 3
|
|
3485
|
+
*/
|
|
3486
|
+
oriErrRetryCount?: number;
|
|
3487
|
+
/** {zh}
|
|
3488
|
+
* @brief 上述重试计数的清零周期(毫秒),超时后重试次数重新统计,对应 {@link VeErrorOptions.oriErrRetryCycle}。
|
|
3489
|
+
* @default 10000
|
|
3490
|
+
*/
|
|
3491
|
+
oriErrRetryCycle?: number;
|
|
3492
|
+
/** {zh}
|
|
3493
|
+
* @brief 是否在原生媒体错误时自动重试拉流,对应 {@link VeErrorOptions.enableOriErrRetry}。
|
|
3494
|
+
* @default true
|
|
3495
|
+
*/
|
|
3496
|
+
enableOriErrRetry?: boolean;
|
|
3497
|
+
/** {zh}
|
|
3498
|
+
* @brief 是否在错误时同步分析网络/流(如 XHR 探测),对应 {@link VeErrorOptions.needSyncAnalyzeError}。
|
|
3499
|
+
* @default true
|
|
3500
|
+
*/
|
|
3501
|
+
needSyncAnalyzeError?: boolean;
|
|
3502
|
+
/** {zh}
|
|
3503
|
+
* @brief 错误分析请求超时时间(毫秒),对应 {@link VeErrorOptions.analyzeTimeout}。
|
|
3504
|
+
* @default 3000
|
|
3505
|
+
*/
|
|
3506
|
+
analyzeTimeout?: number;
|
|
3264
3507
|
/** {zh}
|
|
3265
3508
|
* @brief rtm配置,配置rtm拉流参数
|
|
3266
3509
|
* @notes 传入rtm流url时才生效
|
|
@@ -3972,6 +4215,174 @@ export interface ApiMapConfig {
|
|
|
3972
4215
|
playDomain: string;
|
|
3973
4216
|
backupPlayDomain?: string;
|
|
3974
4217
|
}
|
|
4218
|
+
/**
|
|
4219
|
+
* @list Options
|
|
4220
|
+
* @brief 字幕项。
|
|
4221
|
+
* @kind property
|
|
4222
|
+
*/
|
|
4223
|
+
/** {en}
|
|
4224
|
+
* @brief 字幕项配置
|
|
4225
|
+
*/
|
|
4226
|
+
export interface ISubTitleItem {
|
|
4227
|
+
/**
|
|
4228
|
+
* @brief 字幕语言。
|
|
4229
|
+
* @default -
|
|
4230
|
+
*/
|
|
4231
|
+
/** {en}
|
|
4232
|
+
* @brief 字幕语言
|
|
4233
|
+
*/
|
|
4234
|
+
language?: string | number;
|
|
4235
|
+
/**
|
|
4236
|
+
* @brief 字幕 ID。
|
|
4237
|
+
* @default -
|
|
4238
|
+
*/
|
|
4239
|
+
/** {en}
|
|
4240
|
+
* @brief 字幕id
|
|
4241
|
+
*/
|
|
4242
|
+
id?: number | string;
|
|
4243
|
+
/**
|
|
4244
|
+
* @brief 是否为默认选择的字幕。
|
|
4245
|
+
* @default false
|
|
4246
|
+
*/
|
|
4247
|
+
/** {en}
|
|
4248
|
+
* @brief 是否是默认选择的字幕
|
|
4249
|
+
*/
|
|
4250
|
+
isDefault?: boolean;
|
|
4251
|
+
/**
|
|
4252
|
+
* @brief 字幕名称。
|
|
4253
|
+
* @default -
|
|
4254
|
+
*/
|
|
4255
|
+
/** {en}
|
|
4256
|
+
* @brief 字幕名称
|
|
4257
|
+
*/
|
|
4258
|
+
text?: string;
|
|
4259
|
+
/**
|
|
4260
|
+
* @brief 字幕名称。兼容 xgplayer-subtitles 的 label 字段。
|
|
4261
|
+
* @default -
|
|
4262
|
+
*/
|
|
4263
|
+
label?: string | number;
|
|
4264
|
+
/**
|
|
4265
|
+
* @brief 外挂字幕 URL 地址。
|
|
4266
|
+
* @default -
|
|
4267
|
+
*/
|
|
4268
|
+
/** {en}
|
|
4269
|
+
* @brief 外挂字幕地址
|
|
4270
|
+
*/
|
|
4271
|
+
url?: string;
|
|
4272
|
+
/**
|
|
4273
|
+
* stringContent
|
|
4274
|
+
* @default 无
|
|
4275
|
+
* @hidden
|
|
4276
|
+
* @type {string}
|
|
4277
|
+
* @memberof ISubTitleItem
|
|
4278
|
+
*/
|
|
4279
|
+
stringContent?: string;
|
|
4280
|
+
/**
|
|
4281
|
+
* 字幕内容列表,非url形式时使用
|
|
4282
|
+
* @default 无
|
|
4283
|
+
* @type {Array<Object>}
|
|
4284
|
+
* @memberof ISubTitleItem
|
|
4285
|
+
* @brief 字幕内容列表。非 `url` 形式时使用。
|
|
4286
|
+
*/
|
|
4287
|
+
/** {en}
|
|
4288
|
+
* @brief 字幕内容列表,非url形式时使用
|
|
4289
|
+
*/
|
|
4290
|
+
list?: IListItem[];
|
|
4291
|
+
}
|
|
4292
|
+
/**
|
|
4293
|
+
* @brief 字幕内容项。
|
|
4294
|
+
* @list Options
|
|
4295
|
+
* @kind property
|
|
4296
|
+
* @export
|
|
4297
|
+
* @interface IListItem
|
|
4298
|
+
*/
|
|
4299
|
+
/** {en}
|
|
4300
|
+
* @brief 字幕内容项配置
|
|
4301
|
+
*/
|
|
4302
|
+
export interface IListItem {
|
|
4303
|
+
/**
|
|
4304
|
+
* 开始时间
|
|
4305
|
+
* @type {number}
|
|
4306
|
+
* @brief 开始时间,单位为秒。
|
|
4307
|
+
*/
|
|
4308
|
+
/** {en}
|
|
4309
|
+
* @brief 开始时间
|
|
4310
|
+
*/
|
|
4311
|
+
start: number;
|
|
4312
|
+
/**
|
|
4313
|
+
* 结束时间
|
|
4314
|
+
* @type {number}
|
|
4315
|
+
* @brief 结束时间,单位为秒。
|
|
4316
|
+
*/
|
|
4317
|
+
/** {en}
|
|
4318
|
+
* @brief 结束时间
|
|
4319
|
+
*/
|
|
4320
|
+
end: number;
|
|
4321
|
+
/**
|
|
4322
|
+
* 字幕数据列表
|
|
4323
|
+
* @type {Array<ITextItem>}
|
|
4324
|
+
* @brief 字幕数据列表。
|
|
4325
|
+
*/
|
|
4326
|
+
/** {en}
|
|
4327
|
+
* @brief 字幕数据列表
|
|
4328
|
+
*/
|
|
4329
|
+
list: Array<ITextItem>;
|
|
4330
|
+
/**
|
|
4331
|
+
* @default 无
|
|
4332
|
+
* @hidden
|
|
4333
|
+
* @type {any}
|
|
4334
|
+
*/
|
|
4335
|
+
[propName: string]: any;
|
|
4336
|
+
}
|
|
4337
|
+
/**
|
|
4338
|
+
* @breif 字幕文案配置
|
|
4339
|
+
* @list Options
|
|
4340
|
+
* @kind property
|
|
4341
|
+
*/
|
|
4342
|
+
export interface ITextItem {
|
|
4343
|
+
/**
|
|
4344
|
+
* @default 无
|
|
4345
|
+
* @hidden
|
|
4346
|
+
* @type {any}
|
|
4347
|
+
*/
|
|
4348
|
+
[propName: string]: any;
|
|
4349
|
+
/**
|
|
4350
|
+
* 开始时间
|
|
4351
|
+
* @type {number}
|
|
4352
|
+
* @brief 开始时间,单位为秒。
|
|
4353
|
+
*/
|
|
4354
|
+
/** {en}
|
|
4355
|
+
* @brief 开始时间
|
|
4356
|
+
*/
|
|
4357
|
+
start: number;
|
|
4358
|
+
/**
|
|
4359
|
+
* 结束时间
|
|
4360
|
+
* @type {number}
|
|
4361
|
+
* @brief 结束时间,单位为秒。
|
|
4362
|
+
*/
|
|
4363
|
+
/** {en}
|
|
4364
|
+
* @brief 结束时间
|
|
4365
|
+
*/
|
|
4366
|
+
end: number;
|
|
4367
|
+
/**
|
|
4368
|
+
* 字幕文案数组
|
|
4369
|
+
* @type {string[]}
|
|
4370
|
+
* @brief 字幕文案数组。
|
|
4371
|
+
*/
|
|
4372
|
+
/** {en}
|
|
4373
|
+
* @brief 字幕文案数组
|
|
4374
|
+
*/
|
|
4375
|
+
text: string[];
|
|
4376
|
+
/**
|
|
4377
|
+
* 字幕顺序
|
|
4378
|
+
* @type {number}
|
|
4379
|
+
* @brief 字幕顺序。
|
|
4380
|
+
*/
|
|
4381
|
+
/** {en}
|
|
4382
|
+
* @brief 字幕顺序
|
|
4383
|
+
*/
|
|
4384
|
+
index?: number;
|
|
4385
|
+
}
|
|
3975
4386
|
export type TLogChannel = "cn" | "va" | "sg";
|
|
3976
4387
|
declare enum PreloadScene {
|
|
3977
4388
|
/**
|
|
@@ -4233,7 +4644,7 @@ export declare type IPreloadUpdateConfig = {
|
|
|
4233
4644
|
* 预加载视频资源
|
|
4234
4645
|
* @detail Options
|
|
4235
4646
|
*/
|
|
4236
|
-
export declare type
|
|
4647
|
+
export declare type IPreloadResolvedStream = {
|
|
4237
4648
|
/**
|
|
4238
4649
|
* 视频唯一ID
|
|
4239
4650
|
* @brief 视频 ID
|
|
@@ -4295,6 +4706,43 @@ export declare type IPreloadStream = {
|
|
|
4295
4706
|
*/
|
|
4296
4707
|
size: number;
|
|
4297
4708
|
};
|
|
4709
|
+
export declare type IPreloadDramaStream = {
|
|
4710
|
+
/**
|
|
4711
|
+
* 视频唯一ID
|
|
4712
|
+
*/
|
|
4713
|
+
vid?: string;
|
|
4714
|
+
/**
|
|
4715
|
+
* 短剧剧 ID
|
|
4716
|
+
*/
|
|
4717
|
+
albumId: string;
|
|
4718
|
+
/**
|
|
4719
|
+
* 短剧剧集 ID
|
|
4720
|
+
*/
|
|
4721
|
+
episodeId: string;
|
|
4722
|
+
/**
|
|
4723
|
+
* 默认清晰度,用于缓存 key 和预加载流选择
|
|
4724
|
+
*/
|
|
4725
|
+
defaultDefinition?: string;
|
|
4726
|
+
/**
|
|
4727
|
+
* Vid 播放配置。短剧预加载会复用 playAuthToken 等配置请求短剧信息。
|
|
4728
|
+
*/
|
|
4729
|
+
getVideoByToken?: IPlayAuthTokenConfig;
|
|
4730
|
+
};
|
|
4731
|
+
export declare type IPreloadAuthTokenStream = {
|
|
4732
|
+
/**
|
|
4733
|
+
* 视频唯一ID
|
|
4734
|
+
*/
|
|
4735
|
+
vid?: string;
|
|
4736
|
+
/**
|
|
4737
|
+
* 默认清晰度,用于选择预加载流
|
|
4738
|
+
*/
|
|
4739
|
+
defaultDefinition?: string;
|
|
4740
|
+
/**
|
|
4741
|
+
* Vid 播放配置。预加载会复用 playAuthToken 请求媒体信息。
|
|
4742
|
+
*/
|
|
4743
|
+
getVideoByToken: IPlayAuthTokenConfig;
|
|
4744
|
+
};
|
|
4745
|
+
export declare type IPreloadStream = IPreloadResolvedStream | IPreloadDramaStream | IPreloadAuthTokenStream;
|
|
4298
4746
|
declare class VeStrategyWrapper {
|
|
4299
4747
|
private tea;
|
|
4300
4748
|
private static mapStrategyNameToUmdKey;
|
|
@@ -4373,6 +4821,8 @@ export declare type UMDMap = Record<UmdKeys, {
|
|
|
4373
4821
|
declare class UMDLoader {
|
|
4374
4822
|
private static jsLoadMap;
|
|
4375
4823
|
private static jsLoadPromiseMap;
|
|
4824
|
+
/** 清除指定插件的加载缓存,使下次 loadPlugins 重新触发加载(用于修复首次加载失败的情况) */
|
|
4825
|
+
clearPluginCache(pluginName: UmdKeys): void;
|
|
4376
4826
|
umdMap: UMDMap;
|
|
4377
4827
|
backupUmdUrlMap: Record<string, string>;
|
|
4378
4828
|
failCallback: (umdName: string, err: any) => any;
|
|
@@ -4454,6 +4904,129 @@ export declare class SdkPlugin {
|
|
|
4454
4904
|
*/
|
|
4455
4905
|
__destroy(): void;
|
|
4456
4906
|
}
|
|
4907
|
+
/**
|
|
4908
|
+
* @author bytedance
|
|
4909
|
+
* @version 1.0
|
|
4910
|
+
* @Description
|
|
4911
|
+
* @date 2024/12/16 17:59
|
|
4912
|
+
*/
|
|
4913
|
+
export declare const enum LangTextKey {
|
|
4914
|
+
NETWORK = "NETWORK",
|
|
4915
|
+
NETWORK_TIMEOUT = "NETWORK_TIMEOUT",
|
|
4916
|
+
NETWORK_FORBIDDEN = "NETWORK_FORBIDDEN",
|
|
4917
|
+
NETWORK_NOTFOUND = "NETWORK_NOTFOUND",
|
|
4918
|
+
NETWORK_RANGE_NOT_SATISFIABLE = "NETWORK_RANGE_NOT_SATISFIABLE",
|
|
4919
|
+
NETWORK_PROTOCOL = "NETWORK_PROTOCOL",
|
|
4920
|
+
NETWORK_URL_EXPIRE = "NETWORK_URL_EXPIRE",
|
|
4921
|
+
NETWORK_URL_SIGN = "NETWORK_URL_SIGN",
|
|
4922
|
+
NETWORK_ENCRYPT_HLS_ERR = "NETWORK_ENCRYPT_HLS_ERR",
|
|
4923
|
+
MEDIA_ERR = "MEDIA_ERR",
|
|
4924
|
+
MEDIA_ERR_ABORTED = "MEDIA_ERR_ABORTED",
|
|
4925
|
+
MEDIA_ERR_NETWORK = "MEDIA_ERR_NETWORK",
|
|
4926
|
+
MEDIA_ERR_DECODE = "MEDIA_ERR_DECODE",
|
|
4927
|
+
MEDIA_ERR_SRC_NOT_SUPPORTED = "MEDIA_ERR_SRC_NOT_SUPPORTED",
|
|
4928
|
+
MEDIA_ERR_NOT_SUPPORTED = "MEDIA_ERR_NOT_SUPPORTED",
|
|
4929
|
+
MEDIA_ERR_URL_EMPTY = "MEDIA_ERR_URL_EMPTY",
|
|
4930
|
+
MEDIA_ERR_FILE_NOT_SUPPORTED = "MEDIA_ERR_FILE_NOT_SUPPORTED",
|
|
4931
|
+
MEDIA_ERR_PLAY_ERR = "MEDIA_ERR_PLAY_ERR",
|
|
4932
|
+
MEDIA_SOURCE_CANNOT_PLAY_TYPE = "MEDIA_SOURCE_CANNOT_PLAY_TYPE",
|
|
4933
|
+
BUSINESS_DRM_NOT_SUPPORT = "BUSINESS_DRM_NOT_SUPPORT",
|
|
4934
|
+
BUSINESS_DRM_NOT_SUPPORT_UN_RECORD = "BUSINESS_DRM_NOT_SUPPORT_UN_RECORD",
|
|
4935
|
+
BUSINESS_DRM_LACK_MEDIA_KEY = "BUSINESS_DRM_LACK_MEDIA_KEY",
|
|
4936
|
+
BUSINESS_DRM_LACK_KEY_SESSION = "BUSINESS_DRM_LACK_KEY_SESSION",
|
|
4937
|
+
BUSINESS_DRM_GENERATE_REQUEST_FAIL = "BUSINESS_DRM_GENERATE_REQUEST_FAIL",
|
|
4938
|
+
BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH = "BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH",
|
|
4939
|
+
BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH = "BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH",
|
|
4940
|
+
BUSINESS_DRM_LICENSE_FAIL = "BUSINESS_DRM_LICENSE_FAIL",
|
|
4941
|
+
BUSINESS_DRM_KEY_ERROR = "BUSINESS_DRM_KEY_ERROR",
|
|
4942
|
+
BUSINESS_DRM_CERT_FAIL = "BUSINESS_DRM_CERT_FAIL",
|
|
4943
|
+
PRIVATE_DRM_KEY_GET_FAILED = "PRIVATE_DRM_KEY_GET_FAILED",
|
|
4944
|
+
PRIVATE_DRM_CRYPTO_NOT_SUPPORT = "PRIVATE_DRM_CRYPTO_NOT_SUPPORT",
|
|
4945
|
+
PRIVATE_DRM_RSA_FAIL = "PRIVATE_DRM_RSA_FAIL",
|
|
4946
|
+
OTHER = "OTHER",
|
|
4947
|
+
VOD_LOG_NOT_CONFIGURED = "VOD_LOG_NOT_CONFIGURED",
|
|
4948
|
+
PLAY_AUTH_TOKEN_EXPIRED = "PLAY_AUTH_TOKEN_EXPIRED",
|
|
4949
|
+
HLS_KEY_TOKEN_EXPIRED = "HLS_KEY_TOKEN_EXPIRED",
|
|
4950
|
+
THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED = "THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED",
|
|
4951
|
+
GET_PLAY_INFO_ERR = "GET_PLAY_INFO_ERR",
|
|
4952
|
+
GET_HLS_DECRYPTION_KEY_ERR = "GET_HLS_DECRYPTION_KEY_ERR",
|
|
4953
|
+
LICENSE_VALIDATE_FAIL = "LICENSE_VALIDATE_FAIL",
|
|
4954
|
+
DEFINITION_AUTO = "DEFINITION_AUTO",
|
|
4955
|
+
LICENSE_STATUS_INVALID = "LICENSE_STATUS_INVALID",
|
|
4956
|
+
LICENSE_STATUS_ERROR_DOMAIN_NOT_MATCH = "LICENSE_STATUS_ERROR_DOMAIN_NOT_MATCH",
|
|
4957
|
+
BASE_LICENSE_NOT_SUPPORT_265 = "BASE_LICENSE_NOT_SUPPORT_265",
|
|
4958
|
+
BASE_LICENSE_NOT_SUPPORT_ABR = "BASE_LICENSE_NOT_SUPPORT_ABR",
|
|
4959
|
+
BASE_LICENSE_NOT_SUPPORT_ADAPT_BUFFER = "BASE_LICENSE_NOT_SUPPORT_ADAPT_BUFFER",
|
|
4960
|
+
BASE_LICENSE_NOT_SUPPORT_PRELOAD = "BASE_LICENSE_NOT_SUPPORT_PRELOAD",
|
|
4961
|
+
EXPIRED_LICENSE_NOT_SUPPORT_265 = "EXPIRED_LICENSE_NOT_SUPPORT_265",
|
|
4962
|
+
EXPIRED_LICENSE_NOT_SUPPORT_ABR = "EXPIRED_LICENSE_NOT_SUPPORT_ABR",
|
|
4963
|
+
EXPIRED_LICENSE_NOT_SUPPORT_ADAPT_BUFFER = "EXPIRED_LICENSE_NOT_SUPPORT_ADAPT_BUFFER",
|
|
4964
|
+
EXPIRED_LICENSE_NOT_SUPPORT_PRELOAD = "EXPIRED_LICENSE_NOT_SUPPORT_PRELOAD",
|
|
4965
|
+
/** Short drama (Minis) errors — codes 93xx */
|
|
4966
|
+
DRAMA_INVALID_PARAM = "DRAMA_INVALID_PARAM",
|
|
4967
|
+
DRAMA_NO_INFO_FOUND = "DRAMA_NO_INFO_FOUND",
|
|
4968
|
+
DRAMA_NOT_SUBMITTED = "DRAMA_NOT_SUBMITTED",
|
|
4969
|
+
DRAMA_UNDER_REVIEW = "DRAMA_UNDER_REVIEW",
|
|
4970
|
+
DRAMA_FAILED_REVIEW = "DRAMA_FAILED_REVIEW",
|
|
4971
|
+
DRAMA_WITHDRAWN_REVIEW = "DRAMA_WITHDRAWN_REVIEW",
|
|
4972
|
+
DRAMA_FAILED_TO_QUERY = "DRAMA_FAILED_TO_QUERY",
|
|
4973
|
+
DRAMA_INVALID_TTOP_TOKEN = "DRAMA_INVALID_TTOP_TOKEN",
|
|
4974
|
+
DRAMA_NOT_ON_SHELF = "DRAMA_NOT_ON_SHELF",
|
|
4975
|
+
DRAMA_FAILED_GET_EPISODE_INFO = "DRAMA_FAILED_GET_EPISODE_INFO"
|
|
4976
|
+
}
|
|
4977
|
+
declare const DRAMA_ERROR_CODE: {
|
|
4978
|
+
/** 9301 - 短剧环境下参数不合法(如使用 url/playList 播放,或缺少 albumId / episodeId) */
|
|
4979
|
+
readonly INVALID_PARAM: {
|
|
4980
|
+
readonly code: 9301;
|
|
4981
|
+
readonly message: "Invalid parameter in short drama environment";
|
|
4982
|
+
readonly textKey: LangTextKey.DRAMA_INVALID_PARAM;
|
|
4983
|
+
};
|
|
4984
|
+
readonly NO_INFO_FOUND: {
|
|
4985
|
+
readonly code: 9302;
|
|
4986
|
+
readonly message: "No information found for this Episode";
|
|
4987
|
+
readonly textKey: LangTextKey.DRAMA_NO_INFO_FOUND;
|
|
4988
|
+
};
|
|
4989
|
+
readonly NOT_SUBMITTED: {
|
|
4990
|
+
readonly code: 9303;
|
|
4991
|
+
readonly message: "Episode not submitted for review";
|
|
4992
|
+
readonly textKey: LangTextKey.DRAMA_NOT_SUBMITTED;
|
|
4993
|
+
};
|
|
4994
|
+
readonly UNDER_REVIEW: {
|
|
4995
|
+
readonly code: 9304;
|
|
4996
|
+
readonly message: "Episode under for review";
|
|
4997
|
+
readonly textKey: LangTextKey.DRAMA_UNDER_REVIEW;
|
|
4998
|
+
};
|
|
4999
|
+
readonly FAILED_REVIEW: {
|
|
5000
|
+
readonly code: 9305;
|
|
5001
|
+
readonly message: "Episode failed review";
|
|
5002
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_REVIEW;
|
|
5003
|
+
};
|
|
5004
|
+
readonly WITHDRAWN_REVIEW: {
|
|
5005
|
+
readonly code: 9306;
|
|
5006
|
+
readonly message: "Episode withdrawn from review";
|
|
5007
|
+
readonly textKey: LangTextKey.DRAMA_WITHDRAWN_REVIEW;
|
|
5008
|
+
};
|
|
5009
|
+
readonly FAILED_TO_QUERY: {
|
|
5010
|
+
readonly code: 9307;
|
|
5011
|
+
readonly message: "Failed to query video playback information";
|
|
5012
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_TO_QUERY;
|
|
5013
|
+
};
|
|
5014
|
+
readonly INVALID_TTOP_TOKEN: {
|
|
5015
|
+
readonly code: 9308;
|
|
5016
|
+
readonly message: "Invalid playAuthToken or failed to verify TTOP token";
|
|
5017
|
+
readonly textKey: LangTextKey.DRAMA_INVALID_TTOP_TOKEN;
|
|
5018
|
+
};
|
|
5019
|
+
readonly NOT_ON_SHELF: {
|
|
5020
|
+
readonly code: 9310;
|
|
5021
|
+
readonly message: "Video is not on shelf";
|
|
5022
|
+
readonly textKey: LangTextKey.DRAMA_NOT_ON_SHELF;
|
|
5023
|
+
};
|
|
5024
|
+
readonly FAILED_GET_EPISODE_INFO: {
|
|
5025
|
+
readonly code: 9399;
|
|
5026
|
+
readonly message: "Failed get episode info";
|
|
5027
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_GET_EPISODE_INFO;
|
|
5028
|
+
};
|
|
5029
|
+
};
|
|
4457
5030
|
declare class AuthToken extends SdkPlugin {
|
|
4458
5031
|
static get pluginName(): string;
|
|
4459
5032
|
isPlayByToken: boolean;
|
|
@@ -4475,13 +5048,50 @@ declare class AuthToken extends SdkPlugin {
|
|
|
4475
5048
|
codec: ICodecType;
|
|
4476
5049
|
defaultDefinition: string;
|
|
4477
5050
|
}>;
|
|
5051
|
+
/**
|
|
5052
|
+
* 短剧 Minis 环境:通过 JSB getDramaInfo 获取媒体信息
|
|
5053
|
+
*/
|
|
5054
|
+
getDramaInfoViaJSB(): Promise<VideoInfoRes | undefined>;
|
|
5055
|
+
/**
|
|
5056
|
+
* 将审核状态映射到短剧错误码
|
|
5057
|
+
*/
|
|
5058
|
+
mapReviewStatusToErrorCode(status: number): keyof typeof DRAMA_ERROR_CODE;
|
|
5059
|
+
/**
|
|
5060
|
+
* 根据 JSB 返回的 msg 或 status 映射到错误码 key
|
|
5061
|
+
*/
|
|
5062
|
+
mapDramaErrorCode(msg: string, status?: number): keyof typeof DRAMA_ERROR_CODE;
|
|
5063
|
+
/**
|
|
5064
|
+
* 将 JSB 返回的 video_info 转换为 VideoInfoRes 格式
|
|
5065
|
+
*/
|
|
5066
|
+
transformDramaVideoInfoToRes(videoInfo: any, config: IPlayAuthTokenConfig): VideoInfoRes;
|
|
5067
|
+
callOnGetMediaInfo(mediaInfo: VideoInfoRes | undefined, fromCache: boolean): void;
|
|
5068
|
+
reportGetDramaInfoPerf(res: IJSBCallbackResult | undefined, request: {
|
|
5069
|
+
albumId?: string;
|
|
5070
|
+
episodeId?: string;
|
|
5071
|
+
vid?: string;
|
|
5072
|
+
}): void;
|
|
4478
5073
|
getVideos(): Promise<any>;
|
|
4479
5074
|
getPrivateDrmInfo(playList: Stream[], vid: string, streamType: string): Promise<void>;
|
|
4480
5075
|
getThumbnailConfig(thumbs: IThumbInfoItem[]): void;
|
|
4481
5076
|
getBarrageMaskUrl(url: string): void;
|
|
5077
|
+
setSubtitleConfig(mediaInfo: VideoInfoRes | undefined): void;
|
|
5078
|
+
getAutoSubtitleList(mediaInfo: VideoInfoRes): ISubTitleItem[];
|
|
5079
|
+
getSubtitleSourceData(mediaInfo: VideoInfoRes): any;
|
|
5080
|
+
getAutoSubtitleItem(item: any, index: number): ISubTitleItem | undefined;
|
|
5081
|
+
getStringAutoSubtitleItem(item: string, index: number): ISubTitleItem;
|
|
5082
|
+
getObjectAutoSubtitleItem(item: any, index: number): ISubTitleItem | undefined;
|
|
5083
|
+
formatAutoSubtitleItem(subtitleItem: ISubTitleItem, rawItem: any, index: number): ISubTitleItem | undefined;
|
|
4482
5084
|
getDrmConfig(videoInfo: IVideoInfo): void;
|
|
5085
|
+
/**
|
|
5086
|
+
* 是否处于短剧 Minis 环境(通过剧 ID + 剧集 ID 获取视频)
|
|
5087
|
+
*/
|
|
5088
|
+
get isMinisDramaMode(): boolean;
|
|
4483
5089
|
init(): void;
|
|
4484
5090
|
initConfig(getVideoByToken: IPlayAuthTokenConfig): void;
|
|
5091
|
+
/**
|
|
5092
|
+
* 剧集切换:configs 已由 player 更新 album_id/episode_id,重新拉取媒体信息
|
|
5093
|
+
*/
|
|
5094
|
+
updateDramaEpisode(isNewVideo: boolean): Promise<void>;
|
|
4485
5095
|
/**
|
|
4486
5096
|
* @description 更新playAuthToken
|
|
4487
5097
|
* @param {IPlayAuthTokenConfig} getVideoByToken token信息
|
|
@@ -4601,9 +5211,7 @@ declare class PlayerData {
|
|
|
4601
5211
|
* @brief 私有加密会话id
|
|
4602
5212
|
*/
|
|
4603
5213
|
encryptSessionId?: string;
|
|
4604
|
-
constructor(configs: IPlayerConfig
|
|
4605
|
-
licensSupportModuleList: string[];
|
|
4606
|
-
}, sdk: VePlayer);
|
|
5214
|
+
constructor(configs: IPlayerConfig, sdk: VePlayer);
|
|
4607
5215
|
/**
|
|
4608
5216
|
* 初始化播放数据
|
|
4609
5217
|
* @param configs { IPlayerConfig } 播放器配置
|
|
@@ -4730,34 +5338,62 @@ declare class MobilePlayerPanel {
|
|
|
4730
5338
|
bind(event: string, eventHandle: any, isBubble?: boolean): void;
|
|
4731
5339
|
destroy(): void;
|
|
4732
5340
|
}
|
|
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
|
-
|
|
5341
|
+
export declare type MediaInfoCacheType = "memory" | "localStorage";
|
|
5342
|
+
/** {zh}
|
|
5343
|
+
* @brief 媒体信息本地缓存配置。
|
|
5344
|
+
* @list Options
|
|
5345
|
+
* @kind property
|
|
5346
|
+
*/
|
|
5347
|
+
/** {en}
|
|
5348
|
+
* @brief Local media info cache config.
|
|
5349
|
+
* @list Options
|
|
5350
|
+
* @kind property
|
|
5351
|
+
*/
|
|
5352
|
+
export interface MediaInfoCacheConfig {
|
|
5353
|
+
/** {zh}
|
|
5354
|
+
* @brief 是否启用媒体信息本地缓存。默认关闭。
|
|
5355
|
+
* @default false
|
|
5356
|
+
*/
|
|
5357
|
+
/** {en}
|
|
5358
|
+
* @brief Whether to enable local media info cache. Disabled by default.
|
|
5359
|
+
* @default false
|
|
5360
|
+
*/
|
|
5361
|
+
enable?: boolean;
|
|
5362
|
+
/** {zh}
|
|
5363
|
+
* @brief 缓存方式。默认使用内存缓存,设置为 localStorage 时写入浏览器本地存储。
|
|
5364
|
+
* @default memory
|
|
5365
|
+
*/
|
|
5366
|
+
/** {en}
|
|
5367
|
+
* @brief Cache storage type. Memory cache is used by default. Set to localStorage to write browser local storage.
|
|
5368
|
+
* @default memory
|
|
5369
|
+
*/
|
|
5370
|
+
cacheType?: MediaInfoCacheType;
|
|
5371
|
+
/** {zh}
|
|
5372
|
+
* @brief 缓存过期时间,单位毫秒。默认 30 分钟。
|
|
5373
|
+
* @default 1800000
|
|
5374
|
+
*/
|
|
5375
|
+
/** {en}
|
|
5376
|
+
* @brief Cache expiration time in milliseconds. Defaults to 30 minutes.
|
|
5377
|
+
* @default 1800000
|
|
5378
|
+
*/
|
|
5379
|
+
expireTime?: number;
|
|
5380
|
+
/** {zh}
|
|
5381
|
+
* @brief 最多缓存的媒体信息条数,默认 100。
|
|
5382
|
+
* @default 100
|
|
5383
|
+
*/
|
|
5384
|
+
/** {en}
|
|
5385
|
+
* @brief Maximum number of media info entries to cache. Defaults to 100.
|
|
5386
|
+
* @default 100
|
|
5387
|
+
*/
|
|
5388
|
+
maxEntries?: number;
|
|
4760
5389
|
}
|
|
5390
|
+
export declare type NormalizedMediaInfoCacheConfig = {
|
|
5391
|
+
enable: boolean;
|
|
5392
|
+
expireTime: number;
|
|
5393
|
+
cacheType: MediaInfoCacheType;
|
|
5394
|
+
maxEntries: number;
|
|
5395
|
+
};
|
|
5396
|
+
declare function getMediaInfoCacheConfig(): NormalizedMediaInfoCacheConfig;
|
|
4761
5397
|
/** {zh}
|
|
4762
5398
|
* @hidden
|
|
4763
5399
|
*/
|
|
@@ -4773,10 +5409,6 @@ export declare type PlayerCore = Player & {
|
|
|
4773
5409
|
panel?: MobilePlayerPanel;
|
|
4774
5410
|
emitExpireTimestamp?: number;
|
|
4775
5411
|
vodLogger?: VodLogger;
|
|
4776
|
-
licenseLogInfo?: {
|
|
4777
|
-
licenseStatus: LicenseStatus;
|
|
4778
|
-
licenseType: LicenseEdition;
|
|
4779
|
-
};
|
|
4780
5412
|
};
|
|
4781
5413
|
/**
|
|
4782
5414
|
* @brief 加密混淆信息
|
|
@@ -4849,6 +5481,18 @@ declare class VePlayer {
|
|
|
4849
5481
|
* @memberof VePlayer
|
|
4850
5482
|
*/
|
|
4851
5483
|
private _emitter;
|
|
5484
|
+
/**
|
|
5485
|
+
* @hidden
|
|
5486
|
+
* createPlayer 阶段耗时采集器(仅在 createPlayer 执行期间存在)
|
|
5487
|
+
*/
|
|
5488
|
+
_createPlayerPerf?: CreatePlayerPerfCollector;
|
|
5489
|
+
/**
|
|
5490
|
+
* @hidden
|
|
5491
|
+
* 最近一次 createPlayer 性能报告
|
|
5492
|
+
*/
|
|
5493
|
+
private _lastCreatePlayerPerfReport?;
|
|
5494
|
+
private _isCollectingCreatePlayerPerf;
|
|
5495
|
+
private _getDramaInfoPerfRecords;
|
|
4852
5496
|
/**
|
|
4853
5497
|
*
|
|
4854
5498
|
*
|
|
@@ -4891,6 +5535,22 @@ declare class VePlayer {
|
|
|
4891
5535
|
* @memberof VePlayer
|
|
4892
5536
|
*/
|
|
4893
5537
|
delayError: any[];
|
|
5538
|
+
/** {zh}
|
|
5539
|
+
* @brief 设置是否为通过短剧信息或 playAuthToken 获取到的视频地址追加时间戳 query(t=Date.now())。
|
|
5540
|
+
* @param enable true=追加时间戳,false=不追加
|
|
5541
|
+
*/
|
|
5542
|
+
/** {en}
|
|
5543
|
+
* @brief Set whether to append a timestamp query (t=Date.now()) to video URLs from drama info or playAuthToken.
|
|
5544
|
+
* @param enable true=append timestamp, false=do not append
|
|
5545
|
+
*/
|
|
5546
|
+
static setAppendVideoUrlTimestamp(enable?: boolean): void;
|
|
5547
|
+
/** {zh}
|
|
5548
|
+
* @hidden
|
|
5549
|
+
*/
|
|
5550
|
+
/** {en}
|
|
5551
|
+
* @hidden
|
|
5552
|
+
*/
|
|
5553
|
+
static getAppendVideoUrlTimestamp(): boolean;
|
|
4894
5554
|
/**
|
|
4895
5555
|
* @hidden
|
|
4896
5556
|
* umd加载器
|
|
@@ -4906,7 +5566,6 @@ declare class VePlayer {
|
|
|
4906
5566
|
/**
|
|
4907
5567
|
* @hidden
|
|
4908
5568
|
*/
|
|
4909
|
-
static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
|
|
4910
5569
|
/**
|
|
4911
5570
|
* @hidden
|
|
4912
5571
|
*/
|
|
@@ -4917,6 +5576,51 @@ declare class VePlayer {
|
|
|
4917
5576
|
* @memberof VePlayer
|
|
4918
5577
|
*/
|
|
4919
5578
|
static sdkVersion: string;
|
|
5579
|
+
/**
|
|
5580
|
+
* @brief TT短剧环境配置
|
|
5581
|
+
* @type {ITTDramaEnv | null}
|
|
5582
|
+
* @memberof VePlayer
|
|
5583
|
+
*/
|
|
5584
|
+
static ttDramaEnv: ITTDramaEnv | null;
|
|
5585
|
+
/** {zh}
|
|
5586
|
+
* @brief 设置TT短剧播放环境
|
|
5587
|
+
* @param env 短剧环境配置,详情见{@link ITTDramaEnv}
|
|
5588
|
+
*/
|
|
5589
|
+
static setTTDramaEnv(env: ITTDramaEnv): void;
|
|
5590
|
+
/** {zh}
|
|
5591
|
+
* @brief 设置媒体信息本地缓存配置,默认关闭。开启后,通过短剧信息或 playAuthToken 获取媒体信息时优先使用缓存。
|
|
5592
|
+
* @param config 缓存配置
|
|
5593
|
+
*/
|
|
5594
|
+
/** {en}
|
|
5595
|
+
* @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.
|
|
5596
|
+
* @param config Cache config
|
|
5597
|
+
*/
|
|
5598
|
+
static setMediaInfoCacheConfig(config: MediaInfoCacheConfig): void;
|
|
5599
|
+
/** {zh}
|
|
5600
|
+
* @brief 获取当前媒体信息本地缓存配置。
|
|
5601
|
+
* @returns 当前媒体信息缓存配置。
|
|
5602
|
+
*/
|
|
5603
|
+
/** {en}
|
|
5604
|
+
* @brief Get current local media info cache config.
|
|
5605
|
+
* @returns Current media info cache config.
|
|
5606
|
+
*/
|
|
5607
|
+
static getMediaInfoCacheConfig(): ReturnType<typeof getMediaInfoCacheConfig>;
|
|
5608
|
+
/** {zh}
|
|
5609
|
+
* @brief 清除媒体信息缓存,会同时清除内存缓存和 localStorage 缓存。
|
|
5610
|
+
*/
|
|
5611
|
+
/** {en}
|
|
5612
|
+
* @brief Clear media info cache from both memory cache and localStorage cache.
|
|
5613
|
+
*/
|
|
5614
|
+
static clearMediaInfoCache(): void;
|
|
5615
|
+
/** {zh}
|
|
5616
|
+
* @brief 设置全局日志开关。开启后会输出 VE_DEBUG.log 级别日志。
|
|
5617
|
+
* @param enable 是否开启详细日志
|
|
5618
|
+
*/
|
|
5619
|
+
/** {en}
|
|
5620
|
+
* @brief Set the global log switch. When enabled, VE_DEBUG.log level logs are printed.
|
|
5621
|
+
* @param enable Whether to enable verbose logs
|
|
5622
|
+
*/
|
|
5623
|
+
static setDebug(enable: boolean): void;
|
|
4920
5624
|
/**
|
|
4921
5625
|
* @hidden
|
|
4922
5626
|
*/
|
|
@@ -4949,7 +5653,7 @@ declare class VePlayer {
|
|
|
4949
5653
|
* @brief 添加待预加载视频列表
|
|
4950
5654
|
* @param list 待预加载视频列表,详情见{@link IPreloadStream[]}。
|
|
4951
5655
|
*/
|
|
4952
|
-
static addPreloadList(list: IPreloadStream[]): void
|
|
5656
|
+
static addPreloadList(list: IPreloadStream[]): Promise<void>;
|
|
4953
5657
|
/** {zh}
|
|
4954
5658
|
* @brief 设置待预加载视频列表,替换当前已设置的待预加载列表
|
|
4955
5659
|
* @param list 待预加载视频列表,详情见{@link IPreloadStream[]}
|
|
@@ -4960,14 +5664,6 @@ declare class VePlayer {
|
|
|
4960
5664
|
* @param codec
|
|
4961
5665
|
* @param options
|
|
4962
5666
|
*/
|
|
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
5667
|
/**
|
|
4972
5668
|
* @breif 生成加密混淆的数据信息
|
|
4973
5669
|
* @param unionId 用户唯一id
|
|
@@ -5115,7 +5811,6 @@ declare class VePlayer {
|
|
|
5115
5811
|
* @hidden
|
|
5116
5812
|
*/
|
|
5117
5813
|
createPlayer: () => Promise<PlayerCore>;
|
|
5118
|
-
private checkLicenseCallback;
|
|
5119
5814
|
/** {zh}
|
|
5120
5815
|
* @hidden
|
|
5121
5816
|
* @brief 设置合并开发者的插件配置,如果开发者从初始化的configs里传了插件配置,则只用开发者的配置,并补齐其他参数
|
|
@@ -5181,6 +5876,28 @@ declare class VePlayer {
|
|
|
5181
5876
|
* @memberof VePlayer
|
|
5182
5877
|
*/
|
|
5183
5878
|
beforePlayerCreate(): Promise<void>;
|
|
5879
|
+
/** {zh}
|
|
5880
|
+
* @hidden
|
|
5881
|
+
* @brief 获取最近一次 createPlayer 的性能报告。
|
|
5882
|
+
*/
|
|
5883
|
+
/** {en}
|
|
5884
|
+
* @hidden
|
|
5885
|
+
* @brief Get the perf report of the latest createPlayer.
|
|
5886
|
+
*/
|
|
5887
|
+
getCreatePlayerPerfReport(): ICreatePlayerPerfReport;
|
|
5888
|
+
/**
|
|
5889
|
+
* @brief 记录一次 JSB getDramaInfo 返回的客户端耗时信息。
|
|
5890
|
+
*/
|
|
5891
|
+
recordGetDramaInfoPerf(payload: IGetDramaInfoPerfCallbackPayload): void;
|
|
5892
|
+
/**
|
|
5893
|
+
* @brief 获取当前播放器实例记录到的 getDramaInfo 客户端耗时列表。
|
|
5894
|
+
*/
|
|
5895
|
+
getDramaInfoPerfRecords(): IGetDramaInfoPerfCallbackPayload[];
|
|
5896
|
+
/**
|
|
5897
|
+
* @brief 获取最近一次 getDramaInfo 客户端耗时。
|
|
5898
|
+
*/
|
|
5899
|
+
getLastDramaInfoPerf(): IGetDramaInfoPerfCallbackPayload | undefined;
|
|
5900
|
+
private _markGetDramaInfoClientPerf;
|
|
5184
5901
|
private prepareStrategies;
|
|
5185
5902
|
/**
|
|
5186
5903
|
* @hidden
|
|
@@ -5227,6 +5944,7 @@ declare class VePlayer {
|
|
|
5227
5944
|
* @memberof VePlayer
|
|
5228
5945
|
*/
|
|
5229
5946
|
private _bindPlayerEvents;
|
|
5947
|
+
private _onMp4PreloadInfo;
|
|
5230
5948
|
private _proxyError;
|
|
5231
5949
|
private _onError;
|
|
5232
5950
|
/** {zh}
|
|
@@ -5344,8 +6062,35 @@ declare class VePlayer {
|
|
|
5344
6062
|
* @param config 播放器实例化配置。此接口仅支持 `IPlayerConfig` 中的 `url`、`playList`、`poster`、`getVideoByToken` 字段。。
|
|
5345
6063
|
* @param isNewVideo 是否为新视频。为 `false` 时,更换后,会从更换前的时间点继续播放。
|
|
5346
6064
|
*/
|
|
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
|
+
};
|
|
5347
6086
|
playNext(config: IPlayerConfig, isNewVideo?: boolean): Promise<any>;
|
|
5348
6087
|
private _playNext;
|
|
6088
|
+
/** 从 playerData.configs 取出短剧 id,供 XGPlayer setConfig / playNext 与切换后 configs 一致 */
|
|
6089
|
+
private _getDramaConfigPatchForPlayer;
|
|
6090
|
+
private _buildDramaInvalidParamError;
|
|
6091
|
+
private _getDramaAlbumIdFromConfig;
|
|
6092
|
+
private _getDramaEpisodeIdFromConfig;
|
|
6093
|
+
private switchDramaEpisode;
|
|
5349
6094
|
/** {zh}
|
|
5350
6095
|
* @brief 销毁xgplayer实例
|
|
5351
6096
|
*
|
|
@@ -5546,6 +6291,32 @@ declare class VePlayer {
|
|
|
5546
6291
|
* @param pluginName 插件名。
|
|
5547
6292
|
*/
|
|
5548
6293
|
getPlugin(pluginName: string): null | BasePlugin;
|
|
6294
|
+
/** {zh}
|
|
6295
|
+
* @brief 获取字幕列表。需配置 `Subtitle` 插件后调用。
|
|
6296
|
+
* @return 当前字幕列表,每项包含 `id`、`language`、`text`(显示名称)等字段。列表为空时返回空数组。
|
|
6297
|
+
* @memberof VePlayer
|
|
6298
|
+
*/
|
|
6299
|
+
getSubtitleList(): ISubTitleItem[];
|
|
6300
|
+
/** {zh}
|
|
6301
|
+
* @brief 切换字幕。需配置 `Subtitle` 插件后调用。
|
|
6302
|
+
* @param subtitle 目标字幕的 id 或 language,任意一个非空即可定位字幕项。
|
|
6303
|
+
* @return 切换成功时 resolve,失败(未找到、切换被中止)时 reject。
|
|
6304
|
+
* @memberof VePlayer
|
|
6305
|
+
*/
|
|
6306
|
+
switchSubtitle(subtitle: {
|
|
6307
|
+
id?: string | number;
|
|
6308
|
+
language?: string | number;
|
|
6309
|
+
}): Promise<void>;
|
|
6310
|
+
/** {zh}
|
|
6311
|
+
* @brief 开启字幕展示。恢复上次选中的字幕项;若从未选中过则默认选第一项。需配置 `Subtitle` 插件后调用。
|
|
6312
|
+
* @memberof VePlayer
|
|
6313
|
+
*/
|
|
6314
|
+
showSubtitle(): void;
|
|
6315
|
+
/** {zh}
|
|
6316
|
+
* @brief 关闭字幕展示。字幕数据保留,可通过 `showSubtitle` 重新开启。需配置 `Subtitle` 插件后调用。
|
|
6317
|
+
* @memberof VePlayer
|
|
6318
|
+
*/
|
|
6319
|
+
hideSubtitle(): void;
|
|
5549
6320
|
/** {zh}
|
|
5550
6321
|
* @memberof VePlayer
|
|
5551
6322
|
* @brief 销毁当前播放器实例。
|
|
@@ -5964,91 +6735,6 @@ export declare class MirrorPlugin extends Plugin {
|
|
|
5964
6735
|
destroy(): void;
|
|
5965
6736
|
render(): string;
|
|
5966
6737
|
}
|
|
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
6738
|
export declare const Events: {
|
|
6053
6739
|
/** {zh}
|
|
6054
6740
|
* @brief 弹幕配置发生变化。
|
|
@@ -6190,6 +6876,13 @@ export declare const Events: {
|
|
|
6190
6876
|
* @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
|
|
6191
6877
|
*/
|
|
6192
6878
|
ABR_AUTO_DESC_CHANGE: string;
|
|
6879
|
+
/** {zh}
|
|
6880
|
+
* @brief mp4 加密插件命中预加载数据时触发。data 为预加载缓存对象,含 `byteLength`、`duration`、`mediaSegList` 等字段。
|
|
6881
|
+
*/
|
|
6882
|
+
/** {en}
|
|
6883
|
+
* @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`.
|
|
6884
|
+
*/
|
|
6885
|
+
PRELOAD_INFO: string;
|
|
6193
6886
|
/** {zh}
|
|
6194
6887
|
* @brief 播放器实例创建完成时触发。
|
|
6195
6888
|
*/
|
|
@@ -6340,10 +7033,21 @@ export declare const Events: {
|
|
|
6340
7033
|
* @brief Autoplay fails to start.
|
|
6341
7034
|
*/
|
|
6342
7035
|
AUTOPLAY_PREVENTED: string;
|
|
7036
|
+
/** {zh}
|
|
7037
|
+
* @brief 播放器准备创建。
|
|
7038
|
+
*/
|
|
7039
|
+
READY_CREATE_PLAYER: string;
|
|
6343
7040
|
/** {zh}
|
|
6344
7041
|
* @brief 播放器完成创建。
|
|
6345
7042
|
*/
|
|
6346
7043
|
PLAYER_CREATED_FINISH: string;
|
|
7044
|
+
/** {zh}
|
|
7045
|
+
* @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
|
|
7046
|
+
*/
|
|
7047
|
+
/** {en}
|
|
7048
|
+
* @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
|
|
7049
|
+
*/
|
|
7050
|
+
CREATE_PLAYER_PERF: string;
|
|
6347
7051
|
/** {zh}
|
|
6348
7052
|
* @brief 播放器重建。
|
|
6349
7053
|
*/
|
|
@@ -6663,10 +7367,21 @@ export declare const Event: {
|
|
|
6663
7367
|
* @brief Autoplay fails to start.
|
|
6664
7368
|
*/
|
|
6665
7369
|
AUTOPLAY_PREVENTED: string;
|
|
7370
|
+
/** {zh}
|
|
7371
|
+
* @brief 播放器准备创建。
|
|
7372
|
+
*/
|
|
7373
|
+
READY_CREATE_PLAYER: string;
|
|
6666
7374
|
/** {zh}
|
|
6667
7375
|
* @brief 播放器完成创建。
|
|
6668
7376
|
*/
|
|
6669
7377
|
PLAYER_CREATED_FINISH: string;
|
|
7378
|
+
/** {zh}
|
|
7379
|
+
* @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
|
|
7380
|
+
*/
|
|
7381
|
+
/** {en}
|
|
7382
|
+
* @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
|
|
7383
|
+
*/
|
|
7384
|
+
CREATE_PLAYER_PERF: string;
|
|
6670
7385
|
/** {zh}
|
|
6671
7386
|
* @brief 播放器重建。
|
|
6672
7387
|
*/
|
|
@@ -6861,12 +7576,18 @@ export declare const Event: {
|
|
|
6861
7576
|
* @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
|
|
6862
7577
|
*/
|
|
6863
7578
|
ABR_AUTO_DESC_CHANGE: string;
|
|
7579
|
+
/** {zh}
|
|
7580
|
+
* @brief mp4 加密插件命中预加载数据时触发。data 为预加载缓存对象,含 `byteLength`、`duration`、`mediaSegList` 等字段。
|
|
7581
|
+
*/
|
|
7582
|
+
/** {en}
|
|
7583
|
+
* @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`.
|
|
7584
|
+
*/
|
|
7585
|
+
PRELOAD_INFO: string;
|
|
6864
7586
|
};
|
|
6865
7587
|
};
|
|
6866
7588
|
export * from "xgplayer";
|
|
6867
7589
|
|
|
6868
7590
|
export {
|
|
6869
|
-
LiveSubTitlesPlugin as LiveSubtitlesPlugin,
|
|
6870
7591
|
MusicPreset as Music,
|
|
6871
7592
|
VePlayer as default,
|
|
6872
7593
|
};
|