Problem/Motivation
This tracks the need for a local library version instead of the CDN version, e.g. for privacy / GDPR reasons.
At videojs the request is tracked here and was added to the roadmap:
https://github.com/videojs/v10/issues/828
For Drupals privacy focus this would be very helpful! I'd even vote to make it default and opt-into the CDN to be safe. But that's a maintainers decision.
Comments
Comment #2
anybodyComment #3
semiaddict commentedHi,
I just pushed a commit on my 4.x branch to allow loading local library files from /libraries/videojs/dist.
Here's how I managed to generate the dist files for Video.Js :
Once the build done, make sure to copy all the files from packages/html/cdn to libraries/videojs/dist.
You should then have a bunch of files in there including audio-minimal.js, audio.js, video-minimal.js and video.js.
Comment #4
anybodyWhao VERY mice @semiaddict!
Maybe you could put this information into the README.md of your branch additionally?
And maybe you'd like to apply as co-maintainer in this module?
Comment #5
yannickooHey 👋 I have added a MR against the
4.xbranch which makes use of thenpm-asset/videojs--htmlComposer dependency so people don't need to build anything manually – https://git.drupalcode.org/issue/videojs-3577815/-/merge_requests/1Comment #6
anybodyNice work @yannickoo that looks great! Did you already test it manually?
I'm wondering if there's any way we can add a test to ensure it works.
And I think
documentation should be added to the README.md?
In modules like photoswipe we're also using the status report to show the presence of the library or using the CDN. We might also want to add a "Use CDN" checkbox and use the local library by default to ensure you don't use CDN accidentally?
Comment #7
yannickooYeah I had those two topics on my radar but realized the complete
README.mdneeds an overhaul :DI have tested this locally and then realized I need more customization to show a responsive thumbnail which made me creating my own "lazy-loaded video player" Single-Directory Component to achieve that.
There are many things we could provide here in this module to make it work in a really nice way but first we need to make that initial
4.xdev version happen.Comment #8
anybodyComment #9
_shyComment #10
anybodyWe need to wait for the VideoJS beta27 release: https://github.com/videojs/v10/tags
GitHub issues say that it should contain the sources we need.
Comment #11
grevil commented@anybody v27 released and the asset is now included in the composer.libraries.json and seperate manual installation is also documented. We shouldn't use the "npm-asset/videojs--html" for now, as it ships with unnecessary dependencies on the rest of the videojs v10 eco-system.
Fixed through #3577815: [10.x] Prepare 10.x branch for Video.js 10 implementation.
Comment #13
grevil commentedAdded contribute record for @yannickoo for the base implementation! Thanks! 🙂👍