@volcengine/veplayer 2.10.0 → 2.10.1

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.
@@ -2297,6 +2297,7 @@ declare class VePlayerBase {
2297
2297
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2298
2298
  private _transformEvent;
2299
2299
  private _switch;
2300
+ private _restartLiveLogger;
2300
2301
  private _switchDifferentProtocolUrl;
2301
2302
  private _switchUrl;
2302
2303
  private _callBeforePlayerInitForUrl;
@@ -14379,7 +14379,7 @@ class VePlayerBase {
14379
14379
  * @brief Retrieve the player SDK version number.
14380
14380
  */
14381
14381
  get playerVersion() {
14382
- return "2.10.0";
14382
+ return "2.10.1";
14383
14383
  }
14384
14384
  /** {zh}
14385
14385
  * @brief 获取当前播放视频的清晰度唯一标识(definition)。
@@ -14941,6 +14941,7 @@ class VePlayerBase {
14941
14941
  var _a, _b, _c, _d, _e, _f, _g, _h;
14942
14942
  const preDefinition = clonedeep(this._sourceManager.definition);
14943
14943
  const isPaused = this._player.paused && !this._player.isError;
14944
+ this._restartLiveLogger();
14944
14945
  const {
14945
14946
  plugins: newPlugins,
14946
14947
  options,
@@ -14978,6 +14979,13 @@ class VePlayerBase {
14978
14979
  isDefinitionSwitching && this.emit(Events.AFTER_DEFINITION_CHANGE);
14979
14980
  }
14980
14981
  }
14982
+ _restartLiveLogger() {
14983
+ var _a, _b, _c, _d;
14984
+ const liveLogger = (_c = (_b = (_a = this._player) == null ? void 0 : _a.plugins) == null ? void 0 : _b.logger) == null ? void 0 : _c._liveLogger;
14985
+ if ((_d = liveLogger == null ? void 0 : liveLogger.logger) == null ? void 0 : _d.destroyed) {
14986
+ liveLogger == null ? void 0 : liveLogger.restart(false);
14987
+ }
14988
+ }
14981
14989
  async _switchDifferentProtocolUrl(plugins, url, isPaused, useSrc) {
14982
14990
  var _a, _b;
14983
14991
  if (useSrc && this._player.media) {
@@ -15014,6 +15022,7 @@ class VePlayerBase {
15014
15022
  }
15015
15023
  async _switchUrl(url, config) {
15016
15024
  const isPaused = this._player.paused && !this._player.isError;
15025
+ this._restartLiveLogger();
15017
15026
  const {
15018
15027
  plugins: newPlugins,
15019
15028
  options,