Skip to content

WebRTC playback volume control

Android SDK uses libjingle_peerconnection library to implement WebRTC. In this library, incall volume changing is hardcoded to control playback volume


private int SetPlayoutVolume(int level) {

    // create audio manager if needed
    if (_audioManager == null && _context != null) {
        _audioManager = (AudioManager)

    int retVal = -1;

    if (_audioManager != null) {
                        level, 0);
        retVal = 0;

    return retVal;

Therefore, incall volume only can be changed when playback volume is set in any Android SDK based application. However, it is possible to switch from hands free to device speakerphone and vice versa (see Media Devices example)