Problem/Motivation

Load the library from the local library directory instead of the CDN.

Proposed resolution

To load the video.js library from local you have to do two steps:

  1. Download the library in the library directory. There are two options:
    • Download the file https://github.com/videojs/video.js/releases/download/v8.17.4/video-js-8..., create the video.js directory in /web/libraries/ and unzip the downloaded video-js-8.17.4.zip file.
    • Modify the composer.json file of the project, adding the following code in the repositories section:
      {
          "type": "package",
          "package": {
              "name": "videojs/video.js",
              "version": "8.17.4",
              "type": "drupal-library",
              "extra": {
                  "installer-name": "video.js"
              },
              "dist": {
                  "url": "https://github.com/videojs/video.js/releases/download/v8.17.4/video-js-8.17.4.zip",
                  "type": "zip"
              },
              "license": "MIT"
          }
      }
      

      and then run the following command: composer require videojs/video.js

  2. Apply the patch included below
CommentFileSizeAuthor
#2 3478713-videojs-library-locally.patch719 bytespascuperbla

Comments

pascuperbla created an issue. See original summary.

pascuperbla’s picture

StatusFileSize
new719 bytes