phoboslab / jsmpeg

MPEG1 Video Decoder in JavaScript
MIT License
6.31k stars 1.43k forks source link

No audio on macOS, Safari #379

Open alectrocute opened 2 years ago

alectrocute commented 2 years ago

Tested using: https://jsmpeg.com/perf.html?file=blade-runner-2049-240p.ts&webgl=1&wasm=1&audio=1

Anybody have a workaround? Thanks!

stondbringa commented 2 years ago

Hi @alectrocute, The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. Nowadays all modern browsers block audio playback. You need to trigger a gesture (like a click on a sound button) to resume the Audio Context and re-enable the sound