Fit more error info in the dialog when videos fail

This commit is contained in:
Brahim Hadriche committed 2023-07-29 20:38:47 -04:00
1 parent e4870a752b
commit 151e108183
6 files changed
+20 -7

No files matched your search

@@ -337,12 +337,16 @@ function OnVideoPlayerStateChange() as void
end if
if state = "error"
messageLines = []
messageLines.push(`errorMsg: ${m.top.errorMsg}`)
messageLines.push(`errorCode: ${m.top.errorCode}`)
messageLines.push(`errorStr: ${m.top.errorStr}`)
errorInfo = m.top.errorInfo
messageLines = [`VideoId: ${m.top.videoId}`]
for each info in errorInfo
messageLines.push(`${info}: ${errorInfo[info]}`)
end for
ShowDialog(messageLines, "Error playing video")
ShowDialog(messageLines, `Error playing video ${m.top.videoId}`)
CloseVideo()
end if
end function