Public methods ArcwarePixelStreaming

This page documents the public methods exposed by:

  • ArcwarePixelStreaming

It focuses on methods provided by the Arcware SDK layer. Methods inherited from Epic’s underlying Pixel Streaming libraries are not exhaustively listed here, with one important exception: emitUIInteraction(), because it is central to most integrations.


ArcwarePixelStreaming

ArcwarePixelStreaming is the core streaming class used by both:

  • ArcwareInit

  • CoreSetup

It is the main place for:

  • stream control

  • messaging

  • analytics

  • file transfer

  • audio and microphone control

  • connection lifecycle


emitUIInteraction

Although this method is inherited from the underlying Pixel Streaming implementation, it is one of the most important methods available on ArcwarePixelStreaming and is the recommended way to send messages from the web application to Unreal Engine.

Parameters

Parameter
Type
Description

descriptor

object | string

Message sent to Unreal Engine

Example

This method should be used by both:

  • UI integrations

  • Core / headless integrations


reconnect

Reconnects the stream.

This method reuses the existing stream object and reinitializes internal readiness tracking.

Example

Typical use cases:

  • reconnect button

  • manual retry after connection loss

  • refreshing the current connection without rebuilding the SDK objects


removePlayer

Stops the stream and removes internal transport and rendering hooks.

This method performs cleanup and disconnects the stream.

Example

Typical use cases:

  • component unmount cleanup

  • fully leaving a stream

  • destroying a stream before creating a new one


send

Sends a message to the backend signalling pipeline.

Parameters

Parameter
Type
Description

type

string

Message type

payload

Record<string, unknown>

Optional payload object

message

{ type: string } & Record<string, unknown>

Full message object

Examples

This is a lower-level method and is mainly useful when working with the Arcware signalling protocol directly.

For Unreal Engine UI interaction, use emitUIInteraction() instead.


sendAnalyticsEvent

Sends an analytics event and also emits it through the local analytics handler.

Parameters

Parameter
Type
Description

event

AnalyticsEvent

Analytics event payload

Example

Use this when frontend interactions should be tracked consistently with Unreal-originated analytics events.


getIncomingFile

Returns the most recently received file sent from Unreal Engine.

Example

This method is typically used together with fileTransferHandler.


fileDownload

Triggers a browser download for the most recently received file.

Parameters

Parameter
Type
Description

filename

string | undefined

Optional custom filename without extension

Example

This is the easiest way for Core users to replicate the default UI file download behavior.


setAudioEnabled

Enables or disables audio playback.

Parameters

Parameter
Type
Description

enabled

boolean

true enables audio, false disables audio

Example

This method uses a direct enabled/disabled semantic.


toggleAudio

Toggles audio muting on the current video and audio elements.

Parameters

Parameter
Type
Description

videoElement

HTMLVideoElement

Video element associated with the stream

enabled

boolean

Mute state as used by the current implementation

Example

setAudioEnabled() is usually easier to use in application code.


toggleMic

Enables or disables microphone usage.

Parameters

Parameter
Type
Description

enable

boolean

Enables or disables microphone input

isDefault

boolean

If false, the stream reconnects so the change takes effect

Example

When microphone state is changed manually, the stream reconnects to apply the new configuration.


onStreamingStateChange

Registers a callback that reacts to streaming state changes.

Parameters

Parameter
Type
Description

callback

(isStreaming: boolean) => void

Called with the current streaming state

Example

This callback is triggered on events such as:

  • video play

  • video pause

  • video end

  • transport open

  • transport close


clearSessionId

Clears the stored session identifier from local storage.

Example

Typical use cases:

  • forcing a clean new session

  • logout / reset flows

  • debugging reconnect behavior

Last updated