Skip to main content
Add video content to your Kleap app for tutorials, demos, and media-rich experiences.

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

Hosting Larger Videos

Short clips can live in your public/ folder and play with a standard <video> tag (see Self-Hosted Videos above). But video files are large, and bundling big files into your site bloats the build and slows page loads. For anything beyond a short clip, host the video on a dedicated video platform and embed it. This offloads bandwidth, adds adaptive streaming, and keeps your site fast:

Rough Guidance

Video sizeBest approach
Short clip (up to ~10 MB)Static file in public/
Longer or high-resolution videoEmbed from a video host (YouTube, Vimeo)
Keeping large media off your static build is the single biggest win for load time.

Video Optimization

File Formats

FormatSupportBest For
MP4UniversalGeneral use
WebMModern browsersBetter 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

Troubleshooting

  • Check file path is correct
  • Ensure video format is supported
  • Check browser console for errors
  • Verify video isn’t blocked by CORS
  • Must be muted for autoplay
  • Add playsInline for mobile
  • Some browsers block all autoplay
  • Compress the video file
  • Use appropriate resolution
  • Consider streaming services for long videos
  • Add poster image while loading

Using Images

Image best practices