The behavior can be triggered with the toggleAudioOnly action, which is
currently fired with a button.
The following aspects of the conference will change when in audio only mode:
- local video is muted
- last N is set to 0 (effectively muting remote video)
- full-screen mode is exited
- audio mode is set to "audio chat" (default output is the earpiece)
- the wake lock is disengaged
One aspect not handled in this patch is disabling the video mute button while in
audio only mode. The user should not be able to turn back video on in that case.
This is in preparation for an upcoming "audio only mode" feature. Setting last N
will also be required for it, so this patch factors out the action and makes it
public so other modules can reuse it.
In addition, if the value is set to undefined the configured default value (or
-1 if absent) is picked.