@byteplus/veplayer 1.18.0-rc.7 → 1.18.0-rc.9

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
@@ -7547,6 +7547,7 @@ export interface DramaIdentity {
7547
7547
  }
7548
7548
  export declare type PlayerPlaybackState = "creating" | "ready" | "playing" | "paused" | "buffering" | "ended" | "error" | "destroyed";
7549
7549
  export interface PlayerPlaybackStateSnapshot extends DramaIdentity {
7550
+ playbackSessionId: string;
7550
7551
  playbackState: PlayerPlaybackState;
7551
7552
  isEnded: boolean;
7552
7553
  isPaused: boolean;
@@ -7554,6 +7555,9 @@ export interface PlayerPlaybackStateSnapshot extends DramaIdentity {
7554
7555
  duration: number;
7555
7556
  currentTime: number;
7556
7557
  }
7558
+ export interface IdentitySwitchTransaction {
7559
+ readonly settled: Promise<void>;
7560
+ }
7557
7561
  /** {zh}
7558
7562
  * @hidden
7559
7563
  */
@@ -7863,6 +7867,10 @@ declare class VePlayer {
7863
7867
  */
7864
7868
  private veErrorIns;
7865
7869
  private vodLogCommon;
7870
+ private _publicPlayNextOperation;
7871
+ private _sourceSwitchAborters?;
7872
+ private _lifecycleGeneration;
7873
+ private _playerRebuildListener?;
7866
7874
  /** {zh}
7867
7875
  * @brief 播放策略预初始化配置
7868
7876
  * @param options 初始化配置,详情见{@link StrategyInitOptions}
@@ -8106,7 +8114,7 @@ declare class VePlayer {
8106
8114
  * @return {*}
8107
8115
  * @memberof VePlayer
8108
8116
  */
8109
- createPlayer: () => Promise<PlayerCore>;
8117
+ createPlayer: (transaction?: IdentitySwitchTransaction) => Promise<any>;
8110
8118
  private _createPlayer;
8111
8119
  private checkLicenseCallback;
8112
8120
  /** {zh}
@@ -8251,6 +8259,8 @@ declare class VePlayer {
8251
8259
  * @return {*}
8252
8260
  * @memberof VePlayer
8253
8261
  */
8262
+ private _onPlayerRebuild;
8263
+ private _getPlayerRebuildListener;
8254
8264
  private _bindPlayerEvents;
8255
8265
  private _onMp4PreloadInfo;
8256
8266
  private _proxyError;
@@ -8367,6 +8377,8 @@ declare class VePlayer {
8367
8377
  * @memberof VePlayer
8368
8378
  */
8369
8379
  switchAuthToken(config: IPlayAuthTokenConfig, isNewVideo?: boolean): Promise<void>;
8380
+ private _switchAuthToken;
8381
+ private _performAuthTokenSwitch;
8370
8382
  /** {zh}
8371
8383
  * @brief 更新临时播放 Token。
8372
8384
  * @memberof VePlayer
@@ -8424,6 +8436,7 @@ declare class VePlayer {
8424
8436
  * @memberof VePlayer
8425
8437
  */
8426
8438
  next(config: IPlayerConfig, isNewVideo?: boolean): Promise<void>;
8439
+ private _next;
8427
8440
  /** {zh}
8428
8441
  * @brief 播放下一视频。
8429
8442
  * @return{Promise<any>}
@@ -8439,8 +8452,18 @@ declare class VePlayer {
8439
8452
  * @memberof VePlayer
8440
8453
  */
8441
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;
8442
8464
  private updatePlayNextSubtitleConfig;
8443
8465
  private _playNext;
8466
+ private _applyIncomingIdentityAliases;
8444
8467
  private _createDramaPlayNextCandidateConfig;
8445
8468
  /** 从 playerData.configs 取出短剧 id,供 XGPlayer setConfig / playNext 与切换后 configs 一致 */
8446
8469
  private _getDramaConfigPatchForPlayer;