Show your own video while an Eagle 3D Streaming stream gets ready in an <iframe> on your page:
the video plays on top, a Start button appears the moment the stream is ready, and the viewer goes straight into
the stream. One ready-made page you can copy.
Open the demo: e3ds.github.io/E3DS-Iframe-Demo/loading-video.
The whole example is one file with no framework and no build step: loading-video/index.html. Copy it, then change the two lines at the top of its script:
const VIDEO_URL = "your-video.mp4";
const STREAM_URL = "https://connector.eagle3dstreaming.com/v5/<your-username>/<your-app>/<your-configuration>";
Use an MP4 (H.264) video: it plays in every browser. Keep it short - it loops until the stream is ready - and small, so it starts before the stream does.
The stream's iframe tells your page how far it has got, with postMessage. The example listens for
two of those messages:
Message type | What the example does |
|---|---|
stage4_playBtnShowedUp | the stream is ready - shows the Start button |
stage5_playBtnPressed | the stream is already playing behind the video - the video makes way when it ends |
Every other moment you can react to - queued, machine found, app downloading, session ended - is listed on Your own loading and ending screens.
Last updated