Skip to main content
Version: 0.0.x

Pause/Resume Video Stream

Whenver you wish to stop/resume downlaod stream(webcam, screenShare and mic) of participant, you can simply do it by using pause, resume methods.

Pause video stream

  • pause() method is used for pause stream(webcam, screenShare and mic) of a particular participant.
import { useParticipant } from "@videosdk.live/react-native-sdk";

// get stream of particular participant
const { webcamStream, micStream, screenShareStream } =
useParticipant("<ParticipantId>");

const onPress = () => {
// pause video stream
webcamStream.pause();

// pause mic stream
micStream.pause();

// pause screen share stream
screenShareStream.pause();
};

Resume video stream

  • resume() method is used to resume stream(webcam, screenShare and mic) of a particular participant.
import { useParticipant } from "@videosdk.live/react-native-sdk";

// get stream of particular participant
const { webcamStream, micStream, screenShareStream } =
useParticipant("<ParticipantId>");

const onPress = () => {
// resume video stream
webcamStream.resume();

// resume mic stream
micStream.resume();

// resume screen share stream
screenShareStream.resume();
};