fix(wasm): request permission for media autoplay if needed

This commit is contained in:
Pascal Engélibert 2022-08-28 19:33:41 +02:00
commit 53bf4b1aef
Signed by: tuxmain
GPG key ID: 3504BC6D362F7DCA
14 changed files with 44 additions and 467 deletions

View file

@ -57,10 +57,12 @@ a, a:visited {
import init from './target/lux-synthese.js'
init()
</script>
<!-- workaround to be sure the browser will request permission to autoplay audio -->
<audio autoplay src="assets/silence.ogg"></audio>
<div id="readme">
<h1>Lux synthesĕ</h1>
<p>
<strong>Note</strong>: audio does not work in the WASM build.
<strong>If audio does not work, please allow media autoplay in browser, then refresh this page.</strong>
</p>
<h2>Controls</h2>
<ul>