@byteplus/veplayer 1.19.2-rc.0 → 1.19.2-rc.10

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
@@ -3350,6 +3350,15 @@ export interface IGetPlayInfoRes {
3350
3350
  * 短剧环境配置接口
3351
3351
  */
3352
3352
  export interface ITTDramaEnv {
3353
+ /** {zh}
3354
+ * @brief 首次 TTMinis.init 调用的 Unix 毫秒时间,用于计算首个视频的起播耗时。
3355
+ * @hidden
3356
+ */
3357
+ /** {en}
3358
+ * @brief Unix timestamp in milliseconds of the first TTMinis.init call, used for first-video startup duration.
3359
+ * @hidden
3360
+ */
3361
+ pageLoadStartTime?: number;
3353
3362
  /** 云服务商,默认从构建时 env.__PLATFORM__ 获取,未注入时默认为 byteplus */
3354
3363
  channel?: "volcengine" | "byteplus";
3355
3364
  /**
@@ -3446,8 +3455,8 @@ export interface IGetDramaInfoPerfInfo {
3446
3455
  * JSB 获取短剧信息返回结果
3447
3456
  */
3448
3457
  export interface IJSBCallbackResult {
3449
- /** {zh} @brief 顶层 Native 通参;旧客户端可缺失。 */
3450
- /** {en} @brief Top-level Native tracking fields; absent on older clients. */
3458
+ /** {zh} @brief 旧回包的顶层 Native 通参;优先使用 data.tracking_context。 */
3459
+ /** {en} @brief Legacy top-level tracking fields; data.tracking_context takes priority. */
3451
3460
  tracking_context?: {
3452
3461
  enter_from?: string;
3453
3462
  minis_type?: string;
@@ -3457,9 +3466,13 @@ export interface IJSBCallbackResult {
3457
3466
  is_success: number | boolean;
3458
3467
  error?: MinisError;
3459
3468
  data?: {
3469
+ /** {zh} @brief Native 埋点通参;缺失时不报对应字段。 */
3470
+ /** {en} @brief Native tracking fields; omitted fields are not reported. */
3471
+ tracking_context?: IJSBCallbackResult["tracking_context"];
3460
3472
  status: number;
3461
3473
  drama_info: {
3462
- album_id: string;
3474
+ drama_id?: string;
3475
+ album_id?: string;
3463
3476
  album_name?: string;
3464
3477
  episode_total_num?: number;
3465
3478
  drama_name?: string;
@@ -7168,6 +7181,8 @@ export declare const enum LangTextKey {
7168
7181
  DRAMA_FAILED_TO_QUERY = "DRAMA_FAILED_TO_QUERY",
7169
7182
  DRAMA_INVALID_TTOP_TOKEN = "DRAMA_INVALID_TTOP_TOKEN",
7170
7183
  DRAMA_NOT_ON_SHELF = "DRAMA_NOT_ON_SHELF",
7184
+ DRAMA_EMPTY_PLAYLIST = "DRAMA_EMPTY_PLAYLIST",
7185
+ DRAMA_GET_INFO_TIMEOUT = "DRAMA_GET_INFO_TIMEOUT",
7171
7186
  DRAMA_FAILED_GET_EPISODE_INFO = "DRAMA_FAILED_GET_EPISODE_INFO"
7172
7187
  }
7173
7188
  declare const DRAMA_ERROR_CODE: {
@@ -7217,6 +7232,16 @@ declare const DRAMA_ERROR_CODE: {
7217
7232
  readonly message: "Video is not on shelf";
7218
7233
  readonly textKey: LangTextKey.DRAMA_NOT_ON_SHELF;
7219
7234
  };
7235
+ readonly EMPTY_PLAYLIST: {
7236
+ readonly code: 9311;
7237
+ readonly message: "Episode video playlist is empty";
7238
+ readonly textKey: LangTextKey.DRAMA_EMPTY_PLAYLIST;
7239
+ };
7240
+ readonly GET_INFO_TIMEOUT: {
7241
+ readonly code: 9312;
7242
+ readonly message: "getDramaInfo request timed out";
7243
+ readonly textKey: LangTextKey.DRAMA_GET_INFO_TIMEOUT;
7244
+ };
7220
7245
  readonly FAILED_GET_EPISODE_INFO: {
7221
7246
  readonly code: 9399;
7222
7247
  readonly message: "Failed get episode info";
@@ -7238,18 +7263,20 @@ declare class AuthToken extends SdkPlugin {
7238
7263
  playInfo?: VideoInfoRes;
7239
7264
  constructor(args: any);
7240
7265
  beforePlayerCreate(): Promise<void>;
7241
- getVideoInfo(sourceConfigs?: IPlayerConfig): Promise<{
7266
+ getVideoInfo(sourceConfigs?: IPlayerConfig, errors?: any[]): Promise<{
7242
7267
  vid: string;
7243
7268
  __mediaInfoCacheHit: boolean;
7269
+ __serverFetchDuration: number;
7244
7270
  __dramaTrackingContext: Record<string, unknown>;
7245
7271
  playList: Stream[];
7246
7272
  codec: ICodecType;
7247
7273
  defaultDefinition: string;
7248
7274
  }>;
7275
+ private reportEmptyDramaPlaylist;
7249
7276
  /**
7250
7277
  * 短剧 Minis 环境:通过 JSB getDramaInfo 获取媒体信息
7251
7278
  */
7252
- getDramaInfoViaJSB(sourceConfigs?: IPlayerConfig): Promise<VideoInfoRes | undefined>;
7279
+ getDramaInfoViaJSB(sourceConfigs?: IPlayerConfig, errors?: any[]): Promise<VideoInfoRes | undefined>;
7253
7280
  /**
7254
7281
  * 将审核状态映射到短剧错误码
7255
7282
  */
@@ -7268,7 +7295,7 @@ declare class AuthToken extends SdkPlugin {
7268
7295
  episodeId?: string;
7269
7296
  vid?: string;
7270
7297
  }): void;
7271
- getVideos(sourceConfigs?: IPlayerConfig): Promise<any>;
7298
+ getVideos(sourceConfigs?: IPlayerConfig, errors?: any[]): Promise<any>;
7272
7299
  getPrivateDrmInfo(playList: Stream[], vid: string, streamType: string): Promise<void>;
7273
7300
  getThumbnailConfig(thumbs: IThumbInfoItem[]): void;
7274
7301
  getBarrageMaskUrl(url: string): void;
@@ -7289,16 +7316,16 @@ declare class AuthToken extends SdkPlugin {
7289
7316
  /**
7290
7317
  * 剧集切换:configs 已由 player 更新 album_id/episode_id,重新拉取媒体信息
7291
7318
  */
7292
- updateDramaEpisode(isNewVideo: boolean, candidateConfig?: IPlayerConfig): Promise<void>;
7319
+ updateDramaEpisode(isNewVideo: boolean, candidateConfig?: IPlayerConfig, errors?: any[]): Promise<void>;
7293
7320
  /**
7294
7321
  * @description 更新playAuthToken
7295
7322
  * @param {IPlayAuthTokenConfig} getVideoByToken token信息
7296
7323
  * @param {boolean} isNewVideo 是否新视频,即是否为切换视频
7297
7324
  */
7298
7325
  updateAuthToken(getVideoByToken: IPlayAuthTokenConfig, isNewVideo: boolean): Promise<void>;
7299
- checkPlayAuthTokenValid(): boolean;
7300
- checkKeyTokenValid(): boolean;
7301
- checkDrmAuthTokenValid(): boolean;
7326
+ checkPlayAuthTokenValid(errors?: any[]): boolean;
7327
+ checkKeyTokenValid(errors?: any[]): boolean;
7328
+ checkDrmAuthTokenValid(errors?: any[]): boolean;
7302
7329
  }
7303
7330
  /** {zh}
7304
7331
  * @hidden
@@ -9381,6 +9408,7 @@ declare class VePlayer {
9381
9408
  private _buildDramaInvalidParamError;
9382
9409
  private _getDramaAlbumIdFromConfig;
9383
9410
  private _getDramaEpisodeIdFromConfig;
9411
+ private _reportPlayNextFailure;
9384
9412
  private switchDramaEpisode;
9385
9413
  /** {zh}
9386
9414
  * @brief 销毁xgplayer实例