UNPKG

@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.

31 lines (29 loc) 573 B
import { useRemoteMedia } from "./chunk-DXZV35JM.js"; // src/hooks/useRemoteVideo.ts var useRemoteVideo = (props) => { const { state, track, stream } = useRemoteMedia({ label: "video", peerId: props.peerId, onClose: props.onClose, onPlayable: (data) => { props.onPlayable?.({ label: "video", track: data.track, stream: data.stream }); } }); const isVideoOn = !!stream; return { state, track, stream, isVideoOn }; }; export { useRemoteVideo }; //# sourceMappingURL=chunk-LMGMGZ73.js.map