The EnxRoom.setAudioOnlyMode() method allows you to switch to an audio-only call where you can neither receive anybody’s video nor publish your video. You can use this method as a toggle to switch between audio-only and audio-video call. This doesn’t affect others video Streams in the Room.

Class: EnxRoom

Method: publish void setAudioOnlyMode( boolean AudioOnly)

Parameter:

AudioOnly – Boolean. Set to true to switch to audio-only call and false to switch to audio-video call.

room.setAudioOnlyMode(true);   // Switch to Audio-Only call
room.setAudioOnlyMode(false);  // Switch back to Audio-Video call

Error Codes / Exceptions

CodeError Description
5051Repeated setAudioOnlyMode() call made while a previous Audio-only request is in process.
5052Repeated setAudioOnlyMode() call made while Audio-Only mode already active.
5053Repeated setAudioOnlyMode() call made while Audio-Video mode already active.
5054Repeated setAudioOnlyMode() call made while a previous Audio-Video request is in process.