Options
All
  • Public
  • Public/Protected
  • All
Menu

agora-rtc-react

Index

Wrapper Functions

  • createBufferSourceAudioTrack(config: BufferSourceAudioTrackInitConfig): (() => { error: null | AgoraRTCError; ready: boolean; track: null | IBufferSourceAudioTrack })
  • Creates and stores the buffer source audio track

    Parameters

    • config: BufferSourceAudioTrackInitConfig

      Config for the buffer source audio track

    Returns (() => { error: null | AgoraRTCError; ready: boolean; track: null | IBufferSourceAudioTrack })

    React hook that can be used to access the buffer source audio track

      • (): { error: null | AgoraRTCError; ready: boolean; track: null | IBufferSourceAudioTrack }
      • Returns { error: null | AgoraRTCError; ready: boolean; track: null | IBufferSourceAudioTrack }

        • error: null | AgoraRTCError
        • ready: boolean
        • track: null | IBufferSourceAudioTrack
  • createCameraVideoTrack(config?: CameraVideoTrackInitConfig): (() => { error: null | AgoraRTCError; ready: boolean; track: null | ICameraVideoTrack })
  • Creates and stores the camera track

    Parameters

    • Optional config: CameraVideoTrackInitConfig

      Config for the camera track

    Returns (() => { error: null | AgoraRTCError; ready: boolean; track: null | ICameraVideoTrack })

    React hook that can be used to access the camera track

      • (): { error: null | AgoraRTCError; ready: boolean; track: null | ICameraVideoTrack }
      • Returns { error: null | AgoraRTCError; ready: boolean; track: null | ICameraVideoTrack }

        • error: null | AgoraRTCError
        • ready: boolean
        • track: null | ICameraVideoTrack
  • createClient(config: ClientConfig): (() => IAgoraRTCClient)
  • Initializes a Web SDK client and stores the instance for the lifecycle of the application

    Parameters

    • config: ClientConfig

      Configuration for the Web SDK Client instance

    Returns (() => IAgoraRTCClient)

    React hook that gives access to the Web SDK Client instance

      • (): IAgoraRTCClient
      • Returns IAgoraRTCClient

  • createCustomAudioTrack(config: CustomAudioTrackInitConfig): (() => { error: null | AgoraRTCError; ready: boolean; track: null | ILocalAudioTrack })
  • Creates and stores the custom audio track

    Parameters

    • config: CustomAudioTrackInitConfig

      Config for the custom audio track

    Returns (() => { error: null | AgoraRTCError; ready: boolean; track: null | ILocalAudioTrack })

    React hook that can be used to access the custom audio track

      • (): { error: null | AgoraRTCError; ready: boolean; track: null | ILocalAudioTrack }
      • Returns { error: null | AgoraRTCError; ready: boolean; track: null | ILocalAudioTrack }

        • error: null | AgoraRTCError
        • ready: boolean
        • track: null | ILocalAudioTrack
  • createCustomVideoTrack(config: CustomVideoTrackInitConfig): (() => { error: null | AgoraRTCError; ready: boolean; track: null | ILocalVideoTrack })
  • Creates and stores the custom video track

    Parameters

    • config: CustomVideoTrackInitConfig

      Config for the custom video track

    Returns (() => { error: null | AgoraRTCError; ready: boolean; track: null | ILocalVideoTrack })

    React hook that can be used to access the custom video track

      • (): { error: null | AgoraRTCError; ready: boolean; track: null | ILocalVideoTrack }
      • Returns { error: null | AgoraRTCError; ready: boolean; track: null | ILocalVideoTrack }

        • error: null | AgoraRTCError
        • ready: boolean
        • track: null | ILocalVideoTrack
  • createMicrophoneAndCameraTracks(audioConfig?: MicrophoneAudioTrackInitConfig, videoConfig?: CameraVideoTrackInitConfig): (() => { error: null | AgoraRTCError; ready: boolean; tracks: null | [IMicrophoneAudioTrack, ICameraVideoTrack] })
  • Creates and stores the camera and microphone tracks

    Parameters

    • Optional audioConfig: MicrophoneAudioTrackInitConfig

      Config for the audio track

    • Optional videoConfig: CameraVideoTrackInitConfig

      Config for the video track

    Returns (() => { error: null | AgoraRTCError; ready: boolean; tracks: null | [IMicrophoneAudioTrack, ICameraVideoTrack] })

    React hook that can be used to access the camera and microphone tracks

      • (): { error: null | AgoraRTCError; ready: boolean; tracks: null | [IMicrophoneAudioTrack, ICameraVideoTrack] }
      • Returns { error: null | AgoraRTCError; ready: boolean; tracks: null | [IMicrophoneAudioTrack, ICameraVideoTrack] }

        • error: null | AgoraRTCError
        • ready: boolean
        • tracks: null | [IMicrophoneAudioTrack, ICameraVideoTrack]
  • createMicrophoneAudioTrack(config?: MicrophoneAudioTrackInitConfig): (() => { error: null | AgoraRTCError; ready: boolean; track: null | IMicrophoneAudioTrack })
  • Creates and stores the microphone track

    Parameters

    • Optional config: MicrophoneAudioTrackInitConfig

      Config for the microphone track

    Returns (() => { error: null | AgoraRTCError; ready: boolean; track: null | IMicrophoneAudioTrack })

    React hook that can be used to access the microphone track

      • (): { error: null | AgoraRTCError; ready: boolean; track: null | IMicrophoneAudioTrack }
      • Returns { error: null | AgoraRTCError; ready: boolean; track: null | IMicrophoneAudioTrack }

        • error: null | AgoraRTCError
        • ready: boolean
        • track: null | IMicrophoneAudioTrack
  • createScreenVideoTrack(config: ScreenVideoTrackInitConfig, withAudio?: "auto" | "enable" | "disable"): (() => { error: null | AgoraRTCError; ready: boolean; tracks: ILocalVideoTrack | [ILocalVideoTrack, ILocalAudioTrack] })
  • Creates and stores the screenshare tracks

    Parameters

    • config: ScreenVideoTrackInitConfig

      Config for the screenshare tracks

    • Optional withAudio: "auto" | "enable" | "disable"

      Try and create audio track as well (needs browser support)

    Returns (() => { error: null | AgoraRTCError; ready: boolean; tracks: ILocalVideoTrack | [ILocalVideoTrack, ILocalAudioTrack] })

    React hook that can be used to access the screenshare tracks

      • (): { error: null | AgoraRTCError; ready: boolean; tracks: ILocalVideoTrack | [ILocalVideoTrack, ILocalAudioTrack] }
      • Returns { error: null | AgoraRTCError; ready: boolean; tracks: ILocalVideoTrack | [ILocalVideoTrack, ILocalAudioTrack] }

        • error: null | AgoraRTCError
        • ready: boolean
        • tracks: ILocalVideoTrack | [ILocalVideoTrack, ILocalAudioTrack]

Other Functions

  • AgoraVideoPlayer(props: ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & { videoTrack: ILocalVideoTrack | ICameraVideoTrack | IRemoteVideoTrack } & { config?: VideoPlayerConfig }): Element
  • A React component to render the local or remote videoTrack

    Parameters

    • props: ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & { videoTrack: ILocalVideoTrack | ICameraVideoTrack | IRemoteVideoTrack } & { config?: VideoPlayerConfig }

      videoTrack and video config

    Returns Element

    An HTML div element containing the provided videoTrack

Generated using TypeDoc