Class: AppStreamer#

AppStreamer is the main module export that can be used to connect to, pause, un-pause, and terminate a streaming Omniverse Kit application session. This module may also be used to send/receive custom messages to/from the streaming kit application.

Constructors#

Constructor#

new AppStreamer(): AppStreamer

Returns#

AppStreamer

Accessors#

streamStatus#

Get Signature#

get static streamStatus(): StreamStatus

Gets the current status of the stream.

Returns#

StreamStatus

The current status of the stream.

Methods#

connect()#

static connect(props): Promise<StreamEvent>

Connects to the streaming kit app specified by the input props.

Parameters#

props#

StreamProps

The StreamProps that contain the initialization data for the stream.

Returns#

Promise<StreamEvent>


getChildren()#

static getChildren(primPath, filters?): Promise<GetChildrenEvent>

Send a request to get the children of a prim.

Parameters#

primPath#

string

Path of the prim used to return the children of the prim.

filters#

string[] = []

Array of USD prim types to filter for children of the prim.

Returns#

Promise<GetChildrenEvent>


getStageLoadingState()#

static getStageLoadingState(): Promise<LoadingStateEvent>

Send a request to retrieve the current loading state of the Kit app.

Returns#

Promise<LoadingStateEvent>


makePrimsSelectable()#

static makePrimsSelectable(paths): Promise<StreamEvent>

Send a request to make prims selectable.

Parameters#

paths#

string[]

Array of USD prim paths to make selectable.

Returns#

Promise<StreamEvent>


openStage()#

static openStage(url): Promise<OpenStageEvent>

Send a request to open a stage in Kit.

Parameters#

url#

string

Returns#

Promise<OpenStageEvent>


resetStage()#

static resetStage(deselectPrims?): Promise<StreamEvent>

Send a request to reset a stage in Kit.

Parameters#

deselectPrims#

boolean = true

Specify whether or not to deselect prims.

Returns#

Promise<StreamEvent>


resize()#

static resize(width, height): Promise<StreamEvent>

Make a request to update the resolution of the streaming application.

If the requested size is larger than the maximum size (the size specified in the stream config), the stream resolution will not be updated and promise rejection will be thrown.

If fitStreamResolution is set to true, the stream resolution will not be updated and promise rejection will be thrown.

Parameters#

width#

number

The requested width. MaxValue 4096.

height#

number

The requested height. MaxValue 4096.

Returns#

Promise<StreamEvent>


sendMessage()#

static sendMessage(message): Promise<StreamEvent>

Sends the provided custom message to the streaming Kit application.

Parameters#

message#

ApplicationMessage

A custom message to send to the streaming application.

Returns#

Promise<StreamEvent>


setFitStreamResolution()#

static setFitStreamResolution(fitStreamResolution): void

Sets the fit stream resolution flag.

If fitStreamResolution is true, the stream resolution will be updated to fit the video element current size and stream resolution will be automatically updated to fit any subsequent changes to the video element size.

If fitStreamResolution is false, the stream resolution will be set to the initial width and height specified in the stream config.

Parameters#

fitStreamResolution#

boolean

Returns#

void


setSelectedPrims()#

static setSelectedPrims(paths): Promise<StreamEvent>

Send a request to select a list of prims from a stage in Kit.

Parameters#

paths#

string[]

AArray of USD prim paths that can be selected.

Returns#

Promise<StreamEvent>


start()#

static start(): Promise<StreamEvent>

Starts/restarts the stream.

Returns#

Promise<StreamEvent>


stop()#

static stop(): Promise<StreamEvent>

Stops (pauses) the stream.

Returns#

Promise<StreamEvent>


terminate()#

static terminate(terminateApp?): Promise<StreamEvent>

Terminates the stream. The stream reference will be reset and will no longer be accessible. Setup will need to be called to connect to a new session.

If terminateApp is true, then the Kit app instance will also be terminated. This currently only applies to OVC v1 stream API and NVCF.

Parameters#

terminateApp#

boolean = false

Whether or not to terminate the Kit app instance.

Returns#

Promise<StreamEvent>