Type: DirectConfig#

DirectConfig: object

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

Also known as the 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 or terminate a session. For NVCF streams, this field is optional: when omitted, it is derived from signalingServer, signalingPort, and signalingPath.

codec?#

optional codec: VideoCodec

The preferred video codec for streaming.

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.

Default Value#

1080

iceServerConfiguration?#

optional iceServerConfiguration: IceServerConfiguration

Optional STUN/TURN server URLs, credentials and ICE transport policy for negotiating the transport protocol (UDP/TCP) used by the WebRTC streaming connection.

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.

onCursor()?#

optional onCursor: (change) => void

Called when the Kit app changes the cursor for the stream viewport.

The SDK always applies standard cursors to the DOM before firing this callback. The callback is a notification for standard cursors and a delegation for custom ones:

Receives a CursorChange object. At least one field is always defined — the type enforces that both-undefined is impossible:

  • Standard cursor: { cursor: CursorType, kitCursorName: string } — SDK already applied cursor to the viewport; the callback is a notification and can override.

  • Custom cursor: { kitCursorName: string }cursor is absent (no CSS mapping); the SDK applied nothing and the caller must handle it.

onCursor: ({ cursor, kitCursorName }) => {
    if (cursor === undefined) {
        // Custom cursor — SDK applied nothing, handle it here.
        video.style.cursor = `url(/images/${kitCursorName}.png), auto`;
    }
    // Standard cursors are already applied by the SDK.
    // Optionally override: video.style.cursor = 'my-override';
}

Parameters#

change: CursorChange

Returns#

void

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

Called for every status transition during stream start: inProgress, warning (retry attempts), success, canceled, and error. The status is on message.status. success fires exactly once per connect when the stream is fully started; consumers wanting “stream is now live” semantics should key off message.status === EventStatus.SUCCESS rather than assuming onStart is single-fire. The onUpdate callback receives the same status stream — onStart is the convention for connect-lifecycle reactions, onUpdate for general observation.

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: StatsEvent

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

Optional fallback for signalingServer only. Does not populate signalingPort or signalingPath — those must be supplied independently. Prefer setting signalingServer directly.

Deprecated#

Surviving from an earlier API shape. Set signalingServer (plus signalingPort and signalingPath) instead. This field and its fallback read are scheduled for removal in the next major version.

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. One of the signaling fields required to establish a direct or NVCF stream connection, alongside signalingServer and signalingPort.

signalingPort?#

optional signalingPort: number

The port number for the signaling server. One of the signaling fields required to establish a direct/NVCF stream connection, alongside signalingServer and signalingPath.

Default Value#

49100

signalingQuery?#

optional signalingQuery: URLSearchParams

Search params for the signaling server. Note that this cannot be typed 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. One of the signaling fields required to establish a direct/NVCF stream connection, alongside signalingPort and signalingPath.

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.

Default Value#

1920