Embed Youtube player without title, controls, branding & sound muted

These are the top 10 things you must do after uploading a video to youtube. Following this checklist will help you gain more youtube subscribers and will also help in getting more views.
[mks_dropcap style=”letter” size=”52″ bg_color=”#ffffff” txt_color=”#000000″]D[/mks_dropcap]ID you ever wanted to embed a youtube video without any of those controls or the title? Now you can! This article will show you how to embed a chromeless youtube player and how to embed a player with the sound muted. So let’s get started.

Code to embed chromeless youtube player (with audio)

<!--Place this code in the head section of your site-->
<script src="https://www.youtube.com/iframe_api"></script>

<!--Place this code where you want the player to display-->
<div id="player"></div>

<!--Place this code right before the closing body tag-->
<script type="text/javascript">
var player;
function onYouTubeIframeAPIReady() {
    player = new YT.Player('player', {
        videoId: 'myr2UOVEJQA',
        playerVars: {
            controls: 0,
            autoplay: 1,
            disablekb: 1,
            enablejsapi: 1,
            iv_load_policy: 3,
            modestbranding: 1,
            showinfo: 0,
          	rel: 0
        }      
    });
}
</script>

If you want to embed more than one such video player in a web page, then paste lines 6-26 where you want the next player to appear. Replace “player” in line 6 and 12 with another id such as “player2” and replace the video ID to the required one.

Code to embed chromeless youtube player (without audio)

<script src="https://www.youtube.com/iframe_api"></script>
<div id="player"></div>
<script type="text/javascript">
var player;
function onYouTubeIframeAPIReady() {
    player = new YT.Player('player', {
        videoId: 'myr2UOVEJQA',
        playerVars: {
            controls: 0,
            autoplay: 1,
            disablekb: 1,
            enablejsapi: 1,
            iv_load_policy: 3,
            modestbranding: 1,
            showinfo: 0,
          	rel: 0
        },
      events:{
        'onReady': onPlayerReady        
      }
    });
}
function onPlayerReady(event) {
    player.mute();
    player.playVideo();
}
</script>

In the above code snippets, change the videoID to the video ID of the required video. You are also free to change the values of other parameters. To learn more about the youtube iframe parameters visit youtube player parameters documentation.

Read Next: Change youtube embed player thumbnail 

Exit mobile version