GroupCall Class
A class for managing group calls.
Note: Do not instantiate GroupCall, rather use relevant methods for placing or receiving group calls in CallClient. See the examples below.
Constructor
GroupCall
-
sinch
-
groupChannel
Parameters:
-
sinch
SinchGroup belongs to this Sinch instrance
-
groupChannel
StringName of the channel
Item Index
Methods
addEventListener
-
eventListener
Add event listeners to the groupCall, multiple listeners can be added with this method. Listeners are processed in the order they're added. Listeners can be removed, using the groupCall.removeEventListener method.
Parameters:
-
eventListener
ObjectAn object containing a set of listeners for various actions
-
[onGroupLocalMediaAdded]
Function optionalCallback for taking action on local stream, such as adding it to a media element in the DOM.
-
[onGroupRemoteCallAdded]
Function optionalCallback for taking action on new participant. Such as adding it's stream to a media element.
-
[onGroupRemoteCallRemoved]
Function optionalCallback for taking action removing a participant stream from the DOM.
-
Returns:
undefined
Example:
hangupGroup
()
protected
End the group call, regardless of which state it's in. It will close the connection to all participants gracefully and then reset the callClient to be ready for a new group call.
Returns:
undefined
removeEventListener
-
eventListener
Remove event lister objects from the groupCall. Pass the same object as was used when adding the listeners.
Parameters:
-
eventListener
ObjectAn object containing a set of listeners for various actions, that has previously been added to this groupCall
Returns:
undefined