Embedding YouTube
The easiest way to add video:Implementation
Responsive YouTube
Embedding Vimeo
Similar to YouTube:Self-Hosted Videos
HTML5 Video
For videos in your public folder:With Poster
Show an image before playing:Autoplay (Muted)
Autoplay requires muted for most browsers:Video Backgrounds
Hero with Video Background
Video from Supabase Storage
Store videos in Supabase:Upload Limits
Consider Supabase storage limits for video:| Plan | Storage | File Size |
|---|---|---|
| Free | 1 GB | 50 MB |
| Pro | 100 GB | 5 GB |
Video Optimization
File Formats
| Format | Support | Best For |
|---|---|---|
| MP4 | Universal | General use |
| WebM | Modern browsers | Better compression |
Provide Multiple Sources
Compression Tips
- Resolution: 1080p max for web
- Bitrate: 5-8 Mbps for 1080p
- Duration: Keep short for fast loading
- Tools: HandBrake, FFmpeg for compression
Video Players
Custom Player UI
Third-Party Players
For advanced features:- Video.js - Full-featured player
- Plyr - Simple, accessible
- React Player - Supports multiple sources
Lazy Loading Videos
Don’t load videos until needed:Video SEO
Schema Markup
Accessibility
Captions
Always provide captions:Transcripts
Provide text alternatives:Common Patterns
Product Demo Section
Video Testimonials
Tutorial Gallery
Troubleshooting
Video not playing
Video not playing
- Check file path is correct
- Ensure video format is supported
- Check browser console for errors
- Verify video isn’t blocked by CORS
Autoplay not working
Autoplay not working
- Must be muted for autoplay
- Add playsInline for mobile
- Some browsers block all autoplay
Video loads slowly
Video loads slowly
- Compress the video file
- Use appropriate resolution
- Consider streaming services for long videos
- Add poster image while loading
Using Images
Image best practices

