HNHacker News
TopNewBestAskShowJobs

cpillsbury

7 karma · joined April 18, 2017

submissionscomments
cpillsbury··on Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller
Oh I definitely misunderstood! VJS is designed to have a "why not both?" approach for all of these things. Though, to your point, we will never build a core player or set of core functionalities that are not intended to work with all "standard" modern browsers. There are a few maybe obvious asterisks there (e.g. AirPlay for Safari, Chromecast for Chrome, etc.), but that's our general approach. That said, we don't want to preclude folks from being able to take advantage of fancy, browser-specific features if they so choose (and we may have "official" support for some of these).
cpillsbury··on Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller
Core contributor here! FYI these kinds of cases are definitely on my mind. One of the nice things about our overarching architecture is we (or someone else, even you!) can add/extend for these kinds in a way that doesn't deeply "bake them in" to core use cases but still makes it completely possible to add. From "soup to nuts" (to extend my food metaphors), we've built VJS in a "highly composable" manner, which means we can, say, add state features, add UI for those state features, extend media renderers to expose those features to the state (if/when needed), etc. etc. If you want to start a discussion picking a concrete Chrome-only API, I'd encourage it (https://github.com/videojs/v10/discussions).

I don't know if/when we'll prioritize these things as part of the "core library", given our higher priorities of "feature parity" and core functionality, but we're already well situated for these kinds of cases (I'm sure we'll encounter and need to figure out some wrinkles along the way, but I'm confident these will generally be tractable).

cpillsbury··on Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller
Hey, core contributor here! If a plain video element plus hls.js is all you need to accomplish your goals, we wouldn't ever try to convince you otherwise. In fact, our "HlsVideo" media renderer is backed by hls.js, and Rob Walch has done Herculean feats maintaining and updating that playback engine. If, however, you don't simply want what's provided from the built in <video controls>, or don't want to worry about all of the hairy edge cases or minutia of feature-rich UIs, VJS can help. If you want it to be dirt simple to switch between, say, a simple MP4, MPEG-DASH, or HLS, Video.js's architecture makes that simple. If you want to customize UIs from the ground up but not have to think about/worry about the state modeling of relevant media UI state, you can grab all and only the bits of VJS you want. Also, while still in its early stages, if you don't need the "swiss army knife" of features (and, sadly, code footprint) that is built into hls.js, you can use our "SimpleHlsVideo" media renderer.

We definitely aren't trying to convince anyone to use our free, open source library that doesn't need it. But we do think there are lots of value adds for lots of folks under lots of circumstances that we can and will help, including as simple as not needing to reinvent the wheel a bunch of times.

cpillsbury··on Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller
Core VJS contributor here and builder of players and playback engines for too long (aka before HLS and MPEG-DASH were a thing). As others mentioned, the support matrix for HLS is very typically the proximate, pragmatic reason why folks will reach for HLS over DASH in a "pick one" situation. You're right that HLS is particularly bad for 24/7, long lived DVR/"EVENT" (to use HLS jargon) streams (fine for live, and there are some "cheats" you can do for EVENT to help there) compared to MPEG-DASH's <SegmentTemplate>-based "dynamic" MPEG usage.

Outside of that, though, the standards themselves have different pain points and tradeoffs. Some things are "cleaner"/"less presumptuous" in DASH, but DASH also has a lot of design details that were both "design by committee" (aka different competing interests resulting in a spec that has arguably too many ways to do the same thing) and overrepresented by server-side folks (so many playback complexities/concerns/considerations weren't thought through). It is also sometimes not constrained enough, at least by default (things like not guaranteeing time alignment across media representations). For what it's worth, I think there are lots of pain points from the HLS design decisions as well, but focusing on DASH here just given the framing of your question.

On the flip side, if you stay within certain bounds, the difference between HLS and DASH simply become text files: one XML manifest (MPD) for DASH and a few playlists (M3U8s) for HLS. There's a lot of effort being made to this end, including: https://cdn.cta.tech/cta/media/media/resources/standards/cta... and the CMAF-HAM-inspired model (https://github.com/streaming-video-technology-alliance/commo... from CML and https://github.com/videojs/v10/blob/main/packages/spf/src/co... in our own playback engine library), just to name a few.

cpillsbury··on Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller
Hey there, core contributor here! Starting with the last one first, since that's the easiest - VJSv10 is basically a completely new player, so no backwards compatibility planned (think Mac <=OS9 vs. OSX). We're aiming to port some of the popular plugins though and have discussed other things like migration guides and the like.

For the primary question - this is a tough one, specifically because v10 is a completely new, ground up architecture. Part of this will be feature parity - v8 does many things/handles many cases that v10 doesn't do yet. That may seem like that is an unfair comparison, and, in some sense, that's true. However, this is in fact part of the ethos of our new architecture: by building a highly composable, loosely coupled player framework with well defined architectural "seams"/contracts, you can more easily pull in "all and only what you need for your use case" (a phrase I've been bandying about). While v8 allows for some of this, it's still much harder and you still end up pulling in stuff you probably don't need for a lot of use cases.

Another one is the UI layer - v8 ended up building an entire component implementation. At the time of building, it kind of had to. v10, on the other hand, can "stand on the shoulders of giants", building on top of e.g. custom elements, or React, or any future frameworks we decide to target (and our architecture makes that comparatively easy as well).

I do suspect that once we hit true feature parity, the numbers will be much closer for "the kitchen sink." The thing is, few people (if any) need the kitchen sink.

Thanks for the tough question!

cpillsbury··on Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller
Hey there, core contributor here! This came up during our beta effort. We very likely will be having an opt-in, non-native subtitles rendering implementation. I know at least a few team members that really want it, which adds to the likelihood that we'll add it eventually. The short version of why we started with native subtitles - bundle size and legal compliance, with a dash of prioritization and a sprinkle of hope that some looming laws will motivate browser owners to prioritize improvements. If you want to see our design decision artifact on the topic, we try to make a lot of them public (also to help the robots these days) - https://github.com/videojs/v10/blob/main/internal/decisions/...
cpillsbury··on Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller
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.
cpillsbury··on Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller
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...).