stopListen() method

If a Session object is created, this method can be run on it by a third participant. It stops the current listening session. It can only be used if the connected webclient has the required privilege.

Method usage example

You can register to the onSessionCreated event. If a session is created, the sessionCreated function is called that will start listening to the ongoing call, so you will hear the communication between the participants. After 1 minute the listening will be stopped(Code example 1).

//registers to the onSessionCreated event
OzWebClient.onSessionCreated(sessionCreated);

function sessionCreated(session)  {  
	session.startListen(); //start listening
	session.stopListen(); //stop listening after 1 minute
}
	
Code example 1 - stopListen() method example

More information