Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • CallbacksInterface

Index

Properties

JoinChannelSuccess: (connection: RtcConnection, elapsed: number) => void

Type declaration

    • Occurs when a user joins a channel. This callback notifies the application that a user joins a specified channel.

      Parameters

      • connection: RtcConnection

        The connection information. See RtcConnection .

      • elapsed: number

        The time elapsed (ms) from the local user calling joinChannel [2/2] until the SDK triggers this callback.

      Returns void

RemoteAudioStateChanged: (connection: RtcConnection, remoteUid: number, state: RemoteAudioState, reason: RemoteAudioStateReason, elapsed: number) => void

Type declaration

    • Occurs when the remote audio state changes. When the audio state of a remote user (in a voice/video call channel) or host (in a live streaming channel) changes, the SDK triggers this callback to report the current state of the remote audio stream.This callback does not work properly when the number of users (in the communication profile) or hosts (in the live streaming channel) in a channel exceeds 17.

      Parameters

      • connection: RtcConnection

        The connection information. See RtcConnection .

      • remoteUid: number

        The ID of the remote user whose audio state changes.

      • state: RemoteAudioState

        The state of the remote audio. See RemoteAudioState .

      • reason: RemoteAudioStateReason

        The reason of the remote audio state change. See RemoteAudioStateReason .

      • elapsed: number

        Time elapsed (ms) from the local user calling the joinChannel [2/2] method until the SDK triggers this callback.

      Returns void

RemoteVideoStateChanged: (connection: RtcConnection, remoteUid: number, state: RemoteVideoState, reason: RemoteVideoStateReason, elapsed: number) => void

Type declaration

    • Occurs when the remote video stream state changes. This callback does not work properly when the number of users (in the communication profile) or hosts (in the live streaming channel) in a channel exceeds 17.

      Parameters

      • connection: RtcConnection

        The connection information. See RtcConnection .

      • remoteUid: number

        The ID of the remote user whose video state changes.

      • state: RemoteVideoState

        The state of the remote video, see RemoteVideoState .

      • reason: RemoteVideoStateReason

        The reason for the remote video state change, see RemoteVideoStateReason .

      • elapsed: number

        Time elapsed (ms) from the local user calling the joinChannel [2/2] method until the SDK triggers this callback.

      Returns void

UserJoined: (connection: RtcConnection, remoteUid: number, elapsed: number) => void

Type declaration

    • (connection: RtcConnection, remoteUid: number, elapsed: number): void
    • Occurs when a remote user (COMMUNICATION)/ host (LIVE_BROADCASTING) joins the channel. In a communication channel, this callback indicates that a remote user joins the channel. The SDK also triggers this callback to report the existing users in the channel when a user joins the channel.In a live-broadcast channel, this callback indicates that a host joins the channel. The SDK also triggers this callback to report the existing hosts in the channel when a host joins the channel. Agora recommends limiting the number of hosts to 17.The SDK triggers this callback under one of the following circumstances:A remote user/host joins the channel by calling the joinChannel [2/2] method.A remote user switches the user role to the host after joining the channel.A remote user/host rejoins the channel after a network interruption.

      Parameters

      • connection: RtcConnection

        The connection information. See RtcConnection .

      • remoteUid: number

        The ID of the user or host who joins the channel.

      • elapsed: number

        Time delay (ms) from the local user calling joinChannel [2/2] until this callback is triggered.

      Returns void

UserOffline: (connection: RtcConnection, remoteUid: number, reason: UserOfflineReasonType) => void

Type declaration

    • Occurs when a remote user (in the communication profile)/ host (in the live streaming profile) leaves the channel. There are two reasons for users to become offline:Leave the channel: When a user/host leaves the channel, the user/host sends a goodbye message. When this message is received, the SDK determines that the user/host leaves the channel.Drop offline: When no data packet of the user or host is received for a certain period of time (20 seconds for the communication profile, and more for the live broadcast profile), the SDK assumes that the user/host drops offline. A poor network connection may lead to false detections. It's recommended to use the Agora RTM SDK for reliable offline detection.

      Parameters

      • connection: RtcConnection

        The connection information. See RtcConnection .

      • remoteUid: number

        The ID of the user who leaves the channel or goes offline.

      • reason: UserOfflineReasonType

        Reasons why the user goes offline: UserOfflineReasonType .

      Returns void

Methods

  • ActiveSpeaker(uid: string | number): void
  • BecomeAudience(): void
  • EndCall(): void
  • SwitchCamera(): void

Generated using TypeDoc