Skip to main content

Function: useConnection()

useConnection(): object

Connect/leave room. And get connection status.

Returns

object

joinRoom()

joinRoom: <PeerMetadata>(__namedParameters) => Promise<void>

Join room and start streaming camera and microphone

See JoinRoomConfig for parameter list

Type Parameters

Type ParameterDefault type
PeerMetadata extends GenericMetadataGenericMetadata

Parameters

ParameterType
__namedParametersJoinRoomConfig<PeerMetadata>

Returns

Promise<void>

leaveRoom()

leaveRoom: () => void

Leave room and stop streaming

Returns

void

peerStatus

peerStatus: PeerStatus

reconnectionStatus

reconnectionStatus: ReconnectionStatus

Defined in

packages/react-native-client/src/hooks/useConnection.ts:72