How do I embed youtube video as header with autoplay, loop, and hide watch, share, Youtube logo, and video...












0















I am trying to make a video header using a Youtube video. I am
having trouble hiding the Youtube Logo in bottom right corner, the Watch
later and Share links in top right corner, and the video title in top
left corner. I was successful in making it autoplay and loop. I also have
text over the video. Any suggestions?



    Here is my current code:

<!-- HTML -->
<div class="embed-responsive embed-responsive-16by9" id="holder">

<iframe class="frame" width="560" height="315"
src="https://www.youtube.com/embed/4hIZUCKsio0?rel=0&amp;
controls=0&amp;showinfo=0;autoplay=1&mute=1&loop=1&playlist=4hIZUCKsio
0" frameborder="0" allow="accelerometer; encrypted-media; gyroscope;
picture-
in-picture" allowfullscreen></iframe>


<div class="bar">
<div class="container">
<div class="row justify-content-start">
<div class="col-sm-8">
<h1>Hey there! My name is John.<br>
I'm a Web Developer.</h1>
<h4>My hobbies include HTML5, CSS3, Javascript, jQuery, and Bootstrap 4.
</h4>
</div>

</div>
</div>
</div>
</div>

<!-- CSS -->
.bar{
position:absolute;
top:0;
left:0;
width:100%;
height:80px;
margin-top: 200px;
margin-left: 150px;
}









share|improve this question























  • Please clarify editing your question: do you want embed a YouTube video, but hidding some elements (like the YouTube logo, the share link button) and basically all controls from the embed video?

    – Mauricio Arias Olave
    Jan 17 at 17:50











  • Yes, embed the youtube video using the code Youtube provides under embed. But hide all of the elements(including Youtube logo, share link etc...). The only thing I want to show is the video itself. Thanks !

    – codingcali
    Jan 17 at 18:18
















0















I am trying to make a video header using a Youtube video. I am
having trouble hiding the Youtube Logo in bottom right corner, the Watch
later and Share links in top right corner, and the video title in top
left corner. I was successful in making it autoplay and loop. I also have
text over the video. Any suggestions?



    Here is my current code:

<!-- HTML -->
<div class="embed-responsive embed-responsive-16by9" id="holder">

<iframe class="frame" width="560" height="315"
src="https://www.youtube.com/embed/4hIZUCKsio0?rel=0&amp;
controls=0&amp;showinfo=0;autoplay=1&mute=1&loop=1&playlist=4hIZUCKsio
0" frameborder="0" allow="accelerometer; encrypted-media; gyroscope;
picture-
in-picture" allowfullscreen></iframe>


<div class="bar">
<div class="container">
<div class="row justify-content-start">
<div class="col-sm-8">
<h1>Hey there! My name is John.<br>
I'm a Web Developer.</h1>
<h4>My hobbies include HTML5, CSS3, Javascript, jQuery, and Bootstrap 4.
</h4>
</div>

</div>
</div>
</div>
</div>

<!-- CSS -->
.bar{
position:absolute;
top:0;
left:0;
width:100%;
height:80px;
margin-top: 200px;
margin-left: 150px;
}









share|improve this question























  • Please clarify editing your question: do you want embed a YouTube video, but hidding some elements (like the YouTube logo, the share link button) and basically all controls from the embed video?

    – Mauricio Arias Olave
    Jan 17 at 17:50











  • Yes, embed the youtube video using the code Youtube provides under embed. But hide all of the elements(including Youtube logo, share link etc...). The only thing I want to show is the video itself. Thanks !

    – codingcali
    Jan 17 at 18:18














0












0








0








I am trying to make a video header using a Youtube video. I am
having trouble hiding the Youtube Logo in bottom right corner, the Watch
later and Share links in top right corner, and the video title in top
left corner. I was successful in making it autoplay and loop. I also have
text over the video. Any suggestions?



    Here is my current code:

<!-- HTML -->
<div class="embed-responsive embed-responsive-16by9" id="holder">

<iframe class="frame" width="560" height="315"
src="https://www.youtube.com/embed/4hIZUCKsio0?rel=0&amp;
controls=0&amp;showinfo=0;autoplay=1&mute=1&loop=1&playlist=4hIZUCKsio
0" frameborder="0" allow="accelerometer; encrypted-media; gyroscope;
picture-
in-picture" allowfullscreen></iframe>


<div class="bar">
<div class="container">
<div class="row justify-content-start">
<div class="col-sm-8">
<h1>Hey there! My name is John.<br>
I'm a Web Developer.</h1>
<h4>My hobbies include HTML5, CSS3, Javascript, jQuery, and Bootstrap 4.
</h4>
</div>

</div>
</div>
</div>
</div>

<!-- CSS -->
.bar{
position:absolute;
top:0;
left:0;
width:100%;
height:80px;
margin-top: 200px;
margin-left: 150px;
}









share|improve this question














I am trying to make a video header using a Youtube video. I am
having trouble hiding the Youtube Logo in bottom right corner, the Watch
later and Share links in top right corner, and the video title in top
left corner. I was successful in making it autoplay and loop. I also have
text over the video. Any suggestions?



    Here is my current code:

<!-- HTML -->
<div class="embed-responsive embed-responsive-16by9" id="holder">

<iframe class="frame" width="560" height="315"
src="https://www.youtube.com/embed/4hIZUCKsio0?rel=0&amp;
controls=0&amp;showinfo=0;autoplay=1&mute=1&loop=1&playlist=4hIZUCKsio
0" frameborder="0" allow="accelerometer; encrypted-media; gyroscope;
picture-
in-picture" allowfullscreen></iframe>


<div class="bar">
<div class="container">
<div class="row justify-content-start">
<div class="col-sm-8">
<h1>Hey there! My name is John.<br>
I'm a Web Developer.</h1>
<h4>My hobbies include HTML5, CSS3, Javascript, jQuery, and Bootstrap 4.
</h4>
</div>

</div>
</div>
</div>
</div>

<!-- CSS -->
.bar{
position:absolute;
top:0;
left:0;
width:100%;
height:80px;
margin-top: 200px;
margin-left: 150px;
}






video iframe youtube header embed






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 16 at 17:49









codingcalicodingcali

81




81













  • Please clarify editing your question: do you want embed a YouTube video, but hidding some elements (like the YouTube logo, the share link button) and basically all controls from the embed video?

    – Mauricio Arias Olave
    Jan 17 at 17:50











  • Yes, embed the youtube video using the code Youtube provides under embed. But hide all of the elements(including Youtube logo, share link etc...). The only thing I want to show is the video itself. Thanks !

    – codingcali
    Jan 17 at 18:18



















  • Please clarify editing your question: do you want embed a YouTube video, but hidding some elements (like the YouTube logo, the share link button) and basically all controls from the embed video?

    – Mauricio Arias Olave
    Jan 17 at 17:50











  • Yes, embed the youtube video using the code Youtube provides under embed. But hide all of the elements(including Youtube logo, share link etc...). The only thing I want to show is the video itself. Thanks !

    – codingcali
    Jan 17 at 18:18

















Please clarify editing your question: do you want embed a YouTube video, but hidding some elements (like the YouTube logo, the share link button) and basically all controls from the embed video?

– Mauricio Arias Olave
Jan 17 at 17:50





Please clarify editing your question: do you want embed a YouTube video, but hidding some elements (like the YouTube logo, the share link button) and basically all controls from the embed video?

– Mauricio Arias Olave
Jan 17 at 17:50













Yes, embed the youtube video using the code Youtube provides under embed. But hide all of the elements(including Youtube logo, share link etc...). The only thing I want to show is the video itself. Thanks !

– codingcali
Jan 17 at 18:18





Yes, embed the youtube video using the code Youtube provides under embed. But hide all of the elements(including Youtube logo, share link etc...). The only thing I want to show is the video itself. Thanks !

– codingcali
Jan 17 at 18:18












1 Answer
1






active

oldest

votes


















0














For hide the YouTube logo, you can add the modestbranding parameter and set the value to 1.



From the show player parameters found in the Youtube Player Demo website:





  • modestbranding: Prevent the YouTube logo from displaying in the control bar. A YouTube text label or watermark still displays when the user's mouse pointer hovers over the player.


The highlighted text sparks me an idea:




  • For avoid user see the elements you need to hide, you can add a css style for prevent the hover effect in the iframe - actually, prevent the hover effect in the div that contains the iframe.


I used the code added in this answer "CSS disable hover effect" for add an inline style1 in the div which contains your iframe.



So, the results is as follows:



<!-- HTML -->
<div class="embed-responsive embed-responsive-16by9" id="holder" style="pointer-events: none;">
<iframe class="frame" width="560" height="315"
src="https://www.youtube.com/embed/4hIZUCKsio0?rel=0&amp;
controls=0&amp;showinfo=0;autoplay=1&mute=1&loop=1&playlist=4hIZUCKsio
0" frameborder="0" allow="accelerometer; encrypted-media; gyroscope;
picture-
in-picture" allowfullscreen></iframe>
</div>


The only downside with this solution is that (when the video plays for the very first time), the YouTube logo, share link, video title and will show for 2-3 seconds before hide automatically.





1 You should actually set the style as part of your css rulings.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54222667%2fhow-do-i-embed-youtube-video-as-header-with-autoplay-loop-and-hide-watch-shar%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    For hide the YouTube logo, you can add the modestbranding parameter and set the value to 1.



    From the show player parameters found in the Youtube Player Demo website:





    • modestbranding: Prevent the YouTube logo from displaying in the control bar. A YouTube text label or watermark still displays when the user's mouse pointer hovers over the player.


    The highlighted text sparks me an idea:




    • For avoid user see the elements you need to hide, you can add a css style for prevent the hover effect in the iframe - actually, prevent the hover effect in the div that contains the iframe.


    I used the code added in this answer "CSS disable hover effect" for add an inline style1 in the div which contains your iframe.



    So, the results is as follows:



    <!-- HTML -->
    <div class="embed-responsive embed-responsive-16by9" id="holder" style="pointer-events: none;">
    <iframe class="frame" width="560" height="315"
    src="https://www.youtube.com/embed/4hIZUCKsio0?rel=0&amp;
    controls=0&amp;showinfo=0;autoplay=1&mute=1&loop=1&playlist=4hIZUCKsio
    0" frameborder="0" allow="accelerometer; encrypted-media; gyroscope;
    picture-
    in-picture" allowfullscreen></iframe>
    </div>


    The only downside with this solution is that (when the video plays for the very first time), the YouTube logo, share link, video title and will show for 2-3 seconds before hide automatically.





    1 You should actually set the style as part of your css rulings.






    share|improve this answer




























      0














      For hide the YouTube logo, you can add the modestbranding parameter and set the value to 1.



      From the show player parameters found in the Youtube Player Demo website:





      • modestbranding: Prevent the YouTube logo from displaying in the control bar. A YouTube text label or watermark still displays when the user's mouse pointer hovers over the player.


      The highlighted text sparks me an idea:




      • For avoid user see the elements you need to hide, you can add a css style for prevent the hover effect in the iframe - actually, prevent the hover effect in the div that contains the iframe.


      I used the code added in this answer "CSS disable hover effect" for add an inline style1 in the div which contains your iframe.



      So, the results is as follows:



      <!-- HTML -->
      <div class="embed-responsive embed-responsive-16by9" id="holder" style="pointer-events: none;">
      <iframe class="frame" width="560" height="315"
      src="https://www.youtube.com/embed/4hIZUCKsio0?rel=0&amp;
      controls=0&amp;showinfo=0;autoplay=1&mute=1&loop=1&playlist=4hIZUCKsio
      0" frameborder="0" allow="accelerometer; encrypted-media; gyroscope;
      picture-
      in-picture" allowfullscreen></iframe>
      </div>


      The only downside with this solution is that (when the video plays for the very first time), the YouTube logo, share link, video title and will show for 2-3 seconds before hide automatically.





      1 You should actually set the style as part of your css rulings.






      share|improve this answer


























        0












        0








        0







        For hide the YouTube logo, you can add the modestbranding parameter and set the value to 1.



        From the show player parameters found in the Youtube Player Demo website:





        • modestbranding: Prevent the YouTube logo from displaying in the control bar. A YouTube text label or watermark still displays when the user's mouse pointer hovers over the player.


        The highlighted text sparks me an idea:




        • For avoid user see the elements you need to hide, you can add a css style for prevent the hover effect in the iframe - actually, prevent the hover effect in the div that contains the iframe.


        I used the code added in this answer "CSS disable hover effect" for add an inline style1 in the div which contains your iframe.



        So, the results is as follows:



        <!-- HTML -->
        <div class="embed-responsive embed-responsive-16by9" id="holder" style="pointer-events: none;">
        <iframe class="frame" width="560" height="315"
        src="https://www.youtube.com/embed/4hIZUCKsio0?rel=0&amp;
        controls=0&amp;showinfo=0;autoplay=1&mute=1&loop=1&playlist=4hIZUCKsio
        0" frameborder="0" allow="accelerometer; encrypted-media; gyroscope;
        picture-
        in-picture" allowfullscreen></iframe>
        </div>


        The only downside with this solution is that (when the video plays for the very first time), the YouTube logo, share link, video title and will show for 2-3 seconds before hide automatically.





        1 You should actually set the style as part of your css rulings.






        share|improve this answer













        For hide the YouTube logo, you can add the modestbranding parameter and set the value to 1.



        From the show player parameters found in the Youtube Player Demo website:





        • modestbranding: Prevent the YouTube logo from displaying in the control bar. A YouTube text label or watermark still displays when the user's mouse pointer hovers over the player.


        The highlighted text sparks me an idea:




        • For avoid user see the elements you need to hide, you can add a css style for prevent the hover effect in the iframe - actually, prevent the hover effect in the div that contains the iframe.


        I used the code added in this answer "CSS disable hover effect" for add an inline style1 in the div which contains your iframe.



        So, the results is as follows:



        <!-- HTML -->
        <div class="embed-responsive embed-responsive-16by9" id="holder" style="pointer-events: none;">
        <iframe class="frame" width="560" height="315"
        src="https://www.youtube.com/embed/4hIZUCKsio0?rel=0&amp;
        controls=0&amp;showinfo=0;autoplay=1&mute=1&loop=1&playlist=4hIZUCKsio
        0" frameborder="0" allow="accelerometer; encrypted-media; gyroscope;
        picture-
        in-picture" allowfullscreen></iframe>
        </div>


        The only downside with this solution is that (when the video plays for the very first time), the YouTube logo, share link, video title and will show for 2-3 seconds before hide automatically.





        1 You should actually set the style as part of your css rulings.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 18 at 21:24









        Mauricio Arias OlaveMauricio Arias Olave

        4341935




        4341935






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54222667%2fhow-do-i-embed-youtube-video-as-header-with-autoplay-loop-and-hide-watch-shar%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Homophylophilia

            Updating UILabel text programmatically using a function

            Cloud Functions - OpenCV Videocapture Read method fails for larger files from cloud storage