@byteplus/veplayer 2.3.1-rc.4 → 2.4.0-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/esm/index.d.ts +17 -8
- package/esm/veplayer.biz.live.development.js +91 -20
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +139 -16
- package/esm/veplayer.development.css +1 -1
- package/esm/veplayer.development.js +227 -101
- package/esm/veplayer.live.d.ts +139 -16
- package/esm/veplayer.live.development.css +1 -1
- package/esm/veplayer.live.development.js +227 -101
- package/esm/veplayer.live.production.css +1 -1
- package/esm/veplayer.live.production.js +3 -3
- package/esm/veplayer.production.css +1 -1
- package/esm/veplayer.production.js +3 -3
- package/esm/veplayer.vod.d.ts +17 -8
- package/esm/veplayer.vod.development.css +1 -1
- package/esm/veplayer.vod.development.js +168 -69
- package/esm/veplayer.vod.production.css +1 -1
- package/esm/veplayer.vod.production.js +2 -2
- package/package.json +1 -1
- package/umd/index.d.ts +17 -8
- package/umd/veplayer.biz.live.development.js +91 -20
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +139 -16
- package/umd/veplayer.development.css +1 -1
- package/umd/veplayer.development.js +227 -101
- package/umd/veplayer.live.d.ts +139 -16
- package/umd/veplayer.live.development.css +1 -1
- package/umd/veplayer.live.development.js +227 -101
- package/umd/veplayer.live.production.css +1 -1
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.css +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +17 -8
- package/umd/veplayer.vod.development.css +1 -1
- package/umd/veplayer.vod.development.js +168 -69
- package/umd/veplayer.vod.production.css +1 -1
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +139 -16
- package/veplayer.live.d.ts +139 -16
- package/veplayer.vod.d.ts +17 -8
package/veplayer.d.ts
CHANGED
|
@@ -2332,11 +2332,11 @@ declare enum DynamicModule {
|
|
|
2332
2332
|
PluginFlv = "plugin:flv",
|
|
2333
2333
|
PluginMp4 = "plugin:mp4",
|
|
2334
2334
|
PluginHls = "plugin:hls",
|
|
2335
|
-
PluginHlsJs = "plugin:hlsjs",
|
|
2336
2335
|
PluginShaka = "plugin:shaka",
|
|
2337
2336
|
PluginRtm = "plugin:rtm",
|
|
2338
2337
|
PluginXgvideo = "plugin:xgvideo",
|
|
2339
|
-
PluginDrm = "plugin:drm"
|
|
2338
|
+
PluginDrm = "plugin:drm",
|
|
2339
|
+
PluginAbr = "plugin:abr"
|
|
2340
2340
|
}
|
|
2341
2341
|
type ModulesMap = {
|
|
2342
2342
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -2344,11 +2344,11 @@ type ModulesMap = {
|
|
|
2344
2344
|
[DynamicModule.PluginFlv]: Exports;
|
|
2345
2345
|
[DynamicModule.PluginMp4]: Exports;
|
|
2346
2346
|
[DynamicModule.PluginHls]: Exports;
|
|
2347
|
-
[DynamicModule.PluginHlsJs]: Exports;
|
|
2348
2347
|
[DynamicModule.PluginShaka]: Exports;
|
|
2349
2348
|
[DynamicModule.PluginRtm]: Exports;
|
|
2350
2349
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
2351
2350
|
[DynamicModule.PluginDrm]: Exports;
|
|
2351
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
2352
2352
|
};
|
|
2353
2353
|
declare const registerPlugin: (name: string, exports: {
|
|
2354
2354
|
[x: string]: any;
|
|
@@ -4069,11 +4069,11 @@ declare namespace strategy {
|
|
|
4069
4069
|
readonly "plugin:flv": "veplayer.plugin.flv.[env].[ext]";
|
|
4070
4070
|
readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
|
|
4071
4071
|
readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
|
|
4072
|
-
readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
|
|
4073
4072
|
readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
|
|
4074
4073
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
4075
4074
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
4076
4075
|
readonly "plugin:drm": "veplayer.plugin.drm.[env].[ext]";
|
|
4076
|
+
readonly "plugin:abr": "veplayer.plugin.abr.[env].[ext]";
|
|
4077
4077
|
};
|
|
4078
4078
|
const enum State {
|
|
4079
4079
|
Fetching = 0,
|
|
@@ -4100,11 +4100,11 @@ declare namespace strategy {
|
|
|
4100
4100
|
PluginFlv = "plugin:flv",
|
|
4101
4101
|
PluginMp4 = "plugin:mp4",
|
|
4102
4102
|
PluginHls = "plugin:hls",
|
|
4103
|
-
PluginHlsJs = "plugin:hlsjs",
|
|
4104
4103
|
PluginShaka = "plugin:shaka",
|
|
4105
4104
|
PluginRtm = "plugin:rtm",
|
|
4106
4105
|
PluginXgvideo = "plugin:xgvideo",
|
|
4107
|
-
PluginDrm = "plugin:drm"
|
|
4106
|
+
PluginDrm = "plugin:drm",
|
|
4107
|
+
PluginAbr = "plugin:abr"
|
|
4108
4108
|
}
|
|
4109
4109
|
type ModulesMap = {
|
|
4110
4110
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -4112,11 +4112,11 @@ declare namespace strategy {
|
|
|
4112
4112
|
[DynamicModule.PluginFlv]: Exports;
|
|
4113
4113
|
[DynamicModule.PluginMp4]: Exports;
|
|
4114
4114
|
[DynamicModule.PluginHls]: Exports;
|
|
4115
|
-
[DynamicModule.PluginHlsJs]: Exports;
|
|
4116
4115
|
[DynamicModule.PluginShaka]: Exports;
|
|
4117
4116
|
[DynamicModule.PluginRtm]: Exports;
|
|
4118
4117
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
4119
4118
|
[DynamicModule.PluginDrm]: Exports;
|
|
4119
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
4120
4120
|
};
|
|
4121
4121
|
class Loader {
|
|
4122
4122
|
readonly modules: Record<string, Module>;
|
|
@@ -4154,7 +4154,7 @@ declare namespace strategy {
|
|
|
4154
4154
|
}
|
|
4155
4155
|
type StrategyCreator<T, R extends keyof ModulesMap = any> = (options?: T) => Strategy<T, R>;
|
|
4156
4156
|
const createFlvMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginFlv>;
|
|
4157
|
-
const createHlsMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginHls
|
|
4157
|
+
const createHlsMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginHls>;
|
|
4158
4158
|
const createSoftDecodeH264Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
4159
4159
|
const createSoftDecodeH265Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
4160
4160
|
function getCodec(options: VePlayerBaseOptions): Promise<"unknown" | Codec>;
|
|
@@ -4893,6 +4893,9 @@ declare namespace event {
|
|
|
4893
4893
|
AUTOPLAY_SUCCESS: string;
|
|
4894
4894
|
ERROR_REFRESH_CLICK: string;
|
|
4895
4895
|
SOURCE_CHANGE: string;
|
|
4896
|
+
SWITCH_DEFINITION_START: string;
|
|
4897
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
4898
|
+
DOWN_DEFINITION: string;
|
|
4896
4899
|
};
|
|
4897
4900
|
const Events: {
|
|
4898
4901
|
SEI: string;
|
|
@@ -4918,6 +4921,9 @@ declare namespace event {
|
|
|
4918
4921
|
AUTOPLAY_SUCCESS: string;
|
|
4919
4922
|
ERROR_REFRESH_CLICK: string;
|
|
4920
4923
|
SOURCE_CHANGE: string;
|
|
4924
|
+
SWITCH_DEFINITION_START: string;
|
|
4925
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
4926
|
+
DOWN_DEFINITION: string;
|
|
4921
4927
|
REPLAY: string;
|
|
4922
4928
|
ERROR: string;
|
|
4923
4929
|
PLAY: string;
|
|
@@ -4949,6 +4955,9 @@ declare namespace event {
|
|
|
4949
4955
|
COMPLETE: string;
|
|
4950
4956
|
DESTROY: string;
|
|
4951
4957
|
URL_CHANGE: string;
|
|
4958
|
+
LEAVE_PLAYER: string;
|
|
4959
|
+
ENTER_PLAYER: string;
|
|
4960
|
+
LOADING: string;
|
|
4952
4961
|
SEI_PARSED: string;
|
|
4953
4962
|
RETRY: string;
|
|
4954
4963
|
ROTATE: string;
|
|
@@ -5290,6 +5299,21 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5290
5299
|
*/
|
|
5291
5300
|
drm?: Drm;
|
|
5292
5301
|
}
|
|
5302
|
+
interface Abr {
|
|
5303
|
+
enable?: boolean;
|
|
5304
|
+
downTip?: boolean;
|
|
5305
|
+
debug?: boolean;
|
|
5306
|
+
bitrate: number;
|
|
5307
|
+
urls: {
|
|
5308
|
+
[bitrate: number]: string;
|
|
5309
|
+
};
|
|
5310
|
+
}
|
|
5311
|
+
interface HlsAbr {
|
|
5312
|
+
enable?: boolean;
|
|
5313
|
+
downTip?: boolean;
|
|
5314
|
+
debug?: boolean;
|
|
5315
|
+
bitrate: number;
|
|
5316
|
+
}
|
|
5293
5317
|
/** {zh}
|
|
5294
5318
|
* @hidden
|
|
5295
5319
|
* @list option
|
|
@@ -5534,6 +5558,7 @@ interface Flv {
|
|
|
5534
5558
|
* @hidden
|
|
5535
5559
|
*/
|
|
5536
5560
|
abrPts?: string | number;
|
|
5561
|
+
abr?: Abr;
|
|
5537
5562
|
}
|
|
5538
5563
|
/** {zh}
|
|
5539
5564
|
* @list option
|
|
@@ -5584,8 +5609,7 @@ interface Hls {
|
|
|
5584
5609
|
* @default false
|
|
5585
5610
|
*/
|
|
5586
5611
|
enableMSE?: boolean;
|
|
5587
|
-
|
|
5588
|
-
hlsOpts?: any;
|
|
5612
|
+
abr?: HlsAbr;
|
|
5589
5613
|
}
|
|
5590
5614
|
/** {zh}
|
|
5591
5615
|
* @detail api
|
|
@@ -5637,11 +5661,50 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5637
5661
|
*
|
|
5638
5662
|
*/
|
|
5639
5663
|
closeInfoPanel(): void;
|
|
5664
|
+
openAbr(): void;
|
|
5665
|
+
closeAbr(): void;
|
|
5640
5666
|
/** {zh}
|
|
5641
5667
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
5642
5668
|
* @hidden
|
|
5643
5669
|
*/
|
|
5644
5670
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
5671
|
+
switch(target: string | {
|
|
5672
|
+
/** {zh}
|
|
5673
|
+
* @brief 清晰度的唯一标识。
|
|
5674
|
+
* @default 无
|
|
5675
|
+
*/
|
|
5676
|
+
/** {en}
|
|
5677
|
+
* @brief The resolution ID.
|
|
5678
|
+
*/
|
|
5679
|
+
definition?: string;
|
|
5680
|
+
/** {zh}
|
|
5681
|
+
* @brief 线路的唯一标识。
|
|
5682
|
+
* @default 无
|
|
5683
|
+
*/
|
|
5684
|
+
/** {en}
|
|
5685
|
+
* @brief The playback source ID.
|
|
5686
|
+
*/
|
|
5687
|
+
source?: string;
|
|
5688
|
+
}, options?: {
|
|
5689
|
+
/** {zh}
|
|
5690
|
+
* @brief 清晰度 definition 配置无效时,是否降级到播放列表第一个清晰度地址。
|
|
5691
|
+
* @default false
|
|
5692
|
+
*
|
|
5693
|
+
*/
|
|
5694
|
+
/** {en}
|
|
5695
|
+
* @brief Whether to downgrade to the first resolution in the playlist when the player cannot play with the specified resolution.
|
|
5696
|
+
* @default false
|
|
5697
|
+
*
|
|
5698
|
+
*/
|
|
5699
|
+
fallbackToFirstDefinition?: boolean;
|
|
5700
|
+
abr: {
|
|
5701
|
+
bitrate: number; // 默认起播的码率,必传
|
|
5702
|
+
method?: number; // 选择abr算法编号
|
|
5703
|
+
urls: {
|
|
5704
|
+
[bitrate: number]: string;
|
|
5705
|
+
}; // 可用的码率和对应的拉流地址
|
|
5706
|
+
};
|
|
5707
|
+
}): Promise<any>;
|
|
5645
5708
|
}
|
|
5646
5709
|
/** {zh}
|
|
5647
5710
|
* @detail api
|
|
@@ -7320,6 +7383,9 @@ declare namespace live {
|
|
|
7320
7383
|
AUTOPLAY_SUCCESS: string;
|
|
7321
7384
|
ERROR_REFRESH_CLICK: string;
|
|
7322
7385
|
SOURCE_CHANGE: string;
|
|
7386
|
+
SWITCH_DEFINITION_START: string;
|
|
7387
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
7388
|
+
DOWN_DEFINITION: string;
|
|
7323
7389
|
REPLAY: string;
|
|
7324
7390
|
ERROR: string;
|
|
7325
7391
|
PLAY: string;
|
|
@@ -7351,6 +7417,9 @@ declare namespace live {
|
|
|
7351
7417
|
COMPLETE: string;
|
|
7352
7418
|
DESTROY: string;
|
|
7353
7419
|
URL_CHANGE: string;
|
|
7420
|
+
LEAVE_PLAYER: string;
|
|
7421
|
+
ENTER_PLAYER: string;
|
|
7422
|
+
LOADING: string;
|
|
7354
7423
|
SEI_PARSED: string;
|
|
7355
7424
|
RETRY: string;
|
|
7356
7425
|
ROTATE: string;
|
|
@@ -8949,11 +9018,11 @@ declare namespace live {
|
|
|
8949
9018
|
readonly "plugin:flv": "veplayer.plugin.flv.[env].[ext]";
|
|
8950
9019
|
readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
|
|
8951
9020
|
readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
|
|
8952
|
-
readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
|
|
8953
9021
|
readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
|
|
8954
9022
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
8955
9023
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
8956
9024
|
readonly "plugin:drm": "veplayer.plugin.drm.[env].[ext]";
|
|
9025
|
+
readonly "plugin:abr": "veplayer.plugin.abr.[env].[ext]";
|
|
8957
9026
|
};
|
|
8958
9027
|
const enum State {
|
|
8959
9028
|
Fetching = 0,
|
|
@@ -8980,11 +9049,11 @@ declare namespace live {
|
|
|
8980
9049
|
PluginFlv = "plugin:flv",
|
|
8981
9050
|
PluginMp4 = "plugin:mp4",
|
|
8982
9051
|
PluginHls = "plugin:hls",
|
|
8983
|
-
PluginHlsJs = "plugin:hlsjs",
|
|
8984
9052
|
PluginShaka = "plugin:shaka",
|
|
8985
9053
|
PluginRtm = "plugin:rtm",
|
|
8986
9054
|
PluginXgvideo = "plugin:xgvideo",
|
|
8987
|
-
PluginDrm = "plugin:drm"
|
|
9055
|
+
PluginDrm = "plugin:drm",
|
|
9056
|
+
PluginAbr = "plugin:abr"
|
|
8988
9057
|
}
|
|
8989
9058
|
type ModulesMap = {
|
|
8990
9059
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -8992,11 +9061,11 @@ declare namespace live {
|
|
|
8992
9061
|
[DynamicModule.PluginFlv]: Exports;
|
|
8993
9062
|
[DynamicModule.PluginMp4]: Exports;
|
|
8994
9063
|
[DynamicModule.PluginHls]: Exports;
|
|
8995
|
-
[DynamicModule.PluginHlsJs]: Exports;
|
|
8996
9064
|
[DynamicModule.PluginShaka]: Exports;
|
|
8997
9065
|
[DynamicModule.PluginRtm]: Exports;
|
|
8998
9066
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
8999
9067
|
[DynamicModule.PluginDrm]: Exports;
|
|
9068
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
9000
9069
|
};
|
|
9001
9070
|
class Loader {
|
|
9002
9071
|
readonly modules: Record<string, Module>;
|
|
@@ -9778,6 +9847,21 @@ declare namespace live {
|
|
|
9778
9847
|
*/
|
|
9779
9848
|
drm?: Drm;
|
|
9780
9849
|
}
|
|
9850
|
+
interface Abr {
|
|
9851
|
+
enable?: boolean;
|
|
9852
|
+
downTip?: boolean;
|
|
9853
|
+
debug?: boolean;
|
|
9854
|
+
bitrate: number;
|
|
9855
|
+
urls: {
|
|
9856
|
+
[bitrate: number]: string;
|
|
9857
|
+
};
|
|
9858
|
+
}
|
|
9859
|
+
interface HlsAbr {
|
|
9860
|
+
enable?: boolean;
|
|
9861
|
+
downTip?: boolean;
|
|
9862
|
+
debug?: boolean;
|
|
9863
|
+
bitrate: number;
|
|
9864
|
+
}
|
|
9781
9865
|
/** {zh}
|
|
9782
9866
|
* @hidden
|
|
9783
9867
|
* @list option
|
|
@@ -10022,6 +10106,7 @@ declare namespace live {
|
|
|
10022
10106
|
* @hidden
|
|
10023
10107
|
*/
|
|
10024
10108
|
abrPts?: string | number;
|
|
10109
|
+
abr?: Abr;
|
|
10025
10110
|
}
|
|
10026
10111
|
/** {zh}
|
|
10027
10112
|
* @list option
|
|
@@ -10072,8 +10157,7 @@ declare namespace live {
|
|
|
10072
10157
|
* @default false
|
|
10073
10158
|
*/
|
|
10074
10159
|
enableMSE?: boolean;
|
|
10075
|
-
|
|
10076
|
-
hlsOpts?: any;
|
|
10160
|
+
abr?: HlsAbr;
|
|
10077
10161
|
}
|
|
10078
10162
|
/** {zh}
|
|
10079
10163
|
* @detail api
|
|
@@ -10125,11 +10209,50 @@ declare namespace live {
|
|
|
10125
10209
|
*
|
|
10126
10210
|
*/
|
|
10127
10211
|
closeInfoPanel(): void;
|
|
10212
|
+
openAbr(): void;
|
|
10213
|
+
closeAbr(): void;
|
|
10128
10214
|
/** {zh}
|
|
10129
10215
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
10130
10216
|
* @hidden
|
|
10131
10217
|
*/
|
|
10132
10218
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
10219
|
+
switch(target: string | {
|
|
10220
|
+
/** {zh}
|
|
10221
|
+
* @brief 清晰度的唯一标识。
|
|
10222
|
+
* @default 无
|
|
10223
|
+
*/
|
|
10224
|
+
/** {en}
|
|
10225
|
+
* @brief The resolution ID.
|
|
10226
|
+
*/
|
|
10227
|
+
definition?: string;
|
|
10228
|
+
/** {zh}
|
|
10229
|
+
* @brief 线路的唯一标识。
|
|
10230
|
+
* @default 无
|
|
10231
|
+
*/
|
|
10232
|
+
/** {en}
|
|
10233
|
+
* @brief The playback source ID.
|
|
10234
|
+
*/
|
|
10235
|
+
source?: string;
|
|
10236
|
+
}, options?: {
|
|
10237
|
+
/** {zh}
|
|
10238
|
+
* @brief 清晰度 definition 配置无效时,是否降级到播放列表第一个清晰度地址。
|
|
10239
|
+
* @default false
|
|
10240
|
+
*
|
|
10241
|
+
*/
|
|
10242
|
+
/** {en}
|
|
10243
|
+
* @brief Whether to downgrade to the first resolution in the playlist when the player cannot play with the specified resolution.
|
|
10244
|
+
* @default false
|
|
10245
|
+
*
|
|
10246
|
+
*/
|
|
10247
|
+
fallbackToFirstDefinition?: boolean;
|
|
10248
|
+
abr: {
|
|
10249
|
+
bitrate: number; // 默认起播的码率,必传
|
|
10250
|
+
method?: number; // 选择abr算法编号
|
|
10251
|
+
urls: {
|
|
10252
|
+
[bitrate: number]: string;
|
|
10253
|
+
}; // 可用的码率和对应的拉流地址
|
|
10254
|
+
};
|
|
10255
|
+
}): Promise<any>;
|
|
10133
10256
|
}
|
|
10134
10257
|
/** {zh}
|
|
10135
10258
|
* @detail api
|
package/veplayer.live.d.ts
CHANGED
|
@@ -2332,11 +2332,11 @@ declare enum DynamicModule {
|
|
|
2332
2332
|
PluginFlv = "plugin:flv",
|
|
2333
2333
|
PluginMp4 = "plugin:mp4",
|
|
2334
2334
|
PluginHls = "plugin:hls",
|
|
2335
|
-
PluginHlsJs = "plugin:hlsjs",
|
|
2336
2335
|
PluginShaka = "plugin:shaka",
|
|
2337
2336
|
PluginRtm = "plugin:rtm",
|
|
2338
2337
|
PluginXgvideo = "plugin:xgvideo",
|
|
2339
|
-
PluginDrm = "plugin:drm"
|
|
2338
|
+
PluginDrm = "plugin:drm",
|
|
2339
|
+
PluginAbr = "plugin:abr"
|
|
2340
2340
|
}
|
|
2341
2341
|
type ModulesMap = {
|
|
2342
2342
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -2344,11 +2344,11 @@ type ModulesMap = {
|
|
|
2344
2344
|
[DynamicModule.PluginFlv]: Exports;
|
|
2345
2345
|
[DynamicModule.PluginMp4]: Exports;
|
|
2346
2346
|
[DynamicModule.PluginHls]: Exports;
|
|
2347
|
-
[DynamicModule.PluginHlsJs]: Exports;
|
|
2348
2347
|
[DynamicModule.PluginShaka]: Exports;
|
|
2349
2348
|
[DynamicModule.PluginRtm]: Exports;
|
|
2350
2349
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
2351
2350
|
[DynamicModule.PluginDrm]: Exports;
|
|
2351
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
2352
2352
|
};
|
|
2353
2353
|
declare const registerPlugin: (name: string, exports: {
|
|
2354
2354
|
[x: string]: any;
|
|
@@ -4069,11 +4069,11 @@ declare namespace strategy {
|
|
|
4069
4069
|
readonly "plugin:flv": "veplayer.plugin.flv.[env].[ext]";
|
|
4070
4070
|
readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
|
|
4071
4071
|
readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
|
|
4072
|
-
readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
|
|
4073
4072
|
readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
|
|
4074
4073
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
4075
4074
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
4076
4075
|
readonly "plugin:drm": "veplayer.plugin.drm.[env].[ext]";
|
|
4076
|
+
readonly "plugin:abr": "veplayer.plugin.abr.[env].[ext]";
|
|
4077
4077
|
};
|
|
4078
4078
|
const enum State {
|
|
4079
4079
|
Fetching = 0,
|
|
@@ -4100,11 +4100,11 @@ declare namespace strategy {
|
|
|
4100
4100
|
PluginFlv = "plugin:flv",
|
|
4101
4101
|
PluginMp4 = "plugin:mp4",
|
|
4102
4102
|
PluginHls = "plugin:hls",
|
|
4103
|
-
PluginHlsJs = "plugin:hlsjs",
|
|
4104
4103
|
PluginShaka = "plugin:shaka",
|
|
4105
4104
|
PluginRtm = "plugin:rtm",
|
|
4106
4105
|
PluginXgvideo = "plugin:xgvideo",
|
|
4107
|
-
PluginDrm = "plugin:drm"
|
|
4106
|
+
PluginDrm = "plugin:drm",
|
|
4107
|
+
PluginAbr = "plugin:abr"
|
|
4108
4108
|
}
|
|
4109
4109
|
type ModulesMap = {
|
|
4110
4110
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -4112,11 +4112,11 @@ declare namespace strategy {
|
|
|
4112
4112
|
[DynamicModule.PluginFlv]: Exports;
|
|
4113
4113
|
[DynamicModule.PluginMp4]: Exports;
|
|
4114
4114
|
[DynamicModule.PluginHls]: Exports;
|
|
4115
|
-
[DynamicModule.PluginHlsJs]: Exports;
|
|
4116
4115
|
[DynamicModule.PluginShaka]: Exports;
|
|
4117
4116
|
[DynamicModule.PluginRtm]: Exports;
|
|
4118
4117
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
4119
4118
|
[DynamicModule.PluginDrm]: Exports;
|
|
4119
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
4120
4120
|
};
|
|
4121
4121
|
class Loader {
|
|
4122
4122
|
readonly modules: Record<string, Module>;
|
|
@@ -4154,7 +4154,7 @@ declare namespace strategy {
|
|
|
4154
4154
|
}
|
|
4155
4155
|
type StrategyCreator<T, R extends keyof ModulesMap = any> = (options?: T) => Strategy<T, R>;
|
|
4156
4156
|
const createFlvMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginFlv>;
|
|
4157
|
-
const createHlsMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginHls
|
|
4157
|
+
const createHlsMseStrategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginHls>;
|
|
4158
4158
|
const createSoftDecodeH264Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
4159
4159
|
const createSoftDecodeH265Strategy: StrategyCreator<VePlayerBaseOptions, DynamicModule.PluginXgvideo>;
|
|
4160
4160
|
function getCodec(options: VePlayerBaseOptions): Promise<"unknown" | Codec>;
|
|
@@ -4893,6 +4893,9 @@ declare namespace event {
|
|
|
4893
4893
|
AUTOPLAY_SUCCESS: string;
|
|
4894
4894
|
ERROR_REFRESH_CLICK: string;
|
|
4895
4895
|
SOURCE_CHANGE: string;
|
|
4896
|
+
SWITCH_DEFINITION_START: string;
|
|
4897
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
4898
|
+
DOWN_DEFINITION: string;
|
|
4896
4899
|
};
|
|
4897
4900
|
const Events: {
|
|
4898
4901
|
SEI: string;
|
|
@@ -4918,6 +4921,9 @@ declare namespace event {
|
|
|
4918
4921
|
AUTOPLAY_SUCCESS: string;
|
|
4919
4922
|
ERROR_REFRESH_CLICK: string;
|
|
4920
4923
|
SOURCE_CHANGE: string;
|
|
4924
|
+
SWITCH_DEFINITION_START: string;
|
|
4925
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
4926
|
+
DOWN_DEFINITION: string;
|
|
4921
4927
|
REPLAY: string;
|
|
4922
4928
|
ERROR: string;
|
|
4923
4929
|
PLAY: string;
|
|
@@ -4949,6 +4955,9 @@ declare namespace event {
|
|
|
4949
4955
|
COMPLETE: string;
|
|
4950
4956
|
DESTROY: string;
|
|
4951
4957
|
URL_CHANGE: string;
|
|
4958
|
+
LEAVE_PLAYER: string;
|
|
4959
|
+
ENTER_PLAYER: string;
|
|
4960
|
+
LOADING: string;
|
|
4952
4961
|
SEI_PARSED: string;
|
|
4953
4962
|
RETRY: string;
|
|
4954
4963
|
ROTATE: string;
|
|
@@ -5290,6 +5299,21 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5290
5299
|
*/
|
|
5291
5300
|
drm?: Drm;
|
|
5292
5301
|
}
|
|
5302
|
+
interface Abr {
|
|
5303
|
+
enable?: boolean;
|
|
5304
|
+
downTip?: boolean;
|
|
5305
|
+
debug?: boolean;
|
|
5306
|
+
bitrate: number;
|
|
5307
|
+
urls: {
|
|
5308
|
+
[bitrate: number]: string;
|
|
5309
|
+
};
|
|
5310
|
+
}
|
|
5311
|
+
interface HlsAbr {
|
|
5312
|
+
enable?: boolean;
|
|
5313
|
+
downTip?: boolean;
|
|
5314
|
+
debug?: boolean;
|
|
5315
|
+
bitrate: number;
|
|
5316
|
+
}
|
|
5293
5317
|
/** {zh}
|
|
5294
5318
|
* @hidden
|
|
5295
5319
|
* @list option
|
|
@@ -5534,6 +5558,7 @@ interface Flv {
|
|
|
5534
5558
|
* @hidden
|
|
5535
5559
|
*/
|
|
5536
5560
|
abrPts?: string | number;
|
|
5561
|
+
abr?: Abr;
|
|
5537
5562
|
}
|
|
5538
5563
|
/** {zh}
|
|
5539
5564
|
* @list option
|
|
@@ -5584,8 +5609,7 @@ interface Hls {
|
|
|
5584
5609
|
* @default false
|
|
5585
5610
|
*/
|
|
5586
5611
|
enableMSE?: boolean;
|
|
5587
|
-
|
|
5588
|
-
hlsOpts?: any;
|
|
5612
|
+
abr?: HlsAbr;
|
|
5589
5613
|
}
|
|
5590
5614
|
/** {zh}
|
|
5591
5615
|
* @detail api
|
|
@@ -5637,11 +5661,50 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5637
5661
|
*
|
|
5638
5662
|
*/
|
|
5639
5663
|
closeInfoPanel(): void;
|
|
5664
|
+
openAbr(): void;
|
|
5665
|
+
closeAbr(): void;
|
|
5640
5666
|
/** {zh}
|
|
5641
5667
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
5642
5668
|
* @hidden
|
|
5643
5669
|
*/
|
|
5644
5670
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
5671
|
+
switch(target: string | {
|
|
5672
|
+
/** {zh}
|
|
5673
|
+
* @brief 清晰度的唯一标识。
|
|
5674
|
+
* @default 无
|
|
5675
|
+
*/
|
|
5676
|
+
/** {en}
|
|
5677
|
+
* @brief The resolution ID.
|
|
5678
|
+
*/
|
|
5679
|
+
definition?: string;
|
|
5680
|
+
/** {zh}
|
|
5681
|
+
* @brief 线路的唯一标识。
|
|
5682
|
+
* @default 无
|
|
5683
|
+
*/
|
|
5684
|
+
/** {en}
|
|
5685
|
+
* @brief The playback source ID.
|
|
5686
|
+
*/
|
|
5687
|
+
source?: string;
|
|
5688
|
+
}, options?: {
|
|
5689
|
+
/** {zh}
|
|
5690
|
+
* @brief 清晰度 definition 配置无效时,是否降级到播放列表第一个清晰度地址。
|
|
5691
|
+
* @default false
|
|
5692
|
+
*
|
|
5693
|
+
*/
|
|
5694
|
+
/** {en}
|
|
5695
|
+
* @brief Whether to downgrade to the first resolution in the playlist when the player cannot play with the specified resolution.
|
|
5696
|
+
* @default false
|
|
5697
|
+
*
|
|
5698
|
+
*/
|
|
5699
|
+
fallbackToFirstDefinition?: boolean;
|
|
5700
|
+
abr: {
|
|
5701
|
+
bitrate: number; // 默认起播的码率,必传
|
|
5702
|
+
method?: number; // 选择abr算法编号
|
|
5703
|
+
urls: {
|
|
5704
|
+
[bitrate: number]: string;
|
|
5705
|
+
}; // 可用的码率和对应的拉流地址
|
|
5706
|
+
};
|
|
5707
|
+
}): Promise<any>;
|
|
5645
5708
|
}
|
|
5646
5709
|
/** {zh}
|
|
5647
5710
|
* @detail api
|
|
@@ -7320,6 +7383,9 @@ declare namespace live {
|
|
|
7320
7383
|
AUTOPLAY_SUCCESS: string;
|
|
7321
7384
|
ERROR_REFRESH_CLICK: string;
|
|
7322
7385
|
SOURCE_CHANGE: string;
|
|
7386
|
+
SWITCH_DEFINITION_START: string;
|
|
7387
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
7388
|
+
DOWN_DEFINITION: string;
|
|
7323
7389
|
REPLAY: string;
|
|
7324
7390
|
ERROR: string;
|
|
7325
7391
|
PLAY: string;
|
|
@@ -7351,6 +7417,9 @@ declare namespace live {
|
|
|
7351
7417
|
COMPLETE: string;
|
|
7352
7418
|
DESTROY: string;
|
|
7353
7419
|
URL_CHANGE: string;
|
|
7420
|
+
LEAVE_PLAYER: string;
|
|
7421
|
+
ENTER_PLAYER: string;
|
|
7422
|
+
LOADING: string;
|
|
7354
7423
|
SEI_PARSED: string;
|
|
7355
7424
|
RETRY: string;
|
|
7356
7425
|
ROTATE: string;
|
|
@@ -8949,11 +9018,11 @@ declare namespace live {
|
|
|
8949
9018
|
readonly "plugin:flv": "veplayer.plugin.flv.[env].[ext]";
|
|
8950
9019
|
readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
|
|
8951
9020
|
readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
|
|
8952
|
-
readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
|
|
8953
9021
|
readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
|
|
8954
9022
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
8955
9023
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
8956
9024
|
readonly "plugin:drm": "veplayer.plugin.drm.[env].[ext]";
|
|
9025
|
+
readonly "plugin:abr": "veplayer.plugin.abr.[env].[ext]";
|
|
8957
9026
|
};
|
|
8958
9027
|
const enum State {
|
|
8959
9028
|
Fetching = 0,
|
|
@@ -8980,11 +9049,11 @@ declare namespace live {
|
|
|
8980
9049
|
PluginFlv = "plugin:flv",
|
|
8981
9050
|
PluginMp4 = "plugin:mp4",
|
|
8982
9051
|
PluginHls = "plugin:hls",
|
|
8983
|
-
PluginHlsJs = "plugin:hlsjs",
|
|
8984
9052
|
PluginShaka = "plugin:shaka",
|
|
8985
9053
|
PluginRtm = "plugin:rtm",
|
|
8986
9054
|
PluginXgvideo = "plugin:xgvideo",
|
|
8987
|
-
PluginDrm = "plugin:drm"
|
|
9055
|
+
PluginDrm = "plugin:drm",
|
|
9056
|
+
PluginAbr = "plugin:abr"
|
|
8988
9057
|
}
|
|
8989
9058
|
type ModulesMap = {
|
|
8990
9059
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -8992,11 +9061,11 @@ declare namespace live {
|
|
|
8992
9061
|
[DynamicModule.PluginFlv]: Exports;
|
|
8993
9062
|
[DynamicModule.PluginMp4]: Exports;
|
|
8994
9063
|
[DynamicModule.PluginHls]: Exports;
|
|
8995
|
-
[DynamicModule.PluginHlsJs]: Exports;
|
|
8996
9064
|
[DynamicModule.PluginShaka]: Exports;
|
|
8997
9065
|
[DynamicModule.PluginRtm]: Exports;
|
|
8998
9066
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
8999
9067
|
[DynamicModule.PluginDrm]: Exports;
|
|
9068
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
9000
9069
|
};
|
|
9001
9070
|
class Loader {
|
|
9002
9071
|
readonly modules: Record<string, Module>;
|
|
@@ -9778,6 +9847,21 @@ declare namespace live {
|
|
|
9778
9847
|
*/
|
|
9779
9848
|
drm?: Drm;
|
|
9780
9849
|
}
|
|
9850
|
+
interface Abr {
|
|
9851
|
+
enable?: boolean;
|
|
9852
|
+
downTip?: boolean;
|
|
9853
|
+
debug?: boolean;
|
|
9854
|
+
bitrate: number;
|
|
9855
|
+
urls: {
|
|
9856
|
+
[bitrate: number]: string;
|
|
9857
|
+
};
|
|
9858
|
+
}
|
|
9859
|
+
interface HlsAbr {
|
|
9860
|
+
enable?: boolean;
|
|
9861
|
+
downTip?: boolean;
|
|
9862
|
+
debug?: boolean;
|
|
9863
|
+
bitrate: number;
|
|
9864
|
+
}
|
|
9781
9865
|
/** {zh}
|
|
9782
9866
|
* @hidden
|
|
9783
9867
|
* @list option
|
|
@@ -10022,6 +10106,7 @@ declare namespace live {
|
|
|
10022
10106
|
* @hidden
|
|
10023
10107
|
*/
|
|
10024
10108
|
abrPts?: string | number;
|
|
10109
|
+
abr?: Abr;
|
|
10025
10110
|
}
|
|
10026
10111
|
/** {zh}
|
|
10027
10112
|
* @list option
|
|
@@ -10072,8 +10157,7 @@ declare namespace live {
|
|
|
10072
10157
|
* @default false
|
|
10073
10158
|
*/
|
|
10074
10159
|
enableMSE?: boolean;
|
|
10075
|
-
|
|
10076
|
-
hlsOpts?: any;
|
|
10160
|
+
abr?: HlsAbr;
|
|
10077
10161
|
}
|
|
10078
10162
|
/** {zh}
|
|
10079
10163
|
* @detail api
|
|
@@ -10125,11 +10209,50 @@ declare namespace live {
|
|
|
10125
10209
|
*
|
|
10126
10210
|
*/
|
|
10127
10211
|
closeInfoPanel(): void;
|
|
10212
|
+
openAbr(): void;
|
|
10213
|
+
closeAbr(): void;
|
|
10128
10214
|
/** {zh}
|
|
10129
10215
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
10130
10216
|
* @hidden
|
|
10131
10217
|
*/
|
|
10132
10218
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
10219
|
+
switch(target: string | {
|
|
10220
|
+
/** {zh}
|
|
10221
|
+
* @brief 清晰度的唯一标识。
|
|
10222
|
+
* @default 无
|
|
10223
|
+
*/
|
|
10224
|
+
/** {en}
|
|
10225
|
+
* @brief The resolution ID.
|
|
10226
|
+
*/
|
|
10227
|
+
definition?: string;
|
|
10228
|
+
/** {zh}
|
|
10229
|
+
* @brief 线路的唯一标识。
|
|
10230
|
+
* @default 无
|
|
10231
|
+
*/
|
|
10232
|
+
/** {en}
|
|
10233
|
+
* @brief The playback source ID.
|
|
10234
|
+
*/
|
|
10235
|
+
source?: string;
|
|
10236
|
+
}, options?: {
|
|
10237
|
+
/** {zh}
|
|
10238
|
+
* @brief 清晰度 definition 配置无效时,是否降级到播放列表第一个清晰度地址。
|
|
10239
|
+
* @default false
|
|
10240
|
+
*
|
|
10241
|
+
*/
|
|
10242
|
+
/** {en}
|
|
10243
|
+
* @brief Whether to downgrade to the first resolution in the playlist when the player cannot play with the specified resolution.
|
|
10244
|
+
* @default false
|
|
10245
|
+
*
|
|
10246
|
+
*/
|
|
10247
|
+
fallbackToFirstDefinition?: boolean;
|
|
10248
|
+
abr: {
|
|
10249
|
+
bitrate: number; // 默认起播的码率,必传
|
|
10250
|
+
method?: number; // 选择abr算法编号
|
|
10251
|
+
urls: {
|
|
10252
|
+
[bitrate: number]: string;
|
|
10253
|
+
}; // 可用的码率和对应的拉流地址
|
|
10254
|
+
};
|
|
10255
|
+
}): Promise<any>;
|
|
10133
10256
|
}
|
|
10134
10257
|
/** {zh}
|
|
10135
10258
|
* @detail api
|