How to use the react-native-voximplant.Voximplant.Hardware function in react-native-voximplant

To help you get started, we’ve selected a few react-native-voximplant examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github voximplant / react-native-demo / src / manager / CallKitManager.js View on Github external
_onRNCallKeepDidActivateAudioSession = () => {
        console.log('CallKitManager: _onRNCallKeepDidActivateAudioSession');
        Voximplant.Hardware.AudioDeviceManager.getInstance().callKitStartAudio();
    };
github voximplant / react-native-demo / src / manager / CallKitManager.js View on Github external
_onRNCallKeepPerformAnswerCallAction = (event) => {
        console.log('CallKitManager: _onRNCallKeepPerformAnswerCallAction' + this.callId);
        if (!this.callKitUuid) {
            this.callKitUuid = event.callUUID;
        }
        Voximplant.Hardware.AudioDeviceManager.getInstance().callKitConfigureAudioSession();
        NavigationService.navigate('Call', {
            callId: this.callId,
            isVideo: this.withVideo,
            isIncoming: true,
        });
    };
github voximplant / react-native-demo / src / screens / CallScreen.js View on Github external
async switchAudioDevice() {
        console.log('CallScreen[' + this.callId + '] switchAudioDevice');
        let devices = await Voximplant.Hardware.AudioDeviceManager.getInstance().getAudioDevices();
        this.setState({audioDevices: devices, audioDeviceSelectionVisible: true});
    }
github voximplant / react-native-demo / src / screens / CallScreen.js View on Github external
(async() => {
            let currentAudioDevice = await Voximplant.Hardware.AudioDeviceManager.getInstance().getActiveDevice();
            switch (currentAudioDevice) {
                case Voximplant.Hardware.AudioDevice.BLUETOOTH:
                    this.setState({audioDeviceIcon: 'bluetooth-audio'});
                    break;
                case Voximplant.Hardware.AudioDevice.SPEAKER:
                    this.setState({audioDeviceIcon: 'volume-up'});
                    break;
                case Voximplant.Hardware.AudioDevice.WIRED_HEADSET:
                    this.setState({audioDeviceIcon: 'headset'});
                    break;
                case Voximplant.Hardware.AudioDevice.EARPIECE:
                default:
                    this.setState({audioDeviceIcon: 'hearing'});
                    break;
            }
        })();
    }