Skip to content

Commit

Permalink
Log video player errors
Browse files Browse the repository at this point in the history
  • Loading branch information
iBicha committed Oct 6, 2023
1 parent 6abd18a commit 7818f77
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions playlet-lib/src/components/VideoPlayer/VideoPlayer.bs
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,15 @@ function OnVideoPlayerStateChange() as void
messageLines.push(`errorStr: ${m.top.errorStr}`)

errorInfo = m.top.errorInfo
for each info in errorInfo
messageLines.push(`${info}: ${errorInfo[info]}`)
end for
DialogUtils.ShowDialog(messageLines, `Error playing video ${m.top.content.videoId}`, true)
if errorInfo <> invalid
for each info in errorInfo
messageLines.push(`${info}: ${errorInfo[info]}`)
end for
end if

title = `Error playing video ${m.top.content.videoId}`
LogError(title, messageLines)
DialogUtils.ShowDialog(messageLines, title, true)
' TODO:P1 play next video in the queue after showing the error dialog
VideoUtils.CloseVideo()
end if
Expand Down

0 comments on commit 7818f77

Please sign in to comment.