IGenvidClient

class genvidClient.IGenvidClient()

The Genvid client handles the communication with the leaf service.

Properties

genvidClient.IGenvidClient.composeTimeMS

The estimated time of the Compose service in milliseconds.

Type: number

genvidClient.IGenvidClient.delayOffset

The delay offset.

Type: number

genvidClient.IGenvidClient.lastComposeTimeMS

The last official time received by the Compose service in milliseconds.

Type: number

genvidClient.IGenvidClient.streamLatencyMS

The stream latency in milliseconds.

Type: number

genvidClient.IGenvidClient.streamTimeMS

The current stream time in milliseconds.

Type: number

genvidClient.IGenvidClient.videoAspectRatio

Member variable holding the computed aspect ratio of the video (i.e., the result of videoWidth/videoHeight).

This member can be useful to match a WebGL overlay with the video player.

Type: number

genvidClient.IGenvidClient.videoElem

Final HTMLElement of videoElemId, after video player is loaded.

Type: HTMLElement | undefined

genvidClient.IGenvidClient.videoElemId

Unique identifier for the video element (gets replaced).

Type: string | undefined

genvidClient.IGenvidClient.videoPlayer

The video player.

Type: player.IVideoPlayer() | undefined

genvidClient.IGenvidClient.videoTimeMS

The estimated time of the video player in milliseconds.

Type: number

Methods

genvidClient.IGenvidClient.close()

Disconnects the GenvidClient from the Genvid Services.

Returns:void
genvidClient.IGenvidClient.onAuthenticated(onAuthenticatedCallback)

Specifies a callback to be invoked when the authentication happens.

Arguments:
  • onAuthenticatedCallback(success)
    param success:boolean
    returns:void
Returns:

void

genvidClient.IGenvidClient.onDisconnect(callback)

Specifies a callback invoked when the websocket closes.

Arguments:
  • callback()
    returns:void
Returns:

void

genvidClient.IGenvidClient.onDraw(callback)

Specifies a callback to be invoked when it is time to draw an overlay.

Arguments:
Returns:

void

genvidClient.IGenvidClient.onNotificationsReceived(callback)

Specifies a callback to be invoked when the notifications are received.

Arguments:
Returns:

void

genvidClient.IGenvidClient.onStreamsReceived(callback)

Specifies a callback to be invoked when the streams are received.

Arguments:
Returns:

void

genvidClient.IGenvidClient.onVideoPlayerReady(callback)

Specifies a callback to be invoked when the live streaming service video player is created and ready to stream.

Arguments:
  • callback(elem)
    param elem:HTMLElement
    returns:void
Returns:

void

genvidClient.IGenvidClient.reconnect(newInfo, newURI, newToken)

Reconnects the websocket to the specified URI with the specified token.

Arguments:
Returns:

void

genvidClient.IGenvidClient.sendEvent(object)

Sends an event to the Genvid Services event system.

Arguments:
Returns:

void

genvidClient.IGenvidClient.sendEventObject(object)

Sends an event to the Genvid Services event system. This method transforms the object into an array of key value pair before sending it to the system.

Arguments:
  • objectany The object is decomposed in an array of key values and sent to the Genvid event system.
Returns:

void

genvidClient.IGenvidClient.start()

Used to initiate the data streaming.

Returns:void