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
video.js is huge #5632
Comments
👋 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. |
Video.js is a complete, fully functioning HTML 5 video player. If all you need is a background video you could use the HTML5 |
I could, but is there any playback performance drawback, or polyfill to be used, in that case? |
Video.js definitely isn't small. This is because it does quite a lot. The biggest parts are Video.js are the segmented video format support, caption support, and controls. We're working on making it easier to disable the parts that you don't need. |
@stratboy, if is 500kb, is because something is wrong for that flow, our player is 340kb built on top of videojs 7.3 and includes a vr player, playlist functionality, ads, and a custom skin, try Gzip and minify your code for production, also you might want to check code splitting techniques if you don't need the player on the first payload. |
Just check the download version: the minified one is almost 500kb. Yes I can gzip, but the thing is still too much for my needs. I eneded up with native video, and for things more complicated, I found another good free library. |
Sorry to hear that you weren't able to use Video.js. Hopefully, sometime in January we'll have a better answer for this. |
hi , is there today(September/2019) a light version of videojs?
|
The latest Video.js pre-release (7.6.4) is 12KB minified/gzipped smaller. As for a "light" version. It depends on which features you want. If you want HLS support in all browsers, no. If you don't care about HLS, you can grab the "core" builds, which exclude it (https://unpkg.com/browse/video.js@7.6.0/dist/alt/). Minified gzipped video.js is around 125KB, without VHS it is 57KB and without vttjs (if you don't care about captions) is 51KB. At some point, we'll have a better writeup about this and why it's "big" (it isn't any bigger than comparable players). |
I downloaded npm latest version ( EDIT: I just noticed that the cdn minified version ( https://vjs.zencdn.net/7.7.6/video.min.js ) is 127Kb. |
125KB is minnified and gzipped. |
Hi, I just noticed that my defaults.js (the file where I concatenate all my scripts), is very big. So I looked at single files weights, and saw that video.js, minified, is almost 500kb!
It's really, really huge for a single script that only give a service and isn't the whole app. Is there a way to have it lighter? Is there a light version somewhere? I just need it for a background video... 500k are definitely too much for only that.
Thank you
The text was updated successfully, but these errors were encountered: