Skip to main content
The UIControl object provides helper methods for common UI operations.

Methods

toggleAudio()

Toggles the stream audio element between muted and unmuted.
This toggles only the audio element. For complete mute control (both video and audio elements), manage both elements directly. See Audio and media input.

handleResMax(value)

Set the maximum resolution for the stream.
Behavior depends on the resolution mode: in Fixed Resolution Mode, this sends an r.SetRes console command to UE. In Dynamic or Crop on Resize Mode, it updates the maximum dimensions and recalculates based on the viewport.

toggleHoveringMouse(value)

Enable or disable hover mouse mode.
When enabled, mouse movement events are sent to UE even without a button press.

getStreamStats()

Collects and returns current stream statistics as a parsed object.
Returns an object with string keys and parsed values (numbers, booleans, or strings).

getResolution()

Returns the available resolution options if resolution control is enabled for the project.
Returns undefined if resolution control is not enabled in the dashboard.

Next steps

Stream statistics

Full reference for the fields returned by getStreamStats().

pixelStreaming API

Core streaming methods and lifecycle events.