Type Alias: DirectConfig#

DirectConfig: type

Configuration parameters specific to starting a local or remote non-GFN stream.

Type declaration#

accessToken?#

optional accessToken: string

The client JWT.

audioElementId?#

optional audioElementId: string

The id of the audio element created by the caller for the stream.

Default Value#

'remote-audio'

authenticate?#

optional authenticate: boolean

Whether the stream reverse proxy requires a JWT token. This will add the ‘Authorization-Bearer.’ value to the Sec-WebSocket-Protocol field list of the reverse proxy request header, where the Sec-WebSocket-Protocol will be structured as Sec-WebSocket-Protocol : < value1 >, < value2 >, …, ‘Authorization-Bearer.< access token >’, < valuev >, < valuew >, ….

Default Value#

false

autoLaunch?#

optional autoLaunch: boolean

Whether to play the stream automatically on connection.

Default Value#

true

backendUrl?#

optional backendUrl: string

AKA Stream API URL. Endpoint for the OVC Stream API. Used to interact with the stream service rather than the stream application. For example, request a new session, terminate a session, etc.

codecList?#

optional codecList: string[]

An optional list of explicitly supported codecs, in descending order, according to priority.

connectivityTimeout?#

optional connectivityTimeout: number

Defines the stream connection timeout interval (i.e. how long to wait for a connection to be (re)established), in milliseconds.

Default Value#

2000

cursor?#

optional cursor: "free" | "hardware" | "software"

Default Value#

free

enableAV1Support?#

optional enableAV1Support: boolean

Enables Av1 support for streaming.

fitStreamResolution?#

optional fitStreamResolution: boolean

Whether to fit the stream resolution to the video element container. When true, height and width parameters will be used as the maximum height and width of the stream resolution, respectively.

Default Value#

false

forceWSS?#

optional forceWSS: boolean

Whether to force the use of WSS for the stream connection, even for raw IP addresses and non-standard ports. Note that otherwise, WSS will be used only if the port is 443.

Default Value#

false

fps?#

optional fps: number

Requested frames per second for stream render.

Default Value#

60

height?#

optional height: number

The stream resolution height of the rendering application. NOTE: Client will not be able to request a height larger than the initial height with the resize method. maxValue 4096. @defaultValue 1080.

Default Value#

1080

localizeTextInput?#

optional localizeTextInput: boolean

Whether the client wants localized unicode text input sent directly to the server, if supported (requires server built with Kit 108 or above).

Default Value#

true

maxReconnects?#

optional maxReconnects: number

Maximum number of reconnects to the stream the client should attempt. Range[0, max_integer].

Default Value#

5

mediaPort?#

optional mediaPort: number

The port number for the media server.

mediaServer?#

optional mediaServer: string

URL of the media server to connect the streaming kit app to.

mic?#

optional mic: boolean

Whether to enable a mic.

Default Value#

false

nativeTouchEvents?#

optional nativeTouchEvents: boolean

Whether the client should send native touch events or emulate mouse events.

Default Value#

false

newSession?#

optional newSession: boolean

Whether to request a new session from the backend URL.

Default Value#

false

nucleus?#

optional nucleus: string

URL of a nucleus data server to connect the streaming kit app to.

onCustomEvent()?#

optional onCustomEvent: (message) => void

A function that will be called for custom events.

Parameters#

message#

ApplicationMessage | StreamMessage

Returns#

void

onStart()?#

optional onStart: (message) => void

A function that will be called when the stream is started.

Parameters#

message#

StreamEvent

Returns#

void

onStop()?#

optional onStop: (message) => void

A function that will be called when the stream is stopped.

Parameters#

message#

StreamEvent

Returns#

void

onStreamStats()?#

optional onStreamStats: (message) => void

A function that will be called by the service to pass stream StreamStats information.

Parameters#

message#

StreamEvent

Returns#

void

onTerminate()?#

optional onTerminate: (message) => void

A function that will be called when the stream is terminated.

Parameters#

message#

StreamEvent

Returns#

void

onUpdate()?#

optional onUpdate: (message) => void

A function that will be called on update events.

Parameters#

message#

StreamEvent

Returns#

void

reconnectDelay?#

optional reconnectDelay: number

The delay between reconnection attempts (i.e. how long to wait before attempting to reconnect after a failed connection attempt) in milliseconds.

Default Value#

2000

server?#

optional server: string

URL of the streaming service server to connect to.

sessionId?#

optional sessionId: string

Unique ID for the kit app streaming session. If no value is specified, a new session will be requested.

signalingPath?#

optional signalingPath: string

Path for resolving custom NVCF functions.

signalingPort?#

optional signalingPort: number

The port number for the signaling server.

Default Value#

48322

signalingQuery?#

optional signalingQuery: URLSearchParams

Search params for the signaling server. NOTE that we cannot type this as individual parameters because they will need to be re-definable by library users.

signalingServer?#

optional signalingServer: string

URL of the signaling server to connect to.

videoElementId?#

optional videoElementId: string

The id of the video element created by the caller for the stream.

Default Value#

'remote-video'

width?#

optional width: number

The stream resolution width of the rendering application. NOTE: Client will not be able to request a width larger than the initial width with the resize method. maxValue 4096. @defaultValue 1920.

Default Value#

1920