Skip to main content
Version: 0.1.x

Play External Video - React

This feature allows participants to broadcast any external video by providing video link. Like screen share feature, one participant is broadcasting and other participants are receivers.

This guide will provide an overview of how participant can start, stop, resume and seek external video during the meeting.

  1. Start : By using startVideo() function, the broadcaster can start external video by providing video link in argument.

  2. Stop : By using stopVideo() function, a broadcaster can stop external video.

  3. Pause : By using pauseVideo() function, a broadcaster can pause external video by providing { currentTime: 5 } object as an argument.

  4. Resume : By using resumeVideo() function, a broadcaster can resume external video from last pause video duration.

  5. Seek : By using seekVideo() function, a broadcaster can seek external video to any given duration by providing { currentTime: 5 } object as an argument.

Start, Stop, Pause, Resume, and Seek External Video

import { useMeeting } from "@videosdk.live/react-sdk";

const MeetingView = () => {
const { startVideo, stopVideo, pauseVideo, resumeVideo, seekVideo } =
useMeeting();

const onPress = () => {
// Start Video
startVideo({
link: "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
});

// Stop Video
stopVideo();

// Pause Video
pauseVideo({ currentTime: 5 });

// Resume Video
resumeVideo();

// Seek Video
seekVideo({ currentTime: 10 });

return <>...</>;
};
};

Got a Question? Ask us on discord