Log video player errors

This commit is contained in:
Brahim Hadriche committed 2023-10-06 09:18:21 -04:00
1 parent 6abd18ab85
commit 7818f778ea
1 file changed
+9 -4
@@ -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