From f59ed85b62dfddfa6a7ef235d6cd71e3dca53426 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 30 Oct 2025 12:14:09 -0400 Subject: [PATCH] [skip ci] capture player error position and duration --- CHANGELOG.md | 4 ++++ playlet-lib/src/components/VideoPlayer/VideoPlayer.bs | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f0f4918..98728999 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +- Nothing worth mentioning yet. + ## [0.43.3] - 2025-10-30 ### Fixed diff --git a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs index 2e5bbfcc..71baf314 100644 --- a/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs +++ b/playlet-lib/src/components/VideoPlayer/VideoPlayer.bs @@ -579,9 +579,11 @@ function ReportVideoError(errorData as object, url as string) as void }] end if + position = m.top.position + duration = m.top.duration LogTelemetryEvent({ level: "error" - message: errorData.title + " " + errorData.body + `\nurl: ${url}` + message: errorData.title + " " + errorData.body + `\nurl: ${url}\nposition: ${position}\nduration: ${duration}` fingerprint: errorData.fingerprint attachments: attachments })