@kortexa-ai/react-multimodal
Version:
A set of react components and hooks to help with multimodal input
38 lines • 1.44 kB
TypeScript
import { MicrophoneControl, MicrophoneDeviceProps } from '../microphone/types';
import { CameraFacingMode, CameraControl, CameraDeviceProps } from '../camera/types';
import { HandsTrackingDeviceProps, HandsTrackingControl, HandsData } from '../hands/types';
export interface CompositeMediaDevice {
isAudioActive: boolean;
isVideoActive: boolean;
isHandTrackingActive?: boolean;
isMediaActive: boolean;
audioStream?: MediaStream;
videoStream?: MediaStream;
videoFacingMode?: CameraFacingMode;
audioError?: string;
videoError?: string;
handsError?: string;
mediaError?: string;
currentHandsData?: HandsData;
startMedia: () => Promise<void>;
stopMedia: () => void;
toggleMedia: () => Promise<void>;
}
export interface CompositeMediaControl extends CompositeMediaDevice {
cam: CameraControl;
mic: MicrophoneControl;
hands: HandsTrackingControl;
setVideoElementForHands: (element: HTMLVideoElement | null) => void;
startHands: () => Promise<void>;
stopHands: () => void;
isStartingHands: boolean;
isVideoElementForHandsSet: boolean;
}
export interface CompositeMediaDeviceProps {
microphoneProps?: MicrophoneDeviceProps;
cameraProps?: CameraDeviceProps;
handsProps?: HandsTrackingDeviceProps;
startBehavior?: "proceed" | "halt";
}
export type CompositeMediaProviderProps = CompositeMediaDeviceProps;
//# sourceMappingURL=types.d.ts.map