- Issue created by @pcambra
- Merge request !4Issue #3487303: GLightbox is very opinionated on including libraries as local... → (Merged) created by pcambra
- 🇪🇸Spain pcambra Asturies
I've just seen that the plyr.io library requires two hardcoded files from the CDN: https://github.com/sampotts/plyr/blob/a148e2e5b6eb4cda1d63a21397636a365f... that glightbox js library doesn't allow to customise, so in order to avoid those svg/mp4 calls remotely, an additional PR to https://github.com/levmyshkin/glightbox/blob/ec02687a888436767b2800f949a...
- 🇷🇸Serbia levmyshkin Novi Sad, Serbia
Hi pcambra, thank you for your MR! I didn't realize that GLightbox uses 3rd party player, I thought it was native video player. I'd prefer to fork plyr video player, the lastest release was in 24th March 2023, I don't think that it will be updated often. Usually I pull releases in forked repository it didn't take too much time.
Also we need to keep ability to download this Plyr player locally to make it's working without internet access. I'm going also add settings for Plyr player in GLightbox main settings form.
- 🇷🇸Serbia levmyshkin Novi Sad, Serbia
Btw I will test your MR and merge it first tomorrow.
-
levmyshkin →
committed 0b0c8501 on 1.0.x authored by
pcambra →
Issue #3487303: GLightbox is very opinionated on including libraries as...
-
levmyshkin →
committed 0b0c8501 on 1.0.x authored by
pcambra →
-
levmyshkin →
committed 65814db4 on 1.0.x
git commit -m 'Issue #3487303 by pcambra, levmyshkin: Add levmyshkin/...
-
levmyshkin →
committed 65814db4 on 1.0.x
- 🇷🇸Serbia levmyshkin Novi Sad, Serbia
I merged your request and forked plyr library. It will download plyr library automatically with composer now. One I got error for getting paths with LibrariesDirectoryFileFinder, it returns 'library/plyr' path without slash at the beginning. It must be 'root' folder before, but there is no root prefix for my local site. I added '/' manually, which will be working for 99% of sites, but I think it will break base path for site in folder.
I released v1.0.12, ping me if you will have any problems with update. Since it was added a new argument in construction caches must be cleared after update.
- 🇷🇸Serbia levmyshkin Novi Sad, Serbia
I will test site in folder with /base_path/ root and add settings for Plyr in GLightbox settings form later.
- 🇷🇸Serbia levmyshkin Novi Sad, Serbia
Demo page is working fine after update:
https://drupalbook.org/ept/demo/video-and-image-gallery - 🇪🇸Spain pcambra Asturies
That was amazingly fast, many thanks levmyshkin!!!
The only issue we might have is upstream on the glightbox library: https://github.com/biati-digital/glightbox/blob/master/src/js/glightbox....
There's no way to configure two items that come directly from cdn on plyr: https://github.com/sampotts/plyr/blob/a148e2e5b6eb4cda1d63a21397636a365f...
One is a blank mp4 which loads conditionally but the other is the player button svg, and I can see people wanting to change that.
I was going to open an issue there but saw this message: https://github.com/biati-digital/glightbox/issues/472
- 🇷🇸Serbia levmyshkin Novi Sad, Serbia
Hi pcambra, I added settings for plyr on GLightbox config form:
/admin/config/media/glightboxI also forgot, that GLightbox has alter hook_glightbox_settings_alter(), where all settings are possible to change in custom module.
/modules/custom/glightbox/glightbox.api.phpReleased the changes in 1.0.13 version.
- 🇪🇸Spain pcambra Asturies
Yes, but I don't think the mp4 and the svg are configurable (see the links on #13)