Skip to main content

Type Alias: UseCameraResult

UseCameraResult: object

Type declaration

activeCamera

activeCamera: DeviceItem | null

Indicates which camera is now turned on and streaming

cameraDeviceError

cameraDeviceError: DeviceError | null

Possible error thrown while setting up the camera

cameraDevices

cameraDevices: DeviceItem[]

List of available camera devices

cameraStream

cameraStream: MediaStream | null

The MediaStream object containing the current stream

currentCameraMiddleware

currentCameraMiddleware: TrackMiddleware

The currently set camera middleware function

isCameraOn

isCameraOn: boolean

Indicates whether the microphone is streaming video

selectCamera()

selectCamera: (deviceId) => void

Selects the camera device

Parameters

ParameterType
deviceIdstring

Returns

void

setCameraTrackMiddleware()

setCameraTrackMiddleware: (middleware) => Promise<void>

Sets the camera middleware

Parameters

ParameterType
middlewareTrackMiddleware | null

Returns

Promise<void>

toggleCamera()

toggleCamera: () => void

Toggles current camera on/off

Returns

void

Defined in

packages/react-client/src/hooks/devices/useCamera.ts:9