@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.
22 lines (19 loc) • 554 B
TypeScript
import { Consumer } from '@huddle01/web-core';
declare const useRemoteMedia: (props: {
peerId: string;
label: string;
onClose?: () => void;
onPlayable?: (data: {
track: MediaStreamTrack;
stream: MediaStream;
label: string;
}) => void;
onPaused?: () => void;
}) => {
state: "playable" | "unavailable" | "paused" | "available";
track: MediaStreamTrack | null;
stream: MediaStream | null;
stopConsuming: () => void;
startConsuming: () => Promise<Consumer>;
};
export { useRemoteMedia };