Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove more video from youtube embed?

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

like image 394
Mr. HK Avatar asked Oct 24 '18 06:10

Mr. HK


People also ask

How do I stop another YouTube video from appearing at the end?

You can turn off the end suggested video by turning on the autoplay option which automatically plays the next video in the suggested without showing all the suggested.


2 Answers

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.

like image 87
Niraj Kaushal Avatar answered Oct 02 '22 03:10

Niraj Kaushal


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.

like image 44
jon Avatar answered Oct 02 '22 03:10

jon