onMessage abstract method

void onMessage({
  1. required HMSMessage message,
})

This is called when there is a new broadcast message from any other peer in the room

This can be used to implement chat is the room

  • Parameter message: the received broadcast message

Implementation

void onMessage({required HMSMessage message});