@volcengine/veplayer 1.9.4-rc.5 → 1.9.5-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 +13 -85
- package/index.min.js +2 -2
- package/package.json +1 -1
- package/plugin/XGVideo.js +1 -2
- package/plugin/flv.js +1 -1
- package/plugin/hls.js +1 -1
- package/plugin/hlsEncrypt.js +2 -2
- package/plugin/vestrategy_adapt_range.js +0 -1
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,16 +3598,12 @@ 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
|
|
3619
3605
|
* h265策略配置
|
|
3620
|
-
* @detail
|
|
3606
|
+
* @detail detail
|
|
3621
3607
|
*/
|
|
3622
3608
|
export declare type IH265Config = {
|
|
3623
3609
|
/**
|
|
@@ -3631,7 +3617,7 @@ export declare type IH265Config = {
|
|
|
3631
3617
|
} & VeStrategyH265Config;
|
|
3632
3618
|
/**{zh}
|
|
3633
3619
|
* 预加载初始配置
|
|
3634
|
-
* @detail
|
|
3620
|
+
* @detail detail
|
|
3635
3621
|
*/
|
|
3636
3622
|
export declare type IPreloadConfig = {
|
|
3637
3623
|
/**
|
|
@@ -3668,26 +3654,13 @@ 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
|
-
* @detail
|
|
3659
|
+
* @detail detail
|
|
3688
3660
|
*/
|
|
3689
3661
|
export declare type StrategyConfigOptions = {
|
|
3690
3662
|
/**
|
|
3663
|
+
* @hidden
|
|
3691
3664
|
* h265策略配置
|
|
3692
3665
|
*/
|
|
3693
3666
|
[StrategyNames.H265]?: boolean | IH265Config;
|
|
@@ -3695,14 +3668,10 @@ export declare type StrategyConfigOptions = {
|
|
|
3695
3668
|
* 预加载配置
|
|
3696
3669
|
*/
|
|
3697
3670
|
[StrategyNames.PRELOAD]?: boolean | IPreloadConfig;
|
|
3698
|
-
/**
|
|
3699
|
-
* Range拆分(动态Buffer)
|
|
3700
|
-
*/
|
|
3701
|
-
[StrategyNames.ADAPT_RANGE]?: boolean | IAdaptRangeConfig;
|
|
3702
3671
|
};
|
|
3703
3672
|
/**{zh}
|
|
3704
3673
|
* 播放器预初始化配置
|
|
3705
|
-
* @detail
|
|
3674
|
+
* @detail detail
|
|
3706
3675
|
*/
|
|
3707
3676
|
export declare type StrategyInitOptions = {
|
|
3708
3677
|
/**
|
|
@@ -3728,7 +3697,7 @@ export declare type StrategyInitOptions = {
|
|
|
3728
3697
|
};
|
|
3729
3698
|
/**{zh}
|
|
3730
3699
|
* 预加载实例,通过预加载实例可执行一些高级方法
|
|
3731
|
-
* @detail
|
|
3700
|
+
* @detail detail
|
|
3732
3701
|
*/
|
|
3733
3702
|
export declare type PreloaderManager = {
|
|
3734
3703
|
/**
|
|
@@ -3764,7 +3733,7 @@ declare enum PreloaderStatus {
|
|
|
3764
3733
|
}
|
|
3765
3734
|
/**{zh}
|
|
3766
3735
|
* 预加载配置更新
|
|
3767
|
-
* @detail
|
|
3736
|
+
* @detail detail
|
|
3768
3737
|
*/
|
|
3769
3738
|
export declare type IPreloadUpdateConfig = {
|
|
3770
3739
|
/**
|
|
@@ -3778,7 +3747,7 @@ export declare type IPreloadUpdateConfig = {
|
|
|
3778
3747
|
};
|
|
3779
3748
|
/**{zh}
|
|
3780
3749
|
* 预加载视频资源
|
|
3781
|
-
* @detail
|
|
3750
|
+
* @detail detail
|
|
3782
3751
|
*/
|
|
3783
3752
|
export declare type IPreloadStream = {
|
|
3784
3753
|
/**
|
|
@@ -3843,42 +3812,12 @@ declare class VeStrategyWrapper {
|
|
|
3843
3812
|
prepare(): Promise<boolean>;
|
|
3844
3813
|
getDeviceId(): string;
|
|
3845
3814
|
isReady(): boolean;
|
|
3846
|
-
getStrategyRecommendations(
|
|
3847
|
-
getStrategyRecommendationsAsync(
|
|
3815
|
+
getStrategyRecommendations(): StrategyRecommendation;
|
|
3816
|
+
getStrategyRecommendationsAsync(): Promise<StrategyRecommendation>;
|
|
3848
3817
|
isHevcRecommended(): boolean;
|
|
3849
3818
|
private initPreloaderConfig;
|
|
3850
3819
|
}
|
|
3851
3820
|
declare const _default: VeStrategyWrapper;
|
|
3852
|
-
export interface IAdaptRangeDefaultOptions {
|
|
3853
|
-
maxTargetCacheDur: number;
|
|
3854
|
-
minTargetCacheDur: number;
|
|
3855
|
-
rangeMaxDuration: number;
|
|
3856
|
-
rangeMinDuration: number;
|
|
3857
|
-
cacheSafeFactor: number;
|
|
3858
|
-
estPTcontrol: boolean;
|
|
3859
|
-
estPlayTime: number;
|
|
3860
|
-
minBandwidth: number;
|
|
3861
|
-
minDangerThreshold: number;
|
|
3862
|
-
rangeControl: boolean;
|
|
3863
|
-
rangeMinSize: number;
|
|
3864
|
-
safeFactor: number;
|
|
3865
|
-
targetCacheControl: boolean;
|
|
3866
|
-
}
|
|
3867
|
-
declare abstract class AbstractBaseAdapter {
|
|
3868
|
-
isLive: boolean;
|
|
3869
|
-
playerData: any;
|
|
3870
|
-
streamType: string;
|
|
3871
|
-
constructor(options: any);
|
|
3872
|
-
abstract canOpenAbr(): boolean;
|
|
3873
|
-
abstract applyAbrPluginConfig(_finalOptions: any, _autoBitrateOpts: any): void;
|
|
3874
|
-
abstract prepareAbrModule(_playerData: any, _sdkUmdLoader: any): void;
|
|
3875
|
-
abstract needAbrAutoDefinition(): boolean;
|
|
3876
|
-
abstract setAbrDefaultDefiWithAuto(): boolean;
|
|
3877
|
-
abstract canAdaptRangeEnable(): boolean;
|
|
3878
|
-
abstract adaptRangeDefaultOptions(): IAdaptRangeDefaultOptions | undefined;
|
|
3879
|
-
abstract applyAdaptRangePluginConfig(_finalOptions: any, _adaptRangeOptions: any): void;
|
|
3880
|
-
abstract applyAdaptRangeStrategy(_finalOptions: any, _adaptRangeOptions: any): void;
|
|
3881
|
-
}
|
|
3882
3821
|
declare class PlayerData {
|
|
3883
3822
|
id?: string;
|
|
3884
3823
|
root?: HTMLElement;
|
|
@@ -3922,8 +3861,6 @@ declare class PlayerData {
|
|
|
3922
3861
|
urlExpireDiff: number;
|
|
3923
3862
|
urlCheckExpireInterval: number;
|
|
3924
3863
|
};
|
|
3925
|
-
private isAutoBitrateEnable;
|
|
3926
|
-
adapter: AbstractBaseAdapter;
|
|
3927
3864
|
isBusinessDrm: boolean;
|
|
3928
3865
|
isEncrypt: boolean;
|
|
3929
3866
|
dashOpts: {
|
|
@@ -3936,12 +3873,6 @@ declare class PlayerData {
|
|
|
3936
3873
|
*/
|
|
3937
3874
|
initPlayData(configs: IPlayerConfig): void;
|
|
3938
3875
|
initPlaylistAndGetCurrent(configs: IPlayerConfig): Stream;
|
|
3939
|
-
checkAutoBitratePlayList(): boolean;
|
|
3940
|
-
getABRStreamInfo(streamType: any, originDefaultStream: any): {
|
|
3941
|
-
defaultDefinition: string;
|
|
3942
|
-
defaultStream: any;
|
|
3943
|
-
playList: Stream[];
|
|
3944
|
-
};
|
|
3945
3876
|
isCurrentH265(): boolean;
|
|
3946
3877
|
getCurrentByDefaultConfig(): Stream;
|
|
3947
3878
|
initCurrent(currentStreams: Stream): void;
|
|
@@ -3958,13 +3889,12 @@ declare class PlayerData {
|
|
|
3958
3889
|
* @description: 获取当前直播url
|
|
3959
3890
|
*/
|
|
3960
3891
|
getCurrentUrl(): Url;
|
|
3961
|
-
getTargetStreamType(stream?: Stream): string;
|
|
3962
3892
|
/**
|
|
3963
3893
|
* @description: 获取当前的streamType
|
|
3964
3894
|
*/
|
|
3965
3895
|
getCurrentStreamType(): string;
|
|
3966
3896
|
getStreamType(): string;
|
|
3967
|
-
isOpenABR(): boolean;
|
|
3897
|
+
isOpenABR(streamType?: string): boolean;
|
|
3968
3898
|
showRealDefinition(): boolean;
|
|
3969
3899
|
isAutoDefinition(def: any): boolean;
|
|
3970
3900
|
isPlayAutoDefinition(def?: string): boolean;
|
|
@@ -4068,7 +3998,6 @@ declare enum UmdKeys {
|
|
|
4068
3998
|
VeStrategy = "vestrategy",
|
|
4069
3999
|
VeStrategyH265 = "vestrategy_h265",
|
|
4070
4000
|
VeStrategyPreload = "vestrategy_preload",
|
|
4071
|
-
VeStrategyAdaptRange = "vestrategy_adapt_range",
|
|
4072
4001
|
DashAbralgo = "DashAbralgo",
|
|
4073
4002
|
Preloader = "preloader"
|
|
4074
4003
|
}
|
|
@@ -4236,7 +4165,6 @@ declare class VePlayer {
|
|
|
4236
4165
|
* @memberof VePlayer
|
|
4237
4166
|
*/
|
|
4238
4167
|
sdkUmdLoader: umdLoader;
|
|
4239
|
-
private adapter;
|
|
4240
4168
|
/**
|
|
4241
4169
|
* @hidden
|
|
4242
4170
|
*/
|
|
@@ -4256,7 +4184,7 @@ declare class VePlayer {
|
|
|
4256
4184
|
*/
|
|
4257
4185
|
static sdkVersion: string;
|
|
4258
4186
|
/**{zh}
|
|
4259
|
-
* @brief
|
|
4187
|
+
* @brief 播放器预初始化配置
|
|
4260
4188
|
* @param options 初始化配置,详情见{@link StrategyInitOptions}
|
|
4261
4189
|
*/
|
|
4262
4190
|
static prepare(options: StrategyInitOptions): Promise<void>;
|