Codegena
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.

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

DID 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 

Follow Us

Don't be shy, get in touch. We love meeting interesting people and making new friends.

banner