IGenvidClient

class genvid.IGenvidClient()

The Genvid client handles the communication with the leaf service

Properties

genvid.IGenvidClient.composeTimeMS

The estimated time of the Compose service, in milliseconds.

Type: number

genvid.IGenvidClient.delayOffset

The delay offset.

Type: number

genvid.IGenvidClient.lastComposeTimeMS

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

Type: number

genvid.IGenvidClient.streamLatencyMS

The stream latency in milliseconds.

Type: number

genvid.IGenvidClient.streamTimeMS

The current stream time, in milliseconds.

Type: number

genvid.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

genvid.IGenvidClient.videoElem

Final HTMLElement of videoElemId, after video player is loaded.

Type: HTMLElement()

genvid.IGenvidClient.videoElemId

Unique identifier of the video element (gets replaced).

Type: string

genvid.IGenvidClient.videoPlayer

The video player.

Type: genvid.IVideoPlayer()

genvid.IGenvidClient.videoTimeMS

The estimated time of the video player, in milliseconds.

Type: number

Methods

genvid.IGenvidClient.close()

Disconnects the GenvidClient from the Genvid Services.

Returns:any
genvid.IGenvidClient.onAuthenticated(onAuthenticatedCallback)

Specifies a callback to be invoked when the authentication happens.

Arguments:
  • onAuthenticatedCallback
Returns:

any

genvid.IGenvidClient.onDraw(callback)

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

Arguments:
  • callback – Used to draw a specific frame.
Returns:

any

genvid.IGenvidClient.onNotificationsReceived(callback)

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

Arguments:
  • callback
Returns:

any

genvid.IGenvidClient.onStreamsReceived(callback)

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

Arguments:
  • callback – The new data
Returns:

any

genvid.IGenvidClient.onVideoPlayerReady(callback)

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

Arguments:
  • callback – Triggered when the player is ready
Returns:

any

genvid.IGenvidClient.sendEvent(object)

Sends an event to the Genvid Services event system.

Arguments:
Returns:

any

genvid.IGenvidClient.sendEventObject(object)

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

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

any

genvid.IGenvidClient.start()

Used to initiate the data streaming.

Returns:any