@huddle01/react
Version:
The Huddle01 React SDK offers a comprehensive suite of hooks, methods and event listeners that allow for seamless real-time audio and video communication with minimal coding required.
26 lines (23 loc) • 787 B
TypeScript
import { Producer, SupportedCodecs } from '@huddle01/web-core/types';
declare const useLocalVideo: (props?: {
onProduceStart?: (producer: Producer) => void;
onProduceClose?: (reason?: {
code: number;
tag: string;
message?: string;
}) => void;
onProducePaused?: () => void;
}) => {
stream: MediaStream | null;
track: MediaStreamTrack | null;
isVideoOn: boolean;
isProducing: boolean;
enableVideo: (data?: {
customVideoStream?: MediaStream;
prefferedCodec?: SupportedCodecs;
}) => Promise<MediaStream | undefined>;
disableVideo: () => Promise<void>;
replaceVideoStream: (stream: MediaStream) => Promise<void>;
changeVideoSource: (deviceId: string) => Promise<void>;
};
export { useLocalVideo };