new echoTest(onEvents, domElements, options)
EchoTest usecase
Parameters:
Name | Type | Description |
---|---|---|
onEvents |
object | Event handlers: onEvents |
domElements |
object | DOM elements: domElements |
options |
object | Available options: options |
Returns:
EchoTest actions
- Type
- Promise
Example
var onEvents = { onConnected: () => { // Connected to Echotest }, onSlowLink: (uplink, nacks) => { // Slow link detected } }; var domElements = { local: document.getElementById('localVideo'), remote: document.getElementById('remoteVideo') }; var options = { stream: { muteRemoteAudio: true }, account: "******" // Multiple mode }; usecases.echoTest(onEvents, domElements, options) .then(action => { // Use Case has been atacched succesfully ... }) .catch(cause => { // Error attaching the Use Case console.log("Error Attach " + cause ); })
Methods
-
closeUsecase()
-
Close the current UseCase. It's recommended combine with disconnect method
Returns:
- Type
- nothing
Example
action.closeUsecase(); myVideoApp.disconnect(); // Recommended
-
getCurrentBitrate()
-
Gets the current Bitrate between the Peer and the VideoGateway. You need to call the launchConnection first.
Returns:
Number of kbits/sec
- Type
- integer
Example
action.getCurrentBitrate();
-
launchConnection()
-
Establish a connection between the peer and the VideoGateway.
Returns:
- Type
- nothing
Example
action.launchConnection();