@scarlett-player/ui 0.1.1 → 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/index.cjs CHANGED
@@ -696,8 +696,12 @@ var ProgressBar = class {
696
696
  if (this.wasPlayingBeforeDrag) {
697
697
  const video = getVideo(this.api.container);
698
698
  if (video && video.paused) {
699
- video.play().catch(() => {
700
- });
699
+ const resumePlayback = () => {
700
+ video.removeEventListener("seeked", resumePlayback);
701
+ video.play().catch(() => {
702
+ });
703
+ };
704
+ video.addEventListener("seeked", resumePlayback);
701
705
  }
702
706
  }
703
707
  }
package/dist/index.js CHANGED
@@ -665,8 +665,12 @@ var ProgressBar = class {
665
665
  if (this.wasPlayingBeforeDrag) {
666
666
  const video = getVideo(this.api.container);
667
667
  if (video && video.paused) {
668
- video.play().catch(() => {
669
- });
668
+ const resumePlayback = () => {
669
+ video.removeEventListener("seeked", resumePlayback);
670
+ video.play().catch(() => {
671
+ });
672
+ };
673
+ video.addEventListener("seeked", resumePlayback);
670
674
  }
671
675
  }
672
676
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scarlett-player/ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "UI Controls Plugin for Scarlett Player",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -32,7 +32,7 @@
32
32
  "@scarlett-player/core": "^0.1.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@scarlett-player/core": "file:../../core",
35
+ "@scarlett-player/core": "workspace:*",
36
36
  "tsup": "^8.0.0",
37
37
  "typescript": "^5.3.0",
38
38
  "vitest": "^1.6.0",