React Api Reference
    Preparing search index...

    Function VideoPlayer

    • VideoPlayer is a component responsible for rendering a participant’s video or screen-share stream.

      Parameters

      • option: {
            className?: string;
            classNameVideo?: string;
            containerStyle?: CSSProperties;
            participantId: string;
            type?: "video" | "share";
            videoRef?: Ref<HTMLVideoElement>;
            videoStyle?: CSSProperties;
        }
        • OptionalclassName?: string

          Additional CSS classes applied to the container.

        • OptionalclassNameVideo?: string

          Additional CSS classes applied to the <video> element.

        • OptionalcontainerStyle?: CSSProperties

          Custom inline styles applied to the container element.

        • participantId: string

          Unique ID of the participant whose stream is rendered.

        • Optionaltype?: "video" | "share"

          Type of stream to render ("video" or "share"). Defaults to "video".

        • OptionalvideoRef?: Ref<HTMLVideoElement>

          Optional ref to access the underlying <video> element.

        • OptionalvideoStyle?: CSSProperties

          Custom inline styles applied to the <video> element.

      Returns Element

      A JSX element that renders the requested media stream.

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

      const ParticipantView = ({ participantId }) => {
      return (
      <VideoPlayer
      participantId={participantId}
      type="video"
      containerStyle={{ height: "100%", width: "100%" }}
      />
      );
      };