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. With the Web SDK, send it yourself (see Sending the message manually).
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 wayemitUIInteraction 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.
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 uses the Web SDK, 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
Make sure
touchInput: true is set in your SDK config. See input controls.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.