You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Plyr for self-hosted video/audio without any serious problems. Unfortunately it's a bit different with embedded videos from Youtube/Vimeo as they must not be loaded without user’s consent, according to EU law. My cookie consent management tool is the pretty nice Klaro Privacy Manager which leads to some tricky behaviours in detail.
To hide an element like an iframe behind a consent layer you need to replace the src attribute with data-src and add the attribute data-name with something like 'externalmedia'. So when the user calls the page containing the video, he gets a button to consent to 'externalmedia', after clicking it, the banner disappears and the film gets loaded.
Unfortunately, in this case not with Plyr on top, but with the plain Youtube/Vimeo player. The problem is obviously data-src: Using it instead of src breaks Plyr, using src prevents Klaro from working, using both breaks both. After fiddling around with it for more than a day, I’ve reached the end of my wisdom and would appreciate any hint how to solve this litte evil problem. Thanks a lot!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm using Plyr for self-hosted video/audio without any serious problems. Unfortunately it's a bit different with embedded videos from Youtube/Vimeo as they must not be loaded without user’s consent, according to EU law. My cookie consent management tool is the pretty nice Klaro Privacy Manager which leads to some tricky behaviours in detail.
To hide an element like an iframe behind a consent layer you need to replace the
src
attribute withdata-src
and add the attributedata-name
with something like 'externalmedia'. So when the user calls the page containing the video, he gets a button to consent to 'externalmedia', after clicking it, the banner disappears and the film gets loaded.Unfortunately, in this case not with Plyr on top, but with the plain Youtube/Vimeo player. The problem is obviously
data-src
: Using it instead ofsrc
breaks Plyr, usingsrc
prevents Klaro from working, using both breaks both. After fiddling around with it for more than a day, I’ve reached the end of my wisdom and would appreciate any hint how to solve this litte evil problem. Thanks a lot!Beta Was this translation helpful? Give feedback.
All reactions