Live data from Hacker News

Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller

videojs.org

31–40 of 170 posts

Re: Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller

#32

[flagged]

Hey VJS core contributor here. We definitely feel that concern and we also don't yet have a silver bullet formalized. I suspect we'll need some kind of alternate implementations or feature augmentation at some point. We're currently doing things in a bit more ad hoc way, such as the interrelationship between PiP and Fullscreen (see, e.g.: https://github.com/videojs/v10/blob/main/packages/core/src/d... ).

One other thing to note: because the features are "composed", we at least have a lot of flexibility here that makes me feel pretty good about the fundamentals and not "coding ourselves into a corner" here.

Re: Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller

#34
I am curious, why would anyone pick HLS over Dash in these days?

Granted, my knowledge on the matter is rather limited, but I had some long running streams (weeks) and with HLS the playlist became quite large while with dash, the mpd was as small as it gets.

Re: Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller

#36
post #33

Are there any plans to support other frontend frameworks? If I wanted to use it today in something like svelte how should I go about it?

We are designing with the goal of supporting more frameworks like Svelte and Vue specifically, even as far as React Native! We just don’t know when exactly yet but a large part of our approach in v10 is to make sure we can deliver the best possible experience to each frontend framework. It’s important for us that the integrations don’t feel like wrappers but truly idiomatic.

In the meantime, we’re hoping our custom elements will act as a good stopgap. Most frameworks including Svelte support them well, and we’re pouring love into the APIs so they feel good to use regardless of which framework.

If you’re interested in peeking under the hood, architecturally we’re taking a similar approach to TanStack and separating out a shared core from the beginning, but with one added step of splitting out the DOM as well to aid in supporting RN one day.

Re: Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller

#37
post #35

This is very cool, but I'm confused why the React player is smaller than the HTML player. What's actually in the size comparison there?

It’s largely because (1) the React runtime is not bundled so it’s technically not apples to apples, (2) the Web Component includes CSS as well since we’re using Shadow DOM.

Basically few kB for CSS and few kB for a thin “framework” layer for managing attr to prop mapping, simple lifecycle, context, and so on.

Re: Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller

#38

I am curious, why would anyone pick HLS over Dash in these days? Granted, my knowledge on the matter is rather limited, but I had some long running streams (weeks) and with HLS the playlist became quite large while with dash, the mpd was as small as it gets.

It's still mandatory for all but the newest iOS devices, which don't support MediaSourceExtensions.

Re: Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller

#39
post #15

Earlier quoted context omitted.

I'm on the Video.js team, just wanted to say thank you! Means a lot and we'd be eager to hear your experience trying it out. Feel free to drop a GitHub issue or discussion post if you ever get a chance :)

From me, this is a massive relief after we just deployed a bunch of videos to Vimeo. The next week they were bought. I'm a one-man operation. In the order of hundreds of videos served a week. All I want is control over my own destiny. If this and a VPS can do that, that'll be amazing . Thank you for doing this.

If you need more than a VPS can provide (like a real CDN), you can check us out on Swarmify.com. It might be overkill for your use case, though.

We'll be moving to videojs 10 when it hits GA.

Re: Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller

#40
post #38

I am curious, why would anyone pick HLS over Dash in these days? Granted, my knowledge on the matter is rather limited, but I had some long running streams (weeks) and with HLS the playlist became quite large while with dash, the mpd was as small as it gets.

It's still mandatory for all but the newest iOS devices, which don't support MediaSourceExtensions.

This is true, and the whole iOS/iPadOS/tvOS ecosystem supports HLS natively making it much easier to work with on that platform. In addition, Chrome recently added support for HLS[1] (and not DASH), so the native browser support for HLS is getting pretty wide.

HLS also has newer features that address the growing manifest issues you were seeing. [2]

All that said, I think a lot of people would feel more comfortable if the industry's adaptive streaming standard wasn't completely controlled by Apple.

[1] https://caniuse.com/http-live-streaming

[2] https://www.mux.com/blog/low-latency-hls-part-2

Post reply on HN