busy-elephant-27084
04/06/2026, 11:30 PMtall-airline-16756
04/06/2026, 11:31 PMtall-airline-16756
04/06/2026, 11:31 PMbusy-elephant-27084
04/06/2026, 11:32 PMtall-airline-16756
04/06/2026, 11:33 PMcanvas.captureStream(fps), take stream.getVideoTracks()[0], then localParticipant.publishTrack(videoTrack, { source: Track.Source.ScreenShare }).
1. Start LiveKit Universal Egress (Room Composite or Track Composite) to record the room or the published track.
Notes and alternatives
• If Hyperbeam provides a MediaStream directly (instead of canvas), publish that stream’s track the same way.
• Use Room Composite if you want a single merged recording (headless Chrome renders the room). Use Track Egress/Track Composite for per-track exports.
• Send control/metadata over LiveKit data channels if you need synchronized events or captions.
Questions to finalize guidance
• Are you rendering Hyperbeam to a canvas element or receiving a MediaStream from Hyperbeam?
• Do you want a single merged recording (one video of the room) or separate recordings per participant/track?
Tell me which option you want and whether you need code for a web SDK example; I’ll provide a targeted snippet.
Sources: Streaming video from a canvas with WebRTC and React | LiveKit | Streaming video from a canvas with WebRTC and React | LiveKit | Real-time audio and video in the metaverse | LiveKit | Real-time audio and video in the metaverse | LiveKit | Universal Egress | LiveKit, with interactive elementsbusy-elephant-27084
04/07/2026, 12:21 AMtall-airline-16756
04/07/2026, 12:21 AMconst stream = canvas.captureStream(30) or use the provided stream.
b. Get the video track: const videoTrack = stream.getVideoTracks()[0].
c. Publish to LiveKit: await localParticipant.publishTrack(videoTrack, { source: Track.Source.ScreenShare }).
d. Start LiveKit Egress (Room Composite for a merged recording or Track Egress for per-track files).
Option B — iframe is cross-origin (no direct access)
• If you cannot capture the iframe (cross-origin) and Hyperbeam cannot provide a stream, you can:
◦ Run a headless capture in a secure renderer (a small headless Chromium instance or a server-side renderer) that loads the Hyperbeam session and forwards its output as a MediaStream/RTMP to LiveKit egress or publishes into the room as a participant.
◦ Or ask Hyperbeam for a direct output API (MediaStream/track) you can consume client-side.
Notes
• Room Composite records what’s published in the room (uses headless Chrome to layout/record). Track Egress exports individual tracks.
• Use data channels for metadata or sync signals if needed.
• Aim for hardware-accelerated encoding and match capture FPS/bitrate to reduce latency.
Quick question to finalize a concrete snippet:
• Can you access the iframe DOM or does Hyperbeam provide a MediaStream from the SDK? If yes, I’ll provide a Web SDK code example., with interactive elements