HMSUpdateListener class abstract

100ms HMSUpdateListener

100ms SDK provides callbacks to the client app about any change or update happening in the room after a user has joined by implementing HMSUpdateListener.

Implement this listener in a class where you want to perform UI Actions, update App State, etc. These updates can be used to render the video on screen or to display other info regarding the room.

Depending on your use case, you'll need to implement specific methods of the Update Listener. The most common ones are onJoin, onPeerUpdate, onTrackUpdate & onHMSError.

Constructors

HMSUpdateListener()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAudioDeviceChanged({HMSAudioDevice? currentAudioDevice, List<HMSAudioDevice>? availableAudioDevice}) → void
Whenever a new audio device is plugged in or audio output is changed we get the onAudioDeviceChanged update This callback is only fired on Android devices. On iOS, this callback will not be triggered.
onChangeTrackStateRequest({required HMSTrackChangeRequest hmsTrackChangeRequest}) → void
When someone requests for track change of your Audio, Video or an Auxiliary track like Screenshare, this event will be triggered
onHMSError({required HMSException error}) → void
This will be called when there is an error in the system
onJoin({required HMSRoom room}) → void
This will be called on a successful JOIN of the room by the user
onMessage({required HMSMessage message}) → void
This is called when there is a new broadcast message from any other peer in the room
onPeerListUpdate({required List<HMSPeer> addedPeers, required List<HMSPeer> removedPeers}) → void
Upon joining a room with existing peers, onPeerListUpdated will be called with the list of peers present in the room instead of getting onPeerUpdate for each peer in the room. Subsequent peer joins/leaves would be notified via both onPeerUpdate and onPeerListUpdated
onPeerUpdate({required HMSPeer peer, required HMSPeerUpdate update}) → void
This will be called whenever there is an update on an existing peer or a new peer got added/existing peer is removed.
onReconnected() → void
When you are back in the room after network connection was lost
onReconnecting() → void
When network connection is lost & the SDK is trying to reconnect to the room
onRemovedFromRoom({required HMSPeerRemovedFromPeer hmsPeerRemovedFromPeer}) → void
When someone kicks you out or when someone ends the room at that time it is triggered
onRoleChangeRequest({required HMSRoleChangeRequest roleChangeRequest}) → void
This is called when someone asks for change or role
onRoomUpdate({required HMSRoom room, required HMSRoomUpdate update}) → void
This is called when there is a change in any property of the Room
onSessionStoreAvailable({HMSSessionStore? hmsSessionStore}) → void
Whenever a user joins a room onSessionStoreAvailable is fired to get an instance of HMSSessionStore which can be used to perform session metadata operations
onTrackUpdate({required HMSTrack track, required HMSTrackUpdate trackUpdate, required HMSPeer peer}) → void
This is called when there are updates on an existing track or a new track got added/existing track is removed
onUpdateSpeakers({required List<HMSSpeaker> updateSpeakers}) → void
This is called every 1 second with list of active speakers
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited