@volcengine/veplayer 1.9.3 → 1.9.4-rc.1
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 +77 -4
- package/index.min.js +2 -2
- package/package.json +1 -1
- package/plugin/hls.js +1 -1
- package/plugin/hlsEncrypt.js +2 -2
- package/plugin/vestrategy_adapt_range.js +1 -0
package/index.d.ts
CHANGED
|
@@ -3069,6 +3069,16 @@ 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;
|
|
3072
3082
|
/** {zh}
|
|
3073
3083
|
* @brief 外挂字幕配置。
|
|
3074
3084
|
* @default -
|
|
@@ -3598,7 +3608,11 @@ declare enum StrategyNames {
|
|
|
3598
3608
|
/**
|
|
3599
3609
|
* 预加载
|
|
3600
3610
|
*/
|
|
3601
|
-
PRELOAD = "preload"
|
|
3611
|
+
PRELOAD = "preload",
|
|
3612
|
+
/**
|
|
3613
|
+
* Range拆分-动态Buffer
|
|
3614
|
+
*/
|
|
3615
|
+
ADAPT_RANGE = "adaptRange"
|
|
3602
3616
|
}
|
|
3603
3617
|
/**{zh}
|
|
3604
3618
|
* @hidden
|
|
@@ -3654,6 +3668,20 @@ export declare type IPreloadConfig = {
|
|
|
3654
3668
|
*/
|
|
3655
3669
|
disabled?: boolean;
|
|
3656
3670
|
};
|
|
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
|
+
};
|
|
3657
3685
|
/**{zh}
|
|
3658
3686
|
* 高级能力(策略)配置
|
|
3659
3687
|
* @detail detail
|
|
@@ -3668,6 +3696,10 @@ export declare type StrategyConfigOptions = {
|
|
|
3668
3696
|
* 预加载配置
|
|
3669
3697
|
*/
|
|
3670
3698
|
[StrategyNames.PRELOAD]?: boolean | IPreloadConfig;
|
|
3699
|
+
/**
|
|
3700
|
+
* Range拆分(动态Buffer)
|
|
3701
|
+
*/
|
|
3702
|
+
[StrategyNames.ADAPT_RANGE]?: boolean | IAdaptRangeConfig;
|
|
3671
3703
|
};
|
|
3672
3704
|
/**{zh}
|
|
3673
3705
|
* 播放器预初始化配置
|
|
@@ -3812,12 +3844,42 @@ declare class VeStrategyWrapper {
|
|
|
3812
3844
|
prepare(): Promise<boolean>;
|
|
3813
3845
|
getDeviceId(): string;
|
|
3814
3846
|
isReady(): boolean;
|
|
3815
|
-
getStrategyRecommendations(): StrategyRecommendation;
|
|
3816
|
-
getStrategyRecommendationsAsync(): Promise<StrategyRecommendation>;
|
|
3847
|
+
getStrategyRecommendations(options?: any, commonOptions?: any): StrategyRecommendation;
|
|
3848
|
+
getStrategyRecommendationsAsync(options?: any, commonOptions?: any): Promise<StrategyRecommendation>;
|
|
3817
3849
|
isHevcRecommended(): boolean;
|
|
3818
3850
|
private initPreloaderConfig;
|
|
3819
3851
|
}
|
|
3820
3852
|
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
|
+
}
|
|
3821
3883
|
declare class PlayerData {
|
|
3822
3884
|
id?: string;
|
|
3823
3885
|
root?: HTMLElement;
|
|
@@ -3861,6 +3923,8 @@ declare class PlayerData {
|
|
|
3861
3923
|
urlExpireDiff: number;
|
|
3862
3924
|
urlCheckExpireInterval: number;
|
|
3863
3925
|
};
|
|
3926
|
+
private isAutoBitrateEnable;
|
|
3927
|
+
adapter: AbstractBaseAdapter;
|
|
3864
3928
|
isBusinessDrm: boolean;
|
|
3865
3929
|
isEncrypt: boolean;
|
|
3866
3930
|
dashOpts: {
|
|
@@ -3873,6 +3937,12 @@ declare class PlayerData {
|
|
|
3873
3937
|
*/
|
|
3874
3938
|
initPlayData(configs: IPlayerConfig): void;
|
|
3875
3939
|
initPlaylistAndGetCurrent(configs: IPlayerConfig): Stream;
|
|
3940
|
+
checkAutoBitratePlayList(): boolean;
|
|
3941
|
+
getABRStreamInfo(streamType: any, originDefaultStream: any): {
|
|
3942
|
+
defaultDefinition: string;
|
|
3943
|
+
defaultStream: any;
|
|
3944
|
+
playList: Stream[];
|
|
3945
|
+
};
|
|
3876
3946
|
isCurrentH265(): boolean;
|
|
3877
3947
|
getCurrentByDefaultConfig(): Stream;
|
|
3878
3948
|
initCurrent(currentStreams: Stream): void;
|
|
@@ -3889,12 +3959,13 @@ declare class PlayerData {
|
|
|
3889
3959
|
* @description: 获取当前直播url
|
|
3890
3960
|
*/
|
|
3891
3961
|
getCurrentUrl(): Url;
|
|
3962
|
+
getTargetStreamType(stream?: Stream): string;
|
|
3892
3963
|
/**
|
|
3893
3964
|
* @description: 获取当前的streamType
|
|
3894
3965
|
*/
|
|
3895
3966
|
getCurrentStreamType(): string;
|
|
3896
3967
|
getStreamType(): string;
|
|
3897
|
-
isOpenABR(
|
|
3968
|
+
isOpenABR(): boolean;
|
|
3898
3969
|
showRealDefinition(): boolean;
|
|
3899
3970
|
isAutoDefinition(def: any): boolean;
|
|
3900
3971
|
isPlayAutoDefinition(def?: string): boolean;
|
|
@@ -3998,6 +4069,7 @@ declare enum UmdKeys {
|
|
|
3998
4069
|
VeStrategy = "vestrategy",
|
|
3999
4070
|
VeStrategyH265 = "vestrategy_h265",
|
|
4000
4071
|
VeStrategyPreload = "vestrategy_preload",
|
|
4072
|
+
VeStrategyAdaptRange = "vestrategy_adapt_range",
|
|
4001
4073
|
DashAbralgo = "DashAbralgo",
|
|
4002
4074
|
Preloader = "preloader"
|
|
4003
4075
|
}
|
|
@@ -4165,6 +4237,7 @@ declare class VePlayer {
|
|
|
4165
4237
|
* @memberof VePlayer
|
|
4166
4238
|
*/
|
|
4167
4239
|
sdkUmdLoader: umdLoader;
|
|
4240
|
+
private adapter;
|
|
4168
4241
|
/**
|
|
4169
4242
|
* @hidden
|
|
4170
4243
|
*/
|