@volcengine/veplayer 2.3.0 → 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 +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 +294 -5
- package/esm/veplayer.development.css +1 -1
- package/esm/veplayer.development.js +217 -75
- package/esm/veplayer.live.d.ts +294 -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 +294 -5
- package/umd/veplayer.development.css +1 -1
- package/umd/veplayer.development.js +217 -75
- package/umd/veplayer.live.d.ts +294 -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 +294 -5
- package/veplayer.live.d.ts +294 -5
- package/veplayer.vod.d.ts +73 -3
package/veplayer.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,8 @@ interface Flv {
|
|
|
5440
5558
|
* @hidden
|
|
5441
5559
|
*/
|
|
5442
5560
|
abrPts?: string | number;
|
|
5561
|
+
abr?: Abr;
|
|
5562
|
+
mseLowLatency?: boolean;
|
|
5443
5563
|
}
|
|
5444
5564
|
/** {zh}
|
|
5445
5565
|
* @list option
|
|
@@ -5490,6 +5610,8 @@ interface Hls {
|
|
|
5490
5610
|
* @default false
|
|
5491
5611
|
*/
|
|
5492
5612
|
enableMSE?: boolean;
|
|
5613
|
+
abr?: HlsAbr;
|
|
5614
|
+
mseLowLatency?: boolean;
|
|
5493
5615
|
}
|
|
5494
5616
|
/** {zh}
|
|
5495
5617
|
* @detail api
|
|
@@ -5541,11 +5663,50 @@ declare class VePlayerLive extends VePlayerBase {
|
|
|
5541
5663
|
*
|
|
5542
5664
|
*/
|
|
5543
5665
|
closeInfoPanel(): void;
|
|
5666
|
+
openAbr(): void;
|
|
5667
|
+
closeAbr(): void;
|
|
5544
5668
|
/** {zh}
|
|
5545
5669
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
5546
5670
|
* @hidden
|
|
5547
5671
|
*/
|
|
5548
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>;
|
|
5549
5710
|
}
|
|
5550
5711
|
/** {zh}
|
|
5551
5712
|
* @detail api
|
|
@@ -7224,6 +7385,9 @@ declare namespace live {
|
|
|
7224
7385
|
AUTOPLAY_SUCCESS: string;
|
|
7225
7386
|
ERROR_REFRESH_CLICK: string;
|
|
7226
7387
|
SOURCE_CHANGE: string;
|
|
7388
|
+
SWITCH_DEFINITION_START: string;
|
|
7389
|
+
SWITCH_DEFINITION_SUCCESS: string;
|
|
7390
|
+
DOWN_DEFINITION: string;
|
|
7227
7391
|
REPLAY: string;
|
|
7228
7392
|
ERROR: string;
|
|
7229
7393
|
PLAY: string;
|
|
@@ -7255,6 +7419,9 @@ declare namespace live {
|
|
|
7255
7419
|
COMPLETE: string;
|
|
7256
7420
|
DESTROY: string;
|
|
7257
7421
|
URL_CHANGE: string;
|
|
7422
|
+
LEAVE_PLAYER: string;
|
|
7423
|
+
ENTER_PLAYER: string;
|
|
7424
|
+
LOADING: string;
|
|
7258
7425
|
SEI_PARSED: string;
|
|
7259
7426
|
RETRY: string;
|
|
7260
7427
|
ROTATE: string;
|
|
@@ -8035,6 +8202,34 @@ declare namespace live {
|
|
|
8035
8202
|
* @hidden
|
|
8036
8203
|
*/
|
|
8037
8204
|
preparePlugins?: PreparePlugins;
|
|
8205
|
+
/** {zh}
|
|
8206
|
+
* @brief 是否关闭 PC 端单击播放区域切换播放/暂停的能力,开启时,点击播放器区域可实现播放或暂停。
|
|
8207
|
+
* - `true`: 关闭;
|
|
8208
|
+
* - `false`: 开启。
|
|
8209
|
+
* @default false
|
|
8210
|
+
*/
|
|
8211
|
+
/** {en}
|
|
8212
|
+
* @brief Whether to disable the click-to-play feature.
|
|
8213
|
+
* - `true`: Disable.
|
|
8214
|
+
* - `false`: Enable. Play/pause the video on mounse click for the PCs.
|
|
8215
|
+
* @default false
|
|
8216
|
+
*/
|
|
8217
|
+
closeVideoClick?: boolean;
|
|
8218
|
+
/** {zh}
|
|
8219
|
+
* @brief PC 端时表示是否关闭双击播放器进入全屏的能力;移动端时表示是否关闭双击切换播放/暂停的能力。
|
|
8220
|
+
* - `true`: 关闭;
|
|
8221
|
+
* - `false`: 开启。
|
|
8222
|
+
* @default false
|
|
8223
|
+
*/
|
|
8224
|
+
/** {en}
|
|
8225
|
+
* @brief Whether to disable the double-click/tap action.
|
|
8226
|
+
* - `true`: Disable.
|
|
8227
|
+
* - `false`: Enable.
|
|
8228
|
+
* - For the PCs, double click on the video to enter or exit the full screen mode.
|
|
8229
|
+
* - For the mobiles, play/pause the video with double tap.
|
|
8230
|
+
* @default false
|
|
8231
|
+
*/
|
|
8232
|
+
closeVideoDblclick?: boolean;
|
|
8038
8233
|
}
|
|
8039
8234
|
/** {zh}
|
|
8040
8235
|
* @list option
|
|
@@ -8571,7 +8766,7 @@ declare namespace live {
|
|
|
8571
8766
|
* @param callback 表示事件的回调函数。
|
|
8572
8767
|
*/
|
|
8573
8768
|
/** {en}
|
|
8574
|
-
* @brief
|
|
8769
|
+
* @brief Add a one-time listener function for the specified event.
|
|
8575
8770
|
* @param event The event name.
|
|
8576
8771
|
* @param callback The callback function for the event.
|
|
8577
8772
|
*/
|
|
@@ -8829,6 +9024,7 @@ declare namespace live {
|
|
|
8829
9024
|
readonly "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]";
|
|
8830
9025
|
readonly "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]";
|
|
8831
9026
|
readonly "plugin:drm": "veplayer.plugin.drm.[env].[ext]";
|
|
9027
|
+
readonly "plugin:abr": "veplayer.plugin.abr.[env].[ext]";
|
|
8832
9028
|
};
|
|
8833
9029
|
const enum State {
|
|
8834
9030
|
Fetching = 0,
|
|
@@ -8858,7 +9054,8 @@ declare namespace live {
|
|
|
8858
9054
|
PluginShaka = "plugin:shaka",
|
|
8859
9055
|
PluginRtm = "plugin:rtm",
|
|
8860
9056
|
PluginXgvideo = "plugin:xgvideo",
|
|
8861
|
-
PluginDrm = "plugin:drm"
|
|
9057
|
+
PluginDrm = "plugin:drm",
|
|
9058
|
+
PluginAbr = "plugin:abr"
|
|
8862
9059
|
}
|
|
8863
9060
|
type ModulesMap = {
|
|
8864
9061
|
[DynamicModule.BizVod]: Exports;
|
|
@@ -8870,6 +9067,7 @@ declare namespace live {
|
|
|
8870
9067
|
[DynamicModule.PluginRtm]: Exports;
|
|
8871
9068
|
[DynamicModule.PluginXgvideo]: Exports;
|
|
8872
9069
|
[DynamicModule.PluginDrm]: Exports;
|
|
9070
|
+
[DynamicModule.PluginAbr]: Exports;
|
|
8873
9071
|
};
|
|
8874
9072
|
class Loader {
|
|
8875
9073
|
readonly modules: Record<string, Module>;
|
|
@@ -9641,6 +9839,7 @@ declare namespace live {
|
|
|
9641
9839
|
*/
|
|
9642
9840
|
icons?: any;
|
|
9643
9841
|
/** {zh}
|
|
9842
|
+
* @hidden
|
|
9644
9843
|
* @brief 商业 DRM 播放配置。
|
|
9645
9844
|
* @default -
|
|
9646
9845
|
*/
|
|
@@ -9650,6 +9849,30 @@ declare namespace live {
|
|
|
9650
9849
|
*/
|
|
9651
9850
|
drm?: Drm;
|
|
9652
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
|
+
}
|
|
9867
|
+
/** {zh}
|
|
9868
|
+
* @hidden
|
|
9869
|
+
* @list option
|
|
9870
|
+
* @kind property
|
|
9871
|
+
*/
|
|
9872
|
+
/** {en}
|
|
9873
|
+
* @list option
|
|
9874
|
+
* @kind property
|
|
9875
|
+
*/
|
|
9653
9876
|
interface Drm {
|
|
9654
9877
|
/** {zh}
|
|
9655
9878
|
* @brief FairPlay DRM 配置
|
|
@@ -9659,8 +9882,18 @@ declare namespace live {
|
|
|
9659
9882
|
*/
|
|
9660
9883
|
fairplay?: FairplayDrm;
|
|
9661
9884
|
}
|
|
9885
|
+
/** {zh}
|
|
9886
|
+
* @hidden
|
|
9887
|
+
* @list option
|
|
9888
|
+
* @kind property
|
|
9889
|
+
*/
|
|
9890
|
+
/** {en}
|
|
9891
|
+
* @list option
|
|
9892
|
+
* @kind property
|
|
9893
|
+
*/
|
|
9662
9894
|
interface FairplayDrm extends FairplayDrmConfig {
|
|
9663
9895
|
/** {zh}
|
|
9896
|
+
* @hidden
|
|
9664
9897
|
* @brief 获取 DRM 配置的方法,用于更新 DRM 配置。
|
|
9665
9898
|
* @param config
|
|
9666
9899
|
* @returns 证书的请求地址和内容密钥许可证的请求地址。
|
|
@@ -9674,6 +9907,15 @@ declare namespace live {
|
|
|
9674
9907
|
url: string;
|
|
9675
9908
|
}) => Promise<FairplayDrmConfig>;
|
|
9676
9909
|
}
|
|
9910
|
+
/** {zh}
|
|
9911
|
+
* @hidden
|
|
9912
|
+
* @list option
|
|
9913
|
+
* @kind property
|
|
9914
|
+
*/
|
|
9915
|
+
/** {en}
|
|
9916
|
+
* @list option
|
|
9917
|
+
* @kind property
|
|
9918
|
+
*/
|
|
9677
9919
|
interface FairplayDrmConfig {
|
|
9678
9920
|
/** {zh}
|
|
9679
9921
|
* @brief 获取证书的请求地址
|
|
@@ -9706,6 +9948,10 @@ declare namespace live {
|
|
|
9706
9948
|
* @brief 直播开始时间,Unix 时间戳,单位为 s,需要传入浏览器本地时间。
|
|
9707
9949
|
* @default Date.now() / 1000
|
|
9708
9950
|
*/
|
|
9951
|
+
/** {en}
|
|
9952
|
+
* @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.
|
|
9953
|
+
* @default Date.now() / 1000
|
|
9954
|
+
*/
|
|
9709
9955
|
liveStartTime?: number;
|
|
9710
9956
|
/** {zh}
|
|
9711
9957
|
* @brief 最大时移时间,单位为 s,取值范围为 [6,604800]。
|
|
@@ -9862,6 +10108,8 @@ declare namespace live {
|
|
|
9862
10108
|
* @hidden
|
|
9863
10109
|
*/
|
|
9864
10110
|
abrPts?: string | number;
|
|
10111
|
+
abr?: Abr;
|
|
10112
|
+
mseLowLatency?: boolean;
|
|
9865
10113
|
}
|
|
9866
10114
|
/** {zh}
|
|
9867
10115
|
* @list option
|
|
@@ -9912,6 +10160,8 @@ declare namespace live {
|
|
|
9912
10160
|
* @default false
|
|
9913
10161
|
*/
|
|
9914
10162
|
enableMSE?: boolean;
|
|
10163
|
+
abr?: HlsAbr;
|
|
10164
|
+
mseLowLatency?: boolean;
|
|
9915
10165
|
}
|
|
9916
10166
|
/** {zh}
|
|
9917
10167
|
* @detail api
|
|
@@ -9963,11 +10213,50 @@ declare namespace live {
|
|
|
9963
10213
|
*
|
|
9964
10214
|
*/
|
|
9965
10215
|
closeInfoPanel(): void;
|
|
10216
|
+
openAbr(): void;
|
|
10217
|
+
closeAbr(): void;
|
|
9966
10218
|
/** {zh}
|
|
9967
10219
|
* @brief 调用此方法更新 DRM 鉴权配置。
|
|
9968
10220
|
* @hidden
|
|
9969
10221
|
*/
|
|
9970
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>;
|
|
9971
10260
|
}
|
|
9972
10261
|
/** {zh}
|
|
9973
10262
|
* @detail api
|