javascripthtmlhtml5-video

Why can't i unmute my HTML5 video with autoplay enabled?


I got a very annoying problem. I try for a few hours to unmute an HTML5 video with a 'muted' flag, but all that I try doesn't work.

$("#video_background").prop('muted', false);

Sadly, that doesn't work, and removing the muted prop from the code makes nothing, the video stays muted. Is there any solution to force a unmute from the video?

Or can anyone say what I'm making wrong? <section> creates the <video></video> for me, so it uses a few classes. But I searched for a "muted" and no class has it, but the video still has no audio on the website.

And yes.. The videos have sound. My video has autoplay.


Solution

  • Most browsers block any audio that is played by a web page and is not related to user interaction (see https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide). Maybe that's your problem?