React Api Reference
    Preparing search index...

    Function AudioPlayer

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

      Parameters

      • option: {
            participantId: string;
            rawTrackName?: string;
            type?: "audio" | "shareAudio" | "rawAudio";
        }
        • participantId: string

          Unique ID of the participant whose audio stream is rendered.

        • OptionalrawTrackName?: string

          Name of the raw track. Required when type is "rawAudio".

        • Optionaltype?: "audio" | "shareAudio" | "rawAudio"

          Type of audio stream to render ("audio" or "shareAudio"). Defaults to "audio".

      Returns Element

      A JSX element that plays the requested audio stream.

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

      <AudioPlayer
      participantId={participantId}
      type="audio"
      />;