useMeetingSessionState

useMeetingSessionState() : Object

Returns the current meeting session state as returned by meetingSessionState(). This hook accepts a generic type in TypeScript to work seamlessly with custom data type definitions.

Params (optional)

An object with the following properties:

ParameterRequiredTypeDescription
onErrorFunctionCallback for the nonfatal-error event with type 'meeting-session-data-error'

Return type

An object with the following properties:

NameTypeDescription
dataObjectThe meeting session data
topology'none' | 'peer' | 'sfu'The current meeting network topology

Sample code