Fishjam Web SDK - v0.18.0
    Preparing search index...
    • This hook can toggle camera on/off, change camera, provides current camera and other.

      Returns {
          activeCamera: null | DeviceItem;
          cameraDeviceError: null | DeviceError;
          cameraDevices: DeviceItem[];
          cameraStream: null | MediaStream;
          currentCamera: null | MediaDeviceInfo;
          currentCameraMiddleware: TrackMiddleware;
          isCameraOn: boolean;
          selectCamera: (deviceId: string) => Promise<undefined | DeviceError>;
          setCameraTrackMiddleware: (middleware: TrackMiddleware) => Promise<void>;
          toggleCamera: () => Promise<undefined | DeviceError>;
      }

      • activeCamera: null | DeviceItem

        Use currentCamera and isCameraOn instead Indicates which camera is now turned on and streaming

      • cameraDeviceError: null | DeviceError

        Possible error thrown while setting up the camera

      • cameraDevices: DeviceItem[]

        List of available camera devices

      • cameraStream: null | MediaStream

        The MediaStream object containing the current stream

      • currentCamera: null | MediaDeviceInfo

        Indicates which camera is now selected

      • currentCameraMiddleware: TrackMiddleware

        The currently set camera middleware function

      • isCameraOn: boolean

        Indicates whether the camera is streaming video

      • selectCamera: (deviceId: string) => Promise<undefined | DeviceError>

        Selects the camera device

      • setCameraTrackMiddleware: (middleware: TrackMiddleware) => Promise<void>

        Sets the camera middleware

      • toggleCamera: () => Promise<undefined | DeviceError>

        Toggles current camera on/off