Hello i want to make a button that mutes and unmutes sound in html5 tag.
Here what i have so far. Sadly it doesnt work
.ts
soundOnOff()
{
let audio = document.getElementById('muteSound') as HTMLMediaElement
audio.muted = true;
}
html
<button onclick="enableMute()" type="button">Mute sound</button>
<video id="muteSound" muted="true" playsinline autoplay loop preload="auto">
<source src="assets/videos/louvre.mp4" type="video/mp4" >
</video>