@byteplus/veplayer 2.8.0-rc.1 → 2.8.0-rc.3

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.
@@ -14454,7 +14454,7 @@ class VePlayerBase {
14454
14454
  * @brief Retrieve the player SDK version number.
14455
14455
  */
14456
14456
  get playerVersion() {
14457
- return "2.8.0-rc.1";
14457
+ return "2.8.0-rc.3";
14458
14458
  }
14459
14459
  /** {zh}
14460
14460
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -14729,7 +14729,7 @@ class VePlayerBase {
14729
14729
  }
14730
14730
  }
14731
14731
  /** {zh}
14732
- * @brief 调用此方法开始播放 。
14732
+ * @brief 调用此方法开始播放。
14733
14733
  */
14734
14734
  /** {en}
14735
14735
  * @brief Starts playback.
@@ -15013,7 +15013,7 @@ class VePlayerBase {
15013
15013
  return transform(event, callback);
15014
15014
  }
15015
15015
  async _switch(targetDefinition) {
15016
- var _a, _b, _c, _d, _e2, _f;
15016
+ var _a, _b, _c, _d, _e2, _f, _g, _h;
15017
15017
  const preDefinition = clonedeep(this._sourceManager.definition);
15018
15018
  const isPaused = this._player.paused && !this._player.isError;
15019
15019
  const {
@@ -15026,9 +15026,9 @@ class VePlayerBase {
15026
15026
  targetDefinition.url = options == null ? void 0 : options.url;
15027
15027
  }
15028
15028
  this._sourceManager.switch(targetDefinition);
15029
- (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.sources.renderItemList();
15030
- (_d = (_c = this._player) == null ? void 0 : _c.plugins) == null ? void 0 : _d.definition.renderItemList();
15031
- const isSourceSwitching = ((_e2 = targetDefinition == null ? void 0 : targetDefinition.source) == null ? void 0 : _e2.name) !== ((_f = preDefinition == null ? void 0 : preDefinition.source) == null ? void 0 : _f.name);
15029
+ (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.sources) == null ? void 0 : _c.renderItemList();
15030
+ (_f = (_e2 = (_d = this._player) == null ? void 0 : _d.plugins) == null ? void 0 : _e2.definition) == null ? void 0 : _f.renderItemList();
15031
+ const isSourceSwitching = ((_g = targetDefinition == null ? void 0 : targetDefinition.source) == null ? void 0 : _g.name) !== ((_h = preDefinition == null ? void 0 : preDefinition.source) == null ? void 0 : _h.name);
15032
15032
  this._player.config.url = targetDefinition.url;
15033
15033
  if (isSameProtocol) {
15034
15034
  if (isSourceSwitching) {
@@ -21941,10 +21941,10 @@ let Logger$1 = class Logger extends Plugin {
21941
21941
  device_id: (_f = (_e2 = this.player.config) == null ? void 0 : _e2.teaTracker) == null ? void 0 : _f.deviceId,
21942
21942
  error_report_stop: true,
21943
21943
  ext: {
21944
- veplayer_version: "2.8.0-rc.1",
21944
+ veplayer_version: "2.8.0-rc.3",
21945
21945
  flv_version: "3.0.21-rc.21",
21946
21946
  hls_version: "3.0.21-rc.21",
21947
- rts_version: "0.2.1-alpha.29"
21947
+ rts_version: "0.2.1-alpha.30"
21948
21948
  }
21949
21949
  });
21950
21950
  }
@@ -36932,7 +36932,7 @@ class VeStrategyManager {
36932
36932
  }
36933
36933
  const { appId, deviceId, Module } = this.config;
36934
36934
  if (appId && deviceId && Module) {
36935
- await Module.bootstrap({
36935
+ Module.bootstrap({
36936
36936
  ...this.config,
36937
36937
  tracker: {
36938
36938
  Collector: this.Collector,
@@ -41479,6 +41479,12 @@ class VePlayerLive extends VePlayerBase {
41479
41479
  */
41480
41480
  constructor(options) {
41481
41481
  super(options);
41482
+ /** {en}
41483
+ * @hidden
41484
+ */
41485
+ /** {zh}
41486
+ * @hidden
41487
+ */
41482
41488
  __publicField(this, "_protocolManager");
41483
41489
  }
41484
41490
  /** {zh}
@@ -41589,10 +41595,11 @@ class VePlayerLive extends VePlayerBase {
41589
41595
  }
41590
41596
  /** {zh}
41591
41597
  * @brief 调用此方法更新 DRM 配置。
41598
+ * @param config DRM 配置对象,包含 Fairplay DRM 的相关设置。
41592
41599
  */
41593
41600
  /** {en}
41594
41601
  * @brief Use this method to update DRM configuration.
41595
- * @param config
41602
+ * @param config A configuration object containing settings for Fairplay DRM.
41596
41603
  */
41597
41604
  updateDrmConfig(config2) {
41598
41605
  var _a, _b, _c;
@@ -41670,10 +41677,29 @@ class VePlayerLive extends VePlayerBase {
41670
41677
  var _a, _b, _c;
41671
41678
  return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.hls) == null ? void 0 : _c.getStats();
41672
41679
  }
41680
+ /** {en}
41681
+ * @brief This method is used to update the playlist, supporting updates to source, resolution, and related information.
41682
+ * @param playlist The playlist, consisting of multiple `Source` type elements.
41683
+ * @param target An optional target configuration, which can specify the resolution or source. Providing this information helps update the playback source for a specific resolution or stream.
41684
+ * @param needUpdateProtocol Whether the protocol needs to be updated.
41685
+ *
41686
+ * - `true`: Forces the protocol update to ensure compatibility with the playback configuration or source.
41687
+ * - `false`: Does not update the protocol and continues to use the current configuration.
41688
+ */
41689
+ /** {zh}
41690
+ * @brief 调用此方法更新播放列表,支持更新源、清晰度等相关信息。
41691
+ * @param playlist 播放列表,包含多个 `Source` 类型的元素。
41692
+ * @param target 可选的目标配置项,可以指定清晰度或源。提供这些信息可以帮助更新特定清晰度或线路的播放源。
41693
+ * @param needUpdateProtocol 是否需要更新协议。
41694
+ * - `true`:强制更新协议,以确保播放配置或源的兼容性。
41695
+ * - `false`:不更新协议,继续使用当前配置。
41696
+ */
41673
41697
  async updatePlaylist(playlist, target, needUpdateProtocol = true) {
41674
41698
  var _a;
41675
41699
  if (needUpdateProtocol) {
41676
- await ((_a = this._protocolManager) == null ? void 0 : _a.update({ playlist }));
41700
+ await ((_a = this._protocolManager) == null ? void 0 : _a.update({
41701
+ playlist
41702
+ }));
41677
41703
  }
41678
41704
  return super.updatePlaylist(playlist, target);
41679
41705
  }
@@ -41713,7 +41739,9 @@ async function createLivePlayer(options) {
41713
41739
  teaTracker,
41714
41740
  preProcessUrl: (url2) => {
41715
41741
  if (isType(".ts", url2)) {
41716
- return { url: url2 };
41742
+ return {
41743
+ url: url2
41744
+ };
41717
41745
  }
41718
41746
  return {
41719
41747
  url: generateUrlWithSessionId(url2)
@@ -41721,7 +41749,9 @@ async function createLivePlayer(options) {
41721
41749
  },
41722
41750
  async preparePlugins(url2) {
41723
41751
  if (!protocolManager.enableSelector) {
41724
- await protocolManager.update({ url: url2 });
41752
+ await protocolManager.update({
41753
+ url: url2
41754
+ });
41725
41755
  }
41726
41756
  return protocolManager.getStrategy(
41727
41757
  player,