Skip to content

Commit

Permalink
feat(video-on-demand): improve error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
limulus committed Aug 10, 2024
1 parent e4fe72a commit 80d8f7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video-on-demand/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 80d8f7c

Please sign in to comment.