From 9dd634e8dd2541edf89f883fa33a7fed031f7b2c Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 30 Oct 2025 08:58:11 -0400 Subject: [PATCH] [skip ci] capture url errors --- playlet-lib/src/components/VideoPlayer/VideoContentJob.bs | 8 ++++++-- playlet-lib/src/components/VideoPlayer/VideoPlayer.bs | 5 +++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/playlet-lib/src/components/VideoPlayer/VideoContentJob.bs b/playlet-lib/src/components/VideoPlayer/VideoContentJob.bs index 88a79a21..4e21e281 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoContentJob.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoContentJob.bs @@ -129,8 +129,12 @@ function ExecuteJob() as void playletStreamUrlIndex: 0 }) - LogDebug("Setting first url:", streamUrls[0]) - contentNode.url = streamUrls[0] + firstUrl = streamUrls[0] + LogDebug("Setting first url:", firstUrl) + if StringUtils.IsNullOrEmpty(firstUrl) + LogError("First stream URL is empty!") + end if + contentNode.url = firstUrl SetCaptions(metadata, service, contentNode) diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index 9af40913..2e5bbfcc 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -460,10 +460,11 @@ function OnVideoPlayerStateChange() as void content.playletStreamUrlIndex = playletStreamUrlIndex if playletStreamUrlIndex < playletStreamUrls.Count() nextUrl = playletStreamUrls[playletStreamUrlIndex] - LogErrorNoTelemetry(`Stream ${currentUrl} failed to play. Trying next stream ${nextUrl}`) + msg = `Stream ${currentUrl} failed to play. Trying next stream ${nextUrl}` + LogErrorNoTelemetry(msg) LogTelemetryEvent({ level: "error" - message: `Stream ${currentUrl} failed to play. Trying next stream ${nextUrl}` + message: msg fingerprint: ["Stream failed to play. Trying next stream "] })