diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b898c89..dd680648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Error dialog doesn't close automatically when playback recovers after an error - All audio track names are shown as "Other" in multi audio track videos ## [0.44.5] - 2026-01-17 diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index a1c3ff97..17d40fc1 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -329,6 +329,9 @@ function OnVideoContentJobErrorDialogResponse(event as object) shouldPlayNext = false if event <> invalid dialog = event.getRoSGNode() + if m.errorDialog <> invalid and dialog.isSameNode(m.errorDialog) + m.errorDialog = invalid + end if dialog.unobserveFieldScoped("wasClosed") shouldPlayNext = dialog.actualButtonSelected = 0 end if @@ -444,6 +447,14 @@ function OnVideoPlayerStateChange() as void ' Reset isSeekingPosition when started to play the video if state = "playing" m.isSeekingPosition = false + + ' If we somehow was able to recover playback after an error dialog, close the dialog + errorDialog = m.errorDialog + if errorDialog <> invalid + m.errorDialog = invalid + errorDialog.unobserveFieldScoped("wasClosed") + errorDialog.close = true + end if end if ' If we successfully played the video, then any error that comes later is not due to a 403 (FORBIDDEN). @@ -520,6 +531,7 @@ function OnVideoPlayerStateChange() as void dialog = DialogUtils.ShowTimedDialogButtons(errorData.body, errorData.title, buttons, 0, 10, true) if dialog <> invalid + m.errorDialog = dialog dialog.observeFieldScoped("wasClosed", FuncName(OnVideoContentJobErrorDialogResponse)) else OnVideoContentJobErrorDialogResponse(invalid)