@volcengine/veplayer 1.15.3-rc.34 → 1.15.3-rc.36

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
  */
@@ -4788,100 +4831,6 @@ declare class VeStrategyWrapper {
4788
4831
  private initPreloaderConfig;
4789
4832
  }
4790
4833
  declare const _default: VeStrategyWrapper;
4791
- /** {zh}
4792
- * @hidden
4793
- */
4794
- export declare type IRes = IGetPlayInfoRes & {
4795
- Data: IGetPlayInfoRes & {
4796
- VideoID?: string;
4797
- };
4798
- };
4799
- declare enum VideoFileTypes {
4800
- VIDEO = "video",
4801
- EVIDEO = "evideo",
4802
- DRM_EVIDEO = "drm_evideo"
4803
- }
4804
- declare enum AudioFileTypes {
4805
- AUDIO = "audio",
4806
- EAUDIO = "eaudio",
4807
- DRM_AUDIO = "drm_eaudio"
4808
- }
4809
- export interface ITokenInfo {
4810
- Action?: string;
4811
- Codec?: ICodecType;
4812
- FileType?: VideoFileTypes | AudioFileTypes;
4813
- Format?: string;
4814
- Ssl?: 0 | 1;
4815
- Version?: string;
4816
- Vid?: string;
4817
- "X-Algorithm"?: string;
4818
- "X-Credential"?: string;
4819
- "X-Expires"?: number | string;
4820
- "X-Date"?: string;
4821
- "X-Signature"?: string;
4822
- "X-SignedQueries"?: string;
4823
- DrmType?: string;
4824
- PlayAuthIds?: string;
4825
- [propName: string]: string | number;
4826
- }
4827
- /** {zh}
4828
- * @hidden
4829
- */
4830
- export interface IDefItem extends Stream {
4831
- vid: string;
4832
- lineId?: number;
4833
- lineName?: string;
4834
- url: string;
4835
- streamType: string;
4836
- backupUrl: string;
4837
- backUrlList: string[];
4838
- fileType?: "video" | "audio" | "evideo" | "eaudio";
4839
- format: string;
4840
- bitrate?: number;
4841
- size?: number;
4842
- kid?: string;
4843
- vwidth?: number;
4844
- vheight?: number;
4845
- }
4846
- /** {zh}
4847
- * @hidden
4848
- */
4849
- export interface VideoInfoRes {
4850
- playList: IDefItem[];
4851
- type?: string;
4852
- poster: string;
4853
- vid: string;
4854
- duration: number;
4855
- dashOpts: IRes | {
4856
- Data: IRes;
4857
- };
4858
- thumbs: IThumbInfoItem[];
4859
- barrageMaskUrl: string;
4860
- enableAdaptive?: boolean;
4861
- adaptiveBitrateStreamingInfo?: ABRInfo;
4862
- }
4863
- export interface ICreatePlayerPerfTiming {
4864
- name: string;
4865
- duration: number;
4866
- }
4867
- export interface ICreatePlayerPerfReport {
4868
- totalDuration: number;
4869
- timings: ICreatePlayerPerfTiming[];
4870
- timingMap: Record<string, number>;
4871
- }
4872
- declare class CreatePlayerPerfCollector {
4873
- private now;
4874
- private startAt;
4875
- private timings;
4876
- private timingMap;
4877
- constructor();
4878
- markDuration(name: string, durationMs: number): void;
4879
- measure<T>(name: string, fn: () => T): T;
4880
- measureAsync<T>(name: string, fn: () => Promise<T>): Promise<T>;
4881
- finish(): ICreatePlayerPerfReport;
4882
- }
4883
- export declare type CollectorConstructor = new (name: string) => any;
4884
- declare function isMSESupport(mime?: string): boolean;
4885
4834
  /** UMD modules that can be loaded or explicitly pre-registered. */
4886
4835
  export declare enum UmdKeys {
4887
4836
  HLS = "hls",
@@ -5162,7 +5111,7 @@ declare class AuthToken extends SdkPlugin {
5162
5111
  playInfo?: VideoInfoRes;
5163
5112
  constructor(args: any);
5164
5113
  beforePlayerCreate(): Promise<void>;
5165
- getVideoInfo(): Promise<{
5114
+ getVideoInfo(sourceConfigs?: IPlayerConfig): Promise<{
5166
5115
  vid: string;
5167
5116
  playList: Stream[];
5168
5117
  codec: ICodecType;
@@ -5171,7 +5120,7 @@ declare class AuthToken extends SdkPlugin {
5171
5120
  /**
5172
5121
  * 短剧 Minis 环境:通过 JSB getDramaInfo 获取媒体信息
5173
5122
  */
5174
- getDramaInfoViaJSB(): Promise<VideoInfoRes | undefined>;
5123
+ getDramaInfoViaJSB(sourceConfigs?: IPlayerConfig): Promise<VideoInfoRes | undefined>;
5175
5124
  /**
5176
5125
  * 将审核状态映射到短剧错误码
5177
5126
  */
@@ -5190,7 +5139,7 @@ declare class AuthToken extends SdkPlugin {
5190
5139
  episodeId?: string;
5191
5140
  vid?: string;
5192
5141
  }): void;
5193
- getVideos(): Promise<any>;
5142
+ getVideos(sourceConfigs?: IPlayerConfig): Promise<any>;
5194
5143
  getPrivateDrmInfo(playList: Stream[], vid: string, streamType: string): Promise<void>;
5195
5144
  getThumbnailConfig(thumbs: IThumbInfoItem[]): void;
5196
5145
  getBarrageMaskUrl(url: string): void;
@@ -5207,11 +5156,11 @@ declare class AuthToken extends SdkPlugin {
5207
5156
  */
5208
5157
  get isMinisDramaMode(): boolean;
5209
5158
  init(): void;
5210
- initConfig(getVideoByToken: IPlayAuthTokenConfig): void;
5159
+ initConfig(getVideoByToken: IPlayAuthTokenConfig, sourceConfigs?: IPlayerConfig): void;
5211
5160
  /**
5212
5161
  * 剧集切换:configs 已由 player 更新 album_id/episode_id,重新拉取媒体信息
5213
5162
  */
5214
- updateDramaEpisode(isNewVideo: boolean): Promise<void>;
5163
+ updateDramaEpisode(isNewVideo: boolean, candidateConfig?: IPlayerConfig): Promise<void>;
5215
5164
  /**
5216
5165
  * @description 更新playAuthToken
5217
5166
  * @param {IPlayAuthTokenConfig} getVideoByToken token信息
@@ -5411,6 +5360,10 @@ declare class PlayerData {
5411
5360
  */
5412
5361
  get playDomain(): string;
5413
5362
  setVodTeaId(): void;
5363
+ /**
5364
+ * 基于当前配置生成合并后的候选配置,不修改当前播放状态。
5365
+ */
5366
+ getMergedConfigs(newConfigs: IPlayerConfig): IPlayerConfig;
5414
5367
  /**
5415
5368
  * 更新configs,即更新用户的configs,常用于playNext时
5416
5369
  * @param newConfigs {IPlayerConfig} 要更新的配置
@@ -6221,6 +6174,7 @@ declare class VePlayer {
6221
6174
  playNext(config: IPlayerConfig, isNewVideo?: boolean): Promise<any>;
6222
6175
  private updatePlayNextSubtitleConfig;
6223
6176
  private _playNext;
6177
+ private _createDramaPlayNextCandidateConfig;
6224
6178
  /** 从 playerData.configs 取出短剧 id,供 XGPlayer setConfig / playNext 与切换后 configs 一致 */
6225
6179
  private _getDramaConfigPatchForPlayer;
6226
6180
  private _buildDramaInvalidParamError;