Skip to main content
Version: Next

Interface: UseLivestreamViewerResult

Defined in: packages/react-client/src/hooks/useLivestreamViewer.ts:11

Properties

connect()

connect: (config, url?) => Promise<void>

Defined in: packages/react-client/src/hooks/useLivestreamViewer.ts:19

Callback to start receiving a livestream. If the livestream is private, provide token. If the livestream is public, provide streamId.

Parameters

ParameterType
configConnectViewerConfig
url?string

Returns

Promise<void>


disconnect()

disconnect: () => void

Defined in: packages/react-client/src/hooks/useLivestreamViewer.ts:21

Callback used to disconnect from a stream previously connected to with connect

Returns

void


error

error: null | LivestreamError

Defined in: packages/react-client/src/hooks/useLivestreamViewer.ts:23

Any errors encountered in connect will be present in this field.


isConnected

isConnected: boolean

Defined in: packages/react-client/src/hooks/useLivestreamViewer.ts:25

Utility flag which indicates the current connection status


stream

stream: null | MediaStream

Defined in: packages/react-client/src/hooks/useLivestreamViewer.ts:13

The received livestream media