Enable JS API on Youtube Embeds

Created on 20 July 2022, over 2 years ago
Updated 11 February 2025, about 2 months ago

Problem/Motivation

Embedded youtube video's should have the enablejsapi=1 query argument appended to make sure tracking of views is by default supported with GA4.

Steps to reproduce

Create a video media with youtube as provider
Add it to content
The enablejsapi=1 url parameter is missing.

Proposed resolution

Hook into the preprocess function of the video url when it's a youtube source and append the url parameter
Example see: https://www.drupal.org/project/video_embed_field/issues/3152597 Enable JS API on Youtube Embeds Closed: won't fix

Feature request
Status

Closed: won't fix

Version

6.0

Component

Code

Created by

🇧🇪Belgium kevinvb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024