From 91a62cd3ac870ae71f710ed72913dabfcdc9fbb4 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Mon, 27 May 2024 09:38:06 -0400 Subject: [PATCH] Bugfix --- CHANGELOG.md | 4 ++++ playlet-lib/src/components/VideoPlayer/SponsorBlock.bs | 2 +- playlet-lib/src/components/VideoPlayer/VideoPlayer.bs | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c9cc3b17..1b294f4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - A clock to show the time +### Fixed + +- Attempt to fix a race condition when closing player + ## [0.23.6] - 2024-05-23 ### Added diff --git a/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs b/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs index 615095a6..d760b3da 100644 --- a/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs +++ b/playlet-lib/src/components/VideoPlayer/SponsorBlock.bs @@ -115,7 +115,7 @@ namespace SponsorBlock function OnSponsorBlockTaskResults(output as object) as void m.sponsorBlockTask = invalid - if output.cancelled + if output.cancelled or m.onCloseCalled = true return end if diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index 73b677d4..55a14bf3 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -114,7 +114,7 @@ end function function OnVideoContentTaskResults(output as object) as void m.videoContentTask = invalid - if output.cancelled + if output.cancelled or m.onCloseCalled = true return end if