Prompt
What should I use for videos embedded in a web app?
Latest observation
Nov 6, 2026
OpenAI APIWeb search: off
For videos embedded in a web app, the best choice is usually HTML5 <video>.
Use <video> when:
- You want native browser playback
- You need good performance and compatibility
- You want simple controls, autoplay, looping, muting, etc.
- You’re using common formats like:
- MP4 (H.264/AAC) — best compatibility
- WebM — good for modern browsers
Example:
<video controls width="640">
<source src="video.mp4" type="video/mp4">
<source src="video.webm" type="video/webm">
Sorry, your browser doesn’t support embedded videos.
</video>
If you need advanced features:
Use a JavaScript video player library, such as:
- Video.js
- Plyr
- Shaka Player for adaptive streaming (HLS/DASH)
If you’re streaming large or adaptive video:
Use:
- HLS (
.m3u8) for Apple ecosystem + broad modern support - DASH for adaptive streaming across platforms
- A player library to handle them well
Rule of thumb:
- Simple embedded video: use native
<video> - Custom UI or extra features: use a player library
- Adaptive streaming: use HLS/DASH with a specialized player
If you want, I can also recommend the best setup based on your framework (React, Vue, plain HTML, etc.).
Brands