onClientRoleChangeFailed property

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

Occurs when the user role switch fails in the interactive live streaming. In the live broadcasting channel profile, when the local user calls setClientRole 1/2 to switch their user role after joining the channel but the switch fails, the SDK triggers this callback to report the reason for the failure and the 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;