Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am looking into offering variable resolutions/bitrates and there is a video.js plugin that provides that functionality here https://github.com/vidcaster/video-js-resolutions (with a few significant caviats in its current version).
I am wondering what is the most reasonable way to implement a video.js plugin with the module, should the javascript be loaded from a custom module or is there a better way?
Comments
Comment #1
Jorrit CreditAttribution: Jorrit commentedThe JS and CSS need to be included via, for example, your theme. The data-resolution attribute can be added via a template override.
Comment #2
Beanjammin CreditAttribution: Beanjammin commentedThanks for the follow up Jorrit, much appreciated!
Comment #3
mglamanSupport request was answered.
Comment #5
pawel_r CreditAttribution: pawel_r commentedPlease help,
all I get after adding plugin files (link) is:
How to refer to videojs object (and add plugin)?
videojs: 4.12.7
module: 7.x-2.3
Comment #6
pawel_r CreditAttribution: pawel_r commentedehhh... so stupid...
Wrong module version... 7.x-3.0 is using videojs v4, then just changes in copy of videojs.tpl.php file and everything works smoothly.
Comment #8
terminology CreditAttribution: terminology commentedi still dont know how to add video.js plugins in drupal
Comment #9
pawel_r CreditAttribution: pawel_r commented@terminology
Library with plugin should be placed in libraries directory.
Example with 'resolution selector' plugin, example.tpl.php file:
Comment #10
terminology CreditAttribution: terminology commentedi put all the plugins in the libraries directory like pre rool plugin, but have no way to configure them