@volcengine/veplayer 2.7.1-rc.1 → 2.7.1-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.
@@ -14449,7 +14449,7 @@ class VePlayerBase {
14449
14449
  * @brief Retrieve the player SDK version number.
14450
14450
  */
14451
14451
  get playerVersion() {
14452
- return "2.7.1-rc.1";
14452
+ return "2.7.1-rc.3";
14453
14453
  }
14454
14454
  /** {zh}
14455
14455
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -14724,7 +14724,7 @@ class VePlayerBase {
14724
14724
  }
14725
14725
  }
14726
14726
  /** {zh}
14727
- * @brief 调用此方法开始播放 。
14727
+ * @brief 调用此方法开始播放。
14728
14728
  */
14729
14729
  /** {en}
14730
14730
  * @brief Starts playback.
@@ -15008,7 +15008,7 @@ class VePlayerBase {
15008
15008
  return transform(event, callback);
15009
15009
  }
15010
15010
  async _switch(targetDefinition) {
15011
- var _a, _b, _c, _d, _e, _f;
15011
+ var _a, _b, _c, _d, _e, _f, _g, _h;
15012
15012
  const preDefinition = clonedeep(this._sourceManager.definition);
15013
15013
  const isPaused = this._player.paused && !this._player.isError;
15014
15014
  const {
@@ -15021,9 +15021,9 @@ class VePlayerBase {
15021
15021
  targetDefinition.url = options == null ? void 0 : options.url;
15022
15022
  }
15023
15023
  this._sourceManager.switch(targetDefinition);
15024
- (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.sources.renderItemList();
15025
- (_d = (_c = this._player) == null ? void 0 : _c.plugins) == null ? void 0 : _d.definition.renderItemList();
15026
- const isSourceSwitching = ((_e = targetDefinition == null ? void 0 : targetDefinition.source) == null ? void 0 : _e.name) !== ((_f = preDefinition == null ? void 0 : preDefinition.source) == null ? void 0 : _f.name);
15024
+ (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.sources) == null ? void 0 : _c.renderItemList();
15025
+ (_f = (_e = (_d = this._player) == null ? void 0 : _d.plugins) == null ? void 0 : _e.definition) == null ? void 0 : _f.renderItemList();
15026
+ 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);
15027
15027
  this._player.config.url = targetDefinition.url;
15028
15028
  if (isSameProtocol) {
15029
15029
  if (isSourceSwitching) {
@@ -22706,10 +22706,10 @@ class Logger extends Plugin {
22706
22706
  device_id: this.config.deviceId,
22707
22707
  error_report_stop: true,
22708
22708
  ext: {
22709
- veplayer_version: "2.7.1-rc.1",
22709
+ veplayer_version: "2.7.1-rc.3",
22710
22710
  flv_version: "3.0.21-rc.21",
22711
22711
  hls_version: "3.0.21-rc.21",
22712
- rts_version: "0.2.1-alpha.14"
22712
+ rts_version: "0.2.1-alpha.32"
22713
22713
  }
22714
22714
  });
22715
22715
  }
@@ -23898,6 +23898,12 @@ class VePlayerLive extends VePlayerBase {
23898
23898
  */
23899
23899
  constructor(options) {
23900
23900
  super(options);
23901
+ /** {en}
23902
+ * @hidden
23903
+ */
23904
+ /** {zh}
23905
+ * @hidden
23906
+ */
23901
23907
  __publicField(this, "_protocolManager");
23902
23908
  }
23903
23909
  /** {zh}
@@ -24008,10 +24014,11 @@ class VePlayerLive extends VePlayerBase {
24008
24014
  }
24009
24015
  /** {zh}
24010
24016
  * @brief 调用此方法更新 DRM 配置。
24017
+ * @param config DRM 配置对象,包含 Fairplay DRM 的相关设置。
24011
24018
  */
24012
24019
  /** {en}
24013
24020
  * @brief Use this method to update DRM configuration.
24014
- * @param config
24021
+ * @param config A configuration object containing settings for Fairplay DRM.
24015
24022
  */
24016
24023
  updateDrmConfig(config) {
24017
24024
  var _a, _b, _c;
@@ -24089,10 +24096,29 @@ class VePlayerLive extends VePlayerBase {
24089
24096
  var _a, _b, _c;
24090
24097
  return (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.hls) == null ? void 0 : _c.getStats();
24091
24098
  }
24099
+ /** {en}
24100
+ * @brief This method is used to update the playlist, supporting updates to source, resolution, and related information.
24101
+ * @param playlist The playlist, consisting of multiple `Source` type elements.
24102
+ * @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.
24103
+ * @param needUpdateProtocol Whether the protocol needs to be updated.
24104
+ *
24105
+ * - `true`: Forces the protocol update to ensure compatibility with the playback configuration or source.
24106
+ * - `false`: Does not update the protocol and continues to use the current configuration.
24107
+ */
24108
+ /** {zh}
24109
+ * @brief 调用此方法更新播放列表,支持更新源、清晰度等相关信息。
24110
+ * @param playlist 播放列表,包含多个 `Source` 类型的元素。
24111
+ * @param target 可选的目标配置项,可以指定清晰度或源。提供这些信息可以帮助更新特定清晰度或线路的播放源。
24112
+ * @param needUpdateProtocol 是否需要更新协议。
24113
+ * - `true`:强制更新协议,以确保播放配置或源的兼容性。
24114
+ * - `false`:不更新协议,继续使用当前配置。
24115
+ */
24092
24116
  async updatePlaylist(playlist, target, needUpdateProtocol = true) {
24093
24117
  var _a;
24094
24118
  if (needUpdateProtocol) {
24095
- await ((_a = this._protocolManager) == null ? void 0 : _a.update({ playlist }));
24119
+ await ((_a = this._protocolManager) == null ? void 0 : _a.update({
24120
+ playlist
24121
+ }));
24096
24122
  }
24097
24123
  return super.updatePlaylist(playlist, target);
24098
24124
  }
@@ -24128,7 +24154,9 @@ async function createLivePlayer(options) {
24128
24154
  i18nManager: i18n,
24129
24155
  preProcessUrl: (url) => {
24130
24156
  if (isType(".ts", url)) {
24131
- return { url };
24157
+ return {
24158
+ url
24159
+ };
24132
24160
  }
24133
24161
  return {
24134
24162
  url: generateUrlWithSessionId(url)
@@ -24136,7 +24164,9 @@ async function createLivePlayer(options) {
24136
24164
  },
24137
24165
  async preparePlugins(url) {
24138
24166
  if (!protocolManager.enableSelector) {
24139
- await protocolManager.update({ url });
24167
+ await protocolManager.update({
24168
+ url
24169
+ });
24140
24170
  }
24141
24171
  return protocolManager.getStrategy(player, i18n);
24142
24172
  }