Skip to main content
Version: 2.x.x

Video SDK useRTCStream Hook - React Native

useRTCStream(streamId, { onStreamStateChanged }) gives you one participant stream by its id: its kind and track, plus pause() and resume().

import { useParticipant, useRTCStream } from "@videosdk.live/react-native-sdk";

const { webcamStream } = useParticipant(participantId);
const { kind, track, pause, resume } = useRTCStream(webcamStream?.id, {
onStreamStateChanged: ({ state, timestamp }) => console.log(state, timestamp),
});

Properties​

Methods​

Callbacks​

Got a Question? Ask us on discord