share.streampixel.io, and any page that embeds it in an iframe) detects whether the viewer is on a touch device (phone or tablet) and sends a JSON message to your Unreal Engine app. Listen for that message to show or hide your touch controls. A page built with the Web SDK sends the same message.
How it works
As soon as the video starts, on every connection and every reconnect, the share page sends this message to your app as a UI interaction (the same way the Web SDK’sstream.send() sends JSON):
value is true for phone and tablet browsers (iPad included, also when Safari presents itself as a Mac) and false for desktops, touch-screen laptops included. Use it to toggle your in-game touch HUD.
os and device are fixed lowercase strings, so a plain string compare in Blueprints works. Projects that only read type and value are unaffected.
Use
os for platform choices, for example sending an Apple Maps link first on ios and a Google Maps link first on android, and device for layout, for example a larger HUD on tablet.
It is sent once per video start. It is not sent by guests in a shared (SFU) room, since one Unreal app serves everyone in the room.
Unreal blueprint setup
1
Bind to PixelStreamingInputComponent's OnInputEvent
On your
PlayerController (or wherever your touch HUD lives), add a PixelStreamingInputComponent. Bind to its OnPixelStreamingInputEvent delegate.2
Parse the JSON
The delegate hands you a
Descriptor string. Use the JsonUtilities plugin or a parse node to extract type and value.3
Branch on type
If
type == "isTouchDevice", set a Boolean variable on your HUD (e.g. bShowTouchUI = value).4
Bind your HUD widget visibility
Drive the widget’s
Visibility property from bShowTouchUI. Touch viewers see the HUD; desktop viewers don’t.Sending the message manually
You can also force the touch HUD on or off from your own frontend code, regardless of device detection:- Web SDK
- Iframe (postMessage)
Common pitfalls
HUD shows briefly on desktop before hiding
HUD shows briefly on desktop before hiding
The message arrives when the video starts. Hide the HUD by default and show it only when the message arrives.
The app waits for the message forever
The app waits for the message forever
Never block your first HUD on the message: if nothing has arrived within about 3 seconds, show the desktop HUD, and switch whenever an
isTouchDevice message arrives (it can arrive again after a reconnect).HUD never appears on iPad
HUD never appears on iPad
iPadOS Safari presents itself as a Mac; the share page detects it from its touch points and sends
true. If your own page sends the message itself, detect it the same way (a Mac user agent with navigator.maxTouchPoints > 1).Touch input doesn't reach UE
Touch input doesn't reach UE
Check that touch input is on: the Touch toggle in the project’s Frontend settings, or
input.touch in the Web SDK, which follows the dashboard unless your code sets it. See Input and media.Next steps
JSON messaging (UE side)
The full blueprint pattern for receiving JSON from the frontend.
Mobile streaming recipe
Optimize codecs, bitrate, and UI for mobile viewers.