HMSUpdateListener

This is the main listener that the calling application should implement. HMS SDK will send all upates through the callbacks in this interface. Pass the app's implementation while calling HMSSDK.join method

Functions

Link copied to clipboard

Called when a peer remotely changes a track property. For example, forcing the receivers mic to mute.

Link copied to clipboard
abstract fun onError(error: HMSException)

Called when the SDK has encountered an error

Link copied to clipboard
abstract fun onJoin(room: HMSRoom)

Called when joining of HMSRoom is successful

Link copied to clipboard
abstract fun onMessageReceived(message: HMSMessage)

Called when there is a HMSMessage send by another HMSPeer

Link copied to clipboard
abstract fun onPeerUpdate(type: HMSPeerUpdate, peer: HMSPeer)

Called if there is any update related to the HMSPeer

Link copied to clipboard
open fun onPermissionsRequested(permissions: List<String>)
Link copied to clipboard
open fun onReconnected()

Called when the SDK has successfully recovered from a network glitch

Link copied to clipboard
open fun onReconnecting(error: HMSException)

Called when the SDK is trying to reconnect automatically on a network drop/switch etc

Link copied to clipboard
open fun onRemovedFromRoom(notification: HMSRemovedFromRoom)

Called when you have been removed from a room. Causes are:

Link copied to clipboard

Called when there is a non forced role change request from another HMSPeer

Link copied to clipboard
abstract fun onRoomUpdate(type: HMSRoomUpdate, hmsRoom: HMSRoom)

Called if there is any update related to the HMSRoom

Link copied to clipboard

Called when the session store is available.

Link copied to clipboard
abstract fun onTrackUpdate(type: HMSTrackUpdate, track: HMSTrack, peer: HMSPeer)

Called if there is any update related to HMSTrack

Link copied to clipboard
open fun onTranscripts(transcripts: HmsTranscripts)

Called when the webrtc session has transcription of the audio. Not to be confused with transcripts during HLS streams.

Link copied to clipboard
open fun peerListUpdated(addedPeers: ArrayList<HMSPeer>?, removedPeers: ArrayList<HMSPeer>?)

Called when new peers are added to peerlist. Use this to show the list of peers on UI This is called with the intial set of peer on joining a room as well as with update list of peers if some peer joins or leaves the room