IGenvidClient¶
-
class
IGenvidClient
()¶
The Genvid client handles the communication with the leaf service
Properties¶
-
IGenvidClient.
composeTimeMS: number
¶ The estimated time of the Compose service, in milliseconds.
-
IGenvidClient.
delayOffset: number
¶ The delay offset.
-
IGenvidClient.
lastComposeTimeMS: number
¶ The last official time received by the Compose service, in milliseconds.
-
IGenvidClient.
streamLatencyMS: number
¶ The stream latency in milliseconds.
-
IGenvidClient.
streamTimeMS: number
¶ The current stream time, in milliseconds.
-
IGenvidClient.
videoAspectRatio: number
¶ 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.
-
IGenvidClient.
videoElem: HTMLElement
¶ Final HTMLElement of videoElemId, after video player is loaded.
-
IGenvidClient.
videoElemId: string
¶ Unique identifier of the video element (gets replaced).
-
IGenvidClient.
videoPlayer: IVideoPlayer
¶ The video player.
-
IGenvidClient.
videoTimeMS: number
¶ The estimated time of the video player, in milliseconds.
Methods¶
-
IGenvidClient.
close
()¶ Disconnects the GenvidClient from the Genvid Services.
Returns: any
-
IGenvidClient.
onAuthenticated
(onAuthenticatedCallback)¶ Specifies a callback to be invoked when the authentication happens.
Arguments: - onAuthenticatedCallback –
Returns: any
-
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
-
IGenvidClient.
onNotificationsReceived
(callback)¶ Specifies a callback to be invoked when the notifications are received.
Arguments: - callback –
Returns: any
-
IGenvidClient.
onStreamsReceived
(callback)¶ Specifies a callback to be invoked when the streams are received.
Arguments: - callback – The new data
Returns: any
-
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
-
IGenvidClient.
sendEvent
(object)¶ Sends an event to the Genvid Services event system.
Arguments: - object (IKeyValue) – Array of key values
Returns: any
-
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
-
IGenvidClient.
start
()¶ Used to initiate the data streaming.
Returns: any