Skip to content

Instantly share code, notes, and snippets.

@rickd-uk
Created February 13, 2022 09:58
Show Gist options
  • Save rickd-uk/08bd5fc59f3f3382ec8735fbfb822d5d to your computer and use it in GitHub Desktop.
Save rickd-uk/08bd5fc59f3f3382ec8735fbfb822d5d to your computer and use it in GitHub Desktop.
Ask User Permission To Allow Sound (HTML)
<div class="alert">
<p>This webpage would like to play sounds</p>
<p class="buttons">
<button value="0">Block</button>
<button value="1">Allow</button>
</p>
</div>
<button id="btn">trigger notification</button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment