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.
connection
The connection information. See RtcConnection.oldRole
Role that the user switches from: ClientRoleType.newRole
Role that the user switches to: ClientRoleType.newRoleOptions
Properties of the role that the user switches to. See ClientRoleOptions.
Implementation
final void Function(
RtcConnection connection,
ClientRoleType oldRole,
ClientRoleType newRole,
ClientRoleOptions newRoleOptions)? onClientRoleChanged;