@volcengine/veplayer 2.3.0-rc.3 → 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 +73 -3
- package/esm/veplayer.biz.live.development.js +92 -21
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +290 -5
- package/esm/veplayer.development.css +1 -1
- package/esm/veplayer.development.js +217 -75
- package/esm/veplayer.live.d.ts +290 -5
- package/esm/veplayer.live.development.css +1 -1
- package/esm/veplayer.live.development.js +217 -75
- 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 +73 -3
- package/esm/veplayer.vod.development.css +1 -1
- package/esm/veplayer.vod.development.js +169 -68
- 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 +73 -3
- package/umd/veplayer.biz.live.development.js +92 -21
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +290 -5
- package/umd/veplayer.development.css +1 -1
- package/umd/veplayer.development.js +217 -75
- package/umd/veplayer.live.d.ts +290 -5
- package/umd/veplayer.live.development.css +1 -1
- package/umd/veplayer.live.development.js +217 -75
- 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 +73 -3
- package/umd/veplayer.vod.development.css +1 -1
- package/umd/veplayer.vod.development.js +169 -68
- package/umd/veplayer.vod.production.css +1 -1
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +290 -5
- package/veplayer.live.d.ts +290 -5
- package/veplayer.vod.d.ts +73 -3
package/umd/veplayer.live.d.ts
CHANGED
|
@@ -1497,6 +1497,34 @@ interface VePlayerBaseOptions extends Omit<PlayerOptions, "autoplay" | "i18n"> {
|
|
|
1497
1497
|
* @hidden
|
|
1498
1498
|
*/
|
|
1499
1499
|
preparePlugins?: PreparePlugins;
|
|
1500
|
+
/** {zh}
|
|
1501
|
+
* @brief 是否关闭 PC 端单击播放区域切换播放/暂停的能力,开启时,点击播放器区域可实现播放或暂停。
|
|
1502
|
+
* - `true`: 关闭;
|
|
1503
|
+
* - `false`: 开启。
|
|
1504
|
+
* @default false
|
|
1505
|
+
*/
|
|
1506
|
+
/** {en}
|
|
1507
|
+
* @brief Whether to disable the click-to-play feature.
|
|
1508
|
+
* - `true`: Disable.
|
|
1509
|
+
* - `false`: Enable. Play/pause the video on mounse click for the PCs.
|
|
1510
|
+
* @default false
|
|
1511
|
+
*/
|
|
1512
|
+
closeVideoClick?: boolean;
|
|
1513
|
+
/** {zh}
|
|
1514
|
+
* @brief PC 端时表示是否关闭双击播放器进入全屏的能力;移动端时表示是否关闭双击切换播放/暂停的能力。
|
|
1515
|
+
* - `true`: 关闭;
|
|
1516
|
+
* - `false`: 开启。
|
|
1517
|
+
* @default false
|
|
1518
|
+
*/
|
|
1519
|
+
/** {en}
|
|
1520
|
+
* @brief Whether to disable the double-click/tap action.
|
|
1521
|
+
* - `true`: Disable.
|
|
1522
|
+
* - `false`: Enable.
|
|
1523
|
+
* - For the PCs, double click on the video to enter or exit the full screen mode.
|
|
1524
|
+
* - For the mobiles, play/pause the video with double tap.
|
|
1525
|
+
* @default false
|
|
1526
|
+
*/
|
|
1527
|
+
closeVideoDblclick?: boolean;
|
|
1500
1528
|
}
|
|
1501
1529
|
/** {zh}
|
|
1502
1530
|
* @list option
|
|
@@ -2032,7 +2060,7 @@ declare class VePlayerBase {
|
|
|
2032
2060
|
* @param callback 表示事件的回调函数。
|
|
2033
2061
|
*/
|
|
2034
2062
|
/** {en}
|
|
2035
|
-
* @brief
|
|
2063
|
+
* @brief Add a one-time listener function for the specified event.
|
|
2036
2064
|
* @param event The event name.
|
|
2037
2065
|
* @param callback The callback function for the event.
|
|
2038
2066
|
*/
|
|
@@ -2307,7 +2335,8 @@ declare enum DynamicModule {
|
|
|
2307
2335
|
PluginShaka = "plugin:shaka",
|
|
2308
2336
|
PluginRtm = "plugin:rtm",
|
|
2309
2337
|
PluginXgvideo = "plugin:xgvideo",
|
|
2310
|
-
PluginDrm = "plugin:drm"
|
|
2338
|
+
PluginDrm = "plugin:drm",
|
|
2339
|
+
PluginAbr = "plugin:abr"
|
|
2311
2340
|
}
|
|
2312
2341
|
type ModulesMap = {
|
|
2313
2342
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -2319,6 +2348,7 @@ type ModulesMap = {
|
|
|
2319
2348
|
[DynamicModule.PluginRtm]: Exports;
|
|
2320
2349
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
2321
2350
|
[DynamicModule.PluginDrm]: Exports;
|
|
2351
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
2322
2352
|
};
|
|
2323
2353
|
declare const registerPlugin: (name: string, exports: {
|
|
2324
2354
|
[x: string]: any;
|
|
@@ -3812,6 +3842,34 @@ declare namespace strategy {
|
|
|
3812
3842
|
* @hidden
|
|
3813
3843
|
*/
|
|
3814
3844
|
preparePlugins?: PreparePlugins;
|
|
3845
|
+
/** {zh}
|
|
3846
|
+
* @brief 是否关闭 PC 端单击播放区域切换播放/暂停的能力,开启时,点击播放器区域可实现播放或暂停。
|
|
3847
|
+
* - `true`: 关闭;
|
|
3848
|
+
* - `false`: 开启。
|
|
3849
|
+
* @default false
|
|
3850
|
+
*/
|
|
3851
|
+
/** {en}
|
|
3852
|
+
* @brief Whether to disable the click-to-play feature.
|
|
3853
|
+
* - `true`: Disable.
|
|
3854
|
+
* - `false`: Enable. Play/pause the video on mounse click for the PCs.
|
|
3855
|
+
* @default false
|
|
3856
|
+
*/
|
|
3857
|
+
closeVideoClick?: boolean;
|
|
3858
|
+
/** {zh}
|
|
3859
|
+
* @brief PC 端时表示是否关闭双击播放器进入全屏的能力;移动端时表示是否关闭双击切换播放/暂停的能力。
|
|
3860
|
+
* - `true`: 关闭;
|
|
3861
|
+
* - `false`: 开启。
|
|
3862
|
+
* @default false
|
|
3863
|
+
*/
|
|
3864
|
+
/** {en}
|
|
3865
|
+
* @brief Whether to disable the double-click/tap action.
|
|
3866
|
+
* - `true`: Disable.
|
|
3867
|
+
* - `false`: Enable.
|
|
3868
|
+
* - For the PCs, double click on the video to enter or exit the full screen mode.
|
|
3869
|
+
* - For the mobiles, play/pause the video with double tap.
|
|
3870
|
+
* @default false
|
|
3871
|
+
*/
|
|
3872
|
+
closeVideoDblclick?: boolean;
|
|
3815
3873
|
}
|
|
3816
3874
|
/** {zh}
|
|
3817
3875
|
* @list option
|
|
@@ -4015,6 +4073,7 @@ declare namespace strategy {
|
|
|
4015
4073
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
4016
4074
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
4017
4075
|
readonly "plugin:drm": "veplayer.plugin.drm.[env].[ext]";
|
|
4076
|
+
readonly "plugin:abr": "veplayer.plugin.abr.[env].[ext]";
|
|
4018
4077
|
};
|
|
4019
4078
|
const enum State {
|
|
4020
4079
|
Fetching = 0,
|
|
@@ -4044,7 +4103,8 @@ declare namespace strategy {
|
|
|
4044
4103
|
PluginShaka = "plugin:shaka",
|
|
4045
4104
|
PluginRtm = "plugin:rtm",
|
|
4046
4105
|
PluginXgvideo = "plugin:xgvideo",
|
|
4047
|
-
PluginDrm = "plugin:drm"
|
|
4106
|
+
PluginDrm = "plugin:drm",
|
|
4107
|
+
PluginAbr = "plugin:abr"
|
|
4048
4108
|
}
|
|
4049
4109
|
type ModulesMap = {
|
|
4050
4110
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -4056,6 +4116,7 @@ declare namespace strategy {
|
|
|
4056
4116
|
[DynamicModule.PluginRtm]: Exports;
|
|
4057
4117
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
4058
4118
|
[DynamicModule.PluginDrm]: Exports;
|
|
4119
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
4059
4120
|
};
|
|
4060
4121
|
class Loader {
|
|
4061
4122
|
readonly modules: Record<string, Module>;
|
|
@@ -4832,6 +4893,9 @@ declare namespace event {
|
|
|
4832
4893
|
AUTOPLAY_SUCCESS: string;
|
|
4833
4894
|
ERROR_REFRESH_CLICK: string;
|
|
4834
4895
|
SOURCE_CHANGE: string;
|
|
4896
|
+
SWITCH_DEFINITION_START: string;
|
|
4897
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
4898
|
+
DOWN_DEFINITION: string;
|
|
4835
4899
|
};
|
|
4836
4900
|
const Events: {
|
|
4837
4901
|
SEI: string;
|
|
@@ -4857,6 +4921,9 @@ declare namespace event {
|
|
|
4857
4921
|
AUTOPLAY_SUCCESS: string;
|
|
4858
4922
|
ERROR_REFRESH_CLICK: string;
|
|
4859
4923
|
SOURCE_CHANGE: string;
|
|
4924
|
+
SWITCH_DEFINITION_START: string;
|
|
4925
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
4926
|
+
DOWN_DEFINITION: string;
|
|
4860
4927
|
REPLAY: string;
|
|
4861
4928
|
ERROR: string;
|
|
4862
4929
|
PLAY: string;
|
|
@@ -4888,6 +4955,9 @@ declare namespace event {
|
|
|
4888
4955
|
COMPLETE: string;
|
|
4889
4956
|
DESTROY: string;
|
|
4890
4957
|
URL_CHANGE: string;
|
|
4958
|
+
LEAVE_PLAYER: string;
|
|
4959
|
+
ENTER_PLAYER: string;
|
|
4960
|
+
LOADING: string;
|
|
4891
4961
|
SEI_PARSED: string;
|
|
4892
4962
|
RETRY: string;
|
|
4893
4963
|
ROTATE: string;
|
|
@@ -5219,6 +5289,7 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5219
5289
|
*/
|
|
5220
5290
|
icons?: any;
|
|
5221
5291
|
/** {zh}
|
|
5292
|
+
* @hidden
|
|
5222
5293
|
* @brief 商业 DRM 播放配置。
|
|
5223
5294
|
* @default -
|
|
5224
5295
|
*/
|
|
@@ -5228,6 +5299,30 @@ interface LiveVePlayerOptions extends VePlayerBaseOptions {
|
|
|
5228
5299
|
*/
|
|
5229
5300
|
drm?: Drm;
|
|
5230
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
|
+
}
|
|
5317
|
+
/** {zh}
|
|
5318
|
+
* @hidden
|
|
5319
|
+
* @list option
|
|
5320
|
+
* @kind property
|
|
5321
|
+
*/
|
|
5322
|
+
/** {en}
|
|
5323
|
+
* @list option
|
|
5324
|
+
* @kind property
|
|
5325
|
+
*/
|
|
5231
5326
|
interface Drm {
|
|
5232
5327
|
/** {zh}
|
|
5233
5328
|
* @brief FairPlay DRM 配置
|
|
@@ -5237,8 +5332,18 @@ interface Drm {
|
|
|
5237
5332
|
*/
|
|
5238
5333
|
fairplay?: FairplayDrm;
|
|
5239
5334
|
}
|
|
5335
|
+
/** {zh}
|
|
5336
|
+
* @hidden
|
|
5337
|
+
* @list option
|
|
5338
|
+
* @kind property
|
|
5339
|
+
*/
|
|
5340
|
+
/** {en}
|
|
5341
|
+
* @list option
|
|
5342
|
+
* @kind property
|
|
5343
|
+
*/
|
|
5240
5344
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
5241
5345
|
/** {zh}
|
|
5346
|
+
* @hidden
|
|
5242
5347
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
5243
5348
|
* @param config
|
|
5244
5349
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -5252,6 +5357,15 @@ interface FairplayDrm extends FairplayDrmConfig {
|
|
|
5252
5357
|
url: string;
|
|
5253
5358
|
}) => Promise<FairplayDrmConfig>;
|
|
5254
5359
|
}
|
|
5360
|
+
/** {zh}
|
|
5361
|
+
* @hidden
|
|
5362
|
+
* @list option
|
|
5363
|
+
* @kind property
|
|
5364
|
+
*/
|
|
5365
|
+
/** {en}
|
|
5366
|
+
* @list option
|
|
5367
|
+
* @kind property
|
|
5368
|
+
*/
|
|
5255
5369
|
interface FairplayDrmConfig {
|
|
5256
5370
|
/** {zh}
|
|
5257
5371
|
* @brief 获取证书的请求地址
|
|
@@ -5284,6 +5398,10 @@ interface TimeShiftConfig {
|
|
|
5284
5398
|
* @brief 直播开始时间,Unix 时间戳,单位为 s,需要传入浏览器本地时间。
|
|
5285
5399
|
* @default Date.now() / 1000
|
|
5286
5400
|
*/
|
|
5401
|
+
/** {en}
|
|
5402
|
+
* @brief The time the live stream session started. Unix timestamp in seconds. The time must be specified according to the time zone of the browser.
|
|
5403
|
+
* @default Date.now() / 1000
|
|
5404
|
+
*/
|
|
5287
5405
|
liveStartTime?: number;
|
|
5288
5406
|
/** {zh}
|
|
5289
5407
|
* @brief 最大时移时间,单位为 s,取值范围为 [6,604800]。
|
|
@@ -5440,6 +5558,7 @@ interface Flv {
|
|
|
5440
5558
|
* @hidden
|
|
5441
5559
|
*/
|
|
5442
5560
|
abrPts?: string | number;
|
|
5561
|
+
abr?: Abr;
|
|
5443
5562
|
}
|
|
5444
5563
|
/** {zh}
|
|
5445
5564
|
* @list option
|
|
@@ -5490,6 +5609,7 @@ interface Hls {
|
|
|
5490
5609
|
* @default false
|
|
5491
5610
|
*/
|
|
5492
5611
|
enableMSE?: boolean;
|
|
5612
|
+
abr?: HlsAbr;
|
|
5493
5613
|
}
|
|
5494
5614
|
/** {zh}
|
|
5495
5615
|
* @detail api
|
|
@@ -5541,11 +5661,50 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5541
5661
|
*
|
|
5542
5662
|
*/
|
|
5543
5663
|
closeInfoPanel(): void;
|
|
5664
|
+
openAbr(): void;
|
|
5665
|
+
closeAbr(): void;
|
|
5544
5666
|
/** {zh}
|
|
5545
5667
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
5546
5668
|
* @hidden
|
|
5547
5669
|
*/
|
|
5548
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>;
|
|
5549
5708
|
}
|
|
5550
5709
|
/** {zh}
|
|
5551
5710
|
* @detail api
|
|
@@ -7224,6 +7383,9 @@ declare namespace live {
|
|
|
7224
7383
|
AUTOPLAY_SUCCESS: string;
|
|
7225
7384
|
ERROR_REFRESH_CLICK: string;
|
|
7226
7385
|
SOURCE_CHANGE: string;
|
|
7386
|
+
SWITCH_DEFINITION_START: string;
|
|
7387
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
7388
|
+
DOWN_DEFINITION: string;
|
|
7227
7389
|
REPLAY: string;
|
|
7228
7390
|
ERROR: string;
|
|
7229
7391
|
PLAY: string;
|
|
@@ -7255,6 +7417,9 @@ declare namespace live {
|
|
|
7255
7417
|
COMPLETE: string;
|
|
7256
7418
|
DESTROY: string;
|
|
7257
7419
|
URL_CHANGE: string;
|
|
7420
|
+
LEAVE_PLAYER: string;
|
|
7421
|
+
ENTER_PLAYER: string;
|
|
7422
|
+
LOADING: string;
|
|
7258
7423
|
SEI_PARSED: string;
|
|
7259
7424
|
RETRY: string;
|
|
7260
7425
|
ROTATE: string;
|
|
@@ -8035,6 +8200,34 @@ declare namespace live {
|
|
|
8035
8200
|
* @hidden
|
|
8036
8201
|
*/
|
|
8037
8202
|
preparePlugins?: PreparePlugins;
|
|
8203
|
+
/** {zh}
|
|
8204
|
+
* @brief 是否关闭 PC 端单击播放区域切换播放/暂停的能力,开启时,点击播放器区域可实现播放或暂停。
|
|
8205
|
+
* - `true`: 关闭;
|
|
8206
|
+
* - `false`: 开启。
|
|
8207
|
+
* @default false
|
|
8208
|
+
*/
|
|
8209
|
+
/** {en}
|
|
8210
|
+
* @brief Whether to disable the click-to-play feature.
|
|
8211
|
+
* - `true`: Disable.
|
|
8212
|
+
* - `false`: Enable. Play/pause the video on mounse click for the PCs.
|
|
8213
|
+
* @default false
|
|
8214
|
+
*/
|
|
8215
|
+
closeVideoClick?: boolean;
|
|
8216
|
+
/** {zh}
|
|
8217
|
+
* @brief PC 端时表示是否关闭双击播放器进入全屏的能力;移动端时表示是否关闭双击切换播放/暂停的能力。
|
|
8218
|
+
* - `true`: 关闭;
|
|
8219
|
+
* - `false`: 开启。
|
|
8220
|
+
* @default false
|
|
8221
|
+
*/
|
|
8222
|
+
/** {en}
|
|
8223
|
+
* @brief Whether to disable the double-click/tap action.
|
|
8224
|
+
* - `true`: Disable.
|
|
8225
|
+
* - `false`: Enable.
|
|
8226
|
+
* - For the PCs, double click on the video to enter or exit the full screen mode.
|
|
8227
|
+
* - For the mobiles, play/pause the video with double tap.
|
|
8228
|
+
* @default false
|
|
8229
|
+
*/
|
|
8230
|
+
closeVideoDblclick?: boolean;
|
|
8038
8231
|
}
|
|
8039
8232
|
/** {zh}
|
|
8040
8233
|
* @list option
|
|
@@ -8571,7 +8764,7 @@ declare namespace live {
|
|
|
8571
8764
|
* @param callback 表示事件的回调函数。
|
|
8572
8765
|
*/
|
|
8573
8766
|
/** {en}
|
|
8574
|
-
* @brief
|
|
8767
|
+
* @brief Add a one-time listener function for the specified event.
|
|
8575
8768
|
* @param event The event name.
|
|
8576
8769
|
* @param callback The callback function for the event.
|
|
8577
8770
|
*/
|
|
@@ -8829,6 +9022,7 @@ declare namespace live {
|
|
|
8829
9022
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
8830
9023
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
8831
9024
|
readonly "plugin:drm": "veplayer.plugin.drm.[env].[ext]";
|
|
9025
|
+
readonly "plugin:abr": "veplayer.plugin.abr.[env].[ext]";
|
|
8832
9026
|
};
|
|
8833
9027
|
const enum State {
|
|
8834
9028
|
Fetching = 0,
|
|
@@ -8858,7 +9052,8 @@ declare namespace live {
|
|
|
8858
9052
|
PluginShaka = "plugin:shaka",
|
|
8859
9053
|
PluginRtm = "plugin:rtm",
|
|
8860
9054
|
PluginXgvideo = "plugin:xgvideo",
|
|
8861
|
-
PluginDrm = "plugin:drm"
|
|
9055
|
+
PluginDrm = "plugin:drm",
|
|
9056
|
+
PluginAbr = "plugin:abr"
|
|
8862
9057
|
}
|
|
8863
9058
|
type ModulesMap = {
|
|
8864
9059
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -8870,6 +9065,7 @@ declare namespace live {
|
|
|
8870
9065
|
[DynamicModule.PluginRtm]: Exports;
|
|
8871
9066
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
8872
9067
|
[DynamicModule.PluginDrm]: Exports;
|
|
9068
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
8873
9069
|
};
|
|
8874
9070
|
class Loader {
|
|
8875
9071
|
readonly modules: Record<string, Module>;
|
|
@@ -9641,6 +9837,7 @@ declare namespace live {
|
|
|
9641
9837
|
*/
|
|
9642
9838
|
icons?: any;
|
|
9643
9839
|
/** {zh}
|
|
9840
|
+
* @hidden
|
|
9644
9841
|
* @brief 商业 DRM 播放配置。
|
|
9645
9842
|
* @default -
|
|
9646
9843
|
*/
|
|
@@ -9650,6 +9847,30 @@ declare namespace live {
|
|
|
9650
9847
|
*/
|
|
9651
9848
|
drm?: Drm;
|
|
9652
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
|
+
}
|
|
9865
|
+
/** {zh}
|
|
9866
|
+
* @hidden
|
|
9867
|
+
* @list option
|
|
9868
|
+
* @kind property
|
|
9869
|
+
*/
|
|
9870
|
+
/** {en}
|
|
9871
|
+
* @list option
|
|
9872
|
+
* @kind property
|
|
9873
|
+
*/
|
|
9653
9874
|
interface Drm {
|
|
9654
9875
|
/** {zh}
|
|
9655
9876
|
* @brief FairPlay DRM 配置
|
|
@@ -9659,8 +9880,18 @@ declare namespace live {
|
|
|
9659
9880
|
*/
|
|
9660
9881
|
fairplay?: FairplayDrm;
|
|
9661
9882
|
}
|
|
9883
|
+
/** {zh}
|
|
9884
|
+
* @hidden
|
|
9885
|
+
* @list option
|
|
9886
|
+
* @kind property
|
|
9887
|
+
*/
|
|
9888
|
+
/** {en}
|
|
9889
|
+
* @list option
|
|
9890
|
+
* @kind property
|
|
9891
|
+
*/
|
|
9662
9892
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
9663
9893
|
/** {zh}
|
|
9894
|
+
* @hidden
|
|
9664
9895
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
9665
9896
|
* @param config
|
|
9666
9897
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -9674,6 +9905,15 @@ declare namespace live {
|
|
|
9674
9905
|
url: string;
|
|
9675
9906
|
}) => Promise<FairplayDrmConfig>;
|
|
9676
9907
|
}
|
|
9908
|
+
/** {zh}
|
|
9909
|
+
* @hidden
|
|
9910
|
+
* @list option
|
|
9911
|
+
* @kind property
|
|
9912
|
+
*/
|
|
9913
|
+
/** {en}
|
|
9914
|
+
* @list option
|
|
9915
|
+
* @kind property
|
|
9916
|
+
*/
|
|
9677
9917
|
interface FairplayDrmConfig {
|
|
9678
9918
|
/** {zh}
|
|
9679
9919
|
* @brief 获取证书的请求地址
|
|
@@ -9706,6 +9946,10 @@ declare namespace live {
|
|
|
9706
9946
|
* @brief 直播开始时间,Unix 时间戳,单位为 s,需要传入浏览器本地时间。
|
|
9707
9947
|
* @default Date.now() / 1000
|
|
9708
9948
|
*/
|
|
9949
|
+
/** {en}
|
|
9950
|
+
* @brief The time the live stream session started. Unix timestamp in seconds. The time must be specified according to the time zone of the browser.
|
|
9951
|
+
* @default Date.now() / 1000
|
|
9952
|
+
*/
|
|
9709
9953
|
liveStartTime?: number;
|
|
9710
9954
|
/** {zh}
|
|
9711
9955
|
* @brief 最大时移时间,单位为 s,取值范围为 [6,604800]。
|
|
@@ -9862,6 +10106,7 @@ declare namespace live {
|
|
|
9862
10106
|
* @hidden
|
|
9863
10107
|
*/
|
|
9864
10108
|
abrPts?: string | number;
|
|
10109
|
+
abr?: Abr;
|
|
9865
10110
|
}
|
|
9866
10111
|
/** {zh}
|
|
9867
10112
|
* @list option
|
|
@@ -9912,6 +10157,7 @@ declare namespace live {
|
|
|
9912
10157
|
* @default false
|
|
9913
10158
|
*/
|
|
9914
10159
|
enableMSE?: boolean;
|
|
10160
|
+
abr?: HlsAbr;
|
|
9915
10161
|
}
|
|
9916
10162
|
/** {zh}
|
|
9917
10163
|
* @detail api
|
|
@@ -9963,11 +10209,50 @@ declare namespace live {
|
|
|
9963
10209
|
*
|
|
9964
10210
|
*/
|
|
9965
10211
|
closeInfoPanel(): void;
|
|
10212
|
+
openAbr(): void;
|
|
10213
|
+
closeAbr(): void;
|
|
9966
10214
|
/** {zh}
|
|
9967
10215
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
9968
10216
|
* @hidden
|
|
9969
10217
|
*/
|
|
9970
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>;
|
|
9971
10256
|
}
|
|
9972
10257
|
/** {zh}
|
|
9973
10258
|
* @detail api
|