I'm trying to embed a video with the sound muted but I can not figure out how it make it work.
Currently I'm using this but doesn't work:
<iframe src="https://www.youtube.com/embed/uNRGWVJ10gQ?rel=0&autoplay=1" width="560" height="315" frameborder="0" allowfullscreen></iframe>
Any of you knows how can I make this work ?
This is easy. Just add mute=1 to the src parameter of iframe.
Example:
<iframe src="https://www.youtube.com/embed/uNRGWVJ10gQ?ecver=1?controls=0&mute=1&showinfo=0&rel=0&autoplay=1&loop=1&playlist=uNRGWVJ10gQ" frameborder="0" allowfullscreen></iframe>
For me works using
&autoplay=1&mute=1
I would like to thank the friend who posted the codes below in this area. I finally solved a problem that I had to deal with all day long.
was also looking for a solution to this but I wasn't including via iframe, mine was linked to images/video.mp4 - found this https://www.w3schools.com/tags/att_video_muted.asp - and I simply added < video controls muted > (CSS/HTML 5 solution), but no JS required for me...
Updated
Add
&mute=1
to the end of your url.Your new code would be:
Old Answer
You're going to have to add Javascript to mute the audio. Add an id to your iframe: Then retrieve the id with javascript: var myVideo = iframe.getElementById('myVideo'); myVideo.mute();Also see the mute section in the Youtube API reference https://developers.google.com/youtube/js_api_reference?csw=1
And the question: How do I automatically play a Youtube video (IFrame API) muted?
mute=1