@byteplus/veplayer 1.18.0-rc.6 → 1.18.0-rc.8
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 +125 -7
- package/index.min.js +2 -2
- package/lite.cjs +2 -2
- package/lite.d.ts +45 -0
- package/lite.esm.mjs +2 -2
- package/lite.min.js +2 -2
- package/package.json +1 -1
- package/plugin/modules/DashAbralgo.mjs +1 -1
- package/plugin/modules/XGVideo.mjs +1 -1
- package/plugin/modules/danmuMask.mjs +1 -1
- package/plugin/modules/danmujs.mjs +1 -1
- package/plugin/modules/dash.mjs +1 -1
- package/plugin/modules/flv.mjs +1 -1
- package/plugin/modules/hls.mjs +1 -1
- package/plugin/modules/hlsEncrypt.mjs +1 -1
- package/plugin/modules/hlsjs.mjs +1 -1
- package/plugin/modules/hlsjsPro.mjs +1 -1
- package/plugin/modules/mp4Encrypt.mjs +1 -1
- package/plugin/modules/preloader.mjs +1 -1
- package/plugin/modules/streamprobe.mjs +1 -1
- package/plugin/modules/vestrategy.mjs +1 -1
- package/plugin/modules/vestrategy_adapt_range.mjs +1 -1
- package/plugin/modules/vestrategy_h265.mjs +1 -1
- package/plugin/modules/vestrategy_preload.mjs +1 -1
package/index.d.ts
CHANGED
|
@@ -3176,6 +3176,8 @@ export interface ITTDramaEnv {
|
|
|
3176
3176
|
* @type {boolean}
|
|
3177
3177
|
*/
|
|
3178
3178
|
canIUseGetDramaInfo: boolean;
|
|
3179
|
+
/** 是否支持在 getDramaInfo 中透传 transcodeParam */
|
|
3180
|
+
canIUseGetDramaInfoTranscodeParam?: boolean;
|
|
3179
3181
|
/**
|
|
3180
3182
|
* @brief Android 是否支持批量获取短剧信息(高版本 app)
|
|
3181
3183
|
* @type {boolean}
|
|
@@ -3206,6 +3208,20 @@ export interface IGetDramaInfoOptions {
|
|
|
3206
3208
|
albumId: string;
|
|
3207
3209
|
episodeId: string;
|
|
3208
3210
|
vid: string;
|
|
3211
|
+
transcodeParam?: IGetDramaInfoTranscodeParam;
|
|
3212
|
+
}
|
|
3213
|
+
/** JSB/TTOP 使用的 snake_case 转码参数。 */
|
|
3214
|
+
export interface IGetDramaInfoTranscodeParam {
|
|
3215
|
+
format?: string;
|
|
3216
|
+
codec?: string;
|
|
3217
|
+
definition?: string;
|
|
3218
|
+
file_type?: string;
|
|
3219
|
+
need_thumbs?: string;
|
|
3220
|
+
need_barrage_mask?: string;
|
|
3221
|
+
union_info?: string;
|
|
3222
|
+
quality?: string;
|
|
3223
|
+
drm_kek?: string;
|
|
3224
|
+
js_player?: string;
|
|
3209
3225
|
}
|
|
3210
3226
|
export interface MinisError {
|
|
3211
3227
|
error_code: number;
|
|
@@ -3970,6 +3986,24 @@ export interface IGetDramaInfoPerfCallbackPayload {
|
|
|
3970
3986
|
*/
|
|
3971
3987
|
timestamp: number;
|
|
3972
3988
|
}
|
|
3989
|
+
/** {zh}
|
|
3990
|
+
* @brief Minis 短剧转码参数。各字段会由 VePlayer 转换为服务端 snake_case 命名后透传。
|
|
3991
|
+
*/
|
|
3992
|
+
/** {en}
|
|
3993
|
+
* @brief Minis short-drama transcoding parameters. VePlayer converts the fields to server-side snake_case names before forwarding them.
|
|
3994
|
+
*/
|
|
3995
|
+
export interface ITranscodeParam {
|
|
3996
|
+
format?: string;
|
|
3997
|
+
codec?: string;
|
|
3998
|
+
definition?: string;
|
|
3999
|
+
fileType?: string;
|
|
4000
|
+
needThumbs?: string;
|
|
4001
|
+
needBarrageMask?: string;
|
|
4002
|
+
unionInfo?: string;
|
|
4003
|
+
quality?: string;
|
|
4004
|
+
drmKek?: string;
|
|
4005
|
+
jsPlayer?: string;
|
|
4006
|
+
}
|
|
3973
4007
|
/** {zh}
|
|
3974
4008
|
* @list Options
|
|
3975
4009
|
* @kind property
|
|
@@ -4041,6 +4075,13 @@ export interface IPlayerConfig extends IPlayerOptions {
|
|
|
4041
4075
|
* @brief 剧集id,Minis 短剧播放需要
|
|
4042
4076
|
*/
|
|
4043
4077
|
episodeId?: string;
|
|
4078
|
+
/** {zh}
|
|
4079
|
+
* @brief Minis 短剧转码参数。
|
|
4080
|
+
*/
|
|
4081
|
+
/** {en}
|
|
4082
|
+
* @brief Minis short-drama transcoding parameters.
|
|
4083
|
+
*/
|
|
4084
|
+
transcodeParam?: ITranscodeParam;
|
|
4044
4085
|
/** {zh}
|
|
4045
4086
|
* @brief Vid 播放配置项。应用服务端需通过 `vid` 生成临时临时播放 Token,下发给客户端。
|
|
4046
4087
|
* @type {IPlayAuthTokenConfig}
|
|
@@ -6427,7 +6468,7 @@ declare class AuthToken extends SdkPlugin {
|
|
|
6427
6468
|
playInfo?: VideoInfoRes;
|
|
6428
6469
|
constructor(args: any);
|
|
6429
6470
|
beforePlayerCreate(): Promise<void>;
|
|
6430
|
-
getVideoInfo(): Promise<{
|
|
6471
|
+
getVideoInfo(sourceConfigs?: IPlayerConfig): Promise<{
|
|
6431
6472
|
vid: string;
|
|
6432
6473
|
playList: Stream[];
|
|
6433
6474
|
codec: ICodecType;
|
|
@@ -6436,7 +6477,7 @@ declare class AuthToken extends SdkPlugin {
|
|
|
6436
6477
|
/**
|
|
6437
6478
|
* 短剧 Minis 环境:通过 JSB getDramaInfo 获取媒体信息
|
|
6438
6479
|
*/
|
|
6439
|
-
getDramaInfoViaJSB(): Promise<VideoInfoRes | undefined>;
|
|
6480
|
+
getDramaInfoViaJSB(sourceConfigs?: IPlayerConfig): Promise<VideoInfoRes | undefined>;
|
|
6440
6481
|
/**
|
|
6441
6482
|
* 将审核状态映射到短剧错误码
|
|
6442
6483
|
*/
|
|
@@ -6455,7 +6496,7 @@ declare class AuthToken extends SdkPlugin {
|
|
|
6455
6496
|
episodeId?: string;
|
|
6456
6497
|
vid?: string;
|
|
6457
6498
|
}): void;
|
|
6458
|
-
getVideos(): Promise<any>;
|
|
6499
|
+
getVideos(sourceConfigs?: IPlayerConfig): Promise<any>;
|
|
6459
6500
|
getPrivateDrmInfo(playList: Stream[], vid: string, streamType: string): Promise<void>;
|
|
6460
6501
|
getThumbnailConfig(thumbs: IThumbInfoItem[]): void;
|
|
6461
6502
|
getBarrageMaskUrl(url: string): void;
|
|
@@ -6472,11 +6513,11 @@ declare class AuthToken extends SdkPlugin {
|
|
|
6472
6513
|
*/
|
|
6473
6514
|
get isMinisDramaMode(): boolean;
|
|
6474
6515
|
init(): void;
|
|
6475
|
-
initConfig(getVideoByToken: IPlayAuthTokenConfig): void;
|
|
6516
|
+
initConfig(getVideoByToken: IPlayAuthTokenConfig, sourceConfigs?: IPlayerConfig): void;
|
|
6476
6517
|
/**
|
|
6477
6518
|
* 剧集切换:configs 已由 player 更新 album_id/episode_id,重新拉取媒体信息
|
|
6478
6519
|
*/
|
|
6479
|
-
updateDramaEpisode(isNewVideo: boolean): Promise<void>;
|
|
6520
|
+
updateDramaEpisode(isNewVideo: boolean, candidateConfig?: IPlayerConfig): Promise<void>;
|
|
6480
6521
|
/**
|
|
6481
6522
|
* @description 更新playAuthToken
|
|
6482
6523
|
* @param {IPlayAuthTokenConfig} getVideoByToken token信息
|
|
@@ -6679,6 +6720,10 @@ declare class PlayerData {
|
|
|
6679
6720
|
*/
|
|
6680
6721
|
get playDomain(): string;
|
|
6681
6722
|
setVodTeaId(): void;
|
|
6723
|
+
/**
|
|
6724
|
+
* 基于当前配置生成合并后的候选配置,不修改当前播放状态。
|
|
6725
|
+
*/
|
|
6726
|
+
getMergedConfigs(newConfigs: IPlayerConfig): IPlayerConfig;
|
|
6682
6727
|
/**
|
|
6683
6728
|
* 更新configs,即更新用户的configs,常用于playNext时
|
|
6684
6729
|
* @param newConfigs {IPlayerConfig} 要更新的配置
|
|
@@ -6928,7 +6973,26 @@ export declare type IPreloadDramaStream = {
|
|
|
6928
6973
|
vid?: string;
|
|
6929
6974
|
albumId: string;
|
|
6930
6975
|
episodeId: string;
|
|
6976
|
+
/** {zh}
|
|
6977
|
+
* @brief 默认清晰度,仅用于从完整媒体信息中选择预加载流。
|
|
6978
|
+
*/
|
|
6979
|
+
/** {en}
|
|
6980
|
+
* @brief Default definition used only to select a preload stream from complete media information.
|
|
6981
|
+
*/
|
|
6931
6982
|
defaultDefinition?: string;
|
|
6983
|
+
/** {zh}
|
|
6984
|
+
* @brief Minis 短剧转码参数。
|
|
6985
|
+
*/
|
|
6986
|
+
/** {en}
|
|
6987
|
+
* @brief Transcoding parameters for Minis short dramas.
|
|
6988
|
+
*/
|
|
6989
|
+
transcodeParam?: ITranscodeParam;
|
|
6990
|
+
/** {zh}
|
|
6991
|
+
* @brief Vid 播放配置。短剧预加载会复用 playAuthToken 等配置请求短剧信息。
|
|
6992
|
+
*/
|
|
6993
|
+
/** {en}
|
|
6994
|
+
* @brief Vid playback configuration reused by short-drama preload requests.
|
|
6995
|
+
*/
|
|
6932
6996
|
getVideoByToken?: IPlayAuthTokenConfig;
|
|
6933
6997
|
};
|
|
6934
6998
|
export declare type IPreloadAuthTokenStream = {
|
|
@@ -7477,6 +7541,23 @@ export declare type NormalizedMediaInfoCacheConfig = {
|
|
|
7477
7541
|
maxEntries: number;
|
|
7478
7542
|
};
|
|
7479
7543
|
declare function getMediaInfoCacheConfig(): NormalizedMediaInfoCacheConfig;
|
|
7544
|
+
export interface DramaIdentity {
|
|
7545
|
+
albumId: string | null;
|
|
7546
|
+
episodeId: string | null;
|
|
7547
|
+
}
|
|
7548
|
+
export declare type PlayerPlaybackState = "creating" | "ready" | "playing" | "paused" | "buffering" | "ended" | "error" | "destroyed";
|
|
7549
|
+
export interface PlayerPlaybackStateSnapshot extends DramaIdentity {
|
|
7550
|
+
playbackSessionId: string;
|
|
7551
|
+
playbackState: PlayerPlaybackState;
|
|
7552
|
+
isEnded: boolean;
|
|
7553
|
+
isPaused: boolean;
|
|
7554
|
+
isBeforePlayerCreate: boolean;
|
|
7555
|
+
duration: number;
|
|
7556
|
+
currentTime: number;
|
|
7557
|
+
}
|
|
7558
|
+
export interface IdentitySwitchTransaction {
|
|
7559
|
+
readonly settled: Promise<void>;
|
|
7560
|
+
}
|
|
7480
7561
|
/** {zh}
|
|
7481
7562
|
* @hidden
|
|
7482
7563
|
*/
|
|
@@ -7529,6 +7610,15 @@ export interface EncryptInfo {
|
|
|
7529
7610
|
unionInfo: string;
|
|
7530
7611
|
}
|
|
7531
7612
|
declare class VePlayer {
|
|
7613
|
+
/** {zh}
|
|
7614
|
+
* @brief 供 JSSDK 门面查询当前播放器播放状态。
|
|
7615
|
+
* @hidden
|
|
7616
|
+
*/
|
|
7617
|
+
/** {en}
|
|
7618
|
+
* @brief Returns the current player playback state for the JSSDK facade.
|
|
7619
|
+
* @hidden
|
|
7620
|
+
*/
|
|
7621
|
+
static getPlayerPlaybackState(): PlayerPlaybackStateSnapshot | null;
|
|
7532
7622
|
/**
|
|
7533
7623
|
* 注册业务已打包的 UMD 模块,供所有后续创建的播放器共享使用。
|
|
7534
7624
|
*/
|
|
@@ -7777,6 +7867,10 @@ declare class VePlayer {
|
|
|
7777
7867
|
*/
|
|
7778
7868
|
private veErrorIns;
|
|
7779
7869
|
private vodLogCommon;
|
|
7870
|
+
private _publicPlayNextOperation;
|
|
7871
|
+
private _sourceSwitchAborters?;
|
|
7872
|
+
private _lifecycleGeneration;
|
|
7873
|
+
private _playerRebuildListener?;
|
|
7780
7874
|
/** {zh}
|
|
7781
7875
|
* @brief 播放策略预初始化配置
|
|
7782
7876
|
* @param options 初始化配置,详情见{@link StrategyInitOptions}
|
|
@@ -8020,7 +8114,8 @@ declare class VePlayer {
|
|
|
8020
8114
|
* @return {*}
|
|
8021
8115
|
* @memberof VePlayer
|
|
8022
8116
|
*/
|
|
8023
|
-
createPlayer: () => Promise<
|
|
8117
|
+
createPlayer: (transaction?: IdentitySwitchTransaction) => Promise<any>;
|
|
8118
|
+
private _createPlayer;
|
|
8024
8119
|
private checkLicenseCallback;
|
|
8025
8120
|
/** {zh}
|
|
8026
8121
|
* @hidden
|
|
@@ -8164,6 +8259,8 @@ declare class VePlayer {
|
|
|
8164
8259
|
* @return {*}
|
|
8165
8260
|
* @memberof VePlayer
|
|
8166
8261
|
*/
|
|
8262
|
+
private _onPlayerRebuild;
|
|
8263
|
+
private _getPlayerRebuildListener;
|
|
8167
8264
|
private _bindPlayerEvents;
|
|
8168
8265
|
private _onMp4PreloadInfo;
|
|
8169
8266
|
private _proxyError;
|
|
@@ -8280,6 +8377,8 @@ declare class VePlayer {
|
|
|
8280
8377
|
* @memberof VePlayer
|
|
8281
8378
|
*/
|
|
8282
8379
|
switchAuthToken(config: IPlayAuthTokenConfig, isNewVideo?: boolean): Promise<void>;
|
|
8380
|
+
private _switchAuthToken;
|
|
8381
|
+
private _performAuthTokenSwitch;
|
|
8283
8382
|
/** {zh}
|
|
8284
8383
|
* @brief 更新临时播放 Token。
|
|
8285
8384
|
* @memberof VePlayer
|
|
@@ -8337,6 +8436,7 @@ declare class VePlayer {
|
|
|
8337
8436
|
* @memberof VePlayer
|
|
8338
8437
|
*/
|
|
8339
8438
|
next(config: IPlayerConfig, isNewVideo?: boolean): Promise<void>;
|
|
8439
|
+
private _next;
|
|
8340
8440
|
/** {zh}
|
|
8341
8441
|
* @brief 播放下一视频。
|
|
8342
8442
|
* @return{Promise<any>}
|
|
@@ -8352,8 +8452,19 @@ declare class VePlayer {
|
|
|
8352
8452
|
* @memberof VePlayer
|
|
8353
8453
|
*/
|
|
8354
8454
|
playNext(config: IPlayerConfig, isNewVideo?: boolean): Promise<any>;
|
|
8455
|
+
private _createPlayNextInProgressError;
|
|
8456
|
+
private _registerSourceSwitchAborter;
|
|
8457
|
+
private _abortSourceSwitches;
|
|
8458
|
+
private _runDestroyableSourceSwitch;
|
|
8459
|
+
private _createDestroyedPlaybackSwitchError;
|
|
8460
|
+
private _isDestroyedPlaybackSwitchError;
|
|
8461
|
+
private _isStaleLifecycleGeneration;
|
|
8462
|
+
private _cancelStalePlayerCreation;
|
|
8463
|
+
private _discardStalePlayer;
|
|
8355
8464
|
private updatePlayNextSubtitleConfig;
|
|
8356
8465
|
private _playNext;
|
|
8466
|
+
private _applyIncomingIdentityAliases;
|
|
8467
|
+
private _createDramaPlayNextCandidateConfig;
|
|
8357
8468
|
/** 从 playerData.configs 取出短剧 id,供 XGPlayer setConfig / playNext 与切换后 configs 一致 */
|
|
8358
8469
|
private _getDramaConfigPatchForPlayer;
|
|
8359
8470
|
private _buildDramaInvalidParamError;
|
|
@@ -8736,8 +8847,15 @@ declare class VePlayer {
|
|
|
8736
8847
|
*/
|
|
8737
8848
|
hideSubtitle(): void;
|
|
8738
8849
|
/** {zh}
|
|
8739
|
-
* @
|
|
8850
|
+
* @hidden
|
|
8851
|
+
*/
|
|
8852
|
+
/** {en}
|
|
8853
|
+
* @hidden
|
|
8854
|
+
*/
|
|
8855
|
+
private _teardown;
|
|
8856
|
+
/** {zh}
|
|
8740
8857
|
* @brief 销毁当前播放器实例。
|
|
8858
|
+
* @memberof VePlayer
|
|
8741
8859
|
*/
|
|
8742
8860
|
/** {en}
|
|
8743
8861
|
* @brief Destroy the current player instance.
|