@volcengine/veplayer 1.20.1-rc.0 → 1.21.1-rc.0

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
@@ -8398,6 +8398,13 @@ export declare type IMediaInfoPrefetchFailure = {
8398
8398
  */
8399
8399
  export declare type IMediaInfoPrefetchResult = IMediaInfoPrefetchSuccess | IMediaInfoPrefetchFailure;
8400
8400
  export declare type IPreloadStream = IPreloadResolvedStream | IPreloadDramaStream | IPreloadAuthTokenStream;
8401
+ export declare type KernelWarmupOptions = {
8402
+ /** Independent kill switch. V1 also requires explicit preload configuration. */
8403
+ enabled?: boolean;
8404
+ timeoutMs?: number;
8405
+ maxAgeMs?: number;
8406
+ minBufferSeconds?: number;
8407
+ };
8401
8408
  /** {zh}
8402
8409
  * @hidden
8403
8410
  * h265策略配置
@@ -8593,6 +8600,8 @@ export declare type StrategyConfigOptions = {
8593
8600
  * @detail Options
8594
8601
  */
8595
8602
  export declare type StrategyInitOptions = {
8603
+ /** HLS kernel warmup. V1 requires explicit preload + setPreloadList; enabled by default under those gates. */
8604
+ kernelWarmup?: KernelWarmupOptions;
8596
8605
  /** {zh}
8597
8606
  * 应用ID
8598
8607
  * @brief 应用 ID
@@ -8783,6 +8792,7 @@ export interface PlayerPlaybackStateSnapshot extends DramaIdentity {
8783
8792
  export interface IdentitySwitchTransaction {
8784
8793
  readonly settled: Promise<void>;
8785
8794
  }
8795
+ declare const STANDBY_SLOT: unique symbol;
8786
8796
  /** {zh}
8787
8797
  * @hidden
8788
8798
  */
@@ -8835,6 +8845,16 @@ export interface EncryptInfo {
8835
8845
  unionInfo: string;
8836
8846
  }
8837
8847
  declare class VePlayer {
8848
+ private _standby;
8849
+ private _standbyInit?;
8850
+ private _warmup?;
8851
+ private _warmupVisibility?;
8852
+ private _warmupHandoff;
8853
+ private _mediaExpiredListener?;
8854
+ /** @hidden Internal preparation mode; never registered as current playback. */
8855
+ get isWarmupStandby(): boolean;
8856
+ /** @hidden Diagnostic only, not a first-frame metric. */
8857
+ getKernelWarmupState(): string;
8838
8858
  /** {zh}
8839
8859
  * @brief 供 JSSDK 门面查询当前播放器播放状态。
8840
8860
  * @hidden
@@ -9214,7 +9234,7 @@ declare class VePlayer {
9214
9234
  * @param options
9215
9235
  */
9216
9236
  static isRTMSupported: typeof import("@byted/xgplayer-rts").RtsPlugin.isSupported;
9217
- static setLicenseConfig(config: ILicenseConfig): Promise<any>;
9237
+ static setLicenseConfig(config: ILicenseConfig): Promise<void>;
9218
9238
  static checkLicense(): Promise<LicenseEdition>;
9219
9239
  static checkModuleList(): Promise<string[]>;
9220
9240
  static checkLicenseStatus(): Promise<LicenseStatus>;
@@ -9226,6 +9246,7 @@ declare class VePlayer {
9226
9246
  */
9227
9247
  static generateEncryptInfo(unionId: string, streamType: "hls" | "mp4" | "dash"): Promise<EncryptInfo | undefined>;
9228
9248
  private static hasInitVeStrategy;
9249
+ private static warmupPrepareGeneration;
9229
9250
  /**
9230
9251
  * @hidden
9231
9252
  * 延时触发的events,即保证在player创建之后才触发
@@ -9247,7 +9268,7 @@ declare class VePlayer {
9247
9268
  /** {en}
9248
9269
  * @brief Constructor.
9249
9270
  */
9250
- constructor(configs: IPlayerConfig);
9271
+ constructor(configs: IPlayerConfig, internalMode?: typeof STANDBY_SLOT);
9251
9272
  /** @hidden */
9252
9273
  assertLiteConfig(config?: Partial<IPlayerConfig>): void;
9253
9274
  /**
@@ -9749,6 +9770,12 @@ declare class VePlayer {
9749
9770
  private _cancelStalePlayerCreation;
9750
9771
  private _discardStalePlayer;
9751
9772
  private updatePlayNextSubtitleConfig;
9773
+ private _warmupFingerprint;
9774
+ private _bindWarmupScheduling;
9775
+ private _prepareWarmupSlot;
9776
+ private _playNextWithWarmup;
9777
+ private _activateWarmupSlot;
9778
+ private _waitForWarmupFallback;
9752
9779
  private _playNext;
9753
9780
  private _applyIncomingIdentityAliases;
9754
9781
  private _createDramaPlayNextCandidateConfig;