The rootElement
appStream.rootElement is the DOM element that contains the video player and all SDK UI components. You must append it to your page for the stream to be visible.
When to mount
Mount therootElement inside the onVideoInitialized callback. This ensures the video element is ready before you add it to the DOM:
Configuring the video element
After mounting, you may want to configure the video element:Hiding the default Pixel Streaming UI
The SDK inherits some default UI elements from Epic Games’ Pixel Streaming library. You’ll typically want to hide these and build your own:The onDisconnect callback
Called when the stream disconnects:
Full-screen video container
For a full-viewport stream, style your container:Next steps
Custom loading screen
Build a loading screen driven by SDK lifecycle events.
Overlays and UI components
Replace built-in overlays with your own UI.