Problem/Motivation

While this is a blocked youtube video, the Klaro placeholder mentions "vimeo".

Klaro video js blocking placeholder

The test video url is: https://www.youtube.com/watch?v=WCZZLL4HIwA

There is something strange going on. Maybe its a problem with the web components / shadow dom:

Markup screenshot of the video js markup while the Klaro blocking placeholder is shown

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

thomas.frobieter created an issue. See original summary.

thomas.frobieter’s picture

Assigned: Unassigned » grevil
thomas.frobieter’s picture

Issue summary: View changes
StatusFileSize
new57.65 KB
thomas.frobieter’s picture

StatusFileSize
new23.74 KB

Having taken a look at the Klaro code, I think the cause is that they explicitly ensure it's an iframe element (and Video.js doesn't pass data attributes from the x-player web component to the iframe).
This is just my initial finding and likely the wrong part of the code, but I think that's the general concept:
https://github.com/kiprotect/klaro/blob/db9f1aca906a392990c58c58475366a091012ea7/src/lib.js#L148

The iframe is nested inside the youtube-video elements shadow dom, without the required Klaro data attributes (although the Klaro JavaScript probably wouldn't have access to it anyway)

shadow dom of the Video js youtube-players web component

If Video.js doesn't let us set data attributes on the iframe itself, we might have a big problem here.

I've already tried adding slot="media" to a standard YouTube embed iframe element (similar to what we do with the poster image) to see if that would work, but unfortunately, it doesn't.

thomas.frobieter’s picture

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.