onClientRoleChangeFailed property

void Function(RtcConnection connection, ClientRoleChangeFailedReason reason, ClientRoleType currentRole)? onClientRoleChangeFailed
final

Occurs when switching a user role fails.

This callback informs you about the reason for failing to switching and your current user role.

  • connection The connection information. See RtcConnection.
  • reason The reason for a user role switch failure. See ClientRoleChangeFailedReason.
  • currentRole Current user role. See ClientRoleType.

Implementation

final void Function(
    RtcConnection connection,
    ClientRoleChangeFailedReason reason,
    ClientRoleType currentRole)? onClientRoleChangeFailed;