@byteplus/veplayer 2.11.0 → 2.11.2
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/veplayer.biz.live.development.js +33 -11
- package/esm/veplayer.biz.live.production.js +1 -1
- package/esm/veplayer.d.ts +6 -8
- package/esm/veplayer.development.js +36 -14
- package/esm/veplayer.live.d.ts +6 -8
- package/esm/veplayer.live.development.js +36 -14
- package/esm/veplayer.live.production.js +2 -2
- package/esm/veplayer.production.js +2 -2
- package/esm/veplayer.vod.development.js +1 -1
- package/esm/veplayer.vod.production.js +1 -1
- package/package.json +1 -1
- package/umd/veplayer.biz.live.development.js +33 -11
- package/umd/veplayer.biz.live.production.js +1 -1
- package/umd/veplayer.d.ts +6 -8
- package/umd/veplayer.development.js +36 -14
- package/umd/veplayer.live.d.ts +6 -8
- package/umd/veplayer.live.development.js +36 -14
- package/umd/veplayer.live.production.js +1 -1
- package/umd/veplayer.production.js +1 -1
- package/umd/veplayer.vod.development.js +1 -1
- package/umd/veplayer.vod.production.js +1 -1
- package/veplayer.d.ts +6 -8
- package/veplayer.live.d.ts +6 -8
package/package.json
CHANGED
|
@@ -29002,6 +29002,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
29002
29002
|
LicenseFeature2["H265"] = "h265";
|
|
29003
29003
|
LicenseFeature2["PRELOAD"] = "preload";
|
|
29004
29004
|
LicenseFeature2["RTM"] = "rtm";
|
|
29005
|
+
LicenseFeature2["RTM_ADAPTIVE_BUFFER"] = "rtmAdaptiveBuffer";
|
|
29005
29006
|
LicenseFeature2["ABR"] = "abr";
|
|
29006
29007
|
LicenseFeature2["FLV_LOW_LATENCY"] = "flvLowLatency";
|
|
29007
29008
|
return LicenseFeature2;
|
|
@@ -34375,6 +34376,19 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
34375
34376
|
code: ErrorCode$1.LICENSE_EXPIRED_RTM
|
|
34376
34377
|
}
|
|
34377
34378
|
},
|
|
34379
|
+
[
|
|
34380
|
+
"rtmAdaptiveBuffer"
|
|
34381
|
+
/* RTM_ADAPTIVE_BUFFER */
|
|
34382
|
+
]: {
|
|
34383
|
+
BASE_LICENSE_NOT_SUPPORT: {
|
|
34384
|
+
type: "BASE_LICENSE_NOT_SUPPORT",
|
|
34385
|
+
feature: LicenseFeature.RTM_ADAPTIVE_BUFFER
|
|
34386
|
+
},
|
|
34387
|
+
LICENSE_EXPIRED: {
|
|
34388
|
+
type: "LICENSE_EXPIRED",
|
|
34389
|
+
feature: LicenseFeature.RTM_ADAPTIVE_BUFFER
|
|
34390
|
+
}
|
|
34391
|
+
},
|
|
34378
34392
|
[LicenseFeature.PRELOAD]: {
|
|
34379
34393
|
BASE_LICENSE_NOT_SUPPORT: {
|
|
34380
34394
|
type: "BASE_LICENSE_NOT_SUPPORT",
|
|
@@ -34406,6 +34420,16 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
34406
34420
|
}
|
|
34407
34421
|
}
|
|
34408
34422
|
};
|
|
34423
|
+
const premiumFeatureList = (
|
|
34424
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
34425
|
+
// @ts-ignore
|
|
34426
|
+
[
|
|
34427
|
+
LicenseFeature.RTM,
|
|
34428
|
+
LicenseFeature.RTM_ADAPTIVE_BUFFER,
|
|
34429
|
+
LicenseFeature.ABR,
|
|
34430
|
+
LicenseFeature.FLV_LOW_LATENCY
|
|
34431
|
+
]
|
|
34432
|
+
);
|
|
34409
34433
|
class LicenseEventEmitter {
|
|
34410
34434
|
constructor() {
|
|
34411
34435
|
__publicField(this, "player");
|
|
@@ -34446,17 +34470,11 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
34446
34470
|
}
|
|
34447
34471
|
class LiveLicenseManager {
|
|
34448
34472
|
constructor() {
|
|
34449
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
34450
|
-
// @ts-ignore
|
|
34451
|
-
__publicField(this, "enableLiveLicenseCheck", true);
|
|
34452
34473
|
__publicField(this, "licenseSupportModuleList", []);
|
|
34453
34474
|
__publicField(this, "licenseStatusResult");
|
|
34454
34475
|
__publicField(this, "licenseCheckResult");
|
|
34455
34476
|
}
|
|
34456
34477
|
async create() {
|
|
34457
|
-
if (!this.enableLiveLicenseCheck) {
|
|
34458
|
-
return;
|
|
34459
|
-
}
|
|
34460
34478
|
const [license, featureList] = await Promise.all([
|
|
34461
34479
|
licenseManager$1.checkLicense(),
|
|
34462
34480
|
licenseManager$1.checkModuleList()
|
|
@@ -34470,9 +34488,6 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
34470
34488
|
}
|
|
34471
34489
|
// 获取 License Fatal 报错信息,License 有问题或者 Domain 不匹配
|
|
34472
34490
|
getLicenseFatalError() {
|
|
34473
|
-
if (!this.enableLiveLicenseCheck) {
|
|
34474
|
-
return;
|
|
34475
|
-
}
|
|
34476
34491
|
if (this.licenseStatusResult === LicenseStatus.LICENSE_STATUS_INVALID) {
|
|
34477
34492
|
console.warn(`current license is invalid, please check license`);
|
|
34478
34493
|
return ErrorCode$1.LICENSE_STATUS_INVALID;
|
|
@@ -34485,7 +34500,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
34485
34500
|
// 验证 License 是否支持该 feature
|
|
34486
34501
|
checkLiveLicenseFeature(feature) {
|
|
34487
34502
|
var _a, _b;
|
|
34488
|
-
if (!
|
|
34503
|
+
if (!premiumFeatureList.includes(feature)) {
|
|
34489
34504
|
return;
|
|
34490
34505
|
}
|
|
34491
34506
|
const result = licenseManager$1.licenseSupportModuleList.includes(feature);
|
|
@@ -35033,7 +35048,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
35033
35048
|
return LiveUrlType.Rtm;
|
|
35034
35049
|
}
|
|
35035
35050
|
get defaultFallbackStrategy() {
|
|
35036
|
-
return { [FallbackKind.Error]: {
|
|
35051
|
+
return { [FallbackKind.Error]: { excludeList: [2104, 2103, 2101, 2100] } };
|
|
35037
35052
|
}
|
|
35038
35053
|
static canGenerateOtherProtocol(options) {
|
|
35039
35054
|
var _a;
|
|
@@ -35076,10 +35091,17 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
|
|
|
35076
35091
|
i18n,
|
|
35077
35092
|
enableSelector
|
|
35078
35093
|
}) {
|
|
35094
|
+
var _a;
|
|
35079
35095
|
const licenseRtmNotSupportedError = liveLicenseManager.checkLiveLicenseFeature(LicenseFeature.RTM);
|
|
35080
35096
|
if (licenseRtmNotSupportedError == null ? void 0 : licenseRtmNotSupportedError.code) {
|
|
35081
35097
|
throw create$d(licenseRtmNotSupportedError.code, i18n);
|
|
35082
35098
|
}
|
|
35099
|
+
const licenseRtmAdaptiveBufferNotSupportedError = liveLicenseManager.checkLiveLicenseFeature(
|
|
35100
|
+
LicenseFeature.RTM_ADAPTIVE_BUFFER
|
|
35101
|
+
);
|
|
35102
|
+
if (licenseRtmAdaptiveBufferNotSupportedError && ((_a = options.rtm) == null ? void 0 : _a.enableAdaptiveJitterBuffer)) {
|
|
35103
|
+
options.rtm.enableAdaptiveJitterBuffer = false;
|
|
35104
|
+
}
|
|
35083
35105
|
this.protocolStrategy = await getRtmStrategy(
|
|
35084
35106
|
enableSelector ? {
|
|
35085
35107
|
options,
|