Lurker News
Hey all, creator of Video.js and co-founder of Mux & Zencoder here. My team and I built this. I hope you like the themes we’ve built so far, and maybe even get inspired to build your own.

I know Web Components are in a bit of a drama cycle right now. I’m happy to see them get any attention really. I’ve been pretty bullish on them since ~2013 when I started working with them, at least in the context of a widget like a video player. I’ve even given many related talks on them like this one (https://www.youtube.com/watch?v=N6Mh84SRoDg).
I would never push them for a large app or as a full replacement for React, but they’ve been incredible for making video players that are compatible across many contexts, and Player.style is a clear demonstration of that when you get to the step of embedding a theme. Web components really shine for building bits of UI that can be shared between projects. They also are the best way to avoid the long term JS framework thrash that’s a challenge for any developer who works on the web for long enough. One of the best decisions I ever made for Video.js was to not build it with jQuery. Video.js is 15 years old now and still in use, while all the jQuery players are not.
For some added context of this project, when I was building Video.js back in 2010 I put a lot of thought into how other developers would customize the player controls. I was excited to use web technologies (instead of Flash) to build a player and I knew other web devs would be too.
Fast forward 14 years — Video.js has been used on millions of websites including Twitter, Instagram, Amazon, Dropbox, Linkedin and even in United Airlines headrests. In 99.99% of those cases the default Video.js controls were used with little to no customization. So…huge adoption success, utter failure in sparking creativity. In retrospect, asking people to learn a new UI framework just to style their player was too much.
Media Chrome and Player.style are my answer to that friction.
- Media Chrome - A suite of Web Components and React Components that let you easily build a media player UI from scratch, using components you’re already familiar with.
- Player.stye - Themes built with Media Chrome, showing the cross-player and cross-framework flexibility of Media Chrome
Media Chrome is already used on sites like TED.com, Syntax.fm, and anywhere the Mux Player is used. We’ve spent the last few months building some great themes for Player.style. I probably had the most fun recreating the Youtube icon animations from scratch using SVGs and CSS. (Whoever made the originals, nicely done!)
It’s all free and open source, so don’t hesitate to jump in if you’re interested in the project. And of course I’m happy to answer any questions.

Comments (63) 30 threads

Earlier comments
dpedu1 reply#
There's some weirdness around focus going on here, hopefully this comes across as constructive criticism. All of them have the same problem:

When you click on the video itself, the left and right arrow keys work to scrub the video backwards and forwards. Up and down do nothing.
When you click on the scrubber, the left and right arrow keys stop working. Also, the up and down arrow keys start working to rewind/advance the video a different amount of time.
If you click in void space, e.g. on the Winamp example or the blue bar that looks like windows 98 on the Reelplay example - both of these controls stop working, as well as space to play/pause.
Latest chrome on macos.

Heff#
Good feedback, thanks! There's a related issue in the media chrome repo here: https://github.com/muxinc/media-chrome/issues/957

The situation is a little complex with "hot keys" for controlling the video in general (after clicking on the video), accessibility controls for each component, and then general accessibility expectations for the whole page. For example, should we capture the up and down arrows to always control volume when the player is in focus, or should we not do that because people expect that for scrolling the page.
All that said, we definitely have some iteration ahead of us on this front so thanks again for the input.

dnsbty1 reply#
Player.style is excellent!

In my last startup I started to build my own video.js theme, and after a few hours realized it probably wasn't worth my time and stuck with the defaults. Going forward these themes would give me a much better starting point to do something more custom.
Thanks for sharing!

Heff#
Thank you! If you still experience friction when trying to build your own theme, then our job isn't done. So let us know!
djhn1 reply#
Since there are video experts around in this thread, does anyone know if there are implementations out there for a player that enables fast smooth scrubbing with audio, similar to how you can scrub and/or watch the timeline at 16x in Adobe Premiere. I guess one needs to eagerly load something like a 16khz mono audio track and some sort of 1fps sprite or 240p video format with I-frames only to switch to on scrub.
Heff#
Anything frame-accurate or smooth scrubbing has always been a challenge with he abstraction level of the video element. I don't have an exact answer from you, but you might look around the web codecs space, where more performant examples are being built at a lower level. https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_A...
spankalee1 reply#
Web components are great. You all are doing awesome things with them at Mux!
spankalee1 reply#
One small bit of feedback: you should look into using adoptedStyleSheets. They're very well supported now, and give a nice perf boost for repeated elements. You can fall back to
Heff#
Iiiinteresting. Some how I'd missed that so far. Thanks for the tip.

Load more comments