Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

"From the web" YouTube video with rel=0 parameter


Go to End


2 Posts   1528 Views

Avatar
MarijnKampf

Community Member, 176 Posts

3 February 2015 at 9:38pm

I like the "From the web" functionality in the SS 3.1 HTML editor, but is there a way to add a parameter when embedding a YouTube video using this? I can only seem to add videos from: https://www.youtube.com/watch?v=ZptD_1Icq-4 and not https://www.youtube.com/embed?v=ZptD_1Icq-4 (note watch vs. embed in url) If I include the html manually I can add rel=0 to the url, which stops related videos from being shown, is this possible with the "From the web" functionality?

Info on YouTube parameters: https://developers.google.com/youtube/player_parameters

My manual example:

<iframe src="http://www.youtube.com/embed/ZptD_1Icq-4?rel=0" width="420" height="315" frameborder="0"></iframe>

Avatar
Pyromanik

Community Member, 419 Posts

5 February 2015 at 5:27am

So far as I'm aware the media insert simply sticks raw HTML into the editor for you if it's not a local asset (Image).
You could manually re-enter the rel=0 portion of the query string, however it's not an idea solution for clients.
But I'm afraid it's the best I've got to offer sorry. Maybe someone else will have something better.