vlitejs / vlite

🦋 vLitejs is a fast and lightweight Javascript library for customizing video and audio player in Javascript with a minimalist theme (HTML5, Youtube, Vimeo, Dailymotion)
https://vlite.js.org
MIT License
266 stars 18 forks source link

Third-party cookies and 'postMessage' error. #123

Closed abvas closed 5 months ago

abvas commented 6 months ago

Describe the bug

For Youtube, Vimeo, Dailymotion providers I receive a warning:

Third-party cookies will be blocked. Learn more in the Issues tab.

Image 82

In addition, for the Youtube provider, sometimes I get an error similar to this:

www-widgetapi.js:1260 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window's origin ('https://vlite. js.org')

Image 83

Steps to reproduce

Both errors can also be seen on your demo page: https://vlite.js.org/

Just look at the warning and error output for different providers.

Please tell me, is it possible to somehow remove this?

Thank you.

Expected behavior

No errors or warnings in the console.

Screenshots and recordings

No response

Vlite.js

vlitejs 6.0.2

Browser

Chrome 121.0.6167.189

OS

?

Additional context

No response

yoriiis commented 5 months ago

Hi @abvas, thanks for your comments.

The first one is displayed by the SDK of the provider that uses third-party cookies, not by Vlitejs. I haven't reproduced the warning, but I've seen it in the past, nothing serious and there's nothing I can do to fix it I think. The cookie policy is currently being changed (https://developers.google.com/privacy-sandbox/3pcd).

The second can be fixed by Vlitejs!