Quick Example
Embed Player
Basic HTML Embed
React Component
Vue Component
Embed Code Generation
get_embed_code()
Generate an HTML iframe embed string directly from SDK objects. Available on Video, Shot, SearchResult, Timeline, RTStream, RTStreamShot, RTStreamExportResult, and Editor Timeline.
<iframe> string. Raises ValueError if player_url is not available and cannot be auto-generated.
Video Embed
Search Result Embed
RTStream Note
RTStream does not support auto_generate. You must call generate_stream(start, end) explicitly before calling get_embed_code():
build_iframe_embed_code() Utility
A standalone helper when you already have a player URL:
Thumbnail Generation
Get Video Thumbnail
Multiple Thumbnails for Preview
Share Links
VideoDB Console Player
Generate shareable links using the console player:Share Specific Clips
Social Media Metadata
Open Graph Tags
Twitter Card
Generate Metadata Object
CDN Delivery
Stream URL Structure
VideoDB serves content through a global CDN:| Endpoint | Purpose |
|---|---|
stream.videodb.io | HLS streaming |
cdn.videodb.io | Direct file downloads |
URL Caching Strategy
Player Features
Autoplay with Mute
Loop Playback
Custom Controls
Responsive Embed
Aspect Ratio Container
Multiple Aspect Ratios
Best Practices
| Practice | Reason |
|---|---|
| Cache stream URLs | Avoid regenerating on every request |
| Use thumbnails | Improve perceived load time |
| Preload metadata | preload="metadata" for faster starts |
| Lazy load off-screen | Defer loading until visible |
| Handle errors | Show fallback on stream failure |
Error Handling
Next Steps
Streams and Exports
Generate clips and export video
Timeline Architecture
Compose video programmatically