How to remove more video from youtube embed?

28,175

Solution 1

According to new changes made by YouTube on Sept 2018, suggested videos coudn't be disabled.

About rel parameter:

Note: This parameter is changing on or after September 25, 2018.

Prior to the change, this parameter(rel) indicates whether the player should show related videos when playback of the initial video ends. If the parameter's value is set to 1, which is the default value, then the player does show related videos. If the parameter's value is set to 0, then the player does not show related videos. After the change, you will not be able to disable related videos. Instead, if the rel parameter is set to 0, related videos will come from the same channel as the video that was just played.

Solution 2

This solution might not be the best since it hides the video title along with the youtube controls (may be undesirable) but some people might find it useful.

You can make the video player really tall and then crop the top and bottom to hide the more videos section, which is done with divs, so our embed html may look something like this:

  <body>
    <div id="player-size" style="">
      <div id="cropping-div" style="">
        <div id="div-to-crop" style="">
          <div id="player-wrapper">
            <!-- 1. The <iframe> (and video 
            player) will replace this <div> 
            tag. -->
            <div id="player"></div>
          </div>
        </div>
      </div>
    </div>
    <script async src="/youtube-player.js"></script>
  </body>

  </html>

demo: here

original answer: here

Perhaps the code may be modified to only hide the bottom portion of the player only but that will still hide the player controls as well. It is worth mentioning that custom player controls can be made using the player.seek() methods from the iFrame API YouTube has.

Share:
28,175
Mr. HK
Author by

Mr. HK

Professional Freelance Developer Working as an experienced full stack developer and helping clients globally in developing their websites. I have expertise in WordPress, CodeIgniter, Laravel, Woo-commerce, Shopify, ReactJs, VueJs, AngularJs, NodeJs. I have built various websites in these frameworks.

Updated on July 09, 2022

Comments

  • Mr. HK
    Mr. HK almost 2 years

    Here is my site link https://www.suffolkconferencecenter.com on the landing page we have slider in which we have displayed a youtube video, On the video paused more video thumbnail will appear at the bottom of the slider. Please kindly help us to remove that more video from the screen.

    We have already tried rel=0 but its not working for us.

    Thanks, HK

  • Mr. HK
    Mr. HK over 5 years
    rel=0 not working for me I have already mention this in my question. please do needful here
  • Niraj Kaushal
    Niraj Kaushal over 5 years
    Read my answer specially this line "After the change, you will not be able to disable related videos. Instead, if the rel parameter is set to 0, related videos will come from the same channel as the video that was just played."
  • Tristup
    Tristup over 5 years
    How you are embedding, using shortcode or frame from youtube?
  • Mr. HK
    Mr. HK over 5 years
    @Tristup Embedding using iframe
  • Tristup
    Tristup over 5 years
    Then you can easily remove that options when you are getting that embedding code from Youtube. There must be an option to check whether you want show the related videos at the end of the video..
  • Niraj Kaushal
    Niraj Kaushal over 5 years
    rel is that parameter and if you set rel=1 then it will show the related videos (from any channel) but if you set rel=0 then it will only show the related videos from same channel (Note: before Sept 2018, rel=0 means no related video but now it has been changed by Youtube).
  • Nik K
    Nik K about 5 years
    Google have lost the plot. They used to be so user focused. I can't see important content in videos because of all the buttons/overlays etc.