@volcengine/veplayer 1.15.3-rc.1 → 1.15.3-rc.11
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/README.md +47 -0
- package/index.d.ts +560 -236
- package/index.min.css +1 -1
- package/index.min.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -80,21 +80,8 @@ export interface ISdkErrorConfig {
|
|
|
80
80
|
* @hidden
|
|
81
81
|
*/
|
|
82
82
|
isNeedDemoteBack?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* @brief 是否允许回退到同清晰度不同线路的 fallbackurl:
|
|
85
|
-
* - `false`:只能在当前 defintion 范围内 fallback。
|
|
86
|
-
* - `true`:允许 fallback 相同清晰度,不同的线路的 fallbackurl。
|
|
87
|
-
* @default true
|
|
88
|
-
*
|
|
89
|
-
*/
|
|
90
|
-
/** {en}
|
|
91
|
-
* @brief Is demote to different line enabled? The values are as follows:
|
|
92
|
-
* - `false`: only demote in current definition line.
|
|
93
|
-
* - `true`: allow demote to different line.
|
|
94
|
-
*/
|
|
95
|
-
allowDemoteToDifferentLine?: boolean;
|
|
96
83
|
/** {zh}
|
|
97
|
-
* @brief
|
|
84
|
+
* @brief 报错后重试次数。
|
|
98
85
|
* @default 1
|
|
99
86
|
*/
|
|
100
87
|
retryLoopNum?: number;
|
|
@@ -826,61 +813,6 @@ export interface IDefinitionDemotePlugin {
|
|
|
826
813
|
* - `true`: automatic downgrade is enabled.
|
|
827
814
|
*/
|
|
828
815
|
isNeedAutoDemote?: boolean;
|
|
829
|
-
/**
|
|
830
|
-
* @brief 当用户开启 fallbackUrl 降级(降级到备用线路) 时,优先降级清晰度还是 fallbackUrl,取值如下:
|
|
831
|
-
* - `false`:优先在同一个清晰度的所有 fallback 之间切换, 都有问题的情况下,再降低到下一个清晰度
|
|
832
|
-
* - `true`:优先降级清晰度, 清晰度降到最低之后,再在最后一个清晰度的 fallbackUrl 之间切换
|
|
833
|
-
* @default false
|
|
834
|
-
*
|
|
835
|
-
*/
|
|
836
|
-
/** {en}
|
|
837
|
-
* @brief Is demote quality first? The values are as follows:
|
|
838
|
-
* - `false`: not demote quality first.
|
|
839
|
-
* - `true`: demote quality first.
|
|
840
|
-
*/
|
|
841
|
-
shouldDemoteDefinitionFirst?: boolean;
|
|
842
|
-
/**
|
|
843
|
-
* @brief 是否开启 fallbackUrl 降级:
|
|
844
|
-
* - `false`:不尝试降级到备用线路。
|
|
845
|
-
* - `true`:尝试降级到备用线路。
|
|
846
|
-
* @default true
|
|
847
|
-
*
|
|
848
|
-
*/
|
|
849
|
-
/** {en}
|
|
850
|
-
* @brief Is automatic downgrade enabled? The values are as follows:
|
|
851
|
-
* - `false`: not try to play fallbackUrl first.
|
|
852
|
-
* - `true`: try to play fallbackUrl first before demote definition.
|
|
853
|
-
*/
|
|
854
|
-
isNeedDemoteBack?: boolean;
|
|
855
|
-
/**
|
|
856
|
-
* @brief 是否允许回退到同清晰度不同线路的 fallbackurl:
|
|
857
|
-
* - `false`:只能在当前 defintion 范围内 fallback。
|
|
858
|
-
* - `true`:允许 fallback 相同清晰度,不同的线路的 fallbackurl。
|
|
859
|
-
* @default true
|
|
860
|
-
*
|
|
861
|
-
*/
|
|
862
|
-
/** {en}
|
|
863
|
-
* @brief Is demote to different line enabled? The values are as follows:
|
|
864
|
-
* - `false`: only demote in current definition line.
|
|
865
|
-
* - `true`: allow demote to different line.
|
|
866
|
-
*/
|
|
867
|
-
allowDemoteToDifferentLine?: boolean;
|
|
868
|
-
/**
|
|
869
|
-
* @brief 同一清晰度降级至 fallbackurl 的重试轮数。
|
|
870
|
-
* @default 1
|
|
871
|
-
*/
|
|
872
|
-
/** {en}
|
|
873
|
-
* @brief The retry loop number for all available fallbackUrl.
|
|
874
|
-
*/
|
|
875
|
-
retryLoopNum?: number;
|
|
876
|
-
/**
|
|
877
|
-
* @brief 在降级时到下一个definition 时,是否显示 toast 提示。
|
|
878
|
-
* @default 1
|
|
879
|
-
*/
|
|
880
|
-
/** {en}
|
|
881
|
-
* @brief Whether to show toast when demote to next definition.
|
|
882
|
-
*/
|
|
883
|
-
bumpToastWhenDemoteToNextDefinition?: boolean;
|
|
884
816
|
/**
|
|
885
817
|
* @brief 清晰度降级顺序。数组中的元素需与 `playList` 中的 `definition` 相对应。
|
|
886
818
|
* @default []
|
|
@@ -942,10 +874,6 @@ export declare class DefinitionDemotePlugin extends Plugin {
|
|
|
942
874
|
longWaitingEmitTime: number;
|
|
943
875
|
waitingStartTime: number;
|
|
944
876
|
playerData: PlayerData;
|
|
945
|
-
fallbackState: {
|
|
946
|
-
retryTimes: number;
|
|
947
|
-
idx: number;
|
|
948
|
-
};
|
|
949
877
|
static get defaultConfig(): IDefinitionDemotePlugin;
|
|
950
878
|
constructor(args: any);
|
|
951
879
|
registerLanguageTexts(): {
|
|
@@ -965,12 +893,6 @@ export declare class DefinitionDemotePlugin extends Plugin {
|
|
|
965
893
|
_clearTime(): void;
|
|
966
894
|
clearState(): void;
|
|
967
895
|
demote(): void;
|
|
968
|
-
executeDemoteFallbackFirst(): void;
|
|
969
|
-
executeDemoteDefinitionFirst(): void;
|
|
970
|
-
getRetryListForCurrentDefinition(): any[];
|
|
971
|
-
getRetryListForCurrentDefinitionAcrossAllLines(): any[];
|
|
972
|
-
resetTimes(): void;
|
|
973
|
-
changeMainOrBackup(): boolean;
|
|
974
896
|
changeUrl(url: Url): void;
|
|
975
897
|
showToast(definition: Stream): void;
|
|
976
898
|
destroy(): void;
|
|
@@ -2326,6 +2248,81 @@ export interface IGetPlayInfoRes {
|
|
|
2326
2248
|
TotalCount: number;
|
|
2327
2249
|
Version: number;
|
|
2328
2250
|
}
|
|
2251
|
+
/**
|
|
2252
|
+
* 短剧环境配置接口
|
|
2253
|
+
*/
|
|
2254
|
+
export interface ITTDramaEnv {
|
|
2255
|
+
/** 云服务商,默认从构建时 env.__PLATFORM__ 获取,未注入时默认为 byteplus */
|
|
2256
|
+
channel?: "volcengine" | "byteplus";
|
|
2257
|
+
/**
|
|
2258
|
+
* @brief 应用版本号
|
|
2259
|
+
* @type {string}
|
|
2260
|
+
*/
|
|
2261
|
+
appVersion: string;
|
|
2262
|
+
/**
|
|
2263
|
+
* @brief 小程序三方id
|
|
2264
|
+
* @type {string}
|
|
2265
|
+
*/
|
|
2266
|
+
clientKey: string;
|
|
2267
|
+
/**
|
|
2268
|
+
* @brief 是否支持获取短剧信息
|
|
2269
|
+
* @type {boolean}
|
|
2270
|
+
*/
|
|
2271
|
+
canIUseGetDramaInfo: boolean;
|
|
2272
|
+
/**
|
|
2273
|
+
* @brief 获取短剧信息
|
|
2274
|
+
* @type {function}
|
|
2275
|
+
*/
|
|
2276
|
+
getDramaInfo: (callback: (res: IJSBCallbackResult) => void, options: IGetDramaInfoOptions) => void;
|
|
2277
|
+
videoSecurityModule?: any;
|
|
2278
|
+
/**
|
|
2279
|
+
* @brief 日志发送接口
|
|
2280
|
+
* @type {function}
|
|
2281
|
+
*/
|
|
2282
|
+
sendLog: (EventName: string, params: Record<string, any>) => void;
|
|
2283
|
+
/**
|
|
2284
|
+
* 低版本 app 下验证 TTOP 签发的 playAuthToken 时使用的密钥
|
|
2285
|
+
* 通过 JSB(如 minis.getSecret)从 Native 获取,用于 HMAC-SHA256 签名校验
|
|
2286
|
+
*/
|
|
2287
|
+
getTokenVerifySecret?: () => Promise<string>;
|
|
2288
|
+
}
|
|
2289
|
+
/**
|
|
2290
|
+
* JSB 获取短剧信息请求参数
|
|
2291
|
+
*/
|
|
2292
|
+
export interface IGetDramaInfoOptions {
|
|
2293
|
+
clientKey: string;
|
|
2294
|
+
albumId: string;
|
|
2295
|
+
episodeId: string;
|
|
2296
|
+
vid: string;
|
|
2297
|
+
}
|
|
2298
|
+
export interface MinisError {
|
|
2299
|
+
error_code: number;
|
|
2300
|
+
error_msg: string;
|
|
2301
|
+
error_extra?: unknown;
|
|
2302
|
+
}
|
|
2303
|
+
/**
|
|
2304
|
+
* JSB 获取短剧信息返回结果
|
|
2305
|
+
*/
|
|
2306
|
+
export interface IJSBCallbackResult {
|
|
2307
|
+
is_success: number;
|
|
2308
|
+
error: MinisError;
|
|
2309
|
+
data: {
|
|
2310
|
+
status: number;
|
|
2311
|
+
drama_info: {
|
|
2312
|
+
album_id: string;
|
|
2313
|
+
drama_name: string;
|
|
2314
|
+
drama_cover: string;
|
|
2315
|
+
drama_description: string;
|
|
2316
|
+
};
|
|
2317
|
+
episode_info: {
|
|
2318
|
+
episode_id: string;
|
|
2319
|
+
episode_name: string;
|
|
2320
|
+
episode_cover: string;
|
|
2321
|
+
episode_description: string;
|
|
2322
|
+
};
|
|
2323
|
+
video_info: IGetPlayInfoRes;
|
|
2324
|
+
};
|
|
2325
|
+
}
|
|
2329
2326
|
/** {zh}
|
|
2330
2327
|
* @list Options
|
|
2331
2328
|
* @brief 视频编码格式。
|
|
@@ -2360,7 +2357,7 @@ export declare const CodecType: {
|
|
|
2360
2357
|
*/
|
|
2361
2358
|
readonly UNKNOWN: "unknown";
|
|
2362
2359
|
};
|
|
2363
|
-
export declare type ICodecType =
|
|
2360
|
+
export declare type ICodecType = typeof CodecType[keyof typeof CodecType];
|
|
2364
2361
|
export declare const ContentType: {
|
|
2365
2362
|
h265: string;
|
|
2366
2363
|
h264: string;
|
|
@@ -2751,6 +2748,39 @@ export declare type Url = string | Array<{
|
|
|
2751
2748
|
type?: string;
|
|
2752
2749
|
[propName: string]: any;
|
|
2753
2750
|
}>;
|
|
2751
|
+
/** {zh}
|
|
2752
|
+
* @list Options
|
|
2753
|
+
* @kind property
|
|
2754
|
+
* @brief 获取到媒体信息时的回调参数。
|
|
2755
|
+
*/
|
|
2756
|
+
/** {en}
|
|
2757
|
+
* @list Options
|
|
2758
|
+
* @kind property
|
|
2759
|
+
* @brief Callback payload when media information is obtained.
|
|
2760
|
+
*/
|
|
2761
|
+
export interface IGetMediaInfoCallbackPayload {
|
|
2762
|
+
/** {zh}
|
|
2763
|
+
* @brief 媒体信息。
|
|
2764
|
+
*/
|
|
2765
|
+
/** {en}
|
|
2766
|
+
* @brief Media information.
|
|
2767
|
+
*/
|
|
2768
|
+
data: {
|
|
2769
|
+
playList?: Stream[];
|
|
2770
|
+
type?: string;
|
|
2771
|
+
poster?: string;
|
|
2772
|
+
vid?: string;
|
|
2773
|
+
duration?: number;
|
|
2774
|
+
[propName: string]: any;
|
|
2775
|
+
};
|
|
2776
|
+
/** {zh}
|
|
2777
|
+
* @brief 媒体信息是否来自缓存。
|
|
2778
|
+
*/
|
|
2779
|
+
/** {en}
|
|
2780
|
+
* @brief Whether the media information comes from cache.
|
|
2781
|
+
*/
|
|
2782
|
+
fromCache: boolean;
|
|
2783
|
+
}
|
|
2754
2784
|
/** {zh}
|
|
2755
2785
|
* @list Options
|
|
2756
2786
|
* @kind property
|
|
@@ -2796,12 +2826,29 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
2796
2826
|
* @default -
|
|
2797
2827
|
*/
|
|
2798
2828
|
vid?: string;
|
|
2829
|
+
/**
|
|
2830
|
+
* @brief 剧id,Minis 短剧播放需要
|
|
2831
|
+
*/
|
|
2832
|
+
albumId?: string;
|
|
2833
|
+
/**
|
|
2834
|
+
* @brief 剧集id,Minis 短剧播放需要
|
|
2835
|
+
*/
|
|
2836
|
+
episodeId?: string;
|
|
2799
2837
|
/** {zh}
|
|
2800
2838
|
* @brief Vid 播放配置项。应用服务端需通过 `vid` 生成临时临时播放 Token,下发给客户端。
|
|
2801
2839
|
* @type {IPlayAuthTokenConfig}
|
|
2802
2840
|
* @memberof IPlayerConfig
|
|
2803
2841
|
*/
|
|
2804
2842
|
getVideoByToken?: IPlayAuthTokenConfig;
|
|
2843
|
+
/** {zh}
|
|
2844
|
+
* @brief 通过 `playAuthToken` 或缓存获取到媒体信息时触发的回调。
|
|
2845
|
+
* @default -
|
|
2846
|
+
*/
|
|
2847
|
+
/** {en}
|
|
2848
|
+
* @brief Callback fired when media information is obtained from `playAuthToken` or cache.
|
|
2849
|
+
* @default -
|
|
2850
|
+
*/
|
|
2851
|
+
onGetMediaInfo?: (payload: IGetMediaInfoCallbackPayload) => void;
|
|
2805
2852
|
/** {zh}
|
|
2806
2853
|
* @brief 视频加密类型
|
|
2807
2854
|
* @default -
|
|
@@ -3339,6 +3386,31 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
3339
3386
|
* @default -
|
|
3340
3387
|
*/
|
|
3341
3388
|
sdkErrorPlugin?: ISdkErrorConfig;
|
|
3389
|
+
/** {zh}
|
|
3390
|
+
* @brief 原生媒体错误(如网络类 code 2/4)自动重试的最大次数,对应 {@link VeErrorOptions.oriErrRetryCount}。
|
|
3391
|
+
* @default 3
|
|
3392
|
+
*/
|
|
3393
|
+
oriErrRetryCount?: number;
|
|
3394
|
+
/** {zh}
|
|
3395
|
+
* @brief 上述重试计数的清零周期(毫秒),超时后重试次数重新统计,对应 {@link VeErrorOptions.oriErrRetryCycle}。
|
|
3396
|
+
* @default 10000
|
|
3397
|
+
*/
|
|
3398
|
+
oriErrRetryCycle?: number;
|
|
3399
|
+
/** {zh}
|
|
3400
|
+
* @brief 是否在原生媒体错误时自动重试拉流,对应 {@link VeErrorOptions.enableOriErrRetry}。
|
|
3401
|
+
* @default true
|
|
3402
|
+
*/
|
|
3403
|
+
enableOriErrRetry?: boolean;
|
|
3404
|
+
/** {zh}
|
|
3405
|
+
* @brief 是否在错误时同步分析网络/流(如 XHR 探测),对应 {@link VeErrorOptions.needSyncAnalyzeError}。
|
|
3406
|
+
* @default true
|
|
3407
|
+
*/
|
|
3408
|
+
needSyncAnalyzeError?: boolean;
|
|
3409
|
+
/** {zh}
|
|
3410
|
+
* @brief 错误分析请求超时时间(毫秒),对应 {@link VeErrorOptions.analyzeTimeout}。
|
|
3411
|
+
* @default 3000
|
|
3412
|
+
*/
|
|
3413
|
+
analyzeTimeout?: number;
|
|
3342
3414
|
/** {zh}
|
|
3343
3415
|
* @brief rtm配置,配置rtm拉流参数
|
|
3344
3416
|
* @notes 传入rtm流url时才生效
|
|
@@ -4311,7 +4383,7 @@ export declare type IPreloadUpdateConfig = {
|
|
|
4311
4383
|
* 预加载视频资源
|
|
4312
4384
|
* @detail Options
|
|
4313
4385
|
*/
|
|
4314
|
-
export declare type
|
|
4386
|
+
export declare type IPreloadResolvedStream = {
|
|
4315
4387
|
/**
|
|
4316
4388
|
* 视频唯一ID
|
|
4317
4389
|
* @brief 视频 ID
|
|
@@ -4373,6 +4445,43 @@ export declare type IPreloadStream = {
|
|
|
4373
4445
|
*/
|
|
4374
4446
|
size: number;
|
|
4375
4447
|
};
|
|
4448
|
+
export declare type IPreloadDramaStream = {
|
|
4449
|
+
/**
|
|
4450
|
+
* 视频唯一ID
|
|
4451
|
+
*/
|
|
4452
|
+
vid?: string;
|
|
4453
|
+
/**
|
|
4454
|
+
* 短剧剧 ID
|
|
4455
|
+
*/
|
|
4456
|
+
albumId: string;
|
|
4457
|
+
/**
|
|
4458
|
+
* 短剧剧集 ID
|
|
4459
|
+
*/
|
|
4460
|
+
episodeId: string;
|
|
4461
|
+
/**
|
|
4462
|
+
* 默认清晰度,用于缓存 key 和预加载流选择
|
|
4463
|
+
*/
|
|
4464
|
+
defaultDefinition?: string;
|
|
4465
|
+
/**
|
|
4466
|
+
* Vid 播放配置。短剧预加载会复用 playAuthToken 等配置请求短剧信息。
|
|
4467
|
+
*/
|
|
4468
|
+
getVideoByToken?: IPlayAuthTokenConfig;
|
|
4469
|
+
};
|
|
4470
|
+
export declare type IPreloadAuthTokenStream = {
|
|
4471
|
+
/**
|
|
4472
|
+
* 视频唯一ID
|
|
4473
|
+
*/
|
|
4474
|
+
vid?: string;
|
|
4475
|
+
/**
|
|
4476
|
+
* 默认清晰度,用于选择预加载流
|
|
4477
|
+
*/
|
|
4478
|
+
defaultDefinition?: string;
|
|
4479
|
+
/**
|
|
4480
|
+
* Vid 播放配置。预加载会复用 playAuthToken 请求媒体信息。
|
|
4481
|
+
*/
|
|
4482
|
+
getVideoByToken: IPlayAuthTokenConfig;
|
|
4483
|
+
};
|
|
4484
|
+
export declare type IPreloadStream = IPreloadResolvedStream | IPreloadDramaStream | IPreloadAuthTokenStream;
|
|
4376
4485
|
declare class VeStrategyWrapper {
|
|
4377
4486
|
private tea;
|
|
4378
4487
|
private static mapStrategyNameToUmdKey;
|
|
@@ -4532,6 +4641,135 @@ export declare class SdkPlugin {
|
|
|
4532
4641
|
*/
|
|
4533
4642
|
__destroy(): void;
|
|
4534
4643
|
}
|
|
4644
|
+
/**
|
|
4645
|
+
* @author bytedance
|
|
4646
|
+
* @version 1.0
|
|
4647
|
+
* @Description
|
|
4648
|
+
* @date 2024/12/16 17:59
|
|
4649
|
+
*/
|
|
4650
|
+
export declare const enum LangTextKey {
|
|
4651
|
+
NETWORK = "NETWORK",
|
|
4652
|
+
NETWORK_TIMEOUT = "NETWORK_TIMEOUT",
|
|
4653
|
+
NETWORK_FORBIDDEN = "NETWORK_FORBIDDEN",
|
|
4654
|
+
NETWORK_NOTFOUND = "NETWORK_NOTFOUND",
|
|
4655
|
+
NETWORK_RANGE_NOT_SATISFIABLE = "NETWORK_RANGE_NOT_SATISFIABLE",
|
|
4656
|
+
NETWORK_PROTOCOL = "NETWORK_PROTOCOL",
|
|
4657
|
+
NETWORK_URL_EXPIRE = "NETWORK_URL_EXPIRE",
|
|
4658
|
+
NETWORK_URL_SIGN = "NETWORK_URL_SIGN",
|
|
4659
|
+
NETWORK_ENCRYPT_HLS_ERR = "NETWORK_ENCRYPT_HLS_ERR",
|
|
4660
|
+
MEDIA_ERR = "MEDIA_ERR",
|
|
4661
|
+
MEDIA_ERR_ABORTED = "MEDIA_ERR_ABORTED",
|
|
4662
|
+
MEDIA_ERR_NETWORK = "MEDIA_ERR_NETWORK",
|
|
4663
|
+
MEDIA_ERR_DECODE = "MEDIA_ERR_DECODE",
|
|
4664
|
+
MEDIA_ERR_SRC_NOT_SUPPORTED = "MEDIA_ERR_SRC_NOT_SUPPORTED",
|
|
4665
|
+
MEDIA_ERR_NOT_SUPPORTED = "MEDIA_ERR_NOT_SUPPORTED",
|
|
4666
|
+
MEDIA_ERR_URL_EMPTY = "MEDIA_ERR_URL_EMPTY",
|
|
4667
|
+
MEDIA_ERR_FILE_NOT_SUPPORTED = "MEDIA_ERR_FILE_NOT_SUPPORTED",
|
|
4668
|
+
MEDIA_ERR_PLAY_ERR = "MEDIA_ERR_PLAY_ERR",
|
|
4669
|
+
MEDIA_SOURCE_CANNOT_PLAY_TYPE = "MEDIA_SOURCE_CANNOT_PLAY_TYPE",
|
|
4670
|
+
BUSINESS_DRM_NOT_SUPPORT = "BUSINESS_DRM_NOT_SUPPORT",
|
|
4671
|
+
BUSINESS_DRM_NOT_SUPPORT_UN_RECORD = "BUSINESS_DRM_NOT_SUPPORT_UN_RECORD",
|
|
4672
|
+
BUSINESS_DRM_LACK_MEDIA_KEY = "BUSINESS_DRM_LACK_MEDIA_KEY",
|
|
4673
|
+
BUSINESS_DRM_LACK_KEY_SESSION = "BUSINESS_DRM_LACK_KEY_SESSION",
|
|
4674
|
+
BUSINESS_DRM_GENERATE_REQUEST_FAIL = "BUSINESS_DRM_GENERATE_REQUEST_FAIL",
|
|
4675
|
+
BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH = "BUSINESS_DRM_LACK_SERVER_CERTIFICATE_PATH",
|
|
4676
|
+
BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH = "BUSINESS_DRM_LACK_SERVER_PROCESSSPC_PATH",
|
|
4677
|
+
BUSINESS_DRM_LICENSE_FAIL = "BUSINESS_DRM_LICENSE_FAIL",
|
|
4678
|
+
BUSINESS_DRM_KEY_ERROR = "BUSINESS_DRM_KEY_ERROR",
|
|
4679
|
+
BUSINESS_DRM_CERT_FAIL = "BUSINESS_DRM_CERT_FAIL",
|
|
4680
|
+
PRIVATE_DRM_KEY_GET_FAILED = "PRIVATE_DRM_KEY_GET_FAILED",
|
|
4681
|
+
PRIVATE_DRM_CRYPTO_NOT_SUPPORT = "PRIVATE_DRM_CRYPTO_NOT_SUPPORT",
|
|
4682
|
+
PRIVATE_DRM_RSA_FAIL = "PRIVATE_DRM_RSA_FAIL",
|
|
4683
|
+
OTHER = "OTHER",
|
|
4684
|
+
VOD_LOG_NOT_CONFIGURED = "VOD_LOG_NOT_CONFIGURED",
|
|
4685
|
+
PLAY_AUTH_TOKEN_EXPIRED = "PLAY_AUTH_TOKEN_EXPIRED",
|
|
4686
|
+
HLS_KEY_TOKEN_EXPIRED = "HLS_KEY_TOKEN_EXPIRED",
|
|
4687
|
+
THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED = "THIRD_PARTY_DRM_AUTH_TOKEN_EXPIRED",
|
|
4688
|
+
GET_PLAY_INFO_ERR = "GET_PLAY_INFO_ERR",
|
|
4689
|
+
GET_HLS_DECRYPTION_KEY_ERR = "GET_HLS_DECRYPTION_KEY_ERR",
|
|
4690
|
+
LICENSE_VALIDATE_FAIL = "LICENSE_VALIDATE_FAIL",
|
|
4691
|
+
DEFINITION_AUTO = "DEFINITION_AUTO",
|
|
4692
|
+
LICENSE_STATUS_INVALID = "LICENSE_STATUS_INVALID",
|
|
4693
|
+
LICENSE_STATUS_ERROR_DOMAIN_NOT_MATCH = "LICENSE_STATUS_ERROR_DOMAIN_NOT_MATCH",
|
|
4694
|
+
BASE_LICENSE_NOT_SUPPORT_265 = "BASE_LICENSE_NOT_SUPPORT_265",
|
|
4695
|
+
BASE_LICENSE_NOT_SUPPORT_ABR = "BASE_LICENSE_NOT_SUPPORT_ABR",
|
|
4696
|
+
BASE_LICENSE_NOT_SUPPORT_ADAPT_BUFFER = "BASE_LICENSE_NOT_SUPPORT_ADAPT_BUFFER",
|
|
4697
|
+
BASE_LICENSE_NOT_SUPPORT_PRELOAD = "BASE_LICENSE_NOT_SUPPORT_PRELOAD",
|
|
4698
|
+
EXPIRED_LICENSE_NOT_SUPPORT_265 = "EXPIRED_LICENSE_NOT_SUPPORT_265",
|
|
4699
|
+
EXPIRED_LICENSE_NOT_SUPPORT_ABR = "EXPIRED_LICENSE_NOT_SUPPORT_ABR",
|
|
4700
|
+
EXPIRED_LICENSE_NOT_SUPPORT_ADAPT_BUFFER = "EXPIRED_LICENSE_NOT_SUPPORT_ADAPT_BUFFER",
|
|
4701
|
+
EXPIRED_LICENSE_NOT_SUPPORT_PRELOAD = "EXPIRED_LICENSE_NOT_SUPPORT_PRELOAD",
|
|
4702
|
+
/** Short drama (Minis) errors — codes 93xx */
|
|
4703
|
+
DRAMA_INVALID_PARAM = "DRAMA_INVALID_PARAM",
|
|
4704
|
+
DRAMA_NO_INFO_FOUND = "DRAMA_NO_INFO_FOUND",
|
|
4705
|
+
DRAMA_NOT_SUBMITTED = "DRAMA_NOT_SUBMITTED",
|
|
4706
|
+
DRAMA_UNDER_REVIEW = "DRAMA_UNDER_REVIEW",
|
|
4707
|
+
DRAMA_FAILED_REVIEW = "DRAMA_FAILED_REVIEW",
|
|
4708
|
+
DRAMA_WITHDRAWN_REVIEW = "DRAMA_WITHDRAWN_REVIEW",
|
|
4709
|
+
DRAMA_FAILED_TO_QUERY = "DRAMA_FAILED_TO_QUERY",
|
|
4710
|
+
DRAMA_INVALID_TTOP_TOKEN = "DRAMA_INVALID_TTOP_TOKEN",
|
|
4711
|
+
DRAMA_INVALID_PLAY_DOMAIN = "DRAMA_INVALID_PLAY_DOMAIN",
|
|
4712
|
+
DRAMA_NOT_ON_SHELF = "DRAMA_NOT_ON_SHELF",
|
|
4713
|
+
DRAMA_FAILED_GET_EPISODE_INFO = "DRAMA_FAILED_GET_EPISODE_INFO"
|
|
4714
|
+
}
|
|
4715
|
+
declare const DRAMA_ERROR_CODE: {
|
|
4716
|
+
/** 9301 - 短剧环境下参数不合法(如使用 url/playList 播放,或缺少 albumId / episodeId) */
|
|
4717
|
+
readonly INVALID_PARAM: {
|
|
4718
|
+
readonly code: 9301;
|
|
4719
|
+
readonly message: "Invalid parameter in short drama environment";
|
|
4720
|
+
readonly textKey: LangTextKey.DRAMA_INVALID_PARAM;
|
|
4721
|
+
};
|
|
4722
|
+
readonly NO_INFO_FOUND: {
|
|
4723
|
+
readonly code: 9302;
|
|
4724
|
+
readonly message: "No information found for this Episode";
|
|
4725
|
+
readonly textKey: LangTextKey.DRAMA_NO_INFO_FOUND;
|
|
4726
|
+
};
|
|
4727
|
+
readonly NOT_SUBMITTED: {
|
|
4728
|
+
readonly code: 9303;
|
|
4729
|
+
readonly message: "Episode not submitted for review";
|
|
4730
|
+
readonly textKey: LangTextKey.DRAMA_NOT_SUBMITTED;
|
|
4731
|
+
};
|
|
4732
|
+
readonly UNDER_REVIEW: {
|
|
4733
|
+
readonly code: 9304;
|
|
4734
|
+
readonly message: "Episode under for review";
|
|
4735
|
+
readonly textKey: LangTextKey.DRAMA_UNDER_REVIEW;
|
|
4736
|
+
};
|
|
4737
|
+
readonly FAILED_REVIEW: {
|
|
4738
|
+
readonly code: 9305;
|
|
4739
|
+
readonly message: "Episode failed review";
|
|
4740
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_REVIEW;
|
|
4741
|
+
};
|
|
4742
|
+
readonly WITHDRAWN_REVIEW: {
|
|
4743
|
+
readonly code: 9306;
|
|
4744
|
+
readonly message: "Episode withdrawn from review";
|
|
4745
|
+
readonly textKey: LangTextKey.DRAMA_WITHDRAWN_REVIEW;
|
|
4746
|
+
};
|
|
4747
|
+
readonly FAILED_TO_QUERY: {
|
|
4748
|
+
readonly code: 9307;
|
|
4749
|
+
readonly message: "Failed to query video playback information";
|
|
4750
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_TO_QUERY;
|
|
4751
|
+
};
|
|
4752
|
+
readonly INVALID_TTOP_TOKEN: {
|
|
4753
|
+
readonly code: 9308;
|
|
4754
|
+
readonly message: "Invalid playAuthToken or failed to verify TTOP token";
|
|
4755
|
+
readonly textKey: LangTextKey.DRAMA_INVALID_TTOP_TOKEN;
|
|
4756
|
+
};
|
|
4757
|
+
readonly INVALID_PLAY_DOMAIN: {
|
|
4758
|
+
readonly code: 9309;
|
|
4759
|
+
readonly message: "Invalid play domain";
|
|
4760
|
+
readonly textKey: LangTextKey.DRAMA_INVALID_PLAY_DOMAIN;
|
|
4761
|
+
};
|
|
4762
|
+
readonly NOT_ON_SHELF: {
|
|
4763
|
+
readonly code: 9310;
|
|
4764
|
+
readonly message: "Video is not on shelf";
|
|
4765
|
+
readonly textKey: LangTextKey.DRAMA_NOT_ON_SHELF;
|
|
4766
|
+
};
|
|
4767
|
+
readonly FAILED_GET_EPISODE_INFO: {
|
|
4768
|
+
readonly code: 9399;
|
|
4769
|
+
readonly message: "Failed get episode info";
|
|
4770
|
+
readonly textKey: LangTextKey.DRAMA_FAILED_GET_EPISODE_INFO;
|
|
4771
|
+
};
|
|
4772
|
+
};
|
|
4535
4773
|
declare class AuthToken extends SdkPlugin {
|
|
4536
4774
|
static get pluginName(): string;
|
|
4537
4775
|
isPlayByToken: boolean;
|
|
@@ -4553,13 +4791,42 @@ declare class AuthToken extends SdkPlugin {
|
|
|
4553
4791
|
codec: ICodecType;
|
|
4554
4792
|
defaultDefinition: string;
|
|
4555
4793
|
}>;
|
|
4556
|
-
|
|
4794
|
+
/**
|
|
4795
|
+
* 短剧 Minis 环境:通过 JSB getDramaInfo 获取媒体信息
|
|
4796
|
+
*/
|
|
4797
|
+
getDramaInfoViaJSB(): Promise<VideoInfoRes | undefined>;
|
|
4798
|
+
/**
|
|
4799
|
+
* 将审核状态映射到短剧错误码
|
|
4800
|
+
*/
|
|
4801
|
+
mapReviewStatusToErrorCode(status: number): keyof typeof DRAMA_ERROR_CODE;
|
|
4802
|
+
/**
|
|
4803
|
+
* 根据 JSB 返回的 msg 或 status 映射到错误码 key
|
|
4804
|
+
*/
|
|
4805
|
+
mapDramaErrorCode(msg: string, status?: number): keyof typeof DRAMA_ERROR_CODE;
|
|
4806
|
+
/**
|
|
4807
|
+
* 将 JSB 返回的 video_info 转换为 VideoInfoRes 格式
|
|
4808
|
+
*/
|
|
4809
|
+
transformDramaVideoInfoToRes(videoInfo: any, config: IPlayAuthTokenConfig): VideoInfoRes;
|
|
4810
|
+
/**
|
|
4811
|
+
* 短剧环境(宿主注入 ttDramaEnv):校验每条主播放地址域名须为 *.tiktok-minis-vod.us
|
|
4812
|
+
*/
|
|
4813
|
+
ensureMinisDramaPlayDomainOrReject(videoInfoRes: VideoInfoRes | undefined): VideoInfoRes | undefined;
|
|
4814
|
+
callOnGetMediaInfo(mediaInfo: VideoInfoRes | undefined, fromCache: boolean): void;
|
|
4815
|
+
getVideos(): Promise<VideoInfoRes>;
|
|
4557
4816
|
getPrivateDrmInfo(playList: Stream[], vid: string, streamType: string): Promise<void>;
|
|
4558
4817
|
getThumbnailConfig(thumbs: IThumbInfoItem[]): void;
|
|
4559
4818
|
getBarrageMaskUrl(url: string): void;
|
|
4560
4819
|
getDrmConfig(videoInfo: IVideoInfo): void;
|
|
4820
|
+
/**
|
|
4821
|
+
* 是否处于短剧 Minis 环境(通过剧 ID + 剧集 ID 获取视频)
|
|
4822
|
+
*/
|
|
4823
|
+
get isMinisDramaMode(): boolean;
|
|
4561
4824
|
init(): void;
|
|
4562
4825
|
initConfig(getVideoByToken: IPlayAuthTokenConfig): void;
|
|
4826
|
+
/**
|
|
4827
|
+
* 剧集切换:configs 已由 player 更新 album_id/episode_id,重新拉取媒体信息
|
|
4828
|
+
*/
|
|
4829
|
+
updateDramaEpisode(isNewVideo: boolean): Promise<void>;
|
|
4563
4830
|
/**
|
|
4564
4831
|
* @description 更新playAuthToken
|
|
4565
4832
|
* @param {IPlayAuthTokenConfig} getVideoByToken token信息
|
|
@@ -4679,9 +4946,7 @@ declare class PlayerData {
|
|
|
4679
4946
|
* @brief 私有加密会话id
|
|
4680
4947
|
*/
|
|
4681
4948
|
encryptSessionId?: string;
|
|
4682
|
-
constructor(configs: IPlayerConfig
|
|
4683
|
-
licensSupportModuleList: string[];
|
|
4684
|
-
}, sdk: VePlayer);
|
|
4949
|
+
constructor(configs: IPlayerConfig, sdk: VePlayer);
|
|
4685
4950
|
/**
|
|
4686
4951
|
* 初始化播放数据
|
|
4687
4952
|
* @param configs { IPlayerConfig } 播放器配置
|
|
@@ -4726,7 +4991,6 @@ declare class PlayerData {
|
|
|
4726
4991
|
* @description: 获取满足当前直播条件的流
|
|
4727
4992
|
*/
|
|
4728
4993
|
getCurrentStreams(): Stream[];
|
|
4729
|
-
getStreamsMatchCurrentDefinition(): Stream[];
|
|
4730
4994
|
/**
|
|
4731
4995
|
* @description: 获取根据线路ID去重的流,用于获取有几个线路
|
|
4732
4996
|
*/
|
|
@@ -4809,34 +5073,62 @@ declare class MobilePlayerPanel {
|
|
|
4809
5073
|
bind(event: string, eventHandle: any, isBubble?: boolean): void;
|
|
4810
5074
|
destroy(): void;
|
|
4811
5075
|
}
|
|
4812
|
-
export
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
}
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
5076
|
+
export declare type MediaInfoCacheType = "memory" | "localStorage";
|
|
5077
|
+
/** {zh}
|
|
5078
|
+
* @brief 媒体信息本地缓存配置。
|
|
5079
|
+
* @list Options
|
|
5080
|
+
* @kind property
|
|
5081
|
+
*/
|
|
5082
|
+
/** {en}
|
|
5083
|
+
* @brief Local media info cache config.
|
|
5084
|
+
* @list Options
|
|
5085
|
+
* @kind property
|
|
5086
|
+
*/
|
|
5087
|
+
export interface MediaInfoCacheConfig {
|
|
5088
|
+
/** {zh}
|
|
5089
|
+
* @brief 是否启用媒体信息本地缓存。默认关闭。
|
|
5090
|
+
* @default false
|
|
5091
|
+
*/
|
|
5092
|
+
/** {en}
|
|
5093
|
+
* @brief Whether to enable local media info cache. Disabled by default.
|
|
5094
|
+
* @default false
|
|
5095
|
+
*/
|
|
5096
|
+
enable?: boolean;
|
|
5097
|
+
/** {zh}
|
|
5098
|
+
* @brief 缓存方式。默认使用内存缓存,设置为 localStorage 时写入浏览器本地存储。
|
|
5099
|
+
* @default memory
|
|
5100
|
+
*/
|
|
5101
|
+
/** {en}
|
|
5102
|
+
* @brief Cache storage type. Memory cache is used by default. Set to localStorage to write browser local storage.
|
|
5103
|
+
* @default memory
|
|
5104
|
+
*/
|
|
5105
|
+
cacheType?: MediaInfoCacheType;
|
|
5106
|
+
/** {zh}
|
|
5107
|
+
* @brief 缓存过期时间,单位毫秒。默认 30 分钟。
|
|
5108
|
+
* @default 1800000
|
|
5109
|
+
*/
|
|
5110
|
+
/** {en}
|
|
5111
|
+
* @brief Cache expiration time in milliseconds. Defaults to 30 minutes.
|
|
5112
|
+
* @default 1800000
|
|
5113
|
+
*/
|
|
5114
|
+
expireTime?: number;
|
|
5115
|
+
/** {zh}
|
|
5116
|
+
* @brief 最多缓存的媒体信息条数,默认 100。
|
|
5117
|
+
* @default 100
|
|
5118
|
+
*/
|
|
5119
|
+
/** {en}
|
|
5120
|
+
* @brief Maximum number of media info entries to cache. Defaults to 100.
|
|
5121
|
+
* @default 100
|
|
5122
|
+
*/
|
|
5123
|
+
maxEntries?: number;
|
|
4839
5124
|
}
|
|
5125
|
+
export declare type NormalizedMediaInfoCacheConfig = {
|
|
5126
|
+
enable: boolean;
|
|
5127
|
+
expireTime: number;
|
|
5128
|
+
cacheType: MediaInfoCacheType;
|
|
5129
|
+
maxEntries: number;
|
|
5130
|
+
};
|
|
5131
|
+
declare function getMediaInfoCacheConfig(): NormalizedMediaInfoCacheConfig;
|
|
4840
5132
|
/** {zh}
|
|
4841
5133
|
* @hidden
|
|
4842
5134
|
*/
|
|
@@ -4852,10 +5144,6 @@ export declare type PlayerCore = Player & {
|
|
|
4852
5144
|
panel?: MobilePlayerPanel;
|
|
4853
5145
|
emitExpireTimestamp?: number;
|
|
4854
5146
|
vodLogger?: VodLogger;
|
|
4855
|
-
licenseLogInfo?: {
|
|
4856
|
-
licenseStatus: LicenseStatus;
|
|
4857
|
-
licenseType: LicenseEdition;
|
|
4858
|
-
};
|
|
4859
5147
|
};
|
|
4860
5148
|
/**
|
|
4861
5149
|
* @brief 加密混淆信息
|
|
@@ -4928,6 +5216,16 @@ declare class VePlayer {
|
|
|
4928
5216
|
* @memberof VePlayer
|
|
4929
5217
|
*/
|
|
4930
5218
|
private _emitter;
|
|
5219
|
+
/**
|
|
5220
|
+
* @hidden
|
|
5221
|
+
* createPlayer 阶段耗时采集器(仅在 createPlayer 执行期间存在)
|
|
5222
|
+
*/
|
|
5223
|
+
_createPlayerPerf?: CreatePlayerPerfCollector;
|
|
5224
|
+
/**
|
|
5225
|
+
* @hidden
|
|
5226
|
+
* 最近一次 createPlayer 性能报告
|
|
5227
|
+
*/
|
|
5228
|
+
private _lastCreatePlayerPerfReport?;
|
|
4931
5229
|
/**
|
|
4932
5230
|
*
|
|
4933
5231
|
*
|
|
@@ -4970,6 +5268,28 @@ declare class VePlayer {
|
|
|
4970
5268
|
* @memberof VePlayer
|
|
4971
5269
|
*/
|
|
4972
5270
|
delayError: any[];
|
|
5271
|
+
/**
|
|
5272
|
+
* @hidden
|
|
5273
|
+
* When enabled, bypass `short video minis drama` play-domain validation.
|
|
5274
|
+
* This is only used for `ttDramaEnv` scenarios.
|
|
5275
|
+
*/
|
|
5276
|
+
private static _skipMinisDramaPlayDomainValidation;
|
|
5277
|
+
/** {zh}
|
|
5278
|
+
* @brief 跳过短剧 minis 播放域名校验(仅影响 `ttDramaEnv` 下的主播放地址校验)。
|
|
5279
|
+
* @param skip true=跳过校验,false=恢复校验
|
|
5280
|
+
*/
|
|
5281
|
+
/** {en}
|
|
5282
|
+
* @brief Skip minis drama play-domain validation (only affects `ttDramaEnv` scenarios).
|
|
5283
|
+
* @param skip true=skip validation, false=restore validation
|
|
5284
|
+
*/
|
|
5285
|
+
static setSkipMinisDramaPlayDomainValidation(skip?: boolean): void;
|
|
5286
|
+
/** {zh}
|
|
5287
|
+
* @hidden
|
|
5288
|
+
*/
|
|
5289
|
+
/** {en}
|
|
5290
|
+
* @hidden
|
|
5291
|
+
*/
|
|
5292
|
+
static getSkipMinisDramaPlayDomainValidation(): boolean;
|
|
4973
5293
|
/**
|
|
4974
5294
|
* @hidden
|
|
4975
5295
|
* umd加载器
|
|
@@ -4985,7 +5305,6 @@ declare class VePlayer {
|
|
|
4985
5305
|
/**
|
|
4986
5306
|
* @hidden
|
|
4987
5307
|
*/
|
|
4988
|
-
static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
|
|
4989
5308
|
/**
|
|
4990
5309
|
* @hidden
|
|
4991
5310
|
*/
|
|
@@ -4996,6 +5315,51 @@ declare class VePlayer {
|
|
|
4996
5315
|
* @memberof VePlayer
|
|
4997
5316
|
*/
|
|
4998
5317
|
static sdkVersion: string;
|
|
5318
|
+
/**
|
|
5319
|
+
* @brief TT短剧环境配置
|
|
5320
|
+
* @type {ITTDramaEnv | null}
|
|
5321
|
+
* @memberof VePlayer
|
|
5322
|
+
*/
|
|
5323
|
+
static ttDramaEnv: ITTDramaEnv | null;
|
|
5324
|
+
/** {zh}
|
|
5325
|
+
* @brief 设置TT短剧播放环境
|
|
5326
|
+
* @param env 短剧环境配置,详情见{@link ITTDramaEnv}
|
|
5327
|
+
*/
|
|
5328
|
+
static setTTDramaEnv(env: ITTDramaEnv): void;
|
|
5329
|
+
/** {zh}
|
|
5330
|
+
* @brief 设置媒体信息本地缓存配置,默认关闭。开启后,通过短剧信息或 playAuthToken 获取媒体信息时优先使用缓存。
|
|
5331
|
+
* @param config 缓存配置
|
|
5332
|
+
*/
|
|
5333
|
+
/** {en}
|
|
5334
|
+
* @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.
|
|
5335
|
+
* @param config Cache config
|
|
5336
|
+
*/
|
|
5337
|
+
static setMediaInfoCacheConfig(config: MediaInfoCacheConfig): void;
|
|
5338
|
+
/** {zh}
|
|
5339
|
+
* @brief 获取当前媒体信息本地缓存配置。
|
|
5340
|
+
* @returns 当前媒体信息缓存配置。
|
|
5341
|
+
*/
|
|
5342
|
+
/** {en}
|
|
5343
|
+
* @brief Get current local media info cache config.
|
|
5344
|
+
* @returns Current media info cache config.
|
|
5345
|
+
*/
|
|
5346
|
+
static getMediaInfoCacheConfig(): ReturnType<typeof getMediaInfoCacheConfig>;
|
|
5347
|
+
/** {zh}
|
|
5348
|
+
* @brief 清除媒体信息缓存,会同时清除内存缓存和 localStorage 缓存。
|
|
5349
|
+
*/
|
|
5350
|
+
/** {en}
|
|
5351
|
+
* @brief Clear media info cache from both memory cache and localStorage cache.
|
|
5352
|
+
*/
|
|
5353
|
+
static clearMediaInfoCache(): void;
|
|
5354
|
+
/** {zh}
|
|
5355
|
+
* @brief 设置全局日志开关。开启后会输出 VE_DEBUG.log 级别日志。
|
|
5356
|
+
* @param enable 是否开启详细日志
|
|
5357
|
+
*/
|
|
5358
|
+
/** {en}
|
|
5359
|
+
* @brief Set the global log switch. When enabled, VE_DEBUG.log level logs are printed.
|
|
5360
|
+
* @param enable Whether to enable verbose logs
|
|
5361
|
+
*/
|
|
5362
|
+
static setDebug(enable: boolean): void;
|
|
4999
5363
|
/**
|
|
5000
5364
|
* @hidden
|
|
5001
5365
|
*/
|
|
@@ -5028,7 +5392,7 @@ declare class VePlayer {
|
|
|
5028
5392
|
* @brief 添加待预加载视频列表
|
|
5029
5393
|
* @param list 待预加载视频列表,详情见{@link IPreloadStream[]}。
|
|
5030
5394
|
*/
|
|
5031
|
-
static addPreloadList(list: IPreloadStream[]): void
|
|
5395
|
+
static addPreloadList(list: IPreloadStream[]): Promise<void>;
|
|
5032
5396
|
/** {zh}
|
|
5033
5397
|
* @brief 设置待预加载视频列表,替换当前已设置的待预加载列表
|
|
5034
5398
|
* @param list 待预加载视频列表,详情见{@link IPreloadStream[]}
|
|
@@ -5039,14 +5403,6 @@ declare class VePlayer {
|
|
|
5039
5403
|
* @param codec
|
|
5040
5404
|
* @param options
|
|
5041
5405
|
*/
|
|
5042
|
-
static isRTMSupportCodec: (codec: RTMCodec, options: {
|
|
5043
|
-
targetProfileLevel?: string;
|
|
5044
|
-
}) => Promise<boolean>;
|
|
5045
|
-
static setLicenseConfig(config: ILicenseConfig): Promise<void>;
|
|
5046
|
-
static checkLicense(): Promise<LicenseEdition>;
|
|
5047
|
-
static checkModuleList(): Promise<string[]>;
|
|
5048
|
-
static checkLicenseStatus(): Promise<LicenseStatus>;
|
|
5049
|
-
static checkLicenseModuleAuth(module: string, featureName: LicenseFeature): Promise<boolean>;
|
|
5050
5406
|
/**
|
|
5051
5407
|
* @breif 生成加密混淆的数据信息
|
|
5052
5408
|
* @param unionId 用户唯一id
|
|
@@ -5194,7 +5550,6 @@ declare class VePlayer {
|
|
|
5194
5550
|
* @hidden
|
|
5195
5551
|
*/
|
|
5196
5552
|
createPlayer: () => Promise<PlayerCore>;
|
|
5197
|
-
private checkLicenseCallback;
|
|
5198
5553
|
/** {zh}
|
|
5199
5554
|
* @hidden
|
|
5200
5555
|
* @brief 设置合并开发者的插件配置,如果开发者从初始化的configs里传了插件配置,则只用开发者的配置,并补齐其他参数
|
|
@@ -5260,6 +5615,15 @@ declare class VePlayer {
|
|
|
5260
5615
|
* @memberof VePlayer
|
|
5261
5616
|
*/
|
|
5262
5617
|
beforePlayerCreate(): Promise<void>;
|
|
5618
|
+
/** {zh}
|
|
5619
|
+
* @hidden
|
|
5620
|
+
* @brief 获取最近一次 createPlayer 的性能报告。
|
|
5621
|
+
*/
|
|
5622
|
+
/** {en}
|
|
5623
|
+
* @hidden
|
|
5624
|
+
* @brief Get the perf report of the latest createPlayer.
|
|
5625
|
+
*/
|
|
5626
|
+
getCreatePlayerPerfReport(): ICreatePlayerPerfReport;
|
|
5263
5627
|
private prepareStrategies;
|
|
5264
5628
|
/**
|
|
5265
5629
|
* @hidden
|
|
@@ -5306,6 +5670,7 @@ declare class VePlayer {
|
|
|
5306
5670
|
* @memberof VePlayer
|
|
5307
5671
|
*/
|
|
5308
5672
|
private _bindPlayerEvents;
|
|
5673
|
+
private _onMp4PreloadInfo;
|
|
5309
5674
|
private _proxyError;
|
|
5310
5675
|
private _onError;
|
|
5311
5676
|
/** {zh}
|
|
@@ -5423,8 +5788,35 @@ declare class VePlayer {
|
|
|
5423
5788
|
* @param config 播放器实例化配置。此接口仅支持 `IPlayerConfig` 中的 `url`、`playList`、`poster`、`getVideoByToken` 字段。。
|
|
5424
5789
|
* @param isNewVideo 是否为新视频。为 `false` 时,更换后,会从更换前的时间点继续播放。
|
|
5425
5790
|
*/
|
|
5791
|
+
/** {zh}
|
|
5792
|
+
* @brief 当前播放器命中预加载的情况
|
|
5793
|
+
* @type {{
|
|
5794
|
+
* hit: number, // 0-未命中 1-命中
|
|
5795
|
+
* duration: 0, // 预加载时长
|
|
5796
|
+
* length: 0 // 预加载数据长度
|
|
5797
|
+
* }}
|
|
5798
|
+
*/
|
|
5799
|
+
/** {en}
|
|
5800
|
+
* @brief Whether the current playback hit preloaded data.
|
|
5801
|
+
* @type {{
|
|
5802
|
+
* hit: number, // 0-miss 1-hit
|
|
5803
|
+
* duration: number, // preloaded duration
|
|
5804
|
+
* length: number // preloaded data length in bytes
|
|
5805
|
+
* }}
|
|
5806
|
+
*/
|
|
5807
|
+
get preLoadData(): {
|
|
5808
|
+
hit: number;
|
|
5809
|
+
duration?: number;
|
|
5810
|
+
length?: number;
|
|
5811
|
+
};
|
|
5426
5812
|
playNext(config: IPlayerConfig, isNewVideo?: boolean): Promise<any>;
|
|
5427
5813
|
private _playNext;
|
|
5814
|
+
/** 从 playerData.configs 取出短剧 id,供 XGPlayer setConfig / playNext 与切换后 configs 一致 */
|
|
5815
|
+
private _getDramaConfigPatchForPlayer;
|
|
5816
|
+
private _buildDramaInvalidParamError;
|
|
5817
|
+
private _getDramaAlbumIdFromConfig;
|
|
5818
|
+
private _getDramaEpisodeIdFromConfig;
|
|
5819
|
+
private switchDramaEpisode;
|
|
5428
5820
|
/** {zh}
|
|
5429
5821
|
* @brief 销毁xgplayer实例
|
|
5430
5822
|
*
|
|
@@ -6043,91 +6435,6 @@ export declare class MirrorPlugin extends Plugin {
|
|
|
6043
6435
|
destroy(): void;
|
|
6044
6436
|
render(): string;
|
|
6045
6437
|
}
|
|
6046
|
-
export declare type InfoItem = {
|
|
6047
|
-
key: string;
|
|
6048
|
-
label: string;
|
|
6049
|
-
labelTextKey?: string;
|
|
6050
|
-
value?: any;
|
|
6051
|
-
render?: (key: any) => string;
|
|
6052
|
-
type?: string;
|
|
6053
|
-
dom?: Element;
|
|
6054
|
-
};
|
|
6055
|
-
/**
|
|
6056
|
-
* 直播信息面板
|
|
6057
|
-
*/
|
|
6058
|
-
export declare class LiveInfoPanel extends Plugin {
|
|
6059
|
-
private _pollTimer;
|
|
6060
|
-
private _infoItems;
|
|
6061
|
-
static get pluginName(): string;
|
|
6062
|
-
static get defaultConfig(): {
|
|
6063
|
-
visible: boolean;
|
|
6064
|
-
showH265Info: boolean;
|
|
6065
|
-
};
|
|
6066
|
-
get streamType(): any;
|
|
6067
|
-
afterCreate(): void;
|
|
6068
|
-
registerLanguageTexts(): {
|
|
6069
|
-
DECODEFPS: {
|
|
6070
|
-
en: string;
|
|
6071
|
-
zh: string;
|
|
6072
|
-
};
|
|
6073
|
-
DECODECOST: {
|
|
6074
|
-
en: string;
|
|
6075
|
-
zh: string;
|
|
6076
|
-
};
|
|
6077
|
-
FORMAT: {
|
|
6078
|
-
en: string;
|
|
6079
|
-
zh: string;
|
|
6080
|
-
};
|
|
6081
|
-
FPS: {
|
|
6082
|
-
en: string;
|
|
6083
|
-
zh: string;
|
|
6084
|
-
};
|
|
6085
|
-
BITRATE: {
|
|
6086
|
-
en: string;
|
|
6087
|
-
zh: string;
|
|
6088
|
-
};
|
|
6089
|
-
GOP: {
|
|
6090
|
-
en: string;
|
|
6091
|
-
zh: string;
|
|
6092
|
-
};
|
|
6093
|
-
RESOLUTION: {
|
|
6094
|
-
en: string;
|
|
6095
|
-
zh: string;
|
|
6096
|
-
};
|
|
6097
|
-
ENCODETYPE: {
|
|
6098
|
-
en: string;
|
|
6099
|
-
zh: string;
|
|
6100
|
-
};
|
|
6101
|
-
BUFFEREND: {
|
|
6102
|
-
en: string;
|
|
6103
|
-
zh: string;
|
|
6104
|
-
};
|
|
6105
|
-
CURRENTTIME: {
|
|
6106
|
-
en: string;
|
|
6107
|
-
zh: string;
|
|
6108
|
-
};
|
|
6109
|
-
};
|
|
6110
|
-
_getDefaultInfo(data: any): Record<string, InfoItem>;
|
|
6111
|
-
_init(): void;
|
|
6112
|
-
_getStats(): any;
|
|
6113
|
-
_getInfoListData(): Record<string, InfoItem>;
|
|
6114
|
-
_initDom(infoItems: any): any;
|
|
6115
|
-
_updateTitle(rowDom: Element, item: InfoItem): void;
|
|
6116
|
-
_updateDom(rowdom: Element, newItem: InfoItem): void;
|
|
6117
|
-
_renderLabel(item: InfoItem): any;
|
|
6118
|
-
_renderValue(item: InfoItem): any;
|
|
6119
|
-
_handleDataChange(): void;
|
|
6120
|
-
_tick(): void;
|
|
6121
|
-
_poll(): void;
|
|
6122
|
-
destroy(): void;
|
|
6123
|
-
_handleError(): void;
|
|
6124
|
-
_handleLoadedData(): void;
|
|
6125
|
-
_open(): void;
|
|
6126
|
-
_close(): void;
|
|
6127
|
-
open(): void;
|
|
6128
|
-
close(): void;
|
|
6129
|
-
render(): string;
|
|
6130
|
-
}
|
|
6131
6438
|
export declare const Events: {
|
|
6132
6439
|
/** {zh}
|
|
6133
6440
|
* @brief 弹幕配置发生变化。
|
|
@@ -6154,11 +6461,11 @@ export declare const Events: {
|
|
|
6154
6461
|
*/
|
|
6155
6462
|
REFRESH_CLICK: string;
|
|
6156
6463
|
/** {zh}
|
|
6157
|
-
* @brief
|
|
6464
|
+
* @brief 报错时触发降级。
|
|
6158
6465
|
*/
|
|
6159
6466
|
PLAY_BACKUP_CHANGE: string;
|
|
6160
6467
|
/** {zh}
|
|
6161
|
-
* @brief
|
|
6468
|
+
* @brief 报错时触发的降级结束。
|
|
6162
6469
|
*/
|
|
6163
6470
|
PLAY_BACKUP_CHANGE_FINISH: string;
|
|
6164
6471
|
/** {zh}
|
|
@@ -6189,15 +6496,6 @@ export declare const Events: {
|
|
|
6189
6496
|
* @brief 清晰度降级。
|
|
6190
6497
|
*/
|
|
6191
6498
|
DEFINITION_DEMOTE: string;
|
|
6192
|
-
/** {zh}
|
|
6193
|
-
* @brief 已降至最低清晰度。
|
|
6194
|
-
*/
|
|
6195
|
-
DEFINITION_DEMOTE_ALL_DONE: string;
|
|
6196
|
-
/** {zh}
|
|
6197
|
-
* @brief 所有可执行的降级操作均执行完毕。如果用户同时开启了 definition 降级和 fallbackUrl 降级,
|
|
6198
|
-
* 无论两者哪个优先级更高,待所有可执行的降级操作均执行完毕,会触发该事件。
|
|
6199
|
-
*/
|
|
6200
|
-
DEMOTE_ALL_DONE: string;
|
|
6201
6499
|
/** {zh}
|
|
6202
6500
|
* @hidden
|
|
6203
6501
|
*/
|
|
@@ -6278,6 +6576,13 @@ export declare const Events: {
|
|
|
6278
6576
|
* @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
|
|
6279
6577
|
*/
|
|
6280
6578
|
ABR_AUTO_DESC_CHANGE: string;
|
|
6579
|
+
/** {zh}
|
|
6580
|
+
* @brief mp4 加密插件命中预加载数据时触发。data 为预加载缓存对象,含 `byteLength`、`duration`、`mediaSegList` 等字段。
|
|
6581
|
+
*/
|
|
6582
|
+
/** {en}
|
|
6583
|
+
* @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`.
|
|
6584
|
+
*/
|
|
6585
|
+
PRELOAD_INFO: string;
|
|
6281
6586
|
/** {zh}
|
|
6282
6587
|
* @brief 播放器实例创建完成时触发。
|
|
6283
6588
|
*/
|
|
@@ -6428,10 +6733,21 @@ export declare const Events: {
|
|
|
6428
6733
|
* @brief Autoplay fails to start.
|
|
6429
6734
|
*/
|
|
6430
6735
|
AUTOPLAY_PREVENTED: string;
|
|
6736
|
+
/** {zh}
|
|
6737
|
+
* @brief 播放器准备创建。
|
|
6738
|
+
*/
|
|
6739
|
+
READY_CREATE_PLAYER: string;
|
|
6431
6740
|
/** {zh}
|
|
6432
6741
|
* @brief 播放器完成创建。
|
|
6433
6742
|
*/
|
|
6434
6743
|
PLAYER_CREATED_FINISH: string;
|
|
6744
|
+
/** {zh}
|
|
6745
|
+
* @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
|
|
6746
|
+
*/
|
|
6747
|
+
/** {en}
|
|
6748
|
+
* @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
|
|
6749
|
+
*/
|
|
6750
|
+
CREATE_PLAYER_PERF: string;
|
|
6435
6751
|
/** {zh}
|
|
6436
6752
|
* @brief 播放器重建。
|
|
6437
6753
|
*/
|
|
@@ -6751,10 +7067,21 @@ export declare const Event: {
|
|
|
6751
7067
|
* @brief Autoplay fails to start.
|
|
6752
7068
|
*/
|
|
6753
7069
|
AUTOPLAY_PREVENTED: string;
|
|
7070
|
+
/** {zh}
|
|
7071
|
+
* @brief 播放器准备创建。
|
|
7072
|
+
*/
|
|
7073
|
+
READY_CREATE_PLAYER: string;
|
|
6754
7074
|
/** {zh}
|
|
6755
7075
|
* @brief 播放器完成创建。
|
|
6756
7076
|
*/
|
|
6757
7077
|
PLAYER_CREATED_FINISH: string;
|
|
7078
|
+
/** {zh}
|
|
7079
|
+
* @brief createPlayer 性能报告。与 `PLAYER_CREATED_FINISH` 几乎同时触发(略早)。
|
|
7080
|
+
*/
|
|
7081
|
+
/** {en}
|
|
7082
|
+
* @brief createPlayer performance report. Fired almost at the same time as `PLAYER_CREATED_FINISH` (slightly earlier).
|
|
7083
|
+
*/
|
|
7084
|
+
CREATE_PLAYER_PERF: string;
|
|
6758
7085
|
/** {zh}
|
|
6759
7086
|
* @brief 播放器重建。
|
|
6760
7087
|
*/
|
|
@@ -6834,11 +7161,11 @@ export declare const Event: {
|
|
|
6834
7161
|
*/
|
|
6835
7162
|
REFRESH_CLICK: string;
|
|
6836
7163
|
/** {zh}
|
|
6837
|
-
* @brief
|
|
7164
|
+
* @brief 报错时触发降级。
|
|
6838
7165
|
*/
|
|
6839
7166
|
PLAY_BACKUP_CHANGE: string;
|
|
6840
7167
|
/** {zh}
|
|
6841
|
-
* @brief
|
|
7168
|
+
* @brief 报错时触发的降级结束。
|
|
6842
7169
|
*/
|
|
6843
7170
|
PLAY_BACKUP_CHANGE_FINISH: string;
|
|
6844
7171
|
/** {zh}
|
|
@@ -6869,15 +7196,6 @@ export declare const Event: {
|
|
|
6869
7196
|
* @brief 清晰度降级。
|
|
6870
7197
|
*/
|
|
6871
7198
|
DEFINITION_DEMOTE: string;
|
|
6872
|
-
/** {zh}
|
|
6873
|
-
* @brief 已降至最低清晰度。
|
|
6874
|
-
*/
|
|
6875
|
-
DEFINITION_DEMOTE_ALL_DONE: string;
|
|
6876
|
-
/** {zh}
|
|
6877
|
-
* @brief 所有可执行的降级操作均执行完毕。如果用户同时开启了 definition 降级和 fallbackUrl 降级,
|
|
6878
|
-
* 无论两者哪个优先级更高,待所有可执行的降级操作均执行完毕,会触发该事件。
|
|
6879
|
-
*/
|
|
6880
|
-
DEMOTE_ALL_DONE: string;
|
|
6881
7199
|
/** {zh}
|
|
6882
7200
|
* @hidden
|
|
6883
7201
|
*/
|
|
@@ -6958,12 +7276,18 @@ export declare const Event: {
|
|
|
6958
7276
|
* @brief 多码率自适应播放时,自动挡位对应的清晰度改变。
|
|
6959
7277
|
*/
|
|
6960
7278
|
ABR_AUTO_DESC_CHANGE: string;
|
|
7279
|
+
/** {zh}
|
|
7280
|
+
* @brief mp4 加密插件命中预加载数据时触发。data 为预加载缓存对象,含 `byteLength`、`duration`、`mediaSegList` 等字段。
|
|
7281
|
+
*/
|
|
7282
|
+
/** {en}
|
|
7283
|
+
* @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`.
|
|
7284
|
+
*/
|
|
7285
|
+
PRELOAD_INFO: string;
|
|
6961
7286
|
};
|
|
6962
7287
|
};
|
|
6963
7288
|
export * from "xgplayer";
|
|
6964
7289
|
|
|
6965
7290
|
export {
|
|
6966
|
-
LiveSubTitlesPlugin as LiveSubtitlesPlugin,
|
|
6967
7291
|
MusicPreset as Music,
|
|
6968
7292
|
VePlayer as default,
|
|
6969
7293
|
};
|