Bug fixes

This commit is contained in:
Brahim Hadriche committed 2024-03-09 22:55:07 -05:00
1 parent 6b47440cb5
commit 26ed985ecc
3 files changed
+19 -1

No files matched your search

+5
View File
@@ -11,6 +11,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Subscriber count in the channel page
### Fixed
- A bug where videos that did not premiere yet would error with a playback error
- A bug where a playback error dialog is dismissed too fast before playing the next video
## [0.21.0] - 2024-03-07
### Added
@@ -36,6 +36,16 @@ function VideoContentTask(input as object) as object
contentNode.secondaryTitle = metadata.author
contentNode.live = metadata.liveNow
if IsString(metadata.error)
' Adding metadata allows us to play next recommended video after displaying the error
contentNode.addFields({ metadata: metadata })
return {
success: false
error: metadata.error
}
end if
streamUrls = CreateStreamUrls(metadata, service, preferencesNode, playletServerPort)
contentNode.url = streamUrls[0]
@@ -25,7 +25,9 @@ function Init()
m.videoPlayingSuccess = false
' ignoreNextFinishedState indicates if we should ignore the next finished state
' This is used to prevent the video from playing the next video when we are
' still trying to find a working stream url
' still trying to find a working stream url.
' This is also used to prevent playing the next video when we're still displaying
' an error dialog.
m.ignoreNextFinishedState = false
' Indicates that we're currently paused and seeking position
@@ -266,6 +268,7 @@ function OnVideoPlayerStateChange() as void
dialog = DialogUtils.ShowTimedDialogButtons(messageLines, title, ["Play next video", "Cancel"], 0, 10, true)
dialog.observeFieldScoped("wasClosed", FuncName(OnVideoContentTaskErrorDialogResponse))
m.ignoreNextFinishedState = true
end if
end function