@sendbird/calls-react-native
    Preparing search index...

    Interface DirectCallListener

    interface DirectCallListener {
        onAudioDeviceChanged: (
            call: DirectCallProperties,
            info: AudioDeviceChangedInfo,
        ) => void;
        onConnected: (call: DirectCallProperties) => void;
        onCustomItemsDeleted: (
            call: DirectCallProperties,
            deletedKeys: string[],
        ) => void;
        onCustomItemsUpdated: (
            call: DirectCallProperties,
            updatedKeys: string[],
        ) => void;
        onEnded: (call: DirectCallProperties) => void;
        onEstablished: (call: DirectCallProperties) => void;
        onLocalVideoSettingsChanged: (call: DirectCallProperties) => void;
        onPropertyUpdatedManually: (call: DirectCallProperties) => void;
        onReconnected: (call: DirectCallProperties) => void;
        onReconnecting: (call: DirectCallProperties) => void;
        onRemoteAudioSettingsChanged: (call: DirectCallProperties) => void;
        onRemoteRecordingStatusChanged: (call: DirectCallProperties) => void;
        onRemoteVideoSettingsChanged: (call: DirectCallProperties) => void;
        onUserHoldStatusChanged: (
            call: DirectCallProperties,
            isLocalUser: boolean,
            isUserOnHold: boolean,
        ) => void;
    }
    Index

    Properties

    onAudioDeviceChanged: (
        call: DirectCallProperties,
        info: AudioDeviceChangedInfo,
    ) => void

    Called when the audio device has been changed.

    on iOS, if you want to change the audio device you should handle the native side. (Currently, only port names are supported as strings) See also: AVAudioSession.setPreferredInput https://developer.apple.com/documentation/avfaudio/avaudiosession/1616491-setpreferredinput See also: AVRoutePickerView https://developer.apple.com/documentation/avkit/avroutepickerview

    1.0.0

    onConnected: (call: DirectCallProperties) => void

    Called when media streams between the caller and callee are connected and audio/video is enabled.

    1.0.0

    onCustomItemsDeleted: (
        call: DirectCallProperties,
        deletedKeys: string[],
    ) => void

    Called when the custom items of the call are deleted.

    1.0.0

    onCustomItemsUpdated: (
        call: DirectCallProperties,
        updatedKeys: string[],
    ) => void

    Called when the custom items of the call are updated.

    1.0.0

    onEnded: (call: DirectCallProperties) => void

    Called when the call has ended.

    1.0.0

    onEstablished: (call: DirectCallProperties) => void

    Called when the callee has accepted the call, but not yet connected to media streams.

    1.0.0

    onLocalVideoSettingsChanged: (call: DirectCallProperties) => void

    Called when the local user changes audio settings.

    Android

    1.0.0

    onPropertyUpdatedManually: (call: DirectCallProperties) => void

    Called when the update properties internally on Javascript side

    Javascript

    1.0.0

    onReconnected: (call: DirectCallProperties) => void

    Called when DirectCall successfully reconnects to the server.

    1.0.0

    onReconnecting: (call: DirectCallProperties) => void

    Called when DirectCall begins attempting to reconnect to the server after losing connection.

    1.0.0

    onRemoteAudioSettingsChanged: (call: DirectCallProperties) => void

    Called when the remote user changes audio settings.

    1.0.0

    onRemoteRecordingStatusChanged: (call: DirectCallProperties) => void

    Called when the other user’s recording status is changed. You can check the recording status of the other user with DirectCall.remoteRecordingStatus

    1.0.0

    onRemoteVideoSettingsChanged: (call: DirectCallProperties) => void

    Called when the remote user changes video settings.

    1.0.0 *

    onUserHoldStatusChanged: (
        call: DirectCallProperties,
        isLocalUser: boolean,
        isUserOnHold: boolean,
    ) => void

    The local or remote user has put a call on hold or removed a hold from a call and their hold status has changed.

    Type Declaration

      • (call: DirectCallProperties, isLocalUser: boolean, isUserOnHold: boolean): void
      • Parameters

        • call: DirectCallProperties

          DirectCall that has updated user hold status

        • isLocalUser: boolean

          Returns true if the user whose hold status changed is local user

        • isUserOnHold: boolean

          Returns true if the user's hold status is changed to on hold

        Returns void

    1.0.0