I am trying to make it start with the sound of the audio, I know that due to browser issues and good practices it does not allow it to start alone, is there a way to do it? I also want the video to start with the audio but it doesn't work either
<audio src="./src/video/sound.mp3" preload autoplay id="audio"></audio>
<video src="./src/video/video.mp4" id="video" class="hidden"></video>
document.getElementById('audio').play()
setTimeout(()=>{
let video = document.getElementById('video')
video.play()
video.removeAttribute('muted')
video.classList.remove('hidden')
document.getElementById('audio').pause()
}, 10000)