onClientRoleChanged property
void Function(RtcConnection connection, ClientRoleType oldRole, ClientRoleType newRole, ClientRoleOptions newRoleOptions)?
onClientRoleChanged
final
Occurs when the user role or the audience latency level changes.
connectionThe connection information. See RtcConnection.oldRoleRole that the user switches from: ClientRoleType.newRoleRole that the user switches to: ClientRoleType.newRoleOptionsProperties of the role that the user switches to. See ClientRoleOptions.
Implementation
final void Function(
RtcConnection connection,
ClientRoleType oldRole,
ClientRoleType newRole,
ClientRoleOptions newRoleOptions)? onClientRoleChanged;