Video Player
This Etch video player for WordPress plays MP4 and WebM files, HLS streams, YouTube and Vimeo, or a muted background video behind a hero. It comes with accessible controls and captions, and it can ask for privacy consent before YouTube or Vimeo connect.
Lite is the same player without HLS, for sites with files, YouTube and Vimeo only.
Download Lite .jsonStay up to date. Etch won’t update a pasted component for you. Subscribe and get one email when a new version is out.
10 players in real layouts
Press Play on any of them; most pause the others when they start. The YouTube player asks before it connects, and Mobile switches to a phone width.
What it does
The whole Etch video player is one pasted component. Media Chrome, hls.js and the Vimeo Player SDK are bundled, and the CSS and scripts travel with it, so you need no plugin, no CDN and no API key.
Four sources in one component
MP4 and WebM files and HLS streams play with Media Chrome controls. YouTube and Vimeo links play with the provider’s own controls, so their captions and quality menu keep working. You need no API key.
Background video for heroes
Background mode plays a muted, looping file or stream behind the Content slot, under your heading and button. Its one pause button always stays visible. Under reduced motion it shows the poster until the visitor presses Play.
Consent before YouTube and Vimeo
With Privacy Consent on, the page asks first and requests nothing from YouTube or Vimeo before the visitor agrees, not even an image. A Consent Cookie field or a short script connects your cookie banner.
Loads the video when it’s needed
When Visible loads the video once the player is within 200px of the screen. Eager loads it with the page. On Interaction requests no video, stream or caption file until the first Play press.
Captions and a large play button
WebVTT captions, one row per language, in a menu that works before the first Play. A large play button sits over the poster, and a loading ring shows when a start takes longer than 300 ms.
Accessible by default
The player is a region named by Video Title. Every control works from the keyboard with a visible focus ring, and it follows reduced motion and forced colors. Checked with TalkBack on an Android emulator and VoiceOver on a Mac.
60 styling variables
Colors and sizes of the frame, controls, timeline, play button, Background mode and consent panel, set on any parent element. ACSS 4 tokens with plain fallbacks, so it works without Automatic.css too.
A Lite version without HLS
ED Video Player Lite leaves out HLS, for sites with only files, YouTube and Vimeo. It carries about 70 KB of gzipped JavaScript instead of about 260 KB, with the same CSS, runtime and other props.
Add it in four steps
This WordPress video component installs like any other Etch component, with a paste, and needs no plugin, no CDN and no API key. The paste brings the CSS and three scripts with Media Chrome, hls.js and the Vimeo Player SDK bundled; Lite has two and leaves out hls.js. Your videos stay in your Media Library or on your video host. It works with or without Automatic.css 4.
Video Player or Lite? ED Video Player plays video files, HLS streams, YouTube and Vimeo. Lite plays files, YouTube and Vimeo. Etch puts a component’s scripts on every page that uses it, so a page with ED Video Player carries about 260 KB of gzipped JavaScript, even when its only player shows a YouTube link. With Lite it is about 70 KB. Take Lite when no player needs an .m3u8 stream. Take ED Video Player for a live stream or adaptive quality from a video platform, or when you’re not sure. Both can sit on one site, even on one page, as long as they are the same version.
Shows without its styles? It was pasted but not saved, and pasting again won’t repair it. Delete ED Video Player from your components, paste it again, click Save and reload the builder. The same goes for Lite.
- Copy the componentUse Copy component at the top of this page, or Copy Lite for the version without HLS. You can also download the .json file.
- Paste, save and reloadSelect where it should go, press Ctrl+V or ⌘V and click Save. Then reload the builder before you go on: Etch has lost edits saved later in the same session.
- Choose the sourceSet Source Type and fill the field that matches: Video File, HLS URL or YouTube / Vimeo URL. Add a Poster from your own site, in the shape of the video.
- Name it and saveGive it a Video Title, such as Product tour, so screen readers can tell the players apart. Add Captions rows for a file or a stream, then save.
39 settings in the Etch props panel
In the order of the Etch props panel, where each setting has help text too. Only the source needs filling in: everything else has a working default, and empty labels fall back to built-in English text.
Before you publish a video
Things that are easy to miss when a video goes onto a real site.
- YouTube doesn’t play in the Etch builder. The builder canvas sends no Referer, and YouTube answers with its Error 153 screen. So the builder shows the poster, or the video’s own thumbnail, with a hint. The published page plays the video as usual. Vimeo plays in the builder too.
- Reload the builder after the paste. After a component with a new definition was pasted and saved, later edits saved in the same builder session were gone after a reload. It is Etch behavior: a plain paragraph is lost too. Reload once before you paste another component or keep editing.
- Keep Video Player and Lite at the same version. Both use the same styles of .ed-video-player, matched by selector, and Etch keeps a style it already has when you paste. A second paste at another version would run on the older CSS.
- Every page that uses it carries its scripts. Etch adds a component’s scripts to each page with an instance, whatever that page plays. Load Media defers the video, not the JavaScript: about 260 KB gzipped for Video Player, about 70 KB for Lite. A Content Security Policy must allow the inline scripts Etch delivers.
- Privacy Consent is a mechanism, not legal advice. You decide whether you need consent, what the message says and which banner category a video belongs to. It holds back only this component’s requests, shows no site-wide banner, keeps no log of consents and can’t remove cookies the service has already set.
- A background video is decoration. It has no sound, no captions and no name for screen readers, so it must not carry information the page doesn’t give elsewhere. Give it a poster, keep slot text at 4.5:1 over the lightest frame of the video, and don’t hide its pause button.
- Some built-in text is English only. Media Chrome’s control names and tooltips, the status messages and the load and retry buttons have no translation in this version. Video Title, the two button labels, the consent texts and the caption labels are props, so write those in your site language.
- Without JavaScript, files still get a link. A video file or HLS stream shows its poster above a link to the source. A YouTube or Vimeo source shows only an empty frame. Background mode keeps its poster and the slot content.
- Not tested yet: NVDA, VoiceOver on iOS and real devices. NVDA was used only to check the control order around picture in picture. Physical phones and tablets, real 400 % zoom and the real cookie banner plugins are untested too. It ran in Chromium, Firefox, Edge and Safari 27, in the iPhone and iPad Simulator, with TalkBack on an Android emulator and with VoiceOver on a Mac.
Free to use. Not for resale.
Licensed under FSL-1.1-MIT, the Functional Source License with an MIT future license. Each version becomes MIT-licensed two years after its release.
- Use it on unlimited personal, client and commercial websites
- Modify and adapt it however you like
- Use it in paid design and development work for your clients
- Sell it, or a modified version, as a component: in a library, bundle, template kit, plugin or marketplace listing
- Offer it in another commercial product or service that competes with it
Keep the copyright and license notices in the code, and link to this page instead of re-hosting the download, so everyone gets fixes and updates. Read the full license
Third-party code
This component bundles the open-source libraries below. They keep their own licenses, and FSL-1.1-MIT does not apply to them. Each script carries the full notices of what it bundles; keep them when you use or change the component. The code is unchanged except for one fix in hls-video-element, which removes a listener when its hls.js instance is destroyed. Lite leaves out hls.js, hls-video-element, custom-media-element and media-tracks. The YouTube IFrame API is not bundled: YouTube serves it when a YouTube player loads.
- Media Chrome4.19.2
- hls.js1.7.3
- hls-video-element1.5.11
- custom-media-element1.4.6
- media-tracks0.3.5
- @vimeo/player2.29.0
- native-promise-only0.8.1
- weakmap-polyfill2.0.4
How to update
Etch has no update button for pasted components. Pasting a newer version over an installed one changes nothing: Etch keeps the component and the CSS it already has. To update, reinstall in five steps. If your site has both ED Video Player and Lite, update them together.
- Note what you setWrite down the settings of each player, including its source, poster, Captions rows and Privacy Consent fields, and copy any CSS you changed in the component’s own styles.
- Delete the componentsIn Etch, delete ED Video Player and ED Video Player Lite, whichever you have, from your components. Every player disappears from every page that used it.
- Delete their stylesIn the Style Manager, search for ed-video-player and delete the 20 styles listed below. Both versions share them.
- Paste the new versionCopy or download the new JSON from this page, paste it on the canvas, click Save and reload the builder. If you use Lite, do the same with the Lite JSON.
- Put your players backInsert a player wherever one was, re-enter its settings and save. Reload any other open builder tab.
Styles to delete in step 3
.ed-video-player.ed-video-player__controller.ed-video-player__source.ed-video-player__track.ed-video-player__captions-menu.ed-video-player__controls.ed-video-player__timeline.ed-video-player__seek.ed-video-player__bar.ed-video-player__play.ed-video-player__time.ed-video-player__mute.ed-video-player__volume.ed-video-player__captions.ed-video-player__rate.ed-video-player__pip.ed-video-player__fullscreen.ed-video-player__content.ed-video-player__status.ed-video-player__fallback
Trade-offs
- Placements are not kept. Etch doesn’t link old players to the new component, so you insert each one again and re-enter its settings.
- Edits inside the component’s CSS are replaced. Keep overrides on a parent class with the
--ed-video-player-*variables; those survive an update. - Skipping a step leaves a mix. Without step 2, Etch keeps the old component. Without step 3, the new version runs on the old CSS.
Nothing to update yet. 1.0.0-beta.1 is the first public version. Subscribe and you’ll get one email when the next one is out.
What changed
Versions follow semantic versioning. When an update changes how existing options behave, its entry says so.
1.0.0-beta.1Latest
- ReleasedFirst public version, as ED Video Player and ED Video Player Lite. It stays a beta until NVDA, VoiceOver on iOS, physical phones and tablets, real 400 % zoom and real cookie banner plugins are checked.
Tell me what this component needs
A bug, a missing option, or anything that made the component awkward to use in a real build — it all belongs here. The versions above are the ones it was tested on; if yours differ, say so.