@byteplus/veplayer 2.3.1-rc.4 → 2.4.0-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/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 +143 -16
- package/esm/veplayer.development.css +1 -1
- package/esm/veplayer.development.js +227 -101
- package/esm/veplayer.live.d.ts +143 -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 +143 -16
- package/umd/veplayer.development.css +1 -1
- package/umd/veplayer.development.js +227 -101
- package/umd/veplayer.live.d.ts +143 -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 +143 -16
- package/veplayer.live.d.ts +143 -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,8 @@ interface Flv {
|
|
|
5534
5558
|
* @hidden
|
|
5535
5559
|
*/
|
|
5536
5560
|
abrPts?: string | number;
|
|
5561
|
+
abr?: Abr;
|
|
5562
|
+
mseLowLatency?: boolean;
|
|
5537
5563
|
}
|
|
5538
5564
|
/** {zh}
|
|
5539
5565
|
* @list option
|
|
@@ -5584,8 +5610,8 @@ interface Hls {
|
|
|
5584
5610
|
* @default false
|
|
5585
5611
|
*/
|
|
5586
5612
|
enableMSE?: boolean;
|
|
5587
|
-
|
|
5588
|
-
|
|
5613
|
+
abr?: HlsAbr;
|
|
5614
|
+
mseLowLatency?: boolean;
|
|
5589
5615
|
}
|
|
5590
5616
|
/** {zh}
|
|
5591
5617
|
* @detail api
|
|
@@ -5637,11 +5663,50 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5637
5663
|
*
|
|
5638
5664
|
*/
|
|
5639
5665
|
closeInfoPanel(): void;
|
|
5666
|
+
openAbr(): void;
|
|
5667
|
+
closeAbr(): void;
|
|
5640
5668
|
/** {zh}
|
|
5641
5669
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
5642
5670
|
* @hidden
|
|
5643
5671
|
*/
|
|
5644
5672
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
5673
|
+
switch(target: string | {
|
|
5674
|
+
/** {zh}
|
|
5675
|
+
* @brief 清晰度的唯一标识。
|
|
5676
|
+
* @default 无
|
|
5677
|
+
*/
|
|
5678
|
+
/** {en}
|
|
5679
|
+
* @brief The resolution ID.
|
|
5680
|
+
*/
|
|
5681
|
+
definition?: string;
|
|
5682
|
+
/** {zh}
|
|
5683
|
+
* @brief 线路的唯一标识。
|
|
5684
|
+
* @default 无
|
|
5685
|
+
*/
|
|
5686
|
+
/** {en}
|
|
5687
|
+
* @brief The playback source ID.
|
|
5688
|
+
*/
|
|
5689
|
+
source?: string;
|
|
5690
|
+
}, options?: {
|
|
5691
|
+
/** {zh}
|
|
5692
|
+
* @brief 清晰度 definition 配置无效时,是否降级到播放列表第一个清晰度地址。
|
|
5693
|
+
* @default false
|
|
5694
|
+
*
|
|
5695
|
+
*/
|
|
5696
|
+
/** {en}
|
|
5697
|
+
* @brief Whether to downgrade to the first resolution in the playlist when the player cannot play with the specified resolution.
|
|
5698
|
+
* @default false
|
|
5699
|
+
*
|
|
5700
|
+
*/
|
|
5701
|
+
fallbackToFirstDefinition?: boolean;
|
|
5702
|
+
abr: {
|
|
5703
|
+
bitrate: number; // 默认起播的码率,必传
|
|
5704
|
+
method?: number; // 选择abr算法编号
|
|
5705
|
+
urls: {
|
|
5706
|
+
[bitrate: number]: string;
|
|
5707
|
+
}; // 可用的码率和对应的拉流地址
|
|
5708
|
+
};
|
|
5709
|
+
}): Promise<any>;
|
|
5645
5710
|
}
|
|
5646
5711
|
/** {zh}
|
|
5647
5712
|
* @detail api
|
|
@@ -7320,6 +7385,9 @@ declare namespace live {
|
|
|
7320
7385
|
AUTOPLAY_SUCCESS: string;
|
|
7321
7386
|
ERROR_REFRESH_CLICK: string;
|
|
7322
7387
|
SOURCE_CHANGE: string;
|
|
7388
|
+
SWITCH_DEFINITION_START: string;
|
|
7389
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
7390
|
+
DOWN_DEFINITION: string;
|
|
7323
7391
|
REPLAY: string;
|
|
7324
7392
|
ERROR: string;
|
|
7325
7393
|
PLAY: string;
|
|
@@ -7351,6 +7419,9 @@ declare namespace live {
|
|
|
7351
7419
|
COMPLETE: string;
|
|
7352
7420
|
DESTROY: string;
|
|
7353
7421
|
URL_CHANGE: string;
|
|
7422
|
+
LEAVE_PLAYER: string;
|
|
7423
|
+
ENTER_PLAYER: string;
|
|
7424
|
+
LOADING: string;
|
|
7354
7425
|
SEI_PARSED: string;
|
|
7355
7426
|
RETRY: string;
|
|
7356
7427
|
ROTATE: string;
|
|
@@ -8949,11 +9020,11 @@ declare namespace live {
|
|
|
8949
9020
|
readonly "plugin:flv": "veplayer.plugin.flv.[env].[ext]";
|
|
8950
9021
|
readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
|
|
8951
9022
|
readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
|
|
8952
|
-
readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
|
|
8953
9023
|
readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
|
|
8954
9024
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
8955
9025
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
8956
9026
|
readonly "plugin:drm": "veplayer.plugin.drm.[env].[ext]";
|
|
9027
|
+
readonly "plugin:abr": "veplayer.plugin.abr.[env].[ext]";
|
|
8957
9028
|
};
|
|
8958
9029
|
const enum State {
|
|
8959
9030
|
Fetching = 0,
|
|
@@ -8980,11 +9051,11 @@ declare namespace live {
|
|
|
8980
9051
|
PluginFlv = "plugin:flv",
|
|
8981
9052
|
PluginMp4 = "plugin:mp4",
|
|
8982
9053
|
PluginHls = "plugin:hls",
|
|
8983
|
-
PluginHlsJs = "plugin:hlsjs",
|
|
8984
9054
|
PluginShaka = "plugin:shaka",
|
|
8985
9055
|
PluginRtm = "plugin:rtm",
|
|
8986
9056
|
PluginXgvideo = "plugin:xgvideo",
|
|
8987
|
-
PluginDrm = "plugin:drm"
|
|
9057
|
+
PluginDrm = "plugin:drm",
|
|
9058
|
+
PluginAbr = "plugin:abr"
|
|
8988
9059
|
}
|
|
8989
9060
|
type ModulesMap = {
|
|
8990
9061
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -8992,11 +9063,11 @@ declare namespace live {
|
|
|
8992
9063
|
[DynamicModule.PluginFlv]: Exports;
|
|
8993
9064
|
[DynamicModule.PluginMp4]: Exports;
|
|
8994
9065
|
[DynamicModule.PluginHls]: Exports;
|
|
8995
|
-
[DynamicModule.PluginHlsJs]: Exports;
|
|
8996
9066
|
[DynamicModule.PluginShaka]: Exports;
|
|
8997
9067
|
[DynamicModule.PluginRtm]: Exports;
|
|
8998
9068
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
8999
9069
|
[DynamicModule.PluginDrm]: Exports;
|
|
9070
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
9000
9071
|
};
|
|
9001
9072
|
class Loader {
|
|
9002
9073
|
readonly modules: Record<string, Module>;
|
|
@@ -9778,6 +9849,21 @@ declare namespace live {
|
|
|
9778
9849
|
*/
|
|
9779
9850
|
drm?: Drm;
|
|
9780
9851
|
}
|
|
9852
|
+
interface Abr {
|
|
9853
|
+
enable?: boolean;
|
|
9854
|
+
downTip?: boolean;
|
|
9855
|
+
debug?: boolean;
|
|
9856
|
+
bitrate: number;
|
|
9857
|
+
urls: {
|
|
9858
|
+
[bitrate: number]: string;
|
|
9859
|
+
};
|
|
9860
|
+
}
|
|
9861
|
+
interface HlsAbr {
|
|
9862
|
+
enable?: boolean;
|
|
9863
|
+
downTip?: boolean;
|
|
9864
|
+
debug?: boolean;
|
|
9865
|
+
bitrate: number;
|
|
9866
|
+
}
|
|
9781
9867
|
/** {zh}
|
|
9782
9868
|
* @hidden
|
|
9783
9869
|
* @list option
|
|
@@ -10022,6 +10108,8 @@ declare namespace live {
|
|
|
10022
10108
|
* @hidden
|
|
10023
10109
|
*/
|
|
10024
10110
|
abrPts?: string | number;
|
|
10111
|
+
abr?: Abr;
|
|
10112
|
+
mseLowLatency?: boolean;
|
|
10025
10113
|
}
|
|
10026
10114
|
/** {zh}
|
|
10027
10115
|
* @list option
|
|
@@ -10072,8 +10160,8 @@ declare namespace live {
|
|
|
10072
10160
|
* @default false
|
|
10073
10161
|
*/
|
|
10074
10162
|
enableMSE?: boolean;
|
|
10075
|
-
|
|
10076
|
-
|
|
10163
|
+
abr?: HlsAbr;
|
|
10164
|
+
mseLowLatency?: boolean;
|
|
10077
10165
|
}
|
|
10078
10166
|
/** {zh}
|
|
10079
10167
|
* @detail api
|
|
@@ -10125,11 +10213,50 @@ declare namespace live {
|
|
|
10125
10213
|
*
|
|
10126
10214
|
*/
|
|
10127
10215
|
closeInfoPanel(): void;
|
|
10216
|
+
openAbr(): void;
|
|
10217
|
+
closeAbr(): void;
|
|
10128
10218
|
/** {zh}
|
|
10129
10219
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
10130
10220
|
* @hidden
|
|
10131
10221
|
*/
|
|
10132
10222
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
10223
|
+
switch(target: string | {
|
|
10224
|
+
/** {zh}
|
|
10225
|
+
* @brief 清晰度的唯一标识。
|
|
10226
|
+
* @default 无
|
|
10227
|
+
*/
|
|
10228
|
+
/** {en}
|
|
10229
|
+
* @brief The resolution ID.
|
|
10230
|
+
*/
|
|
10231
|
+
definition?: string;
|
|
10232
|
+
/** {zh}
|
|
10233
|
+
* @brief 线路的唯一标识。
|
|
10234
|
+
* @default 无
|
|
10235
|
+
*/
|
|
10236
|
+
/** {en}
|
|
10237
|
+
* @brief The playback source ID.
|
|
10238
|
+
*/
|
|
10239
|
+
source?: string;
|
|
10240
|
+
}, options?: {
|
|
10241
|
+
/** {zh}
|
|
10242
|
+
* @brief 清晰度 definition 配置无效时,是否降级到播放列表第一个清晰度地址。
|
|
10243
|
+
* @default false
|
|
10244
|
+
*
|
|
10245
|
+
*/
|
|
10246
|
+
/** {en}
|
|
10247
|
+
* @brief Whether to downgrade to the first resolution in the playlist when the player cannot play with the specified resolution.
|
|
10248
|
+
* @default false
|
|
10249
|
+
*
|
|
10250
|
+
*/
|
|
10251
|
+
fallbackToFirstDefinition?: boolean;
|
|
10252
|
+
abr: {
|
|
10253
|
+
bitrate: number; // 默认起播的码率,必传
|
|
10254
|
+
method?: number; // 选择abr算法编号
|
|
10255
|
+
urls: {
|
|
10256
|
+
[bitrate: number]: string;
|
|
10257
|
+
}; // 可用的码率和对应的拉流地址
|
|
10258
|
+
};
|
|
10259
|
+
}): Promise<any>;
|
|
10133
10260
|
}
|
|
10134
10261
|
/** {zh}
|
|
10135
10262
|
* @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,8 @@ interface Flv {
|
|
|
5534
5558
|
* @hidden
|
|
5535
5559
|
*/
|
|
5536
5560
|
abrPts?: string | number;
|
|
5561
|
+
abr?: Abr;
|
|
5562
|
+
mseLowLatency?: boolean;
|
|
5537
5563
|
}
|
|
5538
5564
|
/** {zh}
|
|
5539
5565
|
* @list option
|
|
@@ -5584,8 +5610,8 @@ interface Hls {
|
|
|
5584
5610
|
* @default false
|
|
5585
5611
|
*/
|
|
5586
5612
|
enableMSE?: boolean;
|
|
5587
|
-
|
|
5588
|
-
|
|
5613
|
+
abr?: HlsAbr;
|
|
5614
|
+
mseLowLatency?: boolean;
|
|
5589
5615
|
}
|
|
5590
5616
|
/** {zh}
|
|
5591
5617
|
* @detail api
|
|
@@ -5637,11 +5663,50 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5637
5663
|
*
|
|
5638
5664
|
*/
|
|
5639
5665
|
closeInfoPanel(): void;
|
|
5666
|
+
openAbr(): void;
|
|
5667
|
+
closeAbr(): void;
|
|
5640
5668
|
/** {zh}
|
|
5641
5669
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
5642
5670
|
* @hidden
|
|
5643
5671
|
*/
|
|
5644
5672
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
5673
|
+
switch(target: string | {
|
|
5674
|
+
/** {zh}
|
|
5675
|
+
* @brief 清晰度的唯一标识。
|
|
5676
|
+
* @default 无
|
|
5677
|
+
*/
|
|
5678
|
+
/** {en}
|
|
5679
|
+
* @brief The resolution ID.
|
|
5680
|
+
*/
|
|
5681
|
+
definition?: string;
|
|
5682
|
+
/** {zh}
|
|
5683
|
+
* @brief 线路的唯一标识。
|
|
5684
|
+
* @default 无
|
|
5685
|
+
*/
|
|
5686
|
+
/** {en}
|
|
5687
|
+
* @brief The playback source ID.
|
|
5688
|
+
*/
|
|
5689
|
+
source?: string;
|
|
5690
|
+
}, options?: {
|
|
5691
|
+
/** {zh}
|
|
5692
|
+
* @brief 清晰度 definition 配置无效时,是否降级到播放列表第一个清晰度地址。
|
|
5693
|
+
* @default false
|
|
5694
|
+
*
|
|
5695
|
+
*/
|
|
5696
|
+
/** {en}
|
|
5697
|
+
* @brief Whether to downgrade to the first resolution in the playlist when the player cannot play with the specified resolution.
|
|
5698
|
+
* @default false
|
|
5699
|
+
*
|
|
5700
|
+
*/
|
|
5701
|
+
fallbackToFirstDefinition?: boolean;
|
|
5702
|
+
abr: {
|
|
5703
|
+
bitrate: number; // 默认起播的码率,必传
|
|
5704
|
+
method?: number; // 选择abr算法编号
|
|
5705
|
+
urls: {
|
|
5706
|
+
[bitrate: number]: string;
|
|
5707
|
+
}; // 可用的码率和对应的拉流地址
|
|
5708
|
+
};
|
|
5709
|
+
}): Promise<any>;
|
|
5645
5710
|
}
|
|
5646
5711
|
/** {zh}
|
|
5647
5712
|
* @detail api
|
|
@@ -7320,6 +7385,9 @@ declare namespace live {
|
|
|
7320
7385
|
AUTOPLAY_SUCCESS: string;
|
|
7321
7386
|
ERROR_REFRESH_CLICK: string;
|
|
7322
7387
|
SOURCE_CHANGE: string;
|
|
7388
|
+
SWITCH_DEFINITION_START: string;
|
|
7389
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
7390
|
+
DOWN_DEFINITION: string;
|
|
7323
7391
|
REPLAY: string;
|
|
7324
7392
|
ERROR: string;
|
|
7325
7393
|
PLAY: string;
|
|
@@ -7351,6 +7419,9 @@ declare namespace live {
|
|
|
7351
7419
|
COMPLETE: string;
|
|
7352
7420
|
DESTROY: string;
|
|
7353
7421
|
URL_CHANGE: string;
|
|
7422
|
+
LEAVE_PLAYER: string;
|
|
7423
|
+
ENTER_PLAYER: string;
|
|
7424
|
+
LOADING: string;
|
|
7354
7425
|
SEI_PARSED: string;
|
|
7355
7426
|
RETRY: string;
|
|
7356
7427
|
ROTATE: string;
|
|
@@ -8949,11 +9020,11 @@ declare namespace live {
|
|
|
8949
9020
|
readonly "plugin:flv": "veplayer.plugin.flv.[env].[ext]";
|
|
8950
9021
|
readonly "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]";
|
|
8951
9022
|
readonly "plugin:hls": "veplayer.plugin.hls.[env].[ext]";
|
|
8952
|
-
readonly "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]";
|
|
8953
9023
|
readonly "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]";
|
|
8954
9024
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
8955
9025
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
8956
9026
|
readonly "plugin:drm": "veplayer.plugin.drm.[env].[ext]";
|
|
9027
|
+
readonly "plugin:abr": "veplayer.plugin.abr.[env].[ext]";
|
|
8957
9028
|
};
|
|
8958
9029
|
const enum State {
|
|
8959
9030
|
Fetching = 0,
|
|
@@ -8980,11 +9051,11 @@ declare namespace live {
|
|
|
8980
9051
|
PluginFlv = "plugin:flv",
|
|
8981
9052
|
PluginMp4 = "plugin:mp4",
|
|
8982
9053
|
PluginHls = "plugin:hls",
|
|
8983
|
-
PluginHlsJs = "plugin:hlsjs",
|
|
8984
9054
|
PluginShaka = "plugin:shaka",
|
|
8985
9055
|
PluginRtm = "plugin:rtm",
|
|
8986
9056
|
PluginXgvideo = "plugin:xgvideo",
|
|
8987
|
-
PluginDrm = "plugin:drm"
|
|
9057
|
+
PluginDrm = "plugin:drm",
|
|
9058
|
+
PluginAbr = "plugin:abr"
|
|
8988
9059
|
}
|
|
8989
9060
|
type ModulesMap = {
|
|
8990
9061
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -8992,11 +9063,11 @@ declare namespace live {
|
|
|
8992
9063
|
[DynamicModule.PluginFlv]: Exports;
|
|
8993
9064
|
[DynamicModule.PluginMp4]: Exports;
|
|
8994
9065
|
[DynamicModule.PluginHls]: Exports;
|
|
8995
|
-
[DynamicModule.PluginHlsJs]: Exports;
|
|
8996
9066
|
[DynamicModule.PluginShaka]: Exports;
|
|
8997
9067
|
[DynamicModule.PluginRtm]: Exports;
|
|
8998
9068
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
8999
9069
|
[DynamicModule.PluginDrm]: Exports;
|
|
9070
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
9000
9071
|
};
|
|
9001
9072
|
class Loader {
|
|
9002
9073
|
readonly modules: Record<string, Module>;
|
|
@@ -9778,6 +9849,21 @@ declare namespace live {
|
|
|
9778
9849
|
*/
|
|
9779
9850
|
drm?: Drm;
|
|
9780
9851
|
}
|
|
9852
|
+
interface Abr {
|
|
9853
|
+
enable?: boolean;
|
|
9854
|
+
downTip?: boolean;
|
|
9855
|
+
debug?: boolean;
|
|
9856
|
+
bitrate: number;
|
|
9857
|
+
urls: {
|
|
9858
|
+
[bitrate: number]: string;
|
|
9859
|
+
};
|
|
9860
|
+
}
|
|
9861
|
+
interface HlsAbr {
|
|
9862
|
+
enable?: boolean;
|
|
9863
|
+
downTip?: boolean;
|
|
9864
|
+
debug?: boolean;
|
|
9865
|
+
bitrate: number;
|
|
9866
|
+
}
|
|
9781
9867
|
/** {zh}
|
|
9782
9868
|
* @hidden
|
|
9783
9869
|
* @list option
|
|
@@ -10022,6 +10108,8 @@ declare namespace live {
|
|
|
10022
10108
|
* @hidden
|
|
10023
10109
|
*/
|
|
10024
10110
|
abrPts?: string | number;
|
|
10111
|
+
abr?: Abr;
|
|
10112
|
+
mseLowLatency?: boolean;
|
|
10025
10113
|
}
|
|
10026
10114
|
/** {zh}
|
|
10027
10115
|
* @list option
|
|
@@ -10072,8 +10160,8 @@ declare namespace live {
|
|
|
10072
10160
|
* @default false
|
|
10073
10161
|
*/
|
|
10074
10162
|
enableMSE?: boolean;
|
|
10075
|
-
|
|
10076
|
-
|
|
10163
|
+
abr?: HlsAbr;
|
|
10164
|
+
mseLowLatency?: boolean;
|
|
10077
10165
|
}
|
|
10078
10166
|
/** {zh}
|
|
10079
10167
|
* @detail api
|
|
@@ -10125,11 +10213,50 @@ declare namespace live {
|
|
|
10125
10213
|
*
|
|
10126
10214
|
*/
|
|
10127
10215
|
closeInfoPanel(): void;
|
|
10216
|
+
openAbr(): void;
|
|
10217
|
+
closeAbr(): void;
|
|
10128
10218
|
/** {zh}
|
|
10129
10219
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
10130
10220
|
* @hidden
|
|
10131
10221
|
*/
|
|
10132
10222
|
updateDrmConfig(config: FairplayDrmConfig): void;
|
|
10223
|
+
switch(target: string | {
|
|
10224
|
+
/** {zh}
|
|
10225
|
+
* @brief 清晰度的唯一标识。
|
|
10226
|
+
* @default 无
|
|
10227
|
+
*/
|
|
10228
|
+
/** {en}
|
|
10229
|
+
* @brief The resolution ID.
|
|
10230
|
+
*/
|
|
10231
|
+
definition?: string;
|
|
10232
|
+
/** {zh}
|
|
10233
|
+
* @brief 线路的唯一标识。
|
|
10234
|
+
* @default 无
|
|
10235
|
+
*/
|
|
10236
|
+
/** {en}
|
|
10237
|
+
* @brief The playback source ID.
|
|
10238
|
+
*/
|
|
10239
|
+
source?: string;
|
|
10240
|
+
}, options?: {
|
|
10241
|
+
/** {zh}
|
|
10242
|
+
* @brief 清晰度 definition 配置无效时,是否降级到播放列表第一个清晰度地址。
|
|
10243
|
+
* @default false
|
|
10244
|
+
*
|
|
10245
|
+
*/
|
|
10246
|
+
/** {en}
|
|
10247
|
+
* @brief Whether to downgrade to the first resolution in the playlist when the player cannot play with the specified resolution.
|
|
10248
|
+
* @default false
|
|
10249
|
+
*
|
|
10250
|
+
*/
|
|
10251
|
+
fallbackToFirstDefinition?: boolean;
|
|
10252
|
+
abr: {
|
|
10253
|
+
bitrate: number; // 默认起播的码率,必传
|
|
10254
|
+
method?: number; // 选择abr算法编号
|
|
10255
|
+
urls: {
|
|
10256
|
+
[bitrate: number]: string;
|
|
10257
|
+
}; // 可用的码率和对应的拉流地址
|
|
10258
|
+
};
|
|
10259
|
+
}): Promise<any>;
|
|
10133
10260
|
}
|
|
10134
10261
|
/** {zh}
|
|
10135
10262
|
* @detail api
|