This tutorial will explain to you How you can embed a YouTube video that will automatically play. When the web page is loaded but with sound muted.
In earlier articles, We revealed How to embed YouTube videos by applying various tips and tricks. We are discussing the embedding only the part audio of YouTube videos, A video without the YouTube Logo, Videos starting from a specific time and much more. But, What if you wanted to embed a video from YouTube with the sound muted?
You want to create a promotional web page having videos as it's background. Putting the embedding code from YouTube on any web page will play both the video and the audio as well. So whenever the browser loads the page, both the video and audio start to play.
If you decide to put more than one video like (auto-play enabled), Too many sounds will have been resulting from a noisy environment. If you could mute the sound by default for the video (s), things would be more accepted. And here you go. This article will guide you to how to Embed YouTube videos without sound.
It is easy to embed YouTube videos on your website. You just have to copy the IFRAME embed code and paste it anywhere 0n your web page. YouTube does offer basic customization options – like you can modify the player dimensions or hide the YouTube branding – but if you would like to have more controls over the layout or behavior of the embedded player, YouTube Player API is the way to go.
For instance, A products website may use short screencasts to highlight features and These type of videos will be autoplay when the page is loaded. The volume is however set to 0 (zero) and the user can manually click to unmute the video. Similarly, If you are using YouTube videos backgrounds, It makes more sense to embed muted videos that run in a loop.
Embed YouTube Player with Autoplay and Sound Muted.
See the demo page to get an idea of what we are trying to do in this. The page loads, the video plays, But with the audio slide is all the way down.
This is easy. Go the YouTube video page and note down the ID of the video from the URL. For instance, If the YouTube video link is http://youtube.com/watch?v=xyz-123, The video Id is xyz-123. Once you have the ID, all you have to do is replace YOUR_VIDEO_ID in the Following code with the string.
After completing the above step. The Next step is to place the edited code on your web page. Then the embedded video would automatically play that video, But the sound is muted.
Know You can further customize the player by modifying the various type player variables as commented in the code given. For instance, if you set the loop as 1, The video will play in a loop. Set fs to 1 for the show the fullscreen button inside the video player on Your website. Internally, The Viewer is embedded using the YouTube IFRAME API. When the page is loaded, the already event runs that mutes the videos.
The embedded YouTube Video will Autoplay, But sound muted.
I hope you have understood How to Embed a YouTube Video with Sound Muted.
0 comments:
Post a Comment