Updated on 2023-03-23 GMT+08:00

Obtaining a User Status

Function

This API is used to obtain the status of a user (whether the user is being called or in the meeting).

Function Prototype

getUserState(onGetUserStateResult?: (ret: SDKERR, reason: string, userState: UserState) => void): voidgetUserState(onGetUserStateResult?: (ret: SDKERR, reason: string, userState: UserState) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
onGetUserStateResult Y (ret: SDKERR, reason: string, userState: UserState) => void Callback of obtaining the user status.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string, userState: UserState) => void

Table 2 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.
userState UserState User status, which is used to determine whether the user is busy.
Table 3 Enumerated values of UserState
Enumeration Name Enumerated Value Description
HWM_STATE_IDLE 0 Idle.
HWM_STATE_IN_CONF 1 In a meeting.
HWM_STATE_IN_CALL 2 In a call.