Class: echoTest

echoTest

EchoTest usecase


new echoTest(onEvents, domElements, options)

EchoTest usecase

Parameters:
Name Type Description
onEvents object

Event handlers: onConnected, onSlowLink

domElements object

DOM elements: local, remote

options object

Available options: muteRemoteAudio

Returns:

EchoTest methods: getCurrentBitrate, launchConnection, closeUsecase

Type
Promise
Example
var onEvents = {
    onConnected: function() {
         // Connected
    },
    onSlowLink: function(uplink, nacks) {
         // Slow link detected
    }
};

var domElements = {
    local: document.getElementById('localVideo'),
    remote: document.getElementById('remoteVideo')
};

var options = {
     stream: {
         muteRemoteAudio: true
     }
};

usecases.echoTest(onEvents, domElements, options)
    .then(function(action) {
         // Use Case has been atacched succesfully
         ...
    })
    .catch(function(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
action.closeUsecase();
myVideoApp.disconnect(); // Recommended

<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
action.getCurrentBitrate();

<inner> launchConnection()

Establish a connection between the peer and the VideoGateway.

Returns:
Type
nothing
Example
action.launchConnection();