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.

47 lines (45 loc) 980 B
import { useRemoteMedia } from "./chunk-PSIVQREQ.js"; // src/hooks/useRemoteScreenShare.ts var useRemoteScreenShare = (props) => { const { state, stream: videoStream, track: videoTrack } = useRemoteMedia({ label: "screen-share-video", peerId: props.peerId, onClose: props.onClose, onPlayable: (data) => { props.onPlayable?.({ label: "screen-share-video", track: data.track, stream: data.stream }); } }); const { stream: audioStream, track: audioTrack } = useRemoteMedia({ label: "screen-share-audio", peerId: props.peerId, onClose: props.onClose, onPlayable: (data) => { props.onPlayable?.({ label: "screen-share-audio", track: data.track, stream: data.stream }); } }); return { videoStream, audioStream, videoTrack, audioTrack, state }; }; export { useRemoteScreenShare }; //# sourceMappingURL=chunk-Z7IDMJB2.js.map