youtube1

How to Embed a YouTube Video With Mute Audio

In this article, you'll learn how to embed a YouTube video with autoplay enabled but mute. The Youtube video will automatically play when the web is loaded, but the sound is set to zero.youtube

It's easy to embed video from  YouTube on your website. You can copy the default IFRAME embed code, paste it anywhere in your web page, and you're ready. Youtube also offers a very basic configuration. You can modify the dimensions or hide the brand name Youtube etc but if you wanted more control over the behavior of the embedded player then you can do it through YouTube Player API.

This article explains how you can embed a video from Youtube which will play automatically when the web page loads but with mute audio.

It could be a useful technique for a website that sells various things , starting for example with short screencasts to highlight the products, playing a 5-10 second video on initial page load, but without sound so as not to disturb the user.

The volume will automatically be set to zero and the user can manually turn the sound on with one click. Similarly, if te as video from YouTube, it makes more sense to embed the muting of the continuously running video.

But let's see how you can do that. Go to the YouTube page that contains the video you want and note the ID of the video from the URL. For example, if the video link from YouTube is http://youtube.com/watch?v=xyz-123, the id of the video is XYZ-123 (ie all characters after v = and until the next &) . Once you have copied the id, all you have to do is replace YOUR_VIDEO_ID with your own id in the script below.

Then integrate all of the above script into the code of your webpage and the video will automatically play with the sound muted.

You can further customize the YouTube player by modifying the various variables. For example, if you set loop to 1, the video will play in a loop. If you set fs to 1 then one will appear full (fs=fullscreen) inside the video player.

Good Luck!

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.087 registrants.

Written by Dimitris

Dimitris hates on Mondays .....

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).