
Plyr
A simple, accessible video and audio player for HTML5, YouTube and Vimeo. Now deprecated.
- Stars
- 30k
- Forks
- 3.1k
- Licence
- MIT
- Language
- JavaScript
- Last update
- 16 days ago
- Type
- Library
What it is
Plyr is a JavaScript library that replaces the default look of web video and audio players with a cleaner, customizable set of controls. It works with standard HTML5 media elements as well as embedded YouTube and Vimeo players, giving them one consistent interface and event API. The project is now deprecated: its maintainers recommend Video.js 10 for new projects and Plyr only receives security updates.
- Add styled controls, captions and keyboard shortcuts to an HTML5 video on a webpage
- Wrap a YouTube or Vimeo embed so it uses the same controls and events as your other players
- Show preview thumbnails and multiple caption tracks on a video page
Great for
- Developers maintaining an existing site that already uses Plyr
- Projects that need one consistent player across HTML5, YouTube and Vimeo sources
- Teams who want a lightweight player with no framework dependency
Not ideal for
- New projects: the README says to use Video.js 10 instead, since Plyr is deprecated and only gets security fixes
- Non-developers looking for a ready-made video app, since this is a library that needs to be embedded in a web page
How to get it
- 1
Install with a package manager
Install from npm
npm i plyrBuild from source
npm i && npm run build - 2
Run it
- Add the plyr.css stylesheet to your page head
- Add a video or audio element with an id such as player
- Include plyr.js or import Plyr as an ES6 module
- Create an instance with new Plyr('#player')
- 3
Get the most out of it
- Use the data-poster attribute on video elements to avoid downloading the poster image twice
- Use progressive enhancement with iframe embeds for YouTube and Vimeo
- Add VTT caption tracks with the track element for accessibility
- Use the standardized API and events to control playback across all supported formats
Downloads
Strengths
- Built on standard HTML5 elements and written in vanilla ES6 JavaScript with no jQuery requirement
- Standardized API and events across HTML5, YouTube and Vimeo sources
- Supports captions, keyboard shortcuts, picture-in-picture and i18n controls
Trade-offs
- Deprecated; receives security updates only, so no new features are expected
- Requires a browser that supports modern features, as noted in the README's browser support section
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| plyr (this) | 30k | Library | beginner | 16 days ago | Developers maintaining an existing site that already uses Plyr |
| react-player | 10.3k | Library | intermediate | 1 months ago | React developers who need to embed videos from several services behind one component |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.