muxinc / videojs-mux-kit

MIT License
33 stars 11 forks source link

feat: Output index.vhs.js to allow this to use Video.js+VHS #63

Closed gkatsev closed 2 years ago

gkatsev commented 2 years ago

This PR uses webpack env commands and alias options to output a separate index.vhs.js file that can be used with a default video.js import and thus working with VHS. The default export will continue using hls.js. The npm run build command will output both files. npm run dev will run with hls.js and npm run dev:vhs will run with vhs.

Fixes #62

~A next step, which probably should come in a separate PR is to integrate tech/hls.js with videojs-contrib-quality-levels.~ (This is taken care of in another PR) ~This is a WIP PR to switch videojs-mux-kit to use VHS. This is a minimal set of changes. I think it would be nice to be able to set up alternate builds that will use VHS or hls.js.~

gkatsev commented 2 years ago

I've created a PR based off of this that integrates hls.js with contrib-quality-levels https://github.com/gkatsev/videojs-mux-kit/pull/1

gkatsev commented 2 years ago

I've updated the README to include how to import the new file and also add a note on how to get access to the live demo page.

gkatsev commented 2 years ago

maybe we update player_software_version to be: 0.7.0-hls.js or 0.7.0-vhs? That way from the Mux Data side of things we can see how the two different builds perform.

Something like that definitely is a good idea to do. Should it be the player_software_version or maybe player_software_name?

gkatsev commented 2 years ago

Is there a tech option in Mux data that could be set instead? Not really sure what's the best option.

dylanjha commented 2 years ago

@gkatsev mux metadata guide is here: https://docs.mux.com/guides/data/make-your-data-actionable-with-metadata

Yeah, I could see it going in player_software_name, I don't feel strongly between that one or player_software_version

gkatsev commented 2 years ago

@dylanjha didn't see anything more appropriate. Decided to append it to the player-software-name as that seems a bit more appropriate to me compared to appending it to the version.

dylanjha commented 2 years ago

One small detail, otherwise QA is good and we should get this merged then follow up with a release!