Plyr
A simple, accessible and customisable media player for <video>
, <audio>
, YouTube and Vimeo that started off as a little side project and kinda blew up.
History
Inception
In 2016, while working at Selz, we were building some video-based features for the product so I started looking for a suitable open source player we could use. We had some fairly basic requirements:
1. Accessible
It had to be screen-reader friendly, easy to use with keyboard navigation and support webvtt subtitles. The native players were surprisingly a little behind in terms of a11y.
2. Easy to customize
The nature of the Selz business (building ecommerce websites) meant we had to be able to easily customize the look and feel of it to work with different themes. I’m also quite particular when it comes to how I like things to look 😂.
3. Lightweight
This is a given nowadays but we wanted to keep things fast.
Alternatives
The popular players at the time were Video.js and MediaElement. Unfortunately while both were great players, neither really met our requirements so I decided to have a go myself. How hard could it be? 😁
v1.0
I started off by adapting an accessible video player that PayPal had built (sadly, it no longer exists so I can’t link it). This was a simple designed player that gave me some great inspiration to use when building out v1.
Our original requirements were just for HTML5 <video>
and <audio>
so that’s all I supported in the first version. It was less than 3Kb gzipped. February 2015, I threw it on GitHub and npm, started using it on Selz and didn’t think much of it.
Hacker News
Then, on March 3 2015, it was posted on Hacker News and I was lucky enough to get some traction from that. I woke up the next day to >1,500 stars on GitHub and a bunch of issues and pull requests. I guess it was something a lot of other folks also wanted! I guess I better start building some more features.
Product Hunt
Coming soon
Statistics
- 25k stars on GitHub
- 16M+ downloads on npm (at time of writing) https://npm-stat.com/charts.html?package=plyr&from=2016-01-23&to=2023-07-23
- 3.6B requests and ~600M unique visitors using the CDN every 30 days
Notable users over the years
- BBC
- SpaceX
- Toyota
- Peugeot
- Bloomberg