From 80d8f7ce1e0a59bfd07428ab0c03828b6dabbcdb Mon Sep 17 00:00:00 2001 From: Eric McCarthy Date: Sat, 10 Aug 2024 11:00:41 -0700 Subject: [PATCH] feat(video-on-demand): improve error reporting --- src/video-on-demand/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video-on-demand/index.ts b/src/video-on-demand/index.ts index d611e18..b3ff069 100644 --- a/src/video-on-demand/index.ts +++ b/src/video-on-demand/index.ts @@ -94,7 +94,9 @@ export class VideoOnDemand extends HTMLElement { } videoEl.addEventListener('error', (event) => { - this.dispatchEvent(new VODEvent('error', vod, { event })) + const payload = { event, videoElementLastError: videoEl.error } + this.dispatchEvent(new VODEvent('error', vod, payload)) + console.error('video-on-demand error', payload) }) let played = false