role property Null safety

int role
read / write

Field description: role in the live streaming scenario. The SDK uses this parameter to determine whether the user is an anchor or an audience user. This parameter is required in the live streaming scenario and optional in the call scenario.

Note: this parameter is applicable only to the live streaming scenario (TRTC_APP_SCENE_LIVE or TRTC_APP_SCENE_VOICE_CHATROOM) and doesn't take effect in the call scenario (AUDIOCALL or VIDEOCALL).

Recommended value: default value: anchor (TRTCRoleAnchor)

Implementation

int role;