greenpeace / planet4

Built on top of Wordpress tech, Greenpeace Planet 4 powers digital platforms to engage with millions and win campaigns around the world.
https://planet4.greenpeace.org
Creative Commons Attribution Share Alike 4.0 International
67 stars 27 forks source link

Add a filter to modify lite-youtube-embed parameters #179

Closed stduerre closed 2 years ago

stduerre commented 2 years ago

Brief summary of task:

Planet4 uses lite-youtube-embed for embedded Youtube videos. At the moment, parameters added to the video URLs are hard coded in the master theme.

Adding a filter to customize these parameters allows child themes to fine tune the Youtube video experience to their needs. Examples:

Additional note: In order for Analytics events to work, the Youtube API has to be loaded before the triggers in Tag Manager.. That's outside of the scope of this issue and can be done in a child theme already.

Objectives of task:

Allow child themes to customize parameters of embedded Youtube videos.

Relevant documentation:

Youtube player parameters: https://developers.google.com/youtube/player_parameters#Parameters

GA4 automatically collected events: https://support.google.com/analytics/answer/9234069?hl=en

Youtube iFrame player API: https://developers.google.com/youtube/iframe_api_reference

Other resources:

No response

Estimated length of task:

Short

Timeline for task:

As soon as possible

Dependencies on other work:

none

Example of similar work:

No response

Help:

No response