Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLANET-5386 Force only related videos of channel #1258

Merged
merged 1 commit into from
Dec 14, 2020
Merged

Conversation

Inwerpsel
Copy link
Contributor

@Inwerpsel Inwerpsel commented Dec 10, 2020

We need to add rel=0 query parameter to the iframe url. This is done in the same way as the youtube-nocookie, on the embed html response.

For now this uses a somewhat shaky method of adding this, by relying on the feature=oembedquery parameter being there. Checking if there is a better way, but I guess there's no risk proceeding with this in the meanwhile if it turns out to be tricky?

Ref: https://jira.greenpeace.org/browse/PLANET-5386

Copy link
Member

@lithrel lithrel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


$replacements = [
'youtube.com' => 'youtube-nocookie.com',
'feature=oembed' => 'feature=oembed&rel=0&',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the last & is not necessary ? but it doesn't break anything 🤷

* For now this uses a somewhat shaky method of adding this, by replacing
it in the embed html as a string and relying on the `feature=oembed`
query parameter being there. Checking if there is a better way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants