Thursday, 21 July 2016

How to remove the YouTube Logo from the Video Player?

How to remove the YouTube Logo from the Video Player?

Question: How to remove the YouTube Logo from the Video Player?
<iframe height="300" src="//www.youtube.com/embed/myaqHeNEO04?modestbranding=1" width="400"></iframe>

Demo




Question: How to autoplay the youtube video when embed in website?
<iframe height="300" src="//www.youtube.com/embed/myaqHeNEO04?modestbranding=1&amp;autoplay=1" width="400"></iframe>

Demo




Question: How to Stop autoplay the youtube video when embed in website?
<iframe height="300" src="//www.youtube.com/embed/myaqHeNEO04?modestbranding=1&amp;autoplay=0" width="400"></iframe>

Demo




Question: How to remove related videos from the end of an embedded youtube video?
<iframe height="300" src="//www.youtube.com/embed/myaqHeNEO04?modestbranding=1&amp;autoplay=0&amp;rel=0" width="400"></iframe>

Demo




Wednesday, 20 July 2016

How to embed muted youtube video with autoplay

How to embed muted youtube video with autoplay

Question:How to Embed muted youtube video with autoplay?
<iframe allowfullscreen="" frameborder="0" height="300px" id="ytplayer" src="https://www.youtube-nocookie.com/embed/2gcfHpGpsOw?rel=0&amp;enablejsapi=1&amp;autoplay=1&amp;controls=1&amp;showinfo=0&amp;loop=1&amp;iv_load_policy=3" type="text/html" width="400px"></iframe>
<script>
var player;

function onYouTubeIframeAPIReady() {
    player = new YT.Player('ytplayer', {
        events: {
            'onReady': onPlayerReady
        }
    });
}

function onPlayerReady(event) {
    player.mute();
    player.playVideo();
}    
    </script>


Question:How to Embed muted youtube video without autoplay?
<iframe allowfullscreen="" frameborder="0" height="300px" id="ytplayer" src="https://www.youtube-nocookie.com/embed/2gcfHpGpsOw?rel=0&amp;enablejsapi=1&amp;autoplay=0&amp;controls=1&amp;showinfo=0&amp;loop=1&amp;iv_load_policy=3" type="text/html" width="400px"></iframe>
<script>
var player;

function onYouTubeIframeAPIReady() {
    player = new YT.Player('ytplayer', {
        events: {
            'onReady': onPlayerReady
        }
    });
}

function onPlayerReady(event) {
    player.mute();
    player.playVideo();
}    
    </script>

Demo