4: The SDK connection fails. You can use reason
reported in the
connectionStateChanged
callback to troubleshoot the failure.
2: The request is rejected by the Agora server. Agora recommends you prompt the user to try to switch their user role again.
3: The request is timed out. Agora recommends you prompt the user to check the network connection and try to switch their user role again.
1: The number of hosts in the channel is already at the upper limit.
The reason for a user role switch failure.
v3.7.0