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
- onAuthenticatedCallback(success) –
-
genvidClient.IGenvidClient.
onDisconnect
(callback)¶ Specifies a callback invoked when the websocket closes.
Arguments: - callback() –
returns: void
Returns: void
- callback() –
-
genvidClient.IGenvidClient.
onDraw
(callback)¶ Specifies a callback to be invoked when it is time to draw an overlay.
Arguments: - callback(frame) –
param frame: genvidClient.IDataFrame()
returns: void
Returns: void
- callback(frame) –
-
genvidClient.IGenvidClient.
onNotificationsReceived
(callback)¶ Specifies a callback to be invoked when the notifications are received.
Arguments: - callback(message) –
param message: genvidClient.IDataNotifications()
returns: void
Returns: void
- callback(message) –
-
genvidClient.IGenvidClient.
onStreamsReceived
(callback)¶ Specifies a callback to be invoked when the streams are received.
Arguments: - callback(streams) –
param streams: genvidClient.IDataStreams()
returns: void
Returns: void
- callback(streams) –
-
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
- callback(elem) –
-
genvidClient.IGenvidClient.
reconnect
(newInfo, newURI, newToken)¶ Reconnects the websocket to the specified URI with the specified token.
Arguments: - newInfo –
genvidClient.IStreamInfo()
- newURI – string
- newToken – string
Returns: void
- newInfo –
-
genvidClient.IGenvidClient.
sendEvent
(object)¶ Sends an event to the Genvid Services event system.
Arguments: - object –
genvidClient.IKeyValue()
[] Array of key values
Returns: void
- object –
-
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: - object – any 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
-