Type: DirectConfig#
DirectConfig:
object
Configuration parameters specific to starting a local or remote non-GFN stream.
Type declaration#
accessToken?#
optionalaccessToken:string
The client JWT.
audioElementId?#
optionalaudioElementId:string
The id of the audio element created by the caller for the stream.
Default Value#
'remote-audio'
authenticate?#
optionalauthenticate:boolean
Whether the stream reverse proxy requires a JWT token. This will add the ‘Authorization-Bearer.
Default Value#
false
autoLaunch?#
optionalautoLaunch:boolean
Whether to play the stream automatically on connection.
Default Value#
true
backendUrl?#
optionalbackendUrl: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?#
optionalcodec:VideoCodec
The preferred video codec for streaming.
codecList?#
optionalcodecList:string[]
An optional list of explicitly supported codecs, in descending order, according to priority.
connectivityTimeout?#
optionalconnectivityTimeout: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?#
optionalcursor:"free"|"hardware"|"software"
Default Value#
free
enableAV1Support?#
optionalenableAV1Support:boolean
Enables Av1 support for streaming.
fitStreamResolution?#
optionalfitStreamResolution: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?#
optionalforceWSS: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?#
optionalfps:number
Requested frames per second for stream render.
Default Value#
60
height?#
optionalheight: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?#
optionaliceServerConfiguration: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?#
optionallocalizeTextInput: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?#
optionalmaxReconnects:number
Maximum number of reconnects to the stream the client should attempt. Range[0, max_integer].
Default Value#
5
mediaPort?#
optionalmediaPort:number
The port number for the media server.
mediaServer?#
optionalmediaServer:string
URL of the media server to connect the streaming kit app to.
mic?#
optionalmic:boolean
Whether to enable a mic.
Default Value#
false
nativeTouchEvents?#
optionalnativeTouchEvents:boolean
Whether the client should send native touch events or emulate mouse events.
Default Value#
false
newSession?#
optionalnewSession:boolean
Whether to request a new session from the backend URL.
Default Value#
false
nucleus?#
optionalnucleus:string
URL of a nucleus data server to connect the streaming kit app to.
onCursor()?#
optionalonCursor: (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 appliedcursorto the viewport; the callback is a notification and can override.Custom cursor:
{ kitCursorName: string }—cursoris 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()?#
optionalonCustomEvent: (message) =>void
A function that will be called for custom events.
Parameters#
• message: ApplicationMessage | StreamMessage
Returns#
void
onStart()?#
optionalonStart: (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()?#
optionalonStop: (message) =>void
A function that will be called when the stream is stopped.
Parameters#
• message: StreamEvent
Returns#
void
onStreamStats()?#
optionalonStreamStats: (message) =>void
A function that will be called by the service to pass stream StreamStats information.
Parameters#
• message: StatsEvent
Returns#
void
onTerminate()?#
optionalonTerminate: (message) =>void
A function that will be called when the stream is terminated.
Parameters#
• message: StreamEvent
Returns#
void
onUpdate()?#
optionalonUpdate: (message) =>void
A function that will be called on update events.
Parameters#
• message: StreamEvent
Returns#
void
reconnectDelay?#
optionalreconnectDelay: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?~~#
optionalserver: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?#
optionalsessionId:string
Unique ID for the Kit App Streaming session. If no value is specified, a new session will be requested.
signalingPath?#
optionalsignalingPath: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?#
optionalsignalingPort: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?#
optionalsignalingQuery: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?#
optionalsignalingServer: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?#
optionalvideoElementId:string
The id of the video element created by the caller for the stream.
Default Value#
'remote-video'
width?#
optionalwidth: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