@volcengine/veplayer 2.5.0-rc.1 → 2.6.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 +79 -83
- package/esm/veplayer.biz.live.development.js +65 -18
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +1360 -316
- package/esm/veplayer.development.js +162 -74
- package/esm/veplayer.live.d.ts +1360 -316
- package/esm/veplayer.live.development.js +162 -74
- package/esm/veplayer.live.production.js +3 -3
- package/esm/veplayer.production.js +3 -3
- package/esm/veplayer.vod.d.ts +79 -83
- package/esm/veplayer.vod.development.js +96 -55
- package/esm/veplayer.vod.production.js +2 -2
- package/package.json +1 -1
- package/umd/index.d.ts +79 -83
- package/umd/veplayer.biz.live.development.js +65 -18
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +1360 -316
- package/umd/veplayer.development.js +162 -74
- package/umd/veplayer.live.d.ts +1360 -316
- package/umd/veplayer.live.development.js +162 -74
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.d.ts +79 -83
- package/umd/veplayer.vod.development.js +96 -55
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +1360 -316
- package/veplayer.live.d.ts +1360 -316
- package/veplayer.vod.d.ts +79 -83
|
@@ -2995,8 +2995,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2995
2995
|
device_id: this._deviceId,
|
|
2996
2996
|
ext: {
|
|
2997
2997
|
veplayer_version: "2.3.1-rc.1",
|
|
2998
|
-
flv_version: "3.0.
|
|
2999
|
-
hls_version: "3.0.
|
|
2998
|
+
flv_version: "3.0.21-rc.3",
|
|
2999
|
+
hls_version: "3.0.21-rc.3",
|
|
3000
3000
|
rts_version: "0.2.1-alpha.0"
|
|
3001
3001
|
}
|
|
3002
3002
|
});
|
|
@@ -3365,7 +3365,9 @@ var __publicField = (obj, key, value) => {
|
|
|
3365
3365
|
}
|
|
3366
3366
|
]);
|
|
3367
3367
|
const LIVE_DEFAULT_OPTIONS = {
|
|
3368
|
-
autoplay: {
|
|
3368
|
+
autoplay: {
|
|
3369
|
+
muted: true
|
|
3370
|
+
}
|
|
3369
3371
|
};
|
|
3370
3372
|
const LIVE_DEFAULT_PLUGINS = [...DEFAULT_PLUGINS, Refresh, Logger, InfoPanel];
|
|
3371
3373
|
var RTMCodec = /* @__PURE__ */ ((RTMCodec2) => {
|
|
@@ -3385,7 +3387,10 @@ var __publicField = (obj, key, value) => {
|
|
|
3385
3387
|
super(options);
|
|
3386
3388
|
}
|
|
3387
3389
|
/** {zh}
|
|
3388
|
-
* @brief
|
|
3390
|
+
* @brief 获取已经播放的时长,不包含暂停和等待时间,单位为秒。
|
|
3391
|
+
*/
|
|
3392
|
+
/** {en}
|
|
3393
|
+
* @brief Obtain the duration that has been played, excluding pause and waiting time, with the unit of seconds.
|
|
3389
3394
|
*/
|
|
3390
3395
|
get playTime() {
|
|
3391
3396
|
var _a, _b, _c, _d;
|
|
@@ -3444,7 +3449,10 @@ var __publicField = (obj, key, value) => {
|
|
|
3444
3449
|
(_a = this._player.plugins) == null ? void 0 : _a.infopanel.close();
|
|
3445
3450
|
}
|
|
3446
3451
|
/** {zh}
|
|
3447
|
-
* @brief
|
|
3452
|
+
* @brief 打开码率自适应(ABR)切换功能。
|
|
3453
|
+
*/
|
|
3454
|
+
/** {en}
|
|
3455
|
+
* @brief Enable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
3448
3456
|
*/
|
|
3449
3457
|
openAbr() {
|
|
3450
3458
|
var _a, _b, _c, _d;
|
|
@@ -3458,7 +3466,10 @@ var __publicField = (obj, key, value) => {
|
|
|
3458
3466
|
}
|
|
3459
3467
|
}
|
|
3460
3468
|
/** {zh}
|
|
3461
|
-
* @brief
|
|
3469
|
+
* @brief 关闭码率自适应(ABR)切换功能。
|
|
3470
|
+
*/
|
|
3471
|
+
/** {en}
|
|
3472
|
+
* @brief Disable the Adaptive Bitrate Streaming (ABR) switching feature.
|
|
3462
3473
|
*/
|
|
3463
3474
|
closeAbr() {
|
|
3464
3475
|
var _a, _b, _c, _d;
|
|
@@ -3472,18 +3483,25 @@ var __publicField = (obj, key, value) => {
|
|
|
3472
3483
|
}
|
|
3473
3484
|
}
|
|
3474
3485
|
/** {zh}
|
|
3475
|
-
* @brief 调用此方法更新 DRM
|
|
3476
|
-
|
|
3486
|
+
* @brief 调用此方法更新 DRM 配置。
|
|
3487
|
+
*/
|
|
3488
|
+
/** {en}
|
|
3489
|
+
* @brief Use this method to update DRM configuration.
|
|
3490
|
+
* @param config
|
|
3477
3491
|
*/
|
|
3478
3492
|
updateDrmConfig(config) {
|
|
3479
3493
|
var _a, _b, _c;
|
|
3480
3494
|
(_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.drm) == null ? void 0 : _c.updateDrmConfig(config);
|
|
3481
3495
|
}
|
|
3482
3496
|
/** {zh}
|
|
3483
|
-
* @brief
|
|
3484
|
-
* @param options
|
|
3497
|
+
* @brief 修改 ABR 配置,包含修改是否开启 ABR 功能,和修改其他清晰度。
|
|
3498
|
+
* @param options ABR 的配置。
|
|
3485
3499
|
* @returns
|
|
3486
3500
|
*/
|
|
3501
|
+
/** {en}
|
|
3502
|
+
* @brief Modify ABR configuration, including enabling or disabling the ABR feature and adjusting other resolutions.
|
|
3503
|
+
* @param options Configuration of ABR.
|
|
3504
|
+
*/
|
|
3487
3505
|
switchAbr(options) {
|
|
3488
3506
|
var _a, _b;
|
|
3489
3507
|
if (!((_a = this._player.plugins) == null ? void 0 : _a.abr)) {
|
|
@@ -3494,7 +3512,9 @@ var __publicField = (obj, key, value) => {
|
|
|
3494
3512
|
if (!url) {
|
|
3495
3513
|
return;
|
|
3496
3514
|
}
|
|
3497
|
-
this.switch(url, {
|
|
3515
|
+
this.switch(url, {
|
|
3516
|
+
seamless: true
|
|
3517
|
+
});
|
|
3498
3518
|
this._player.plugins.abr.bitrate = options.bitrate;
|
|
3499
3519
|
}
|
|
3500
3520
|
if (typeof (options == null ? void 0 : options.enable) !== "undefined") {
|
|
@@ -3502,25 +3522,34 @@ var __publicField = (obj, key, value) => {
|
|
|
3502
3522
|
}
|
|
3503
3523
|
}
|
|
3504
3524
|
/** {zh}
|
|
3505
|
-
* @brief 获取 RTM
|
|
3525
|
+
* @brief 获取 RTM 拉流的网络评估信息。
|
|
3506
3526
|
* @returns
|
|
3507
3527
|
*/
|
|
3528
|
+
/** {en}
|
|
3529
|
+
* @brief Obtain the network assessment information of RTM pull streaming.
|
|
3530
|
+
*/
|
|
3508
3531
|
getRTMNetWorkInfo() {
|
|
3509
3532
|
var _a, _b, _c;
|
|
3510
3533
|
return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.rts) == null ? void 0 : _c.getNetWorkInfo();
|
|
3511
3534
|
}
|
|
3512
3535
|
/** {zh}
|
|
3513
|
-
* @brief 获取 RTM
|
|
3536
|
+
* @brief 获取 RTM 拉流的播放信息。
|
|
3514
3537
|
* @returns
|
|
3515
3538
|
*/
|
|
3539
|
+
/** {en}
|
|
3540
|
+
* @brief Obtain the playback information of RTM pull stream.
|
|
3541
|
+
*/
|
|
3516
3542
|
async getRTMStats() {
|
|
3517
3543
|
var _a, _b, _c;
|
|
3518
3544
|
return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.rts) == null ? void 0 : _c.getStatsSnapshoot();
|
|
3519
3545
|
}
|
|
3520
3546
|
/** {zh}
|
|
3521
|
-
* @brief 获取 FLV
|
|
3547
|
+
* @brief 获取 FLV 拉流的播放信息。
|
|
3522
3548
|
* @returns
|
|
3523
3549
|
*/
|
|
3550
|
+
/** {en}
|
|
3551
|
+
* @brief Obtain the playback information of FLV pull streaming.
|
|
3552
|
+
*/
|
|
3524
3553
|
getFLVStats() {
|
|
3525
3554
|
var _a, _b, _c;
|
|
3526
3555
|
return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.flv) == null ? void 0 : _c.getStats();
|
|
@@ -3532,7 +3561,10 @@ var __publicField = (obj, key, value) => {
|
|
|
3532
3561
|
if (!options || !options.url && !options.playlist) {
|
|
3533
3562
|
throw create(ErrorCode.INVALID_PARAMETER, new VeI18n());
|
|
3534
3563
|
}
|
|
3535
|
-
const i18n = new VeI18n({
|
|
3564
|
+
const i18n = new VeI18n({
|
|
3565
|
+
lang: options == null ? void 0 : options.lang,
|
|
3566
|
+
i18n: options == null ? void 0 : options.i18n
|
|
3567
|
+
});
|
|
3536
3568
|
const finalOptions = {
|
|
3537
3569
|
...options,
|
|
3538
3570
|
plugins: [...LIVE_DEFAULT_PLUGINS, ...options.plugins ?? []]
|
|
@@ -3550,9 +3582,24 @@ var __publicField = (obj, key, value) => {
|
|
|
3550
3582
|
},
|
|
3551
3583
|
async preparePlugins(url) {
|
|
3552
3584
|
const [typeStrategy, drmStrategy, abrStrategy] = await Promise.all([
|
|
3553
|
-
getTypeStrategy(
|
|
3554
|
-
|
|
3555
|
-
|
|
3585
|
+
getTypeStrategy(
|
|
3586
|
+
{
|
|
3587
|
+
...finalOptions,
|
|
3588
|
+
url
|
|
3589
|
+
},
|
|
3590
|
+
player
|
|
3591
|
+
),
|
|
3592
|
+
getDrmStrategy(
|
|
3593
|
+
{
|
|
3594
|
+
...finalOptions,
|
|
3595
|
+
url
|
|
3596
|
+
},
|
|
3597
|
+
player
|
|
3598
|
+
),
|
|
3599
|
+
getAbrStrategy({
|
|
3600
|
+
...finalOptions,
|
|
3601
|
+
url
|
|
3602
|
+
})
|
|
3556
3603
|
]);
|
|
3557
3604
|
const { options: options2, plugins } = typeStrategy ?? {};
|
|
3558
3605
|
const { options: drmOptions, plugins: drmPlugins } = drmStrategy ?? {};
|