Picture of Kevin Doherty
Remove More Videos from Youtube content on Media
by Kevin Doherty - Tuesday, 20 March 2018, 10:05 AM
 

Hi All,

Apologies if this has been asked before but I couldn't find anything when I searched.

When using the media component you can include YouTube videos using the URL of the video e.g: https://youtu.be/305ryPvU6A8

When using this link, if you pause the video then it will display a More Videos bar along the bottom of the component with suggested content (based on related and browser history). Does anyone know if it is possible to remove this using parameters?

I know that when using the link from the embed code you can add ?rel=0 to remove the suggested videos at the end and &ytp-pause-overlay=0 to remove this More videos strip. However, when I try this with the direct link the output on Adapt seems to ignore these parameters and just displays the video with these still on it.

Alternatively, should it be possible to use the src from the embed link in the media component e.g: https://www.youtube.com/embed/305ryPvU6A8 - I've tried using this through the media component to see, but it doesn't play and this may very well be expected behaviour but just looking to try everything.

Any help or advice much appreciated!

Thanks,

Kevin

Picture of Matt Leathes
Re: Remove More Videos from Youtube content on Media
by Matt Leathes - Tuesday, 20 March 2018, 11:17 AM
 

Hi Kevin

The Adapt media component uses mediaelementjs 'under the hood' and it is this that provides the youtube/vimeo functionality - but, as you have found, it's quite basic.

You might be better off trying adapt-youtube which is a dedicated Adapt plugin implementation of the YouTube IFrame Player - and therefore offers a bit more functionality.

Picture of Kevin Doherty
Re: Remove More Videos from Youtube content on Media
by Kevin Doherty - Tuesday, 20 March 2018, 11:29 AM
 

Hi Matt,

Thanks for the reply, I was having a look at the adapt-youtube component earlier and saw that within the example.json it includes a field for "_showAnnotations". Am I right in thinking that this would remove all those extra elements that get added on a YouTube video or would it require adding the parameters to the source field?

Thanks,

Kevin

Picture of Matt Leathes
Re: Remove More Videos from Youtube content on Media
by Matt Leathes - Tuesday, 20 March 2018, 12:14 PM
 

It's been a while since I used this so I don't remember TBH. It's basically just giving you access to some of the settings from the YouTube IFrame Player API so hopefully you should be able to find out what you need in the documentation for that - or by experimenting with the settings.

Picture of Stephen Harlow
Re: Remove More Videos from Youtube content on Media
by Stephen Harlow - Tuesday, 20 March 2018, 8:43 PM
 

Hi Kevin

We faced this issue in a recent project. My understanding is that one of our web developers updated the MediaElement.js libraries in adapt-contrib-media so that YouTube links now support the ?rel=0 URL parameter to disable related videos. Feel free to download his fork of adapt-contrib-media.

Cheers

Stephen