@volcengine/veplayer 2.11.1 → 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/umd/veplayer.d.ts CHANGED
@@ -5819,6 +5819,7 @@ declare enum LicenseFeature {
5819
5819
  H265 = "h265",
5820
5820
  PRELOAD = "preload",
5821
5821
  RTM = "rtm",
5822
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer",
5822
5823
  ABR = "abr",
5823
5824
  FLV_LOW_LATENCY = "flvLowLatency"
5824
5825
  }
@@ -6313,7 +6314,8 @@ type ErrorCode = ValueOf<typeof ErrorCode>;
6313
6314
  declare enum LiveLicenseFeature {
6314
6315
  RTM = "rtm",
6315
6316
  ABR = "abr",
6316
- FLV_LOW_LATENCY = "flvLowLatency"
6317
+ FLV_LOW_LATENCY = "flvLowLatency",
6318
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer"
6317
6319
  }
6318
6320
  /** {zh}
6319
6321
  * @list option
@@ -11034,6 +11036,7 @@ declare namespace live {
11034
11036
  H265 = "h265",
11035
11037
  PRELOAD = "preload",
11036
11038
  RTM = "rtm",
11039
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer",
11037
11040
  ABR = "abr",
11038
11041
  FLV_LOW_LATENCY = "flvLowLatency"
11039
11042
  }
@@ -11585,7 +11588,8 @@ declare namespace live {
11585
11588
  enum LiveLicenseFeature {
11586
11589
  RTM = "rtm",
11587
11590
  ABR = "abr",
11588
- FLV_LOW_LATENCY = "flvLowLatency"
11591
+ FLV_LOW_LATENCY = "flvLowLatency",
11592
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer"
11589
11593
  }
11590
11594
  /** {zh}
11591
11595
  * @list option
@@ -14620,7 +14620,7 @@ var __publicField = (obj, key, value) => {
14620
14620
  * @brief Retrieve the player SDK version number.
14621
14621
  */
14622
14622
  get playerVersion() {
14623
- return "2.11.1";
14623
+ return "2.11.2";
14624
14624
  }
14625
14625
  /** {zh}
14626
14626
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -31064,6 +31064,7 @@ Radeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1
31064
31064
  LicenseFeature2["H265"] = "h265";
31065
31065
  LicenseFeature2["PRELOAD"] = "preload";
31066
31066
  LicenseFeature2["RTM"] = "rtm";
31067
+ LicenseFeature2["RTM_ADAPTIVE_BUFFER"] = "rtmAdaptiveBuffer";
31067
31068
  LicenseFeature2["ABR"] = "abr";
31068
31069
  LicenseFeature2["FLV_LOW_LATENCY"] = "flvLowLatency";
31069
31070
  return LicenseFeature2;
@@ -56479,7 +56480,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
56479
56480
  device_id: deviceId,
56480
56481
  error_report_stop: true,
56481
56482
  ext: {
56482
- veplayer_version: "2.11.1",
56483
+ veplayer_version: "2.11.2",
56483
56484
  flv_version: "3.0.23-rc.6",
56484
56485
  hls_version: "3.0.21-rc.21",
56485
56486
  rts_version: "0.2.1-alpha.57"
@@ -62014,6 +62015,19 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
62014
62015
  code: ErrorCode.LICENSE_EXPIRED_RTM
62015
62016
  }
62016
62017
  },
62018
+ [
62019
+ "rtmAdaptiveBuffer"
62020
+ /* RTM_ADAPTIVE_BUFFER */
62021
+ ]: {
62022
+ BASE_LICENSE_NOT_SUPPORT: {
62023
+ type: "BASE_LICENSE_NOT_SUPPORT",
62024
+ feature: LicenseFeature.RTM_ADAPTIVE_BUFFER
62025
+ },
62026
+ LICENSE_EXPIRED: {
62027
+ type: "LICENSE_EXPIRED",
62028
+ feature: LicenseFeature.RTM_ADAPTIVE_BUFFER
62029
+ }
62030
+ },
62017
62031
  [LicenseFeature.PRELOAD]: {
62018
62032
  BASE_LICENSE_NOT_SUPPORT: {
62019
62033
  type: "BASE_LICENSE_NOT_SUPPORT",
@@ -62045,6 +62059,15 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
62045
62059
  }
62046
62060
  }
62047
62061
  };
62062
+ const premiumFeatureList = (
62063
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
62064
+ // @ts-ignore
62065
+ [
62066
+ LicenseFeature.RTM_ADAPTIVE_BUFFER,
62067
+ LicenseFeature.ABR,
62068
+ LicenseFeature.FLV_LOW_LATENCY
62069
+ ]
62070
+ );
62048
62071
  class LicenseEventEmitter {
62049
62072
  constructor() {
62050
62073
  __publicField(this, "player");
@@ -62115,6 +62138,9 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
62115
62138
  // 验证 License 是否支持该 feature
62116
62139
  checkLiveLicenseFeature(feature) {
62117
62140
  var _a, _b;
62141
+ if (!premiumFeatureList.includes(feature)) {
62142
+ return;
62143
+ }
62118
62144
  const result = licenseManager.licenseSupportModuleList.includes(feature);
62119
62145
  if (!result) {
62120
62146
  if (this.licenseCheckResult === LicenseEdition.EDITION_STANDARD) {
@@ -62642,7 +62668,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
62642
62668
  return LiveUrlType.Rtm;
62643
62669
  }
62644
62670
  get defaultFallbackStrategy() {
62645
- return { [FallbackKind.Error]: { shouldFallback: () => true } };
62671
+ return { [FallbackKind.Error]: { excludeList: [2104, 2103, 2101, 2100] } };
62646
62672
  }
62647
62673
  static canGenerateOtherProtocol(options) {
62648
62674
  var _a;
@@ -62685,10 +62711,17 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
62685
62711
  i18n,
62686
62712
  enableSelector
62687
62713
  }) {
62714
+ var _a;
62688
62715
  const licenseRtmNotSupportedError = liveLicenseManager.checkLiveLicenseFeature(LicenseFeature.RTM);
62689
62716
  if (licenseRtmNotSupportedError == null ? void 0 : licenseRtmNotSupportedError.code) {
62690
62717
  throw create(licenseRtmNotSupportedError.code, i18n);
62691
62718
  }
62719
+ const licenseRtmAdaptiveBufferNotSupportedError = liveLicenseManager.checkLiveLicenseFeature(
62720
+ LicenseFeature.RTM_ADAPTIVE_BUFFER
62721
+ );
62722
+ if (licenseRtmAdaptiveBufferNotSupportedError && ((_a = options.rtm) == null ? void 0 : _a.enableAdaptiveJitterBuffer)) {
62723
+ options.rtm.enableAdaptiveJitterBuffer = false;
62724
+ }
62692
62725
  this.protocolStrategy = await getRtmStrategy(
62693
62726
  enableSelector ? {
62694
62727
  options,
@@ -74151,7 +74184,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
74151
74184
  }
74152
74185
  await ((_a = liveVeStrategy.veStrategyManager) == null ? void 0 : _a.init({
74153
74186
  ...options,
74154
- playerVersion: "2.11.1",
74187
+ playerVersion: "2.11.2",
74155
74188
  type: "LIVE"
74156
74189
  }));
74157
74190
  return liveVeStrategy.veStrategyManager;
@@ -5819,6 +5819,7 @@ declare enum LicenseFeature {
5819
5819
  H265 = "h265",
5820
5820
  PRELOAD = "preload",
5821
5821
  RTM = "rtm",
5822
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer",
5822
5823
  ABR = "abr",
5823
5824
  FLV_LOW_LATENCY = "flvLowLatency"
5824
5825
  }
@@ -6313,7 +6314,8 @@ type ErrorCode = ValueOf<typeof ErrorCode>;
6313
6314
  declare enum LiveLicenseFeature {
6314
6315
  RTM = "rtm",
6315
6316
  ABR = "abr",
6316
- FLV_LOW_LATENCY = "flvLowLatency"
6317
+ FLV_LOW_LATENCY = "flvLowLatency",
6318
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer"
6317
6319
  }
6318
6320
  /** {zh}
6319
6321
  * @list option
@@ -11034,6 +11036,7 @@ declare namespace live {
11034
11036
  H265 = "h265",
11035
11037
  PRELOAD = "preload",
11036
11038
  RTM = "rtm",
11039
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer",
11037
11040
  ABR = "abr",
11038
11041
  FLV_LOW_LATENCY = "flvLowLatency"
11039
11042
  }
@@ -11585,7 +11588,8 @@ declare namespace live {
11585
11588
  enum LiveLicenseFeature {
11586
11589
  RTM = "rtm",
11587
11590
  ABR = "abr",
11588
- FLV_LOW_LATENCY = "flvLowLatency"
11591
+ FLV_LOW_LATENCY = "flvLowLatency",
11592
+ RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer"
11589
11593
  }
11590
11594
  /** {zh}
11591
11595
  * @list option
@@ -14620,7 +14620,7 @@ var __publicField = (obj, key, value) => {
14620
14620
  * @brief Retrieve the player SDK version number.
14621
14621
  */
14622
14622
  get playerVersion() {
14623
- return "2.11.1";
14623
+ return "2.11.2";
14624
14624
  }
14625
14625
  /** {zh}
14626
14626
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -31064,6 +31064,7 @@ Radeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1
31064
31064
  LicenseFeature2["H265"] = "h265";
31065
31065
  LicenseFeature2["PRELOAD"] = "preload";
31066
31066
  LicenseFeature2["RTM"] = "rtm";
31067
+ LicenseFeature2["RTM_ADAPTIVE_BUFFER"] = "rtmAdaptiveBuffer";
31067
31068
  LicenseFeature2["ABR"] = "abr";
31068
31069
  LicenseFeature2["FLV_LOW_LATENCY"] = "flvLowLatency";
31069
31070
  return LicenseFeature2;
@@ -56479,7 +56480,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
56479
56480
  device_id: deviceId,
56480
56481
  error_report_stop: true,
56481
56482
  ext: {
56482
- veplayer_version: "2.11.1",
56483
+ veplayer_version: "2.11.2",
56483
56484
  flv_version: "3.0.23-rc.6",
56484
56485
  hls_version: "3.0.21-rc.21",
56485
56486
  rts_version: "0.2.1-alpha.57"
@@ -62014,6 +62015,19 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
62014
62015
  code: ErrorCode.LICENSE_EXPIRED_RTM
62015
62016
  }
62016
62017
  },
62018
+ [
62019
+ "rtmAdaptiveBuffer"
62020
+ /* RTM_ADAPTIVE_BUFFER */
62021
+ ]: {
62022
+ BASE_LICENSE_NOT_SUPPORT: {
62023
+ type: "BASE_LICENSE_NOT_SUPPORT",
62024
+ feature: LicenseFeature.RTM_ADAPTIVE_BUFFER
62025
+ },
62026
+ LICENSE_EXPIRED: {
62027
+ type: "LICENSE_EXPIRED",
62028
+ feature: LicenseFeature.RTM_ADAPTIVE_BUFFER
62029
+ }
62030
+ },
62017
62031
  [LicenseFeature.PRELOAD]: {
62018
62032
  BASE_LICENSE_NOT_SUPPORT: {
62019
62033
  type: "BASE_LICENSE_NOT_SUPPORT",
@@ -62045,6 +62059,15 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
62045
62059
  }
62046
62060
  }
62047
62061
  };
62062
+ const premiumFeatureList = (
62063
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
62064
+ // @ts-ignore
62065
+ [
62066
+ LicenseFeature.RTM_ADAPTIVE_BUFFER,
62067
+ LicenseFeature.ABR,
62068
+ LicenseFeature.FLV_LOW_LATENCY
62069
+ ]
62070
+ );
62048
62071
  class LicenseEventEmitter {
62049
62072
  constructor() {
62050
62073
  __publicField(this, "player");
@@ -62115,6 +62138,9 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
62115
62138
  // 验证 License 是否支持该 feature
62116
62139
  checkLiveLicenseFeature(feature) {
62117
62140
  var _a, _b;
62141
+ if (!premiumFeatureList.includes(feature)) {
62142
+ return;
62143
+ }
62118
62144
  const result = licenseManager.licenseSupportModuleList.includes(feature);
62119
62145
  if (!result) {
62120
62146
  if (this.licenseCheckResult === LicenseEdition.EDITION_STANDARD) {
@@ -62642,7 +62668,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
62642
62668
  return LiveUrlType.Rtm;
62643
62669
  }
62644
62670
  get defaultFallbackStrategy() {
62645
- return { [FallbackKind.Error]: { shouldFallback: () => true } };
62671
+ return { [FallbackKind.Error]: { excludeList: [2104, 2103, 2101, 2100] } };
62646
62672
  }
62647
62673
  static canGenerateOtherProtocol(options) {
62648
62674
  var _a;
@@ -62685,10 +62711,17 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
62685
62711
  i18n,
62686
62712
  enableSelector
62687
62713
  }) {
62714
+ var _a;
62688
62715
  const licenseRtmNotSupportedError = liveLicenseManager.checkLiveLicenseFeature(LicenseFeature.RTM);
62689
62716
  if (licenseRtmNotSupportedError == null ? void 0 : licenseRtmNotSupportedError.code) {
62690
62717
  throw create(licenseRtmNotSupportedError.code, i18n);
62691
62718
  }
62719
+ const licenseRtmAdaptiveBufferNotSupportedError = liveLicenseManager.checkLiveLicenseFeature(
62720
+ LicenseFeature.RTM_ADAPTIVE_BUFFER
62721
+ );
62722
+ if (licenseRtmAdaptiveBufferNotSupportedError && ((_a = options.rtm) == null ? void 0 : _a.enableAdaptiveJitterBuffer)) {
62723
+ options.rtm.enableAdaptiveJitterBuffer = false;
62724
+ }
62692
62725
  this.protocolStrategy = await getRtmStrategy(
62693
62726
  enableSelector ? {
62694
62727
  options,
@@ -74158,7 +74191,7 @@ MediaSource ${JSON.stringify(attachMediaSourceData)} from ${logFromSource}`);
74158
74191
  }
74159
74192
  await ((_a = liveVeStrategy.veStrategyManager) == null ? void 0 : _a.init({
74160
74193
  ...options,
74161
- playerVersion: "2.11.1",
74194
+ playerVersion: "2.11.2",
74162
74195
  type: "LIVE"
74163
74196
  }));
74164
74197
  return liveVeStrategy.veStrategyManager;