@volcengine/veplayer 1.15.3-rc.35 → 1.15.3-rc.37

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 CHANGED
@@ -2289,6 +2289,8 @@ export interface ITTDramaEnv {
2289
2289
  * @type {boolean}
2290
2290
  */
2291
2291
  canIUseGetDramaInfo: boolean;
2292
+ /** 是否支持在 getDramaInfo 中透传 transcodeParam */
2293
+ canIUseGetDramaInfoTranscodeParam?: boolean;
2292
2294
  /**
2293
2295
  * @brief Android 是否支持批量获取短剧信息(高版本 app)
2294
2296
  * @type {boolean}
@@ -2319,6 +2321,20 @@ export interface IGetDramaInfoOptions {
2319
2321
  albumId: string;
2320
2322
  episodeId: string;
2321
2323
  vid: string;
2324
+ transcodeParam?: IGetDramaInfoTranscodeParam;
2325
+ }
2326
+ /** JSB/TTOP 使用的 snake_case 转码参数。 */
2327
+ export interface IGetDramaInfoTranscodeParam {
2328
+ format?: string;
2329
+ codec?: string;
2330
+ definition?: string;
2331
+ file_type?: string;
2332
+ need_thumbs?: string;
2333
+ need_barrage_mask?: string;
2334
+ union_info?: string;
2335
+ quality?: string;
2336
+ drm_kek?: string;
2337
+ js_player?: string;
2322
2338
  }
2323
2339
  export interface MinisError {
2324
2340
  error_code: number;
@@ -2864,6 +2880,24 @@ export interface IGetDramaInfoPerfCallbackPayload {
2864
2880
  */
2865
2881
  timestamp: number;
2866
2882
  }
2883
+ /** {zh}
2884
+ * @brief Minis 短剧转码参数。各字段会由 VePlayer 转换为服务端 snake_case 命名后透传。
2885
+ */
2886
+ /** {en}
2887
+ * @brief Minis short-drama transcoding parameters. VePlayer converts the fields to server-side snake_case names before forwarding them.
2888
+ */
2889
+ export interface ITranscodeParam {
2890
+ format?: string;
2891
+ codec?: string;
2892
+ definition?: string;
2893
+ fileType?: string;
2894
+ needThumbs?: string;
2895
+ needBarrageMask?: string;
2896
+ unionInfo?: string;
2897
+ quality?: string;
2898
+ drmKek?: string;
2899
+ jsPlayer?: string;
2900
+ }
2867
2901
  /** {zh}
2868
2902
  * @list Options
2869
2903
  * @kind property
@@ -2917,6 +2951,13 @@ export interface IPlayerConfig extends IPlayerOptions {
2917
2951
  * @brief 剧集id,Minis 短剧播放需要
2918
2952
  */
2919
2953
  episodeId?: string;
2954
+ /** {zh}
2955
+ * @brief Minis 短剧转码参数。
2956
+ */
2957
+ /** {en}
2958
+ * @brief Minis short-drama transcoding parameters.
2959
+ */
2960
+ transcodeParam?: ITranscodeParam;
2920
2961
  /** {zh}
2921
2962
  * @brief Vid 播放配置项。应用服务端需通过 `vid` 生成临时临时播放 Token,下发给客户端。
2922
2963
  * @type {IPlayAuthTokenConfig}
@@ -4729,9 +4770,11 @@ export declare type IPreloadDramaStream = {
4729
4770
  */
4730
4771
  episodeId: string;
4731
4772
  /**
4732
- * 默认清晰度,用于缓存 key 和预加载流选择
4773
+ * 默认清晰度,仅用于从完整媒体信息中选择预加载流
4733
4774
  */
4734
4775
  defaultDefinition?: string;
4776
+ /** Minis 短剧转码参数。 */
4777
+ transcodeParam?: ITranscodeParam;
4735
4778
  /**
4736
4779
  * Vid 播放配置。短剧预加载会复用 playAuthToken 等配置请求短剧信息。
4737
4780
  */
@@ -5068,7 +5111,7 @@ declare class AuthToken extends SdkPlugin {
5068
5111
  playInfo?: VideoInfoRes;
5069
5112
  constructor(args: any);
5070
5113
  beforePlayerCreate(): Promise<void>;
5071
- getVideoInfo(): Promise<{
5114
+ getVideoInfo(sourceConfigs?: IPlayerConfig): Promise<{
5072
5115
  vid: string;
5073
5116
  playList: Stream[];
5074
5117
  codec: ICodecType;
@@ -5077,7 +5120,7 @@ declare class AuthToken extends SdkPlugin {
5077
5120
  /**
5078
5121
  * 短剧 Minis 环境:通过 JSB getDramaInfo 获取媒体信息
5079
5122
  */
5080
- getDramaInfoViaJSB(): Promise<VideoInfoRes | undefined>;
5123
+ getDramaInfoViaJSB(sourceConfigs?: IPlayerConfig): Promise<VideoInfoRes | undefined>;
5081
5124
  /**
5082
5125
  * 将审核状态映射到短剧错误码
5083
5126
  */
@@ -5096,7 +5139,7 @@ declare class AuthToken extends SdkPlugin {
5096
5139
  episodeId?: string;
5097
5140
  vid?: string;
5098
5141
  }): void;
5099
- getVideos(): Promise<any>;
5142
+ getVideos(sourceConfigs?: IPlayerConfig): Promise<any>;
5100
5143
  getPrivateDrmInfo(playList: Stream[], vid: string, streamType: string): Promise<void>;
5101
5144
  getThumbnailConfig(thumbs: IThumbInfoItem[]): void;
5102
5145
  getBarrageMaskUrl(url: string): void;
@@ -5113,11 +5156,11 @@ declare class AuthToken extends SdkPlugin {
5113
5156
  */
5114
5157
  get isMinisDramaMode(): boolean;
5115
5158
  init(): void;
5116
- initConfig(getVideoByToken: IPlayAuthTokenConfig): void;
5159
+ initConfig(getVideoByToken: IPlayAuthTokenConfig, sourceConfigs?: IPlayerConfig): void;
5117
5160
  /**
5118
5161
  * 剧集切换:configs 已由 player 更新 album_id/episode_id,重新拉取媒体信息
5119
5162
  */
5120
- updateDramaEpisode(isNewVideo: boolean): Promise<void>;
5163
+ updateDramaEpisode(isNewVideo: boolean, candidateConfig?: IPlayerConfig): Promise<void>;
5121
5164
  /**
5122
5165
  * @description 更新playAuthToken
5123
5166
  * @param {IPlayAuthTokenConfig} getVideoByToken token信息
@@ -5317,6 +5360,10 @@ declare class PlayerData {
5317
5360
  */
5318
5361
  get playDomain(): string;
5319
5362
  setVodTeaId(): void;
5363
+ /**
5364
+ * 基于当前配置生成合并后的候选配置,不修改当前播放状态。
5365
+ */
5366
+ getMergedConfigs(newConfigs: IPlayerConfig): IPlayerConfig;
5320
5367
  /**
5321
5368
  * 更新configs,即更新用户的configs,常用于playNext时
5322
5369
  * @param newConfigs {IPlayerConfig} 要更新的配置
@@ -6127,6 +6174,7 @@ declare class VePlayer {
6127
6174
  playNext(config: IPlayerConfig, isNewVideo?: boolean): Promise<any>;
6128
6175
  private updatePlayNextSubtitleConfig;
6129
6176
  private _playNext;
6177
+ private _createDramaPlayNextCandidateConfig;
6130
6178
  /** 从 playerData.configs 取出短剧 id,供 XGPlayer setConfig / playNext 与切换后 configs 一致 */
6131
6179
  private _getDramaConfigPatchForPlayer;
6132
6180
  private _buildDramaInvalidParamError;