diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f646eac..8d79d5fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Error dialog for video load fail - SponsorBlock sections and category info +### Fixed +- Bug where playing and exiting a video too quickly would cause the video to play in the background. + ## [0.4.0] - 2022-11-24 ### Added - Play video API diff --git a/src/components/VideoPlayer/Video.bs b/src/components/VideoPlayer/Video.bs index 2d69022d..badc0430 100644 --- a/src/components/VideoPlayer/Video.bs +++ b/src/components/VideoPlayer/Video.bs @@ -87,7 +87,10 @@ function StartVideoDetailsTask(videoId as string) input: { videoId: videoId } - }).then(function(task as object) + }).then(function(task as object) as void + if m.videoPlayer.control = "stop" + return + end if videoId = task.output.videoId metadata = task.output.metadata if metadata <> invalid