biati-digital / glightbox

Pure Javascript lightbox with mobile support. It can handle images, videos with autoplay, inline content and iframes
MIT License
2.03k stars 228 forks source link

Attributes from URLs overwritten when used with plyr #396

Open ocripps24 opened 1 year ago

ocripps24 commented 1 year ago

Projects not listed as publicly available via their embed options on Vimeo require an attribute in the URL to play.

Public:https://player.vimeo.com/video/111111111 Hidden: https://player.vimeo.com/video/111111111?h=1111111111

When passing an href with an attribute to an anchor tag href attribute, the resulting lightbox overlay using plyr overwrites the attribute required for hidden videos to play. This results in the video being unable to be found on Vimeo and not playing.

Expected behaviour would be to append rather than overwrite any attributes in the href.

Cross-device behaviour

gingerchew commented 1 year ago

Yeah, that is a bit odd. It should be easy enough to fix, just need to make sure Plyr isn't to blame in some capacity

biati-digital commented 1 year ago

GLightbox simply passes the full url to Plyr, there's a simple check to see if the video is vimeo or youtube but that's it. Plyr receives the full URL to process it. If you can provide an example it would be great, but i think there's nothing we can do on our end.

Lefthandmedia commented 1 year ago

Hi, I'm pretty sure PLYR cannot consume playlists. so the option is to not use PLYR for playlists and use the standard YT embed only when it is a YT playlist. Is that an option?

despecial commented 1 year ago

Hello, it's a Plyr bug which I reported here https://github.com/sampotts/plyr/issues/2606

There is also a fix but not yet merged into the master.

gingerchew commented 1 year ago

@despecial Thanks for looking into that! I know that Plyr is in the process of joining VidStack, but hopefully they merge that before then.