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
Code | Error Description |
5051 | Repeated setAudioOnlyMode() call made while a previous Audio-only request is in process. |
5052 | Repeated setAudioOnlyMode() call made while Audio-Only mode already active. |
5053 | Repeated setAudioOnlyMode() call made while Audio-Video mode already active. |
5054 | Repeated setAudioOnlyMode() call made while a previous Audio-Video request is in process. |