Aller au contenu principal

Embedded video: integrate WebRTC in your application

Short answer

Embedded video integrates a WebRTC session directly into a web page, portal, or application via iframe or JavaScript SDK. The user stays in your environment (brand, navigation) without switching to an external tool. It is the fastest pattern to connect real-time communication to an existing journey.

Iframe vs SDK: which approach?

Iframe JavaScript SDK
Integration <iframe src="..."> Import lib + init
Dev effort Minimal Medium
UX control Limited (sandbox) Full
Customization URL parameters Component API
CSP Allow frame-src Allow script + connect-src
Updates Server-side SDK versioning

How does a video iframe work?

  1. Your backend calls the video API → gets URL + token;
  2. Your page inserts <iframe src="https://video.your-domain.com/room/abc?token=...">;
  3. The iframe loads the video interface (WebRTC, SFU, TURN);
  4. The user interacts without leaving your portal.

Embed security

  • Temporary token: time-limited access;
  • CSP frame-ancestors: restrict allowed parent domains;
  • HTTPS required: WebRTC needs a secure context;
  • Iframe sandbox: limit permissions if needed.

Embedded video and white label

  • Customer domain (video.company.com);
  • Branding (colours, logo, copy);
  • No vendor branding visible to end users.

Technical constraints

  • CSP: allow frame-src, connect-src (WebSocket), media-src;
  • Firewall: WebRTC flows to SFU/TURN (see STUN/TURN);
  • Responsive: adaptive iframe (aspect-ratio, fullscreen API).

Embedded video vs redirect

Embed (iframe/SDK) Redirect (link)
UX Stays in portal New tab
SI integration Context preserved Context lost
Complexity Medium Minimal
Mobile Variable (iframe) Good (direct link)

For a simple journey (customer support, external guest), a direct link is often enough: see assistance-video.fr.

How does Leagora support embedded video?

Iframe and SDK on sovereign WebRTC infrastructure, white-label ready. Custom video integration for SI scoping. Contact.

FAQ

Does a WebRTC iframe work on mobile?

Yes, but fullscreen experience is sometimes better with a direct link rather than a nested iframe.

Must camera/microphone be allowed in the iframe?

Yes: the allow="camera; microphone; display-capture" attribute is required on the iframe.

Can the iframe communicate with the parent page?

Yes, via postMessage (cross-origin) for session events (join, leave, end).

Is embedded video GDPR-compatible?

Yes if the underlying infrastructure meets your data policy. See GDPR and France hosting.

Can you embed in a native mobile app?

Via WebView with camera/micro permissions, or via native SDK if available.

Key takeaways

  • Iframe = fast integration; SDK = full control.
  • Token + CSP + HTTPS = embed security triad.