Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building videojs with a customized mux.js library? #7826

Closed
Murmur opened this issue Jul 4, 2022 · 4 comments
Closed

Building videojs with a customized mux.js library? #7826

Murmur opened this issue Jul 4, 2022 · 4 comments

Comments

@Murmur
Copy link

Murmur commented Jul 4, 2022

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.jsonfile 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

  1. take videojs from github
  2. 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

@Murmur Murmur added bug needs: triage This issue needs to be reviewed labels Jul 4, 2022
@welcome
Copy link

welcome bot commented Jul 4, 2022

👋 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.

@misteroneill
Copy link
Member

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.

@misteroneill misteroneill removed the needs: triage This issue needs to be reviewed label Jul 11, 2022
@gkatsev
Copy link
Member

gkatsev commented Jul 11, 2022

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.

@mister-ben mister-ben removed the bug label Aug 9, 2022
@wseymour15
Copy link
Contributor

This seems to have a resolution. Please feel free to re-open the ticket if that is not the case.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants