addUpdateListener method

void addUpdateListener({
  1. required HMSUpdateListener listener,
})

add UpdateListener it will add all the listeners.

HMSSDK 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.

Implementation

void addUpdateListener({required HMSUpdateListener listener}) {
  PlatformService.addUpdateListener(listener);
}