Video
YouTube, Vimeo and self-hosted video with privacy mode, lightweight loading and subtitles.
Topics: Media · Privacy
Highlights
Lightweight mode: preview image instead of iframe
youtube-nocookie privacy mode
Subtitle tracks for self-hosted files
Lazy loading
Custom poster and play icon
Accessibility
Real play button with a name, subtitle tracks for self-hosted video, no autoplay surprises.
Privacy
The player only connects to YouTube or Vimeo after a click in lightweight mode.
Live demo
See it in action
Everything below is the real element, configured in Breakdance. Try it with your keyboard, zoom in, or open the page on your phone.
Variant 1
YouTube, lightweight with own preview image
Instead of the YouTube iframe and its thumbnail from Google servers, the element shows a preview image from your media library. The player loads from youtube-nocookie.com after a click.
Variant 2
Vimeo, lightweight
Same principle for Vimeo: no request to Vimeo before the visitor presses play. The play button is a real button with the video title as its name.
Variant 3
Wide format with start time
Any aspect ratio, here 21:9, and a start time of 30 seconds. Suggested videos at the end are limited to the same channel.