@scarlett-player/embed 0.1.0 → 0.1.2

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.
package/dist/embed.js CHANGED
@@ -2731,8 +2731,8 @@ function createHLSPlugin(config) {
2731
2731
  isAutoQuality = false;
2732
2732
  const levelIndex = parseInt(quality.replace("level-", ""), 10);
2733
2733
  if (!isNaN(levelIndex) && levelIndex >= 0 && levelIndex < hls.levels.length) {
2734
- hls.currentLevel = levelIndex;
2735
- api?.logger.debug(`Quality: set to level ${levelIndex}`);
2734
+ hls.nextLevel = levelIndex;
2735
+ api?.logger.debug(`Quality: queued switch to level ${levelIndex}`);
2736
2736
  }
2737
2737
  }
2738
2738
  });
@@ -3516,8 +3516,12 @@ var ProgressBar = class {
3516
3516
  if (this.wasPlayingBeforeDrag) {
3517
3517
  const video = getVideo(this.api.container);
3518
3518
  if (video && video.paused) {
3519
- video.play().catch(() => {
3520
- });
3519
+ const resumePlayback = () => {
3520
+ video.removeEventListener("seeked", resumePlayback);
3521
+ video.play().catch(() => {
3522
+ });
3523
+ };
3524
+ video.addEventListener("seeked", resumePlayback);
3521
3525
  }
3522
3526
  }
3523
3527
  }