Skip to content

Commit

Permalink
Print video error message if video fails play (gpuweb#3580)
Browse files Browse the repository at this point in the history
Print the error message so that we could know why video fails to play
  • Loading branch information
shaoboyan authored Apr 2, 2024
1 parent 71d872b commit f7f8a17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/webgpu/web_platform/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,12 @@ export function startPlayingAndWaitForVideo(

video.addEventListener(
'error',
event => reject(new ErrorWithExtra('Video received "error" event', () => ({ event }))),
event =>
reject(
new ErrorWithExtra('Video received "error" event, message: ' + event.message, () => ({
event,
}))
),
true
);

Expand Down

0 comments on commit f7f8a17

Please sign in to comment.