Call - v26.1.0
    Preparing search index...

    Interface INCCallEventsListener

    Application-layer call event listener

    interface INCCallEventsListener {
        onCallReceived(session: NCCallSession, extra?: string): void;
        onCallEnded(session: NCCallSession, reason: NCCallEndReason): void;
        onCallConnected(session: NCCallSession): void;
        onLocalCallLogReceived?(callLog: INCCallLog): void;
        onServerCallLogReceived?(callLog: INCCallLog): void;
        onMediaTypeChangeRequestReceived?(
            userId: string,
            transactionId: string,
            mediaType: NCCallMediaType,
        ): void;
        onMediaTypeChangeResultReceived?(
            info: {
                userId: string;
                transactionId: string;
                mediaType: NCCallMediaType;
                result: NCCallMediaTypeChangeResult;
            },
        ): void;
        onRemoteCameraStateChanged?(
            callId: string,
            userId: string,
            disabled: boolean,
        ): void;
        onRemoteMicrophoneStateChanged?(
            callId: string,
            userId: string,
            disabled: boolean,
        ): void;
        onRemoteUserInvited?(
            inviteeUserList: string[],
            inviterUserId: string,
            callId: string,
        ): void;
        onRemoteUserStateChanged?(
            callId: string,
            userId: string,
            state: NCCallUserState,
            reason?: NCCallEndReason,
        ): void;
        onUserMediaAvailable?(userId: string, mediaType: NCCallMediaType): void;
        onStartTimeReceived?(
            info: { callId: string; callType: NCCallType; callStartTime: number },
        ): void;
    }
    Index

    Methods

    • Incoming call notification. Fired when being called or invited; the app may accept or reject.

      Parameters

      Returns void

    • Call ended notification.

      Parameters

      Returns void

      For group calls, this only means the local user left; the call may continue for others.

    • Call connected successfully. After connection, the SDK publishes A/V resources internally.

      Parameters

      Returns void

    • Local call log after a 1:1 call ends.

      Parameters

      Returns void

      1:1 only. Built locally so history can still be shown if server sync fails offline. Triggered when:

      1. A 1:1 online call ends
      2. An offline 1:1 call has ended and this client comes back online
    • Server push of call log after a 1:1 or group call ends.

      Parameters

      Returns void

    • Remote user requested a media type change (1:1 only).

      Parameters

      • userId: string

        Remote user ID (requester)

      • transactionId: string

        Transaction ID for this request/response pair

      • mediaType: NCCallMediaType

        Requested media type (audio or audio+video)

      Returns void

    • Result of a media type change (1:1 only).

      Parameters

      Returns void

    • Remote user camera on/off.

      Parameters

      • callId: string

        Call ID

      • userId: string

        Remote user ID

      • disabled: boolean

        true if camera is off, false if on

      Returns void

    • Remote user microphone on/off.

      Parameters

      • callId: string

        Call ID

      • userId: string

        Remote user ID

      • disabled: boolean

        true if mic is off (muted), false if on

      Returns void

    • In a group call, a remote participant was invited (e.g. A and B are in call, A invites C → B gets this).

      Parameters

      • inviteeUserList: string[]

        Invited user IDs

      • inviterUserId: string

        Inviter user ID

      • callId: string

        Call ID; in groups you may still receive this after you have left the call

      Returns void

    • Remote user state changed.

      Parameters

      Returns void

    • A user's audio or video is ready to play; call playMedia(userId, mediaType) to play.

      Parameters

      Returns void

    • Call start time notification.

      Parameters

      • info: { callId: string; callType: NCCallType; callStartTime: number }
        • callId: string

          Call ID

        • callType: NCCallType

          Call type (1:1 or group)

        • callStartTime: number

          Call start timestamp (ms)

      Returns void

      Timestamp when the call room was first joined.