Skip to content

Question: mux-player without hls.js bundled? #1033

Answered by luwes
harshmandan asked this question in Q&A
Discussion options

You must be logged in to vote

Here are all our dist builds:
https://cdn.jsdelivr.net/npm/@mux/mux-player@3.2.0/dist/

Using import maps you should be able to direct the package imports to the urls of your choice.

I put together an example here: https://codesandbox.io/p/sandbox/8xgx86?file=%2Findex.html%3A17%2C77

Note that I wouldn't use this in production because of the many package requests it has to make.


A better solution would be to NPM install Mux player in a project, then import the /dist/index.mjs path in your entry file and make the hls.js import an external package (https://esbuild.github.io/api/#external). This will make that import not be resolved and not included in the bundle. Bundle everything, host the …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by luwes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1024 on December 09, 2024 18:14.