onSwitchRole property
final
Role Switching
You can call the switchRole()
API in TRTCCloud
to switch between
the anchor and audience roles. This is accompanied by a line switching process.
After the switching, the SDK will return the onSwitchRole()
event callback.
- Parameters:
- errCode(int):
- Error code.
ERR_NULL
indicates a successful switch. For more information, please see Error Codes.
- Error code.
- errMsg(String):
- Error message.
- errCode(int):
Implementation
final void Function(int errCode, String errMsg)? onSwitchRole;