@volcengine/veplayer 2.1.0-rc.1 → 2.1.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.
@@ -13176,6 +13176,7 @@ class VePlayerBase {
13176
13176
  async switch(target, options) {
13177
13177
  var _a, _b;
13178
13178
  if (typeof target === "string" && this._sourceManager.sources.length === 1 && ((_b = (_a = this._sourceManager.sources) == null ? void 0 : _a[0].definitions) == null ? void 0 : _b.length) === 1) {
13179
+ this._sourceManager.updateSources(target);
13179
13180
  await this._switchUrl(target);
13180
13181
  return this._sourceManager.definition;
13181
13182
  }
@@ -13472,7 +13473,7 @@ class VePlayerBase {
13472
13473
  async _switchUrl(url) {
13473
13474
  const { plugins: newPlugins, options } = await this.prepare(url) || {};
13474
13475
  const newUrl = (options == null ? void 0 : options.url) ?? url;
13475
- this._sourceManager.updateSources(newUrl);
13476
+ this._sourceManager.url = newUrl;
13476
13477
  if (newPlugins == null ? void 0 : newPlugins.length) {
13477
13478
  this._callBeforePlayerInitForUrl(newPlugins, newUrl);
13478
13479
  } else {