video.js
video.js copied to clipboard
Building videojs with a customized mux.js library?
Description
I was trying to build VideoJS with a customized muxjs library, I failed. See muxjs ticket about my customization, my final version does normal_audio(lang=fin,swe,eng,any)|visual_impaired_audio
preference.
$ git clone --depth 1 https://github.com/videojs/video.js.git
$ npx browserslist@latest --update-db
$ npm install
$ npm audit fix
$ npm run build
"mux.js": "https://github.com/Murmur/mux.js/tarball/main"
first try| modified mux.ts in video.js/package.json?
file, this did nothing, still dist/video.js
had the original muxjs code.
second try| modified mux.ts in video.js/node_modules/@videojs/http-streaming/package.json
file and compile a submodule but builing a module fails on missing test content.
$ cd node_modules/@videojs/http-streaming && npm install && npm run build
>> test/**/*.test.js → test/dist/bundle.js...
>> [!] (plugin createTestData) Error: ENOENT: no such file or directory,
>> scandir '/mnt/c/projects/video.js/video.js/node_modules/@videojs/http-streaming/test/segments'
How do I skip test cases on http-streaming submodule compilation, or this is not how submodule modification should be injected to the overall videojs compilation?
Reduced test case
No response
Steps to reproduce
- take videojs from github
- modify muxjs library link and compile a project
Errors
error from http-streaming nodemodules library compilation.
test/**/*.test.js → test/dist/bundle.js... [!] (plugin createTestData) Error: ENOENT: no such file or directory, scandir '/mnt/c/projects/video.js/video.js/node_modules/@videojs/http-streaming/test/segments'
What version of Video.js are you using?
latest
Video.js plugins used.
No response
What browser(s) including version(s) does this occur with?
Firefox
What OS(es) and version(s) does this occur with?
Windows 10
👋 Thanks for opening your first issue here! 👋
If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. To help make it easier for us to investigate your issue, please follow the contributing guidelines.
Video.js and VHS are compiled at publish time, so the files in dist/
cannot be modified by simply updating dependencies.
You'd probably have to fork VHS (at least), create a custom build of it, and publish it to npm. Then you'd want to use one of the alternate builds of Video.js that does not include VHS baked in.
You can probably build it all locally via npm link
, but it's a bit tricky to get right. An alternative is to modify the dist file directly and then use patch-package or something.
This seems to have a resolution. Please feel free to re-open the ticket if that is not the case.