@volcengine/veplayer 2.1.0-rc.2 → 2.1.0

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.
@@ -13180,6 +13180,7 @@ var __publicField = (obj, key, value) => {
13180
13180
  async switch(target, options) {
13181
13181
  var _a, _b;
13182
13182
  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) {
13183
+ this._sourceManager.updateSources(target);
13183
13184
  await this._switchUrl(target);
13184
13185
  return this._sourceManager.definition;
13185
13186
  }
@@ -13476,7 +13477,7 @@ var __publicField = (obj, key, value) => {
13476
13477
  async _switchUrl(url) {
13477
13478
  const { plugins: newPlugins, options } = await this.prepare(url) || {};
13478
13479
  const newUrl = (options == null ? void 0 : options.url) ?? url;
13479
- this._sourceManager.updateSources(newUrl);
13480
+ this._sourceManager.url = newUrl;
13480
13481
  if (newPlugins == null ? void 0 : newPlugins.length) {
13481
13482
  this._callBeforePlayerInitForUrl(newPlugins, newUrl);
13482
13483
  } else {