@volcengine/veplayer 1.9.4-rc.1 → 1.9.6-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
@@ -3069,16 +3069,6 @@ export interface IPlayerConfig extends IPlayerOptions {
3069
3069
  * @default -
3070
3070
  */
3071
3071
  autoBitrateOpts?: IAutoBitrateOpts;
3072
- /** {zh}
3073
- * @brief Range拆分(动态Buffer)
3074
- * @default -
3075
- */
3076
- adaptRange?: IAdaptRange;
3077
- /** {zh}
3078
- * @brief 视频时长
3079
- * @default -
3080
- */
3081
- duration?: number;
3082
3072
  /** {zh}
3083
3073
  * @brief 外挂字幕配置。
3084
3074
  * @default -
@@ -3608,11 +3598,7 @@ declare enum StrategyNames {
3608
3598
  /**
3609
3599
  * 预加载
3610
3600
  */
3611
- PRELOAD = "preload",
3612
- /**
3613
- * Range拆分-动态Buffer
3614
- */
3615
- ADAPT_RANGE = "adaptRange"
3601
+ PRELOAD = "preload"
3616
3602
  }
3617
3603
  /**{zh}
3618
3604
  * @hidden
@@ -3668,20 +3654,6 @@ export declare type IPreloadConfig = {
3668
3654
  */
3669
3655
  disabled?: boolean;
3670
3656
  };
3671
- /**{zh}
3672
- * Range拆分(动态Buffer)策略初始配置
3673
- * @detail detail
3674
- */
3675
- export declare type IAdaptRangeConfig = {
3676
- /**
3677
- * 预加载依赖Module
3678
- */
3679
- Strategy?: any;
3680
- /**
3681
- * 是否禁用Range拆分策略
3682
- */
3683
- disabled?: boolean;
3684
- };
3685
3657
  /**{zh}
3686
3658
  * 高级能力(策略)配置
3687
3659
  * @detail detail
@@ -3696,10 +3668,6 @@ export declare type StrategyConfigOptions = {
3696
3668
  * 预加载配置
3697
3669
  */
3698
3670
  [StrategyNames.PRELOAD]?: boolean | IPreloadConfig;
3699
- /**
3700
- * Range拆分(动态Buffer)
3701
- */
3702
- [StrategyNames.ADAPT_RANGE]?: boolean | IAdaptRangeConfig;
3703
3671
  };
3704
3672
  /**{zh}
3705
3673
  * 播放器预初始化配置
@@ -3844,42 +3812,12 @@ declare class VeStrategyWrapper {
3844
3812
  prepare(): Promise<boolean>;
3845
3813
  getDeviceId(): string;
3846
3814
  isReady(): boolean;
3847
- getStrategyRecommendations(options?: any, commonOptions?: any): StrategyRecommendation;
3848
- getStrategyRecommendationsAsync(options?: any, commonOptions?: any): Promise<StrategyRecommendation>;
3815
+ getStrategyRecommendations(): StrategyRecommendation;
3816
+ getStrategyRecommendationsAsync(): Promise<StrategyRecommendation>;
3849
3817
  isHevcRecommended(): boolean;
3850
3818
  private initPreloaderConfig;
3851
3819
  }
3852
3820
  declare const _default: VeStrategyWrapper;
3853
- export interface IAdaptRangeDefaultOptions {
3854
- maxTargetCacheDur: number;
3855
- minTargetCacheDur: number;
3856
- rangeMaxDuration: number;
3857
- rangeMinDuration: number;
3858
- cacheSafeFactor: number;
3859
- estPTcontrol: boolean;
3860
- estPlayTime: number;
3861
- minBandwidth: number;
3862
- minDangerThreshold: number;
3863
- rangeControl: boolean;
3864
- rangeMinSize: number;
3865
- safeFactor: number;
3866
- targetCacheControl: boolean;
3867
- }
3868
- declare abstract class AbstractBaseAdapter {
3869
- isLive: boolean;
3870
- playerData: any;
3871
- streamType: string;
3872
- constructor(options: any);
3873
- abstract canOpenAbr(): boolean;
3874
- abstract applyAbrPluginConfig(_finalOptions: any, _autoBitrateOpts: any): void;
3875
- abstract prepareAbrModule(_playerData: any, _sdkUmdLoader: any): void;
3876
- abstract needAbrAutoDefinition(): boolean;
3877
- abstract setAbrDefaultDefiWithAuto(): boolean;
3878
- abstract canAdaptRangeEnable(): boolean;
3879
- abstract adaptRangeDefaultOptions(): IAdaptRangeDefaultOptions | undefined;
3880
- abstract applyAdaptRangePluginConfig(_finalOptions: any, _adaptRangeOptions: any): void;
3881
- abstract applyAdaptRangeStrategy(_finalOptions: any, _adaptRangeOptions: any): void;
3882
- }
3883
3821
  declare class PlayerData {
3884
3822
  id?: string;
3885
3823
  root?: HTMLElement;
@@ -3923,8 +3861,6 @@ declare class PlayerData {
3923
3861
  urlExpireDiff: number;
3924
3862
  urlCheckExpireInterval: number;
3925
3863
  };
3926
- private isAutoBitrateEnable;
3927
- adapter: AbstractBaseAdapter;
3928
3864
  isBusinessDrm: boolean;
3929
3865
  isEncrypt: boolean;
3930
3866
  dashOpts: {
@@ -3937,12 +3873,6 @@ declare class PlayerData {
3937
3873
  */
3938
3874
  initPlayData(configs: IPlayerConfig): void;
3939
3875
  initPlaylistAndGetCurrent(configs: IPlayerConfig): Stream;
3940
- checkAutoBitratePlayList(): boolean;
3941
- getABRStreamInfo(streamType: any, originDefaultStream: any): {
3942
- defaultDefinition: string;
3943
- defaultStream: any;
3944
- playList: Stream[];
3945
- };
3946
3876
  isCurrentH265(): boolean;
3947
3877
  getCurrentByDefaultConfig(): Stream;
3948
3878
  initCurrent(currentStreams: Stream): void;
@@ -3959,13 +3889,12 @@ declare class PlayerData {
3959
3889
  * @description: 获取当前直播url
3960
3890
  */
3961
3891
  getCurrentUrl(): Url;
3962
- getTargetStreamType(stream?: Stream): string;
3963
3892
  /**
3964
3893
  * @description: 获取当前的streamType
3965
3894
  */
3966
3895
  getCurrentStreamType(): string;
3967
3896
  getStreamType(): string;
3968
- isOpenABR(): boolean;
3897
+ isOpenABR(streamType?: string): boolean;
3969
3898
  showRealDefinition(): boolean;
3970
3899
  isAutoDefinition(def: any): boolean;
3971
3900
  isPlayAutoDefinition(def?: string): boolean;
@@ -4069,7 +3998,6 @@ declare enum UmdKeys {
4069
3998
  VeStrategy = "vestrategy",
4070
3999
  VeStrategyH265 = "vestrategy_h265",
4071
4000
  VeStrategyPreload = "vestrategy_preload",
4072
- VeStrategyAdaptRange = "vestrategy_adapt_range",
4073
4001
  DashAbralgo = "DashAbralgo",
4074
4002
  Preloader = "preloader"
4075
4003
  }
@@ -4237,7 +4165,6 @@ declare class VePlayer {
4237
4165
  * @memberof VePlayer
4238
4166
  */
4239
4167
  sdkUmdLoader: umdLoader;
4240
- private adapter;
4241
4168
  /**
4242
4169
  * @hidden
4243
4170
  */
@@ -4591,7 +4518,9 @@ declare class VePlayer {
4591
4518
  * @notes 更换后,会从更换前的时间点继续播放。
4592
4519
  * @param url 视频播放地址。
4593
4520
  */
4594
- switchURL(url: Url): Promise<void>;
4521
+ switchURL(url: Url, options?: {
4522
+ seamless?: boolean;
4523
+ }): Promise<void>;
4595
4524
  /** {zh}
4596
4525
  * @memberof VePlayer
4597
4526
  * @brief 针对不同格式的视频,重建播放器内核播放下一个视频。