onClientRoleChanged property
void Function(RtcConnection connection, ClientRoleType oldRole, ClientRoleType newRole, ClientRoleOptions newRoleOptions)?
onClientRoleChanged
final
Callback when the user role or audience latency level is switched.
This callback is not triggered if you call setClientRole before joining a channel and set the role to BROADCASTER.
connectionConnection information. See RtcConnection.oldRoleRole before switching: ClientRoleType.newRoleRole after switching: ClientRoleType.newRoleOptionsProperties of the new role. See ClientRoleOptions.
Implementation
final void Function(
RtcConnection connection,
ClientRoleType oldRole,
ClientRoleType newRole,
ClientRoleOptions newRoleOptions)? onClientRoleChanged;