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
Parameter | Type |
---|---|
deviceId | string |
Returns
void
setCameraTrackMiddleware()
setCameraTrackMiddleware: (
middleware
) =>Promise
<void
>
Sets the camera middleware
Parameters
Parameter | Type |
---|---|
middleware | TrackMiddleware | null |
Returns
Promise
<void
>
toggleCamera()
toggleCamera: () =>
void
Toggles current camera on/off
Returns
void