From 7818f778ea1f07e0a87cca53fb582cdce5deaa6f Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Fri, 6 Oct 2023 09:18:21 -0400 Subject: [PATCH] Log video player errors --- .../src/components/VideoPlayer/VideoPlayer.bs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index 0991bb12..e17e33ad 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -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