Closed (fixed)
Project:
GLightbox
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2024 at 17:19 UTC
Updated:
18 Dec 2024 at 08:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
pcambraI'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...
Comment #4
levmyshkinHi 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.
Comment #5
levmyshkinBtw I will test your MR and merge it first tomorrow.
Comment #8
levmyshkinI 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.
Comment #9
levmyshkinI will test site in folder with /base_path/ root and add settings for Plyr in GLightbox settings form later.
Comment #10
levmyshkinComment #11
levmyshkinComment #12
levmyshkinDemo page is working fine after update:
https://drupalbook.org/ept/demo/video-and-image-gallery
Comment #13
pcambraThat 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
Comment #14
levmyshkinHi pcambra, I added settings for plyr on GLightbox config form:
/admin/config/media/glightbox
I 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.php
Released the changes in 1.0.13 version.
Comment #15
pcambraYes, but I don't think the mp4 and the svg are configurable (see the links on #13)