Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.streampixel.io/llms.txt

Use this file to discover all available pages before exploring further.

Streampixel automatically detects whether the connected viewer is on a touch device (mobile or tablet) and forwards a JSON message to your Unreal Engine app. Listen for that message to show or hide your touch controls.

How it works

When a session starts, the frontend sends a message to your UE project on the pixelStreamingResponse channel:
{ "type": "isTouchDevice", "value": true }
value is true for mobile / tablet browsers and false for desktops. Use it to toggle your in-game touch HUD.

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.
See JSON message communication for the full blueprint walkthrough on parsing JSON messages from the frontend.

Sending the message manually

You can also force the touch HUD on or off from your own frontend code, regardless of device detection:
import { StreamPixelApplication } from 'streampixelsdk';

const { appStream } = await StreamPixelApplication({
  appId: 'YOUR_PROJECT_ID',
  AutoConnect: true,
});

// Force-show the touch HUD
appStream.stream.emitUIInteraction({
  type: 'isTouchDevice',
  value: true,
});
When you override device detection manually, the platform’s automatic detection is still sent first. Send your override after the stream connects (listen for the videoInitialized event in the SDK or loadingComplete in the iframe).

Common pitfalls

The detection message arrives shortly after the stream connects. Hide the HUD by default and show it only when the message arrives.
iPad Safari reports as macOS by default unless “Request Mobile Website” is set. Detect using 'ontouchstart' in window from the frontend and override the message manually.
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.