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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
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
-
<inner> closeUsecase()
-
Close the current UseCase. It's recommended combine with disconnect method
Returns:
- Type
- nothing
Example
-
<inner> 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
1
action.getCurrentBitrate();
-
<inner> launchConnection()
-
Establish a connection between the peer and the VideoGateway.
Returns:
- Type
- nothing
Example
1
action.launchConnection();