Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 Video muted but still playing

Title pretty much says it all. I have a video which automatically starts playing when arriving on the page.

In the HTML code I have put muted="muted". And here comes the weird part. When looking at the controls it clearly is muted, but the music is still playing and can be heard. Even when I looked at the HTML5 Video example on W3Schools it plays the music while muted.

Is there any way, trough jQuery for example to bypass this? I have a jQuery line in it which stick the muted to the video but that has no effect.

Here is the HTML code is use:

<video id="video" width="640px" height="350px" autoplay="autoplay" loop="loop" controls="controls" muted="muted">             <source src="intouchables.f4v" type="video/mp4">             Your browser does not support the video tag.         </video> 

Hope you can help me out. The jQuery line is as following:

$("video").prop('muted', true);

Thanks in advance.

like image 701
BuzZin' Avatar asked Jan 01 '13 16:01

BuzZin'


People also ask

Why video is not playing in HTML5?

An 'HTML5: Video file not found' error indicates either the browser you are using doesn't support HTML5 or the webpage doesn't have the proper video codec. You may contact the website's developer to install HTML5 supporting codecs for all the three WebM, MP4, and OGG formats.


1 Answers

In Angular case, one can try [muted]="'muted'", It is working for me.

<video id="video" style="width:100%; height:100%" autoplay [muted]="'muted'" loop>   <source src="./../../assets/video/model-video.mp4" type="video/mp4"> </video> 
like image 143
Morez Avatar answered Sep 22 '22 01:09

Morez