startListen() method

If a Session object is created, this method can be run on it by a third participant. It starts a listening session e.g. lets you listen to the ongoing call. 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 (Code example 1).

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

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

More information