Iframe-Based Video Access
This guide shows you how to embed Osteocom videos directly in your application using a simple iframe approach with secure token authentication.
Key Advantagesโ
๐ Reduced Complexity
Eliminates the need for additional API calls, reducing system complexity
๐ฅ Built-in Video Player
No need to implement your own video player - we handle everything
๐ Automatic Captions
Captions and subtitles are handled automatically
๐ฑ Adaptive Resolution
Video player automatically adapts to resolution changes
๐ HLS Streaming
Uses HLS format, the industry standard for video streaming
How It Worksโ
The iframe-based video access system works through a simple yet secure process:
- Token Generation: Your application obtains a video access token from the Video API
- URL Construction: The token is used as a query parameter in the iframe URL
- Security Check: Osteocom validates user access permissions
- Video Delivery: If authorized, a clean video player interface is loaded
Once you set up the iframe with the correct URL and token, no additional configuration is needed!
Prerequisitesโ
Required Token: tokenAuthVideoโ
The tokenAuthVideo is your key to accessing video content. Here's what you need to know:
- Source: Retrieved from the Video API response
- Expiration: 15 minutes from generation
- Scope: Specific channel authorization only
- During playback: Video continues playing even after token expires
- Page refresh: Requires new token generation
- Security: Expired tokens cannot be used from external sources
- Player controls: All controls remain functional after expiration
๐ Security Note: Token expiration protects against unauthorized external access while maintaining seamless user experience during video playback.
Implementation Guideโ
Step 1: Choose Your Environmentโ
Step 2: Construct the Iframe URLโ
The base URL pattern is:
<urlPrefix>/en/videoaccess?signature=<tokenAuthVideo>
Step 3: Basic Implementationโ
<iframe
src="https://test.osteocom.me/en/videoaccess?signature=YOUR_TOKEN_HERE"
width="100%"
height="500"
frameborder="0">
</iframe>
Step 4: Enhanced Configurationโ
Enable Fullscreen Supportโ
<iframe
src="https://test.osteocom.me/en/videoaccess?signature=YOUR_TOKEN_HERE"
width="100%"
height="500"
frameborder="0"
allowfullscreen>
</iframe>
The allowfullscreen attribute is essential for enabling fullscreen functionality in our video player.
Enable DRM Protected Contentโ
For videos with DRM protection, add the allow="encrypted-media" attribute:
<iframe
src="https://test.osteocom.me/en/videoaccess?signature=YOUR_TOKEN_HERE"
width="100%"
height="500"
frameborder="0"
allowfullscreen
allow="encrypted-media">
</iframe>
The allow="encrypted-media" attribute is required for playing DRM-protected content. This enables the Encrypted Media Extensions (EME) API needed for secure content playback.
Set Default Subtitle Languageโ
Add the sublang parameter to set default subtitle language:
<iframe
src="https://test.osteocom.me/en/videoaccess?signature=YOUR_TOKEN_HERE&sublang=en"
width="100%"
height="500"
frameborder="0"
allowfullscreen
allow="encrypted-media">
</iframe>
Supported Subtitle Languagesโ
itItalian
enEnglish
frFrench
esSpanish
Complete Exampleโ
Here's a production-ready implementation:
<div style="position: relative; width: 100%; height: 0; padding-bottom: 56.25%;">
<iframe
src="https://osteocom.me/en/videoaccess?signature=YOUR_TOKEN_HERE&sublang=en"
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"
frameborder="0"
allowfullscreen
allow="encrypted-media">
</iframe>
</div>
Once your iframe is configured correctly, Osteocom handles everything else - video delivery, player controls, captions, and security! ๐