chcunningham / wc-talk

MIT License
44 stars 5 forks source link

Demo throws #6

Closed guest271314 closed 1 year ago

guest271314 commented 2 years ago

FYI your live demo throws errors:


audio_renderer.js:42 DOMException: Unsupported configuration. Check isConfigSupported() prior to calling configure().
error @ audio_renderer.js:42
simple_video_player.html:1 Uncaught DOMException: Failed to execute 'configure' on 'VideoDecoder': H.264 decoding is not supported.
    at VideoRenderer.initialize (https://wc-talk.netlify.app/video_renderer.js:37:18)
    at async Promise.all (index 1)
    at async https://wc-talk.netlify.app/simple_video_player.html:43:3
audio_renderer.js:211 Uncaught (in promise) DOMException: Failed to execute 'decode' on 'AudioDecoder': Cannot call 'decode' on a closed codec.
    at AudioRenderer.fillDataBufferInternal (https://wc-talk.netlify.app/audio_renderer.js:211:20)
    at async AudioRenderer.fillDataBuffer (https://wc-talk.netlify.app/audio_renderer.js:166:5)
chcunningham commented 2 years ago

Just to confirm, sounds like you're using a chromium build that doesn't support H264? Agree, this could be handled in a more user-friendly way (probably just showing a "can't play" type message on the page).

guest271314 commented 2 years ago

Yes. Or decode the H264 (by any means, on all OS's). Both Chromium and Firefox can play Matroska files with Opus and VP8, VP9 - though only when the MIME type or file extension is changed, e.g., https://bugzilla.mozilla.org/show_bug.cgi?id=1422891. User and developer options can be improved re media codec and container handling.

guest271314 commented 2 years ago

How does netlify.app get involved with GitHub pages deployment?

Makes it difficult to test when the branch deployed does not get updated when changes are made.

Should probably do something like

if (!AudioDecoder.isConfigSupported(config)) {
  // reject Promise
}

Right now

console.assert(AudioDecoder.isConfigSupported(config));

is useless when the next line is

this.decoder.configure(config);

anyway, irrespective of the result of the previous line.