API Docs for: 0.9.9
Show:

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
)
protected

Parameters:

  • sinch Sinch

    Group belongs to this Sinch instrance

  • groupChannel String

    Name of the channel

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 Object

    An object containing a set of listeners for various actions

    • [onGroupLocalMediaAdded] Function optional

      Callback for taking action on local stream, such as adding it to a media element in the DOM.

    • [onGroupRemoteCallAdded] Function optional

      Callback for taking action on new participant. Such as adding it's stream to a media element.

    • [onGroupRemoteCallRemoved] Function optional

      Callback 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 Object

    An object containing a set of listeners for various actions, that has previously been added to this groupCall

Returns:

undefined

Example: