In this guide, we’ll show you how to receive data from an Unreal Engine (UE) application (sender) into your webpage (receiver) using the Eagle 3D Streaming iframe-based integration.
Follow the steps below:
Step 1: Listen for Incoming Messages
Add the following code inside a <script> tag in your HTML (preferably within the <head> or before the closing </body> tag):
window.addEventListener("message", messageHandler);
This line sets up an event listener on the browser window. It listens for messages from the iframe (which contains the UE app) and triggers the messageHandler function when a message is received.
Step 2: Handle and Log Incoming Messages
Now define the messageHandler function. In the example below, incoming data will be printed to the browser’s developer console:
const messageHandler = (event) => {
console.log("Message From UE → Iframe:", event.data);
};
The event.data contains the message payload sent from Unreal.
By receiving structured messages from Unreal, your webpage can respond dynamically—enabling powerful interactive features between the frontend and the UE application.
Full Example Code
Expand to view the complete example.
Need help?
If you need any assistance, feel free to reach out through any of the following channels:
🛠️ Support Portal: Contact Our Support Team
💬 Discord Community (Faster Support): Join Our Discord Community
📧 Email Support: support@eagle3dstreaming.com
Follow us on: