Package io.getstream.video.android.core
Class MicrophoneManager
-
- All Implemented Interfaces:
public final class MicrophoneManagerThe Microphone manager makes it easy to use your microphone in a call
-
-
Field Summary
Fields Modifier and Type Field Description private final StateFlow<DeviceStatus>statusprivate final StateFlow<Boolean>isEnabledprivate final StateFlow<StreamAudioDevice>selectedDeviceprivate final StateFlow<List<StreamAudioDevice>>devicesprivate final MediaManagerImplmediaManagerprivate final BooleanpreferSpeakerphone
-
Constructor Summary
Constructors Constructor Description MicrophoneManager(MediaManagerImpl mediaManager, Boolean preferSpeakerphone)
-
Method Summary
Modifier and Type Method Description final StateFlow<DeviceStatus>getStatus()final StateFlow<Boolean>isEnabled()Represents whether the audio is enabled final StateFlow<StreamAudioDevice>getSelectedDevice()final StateFlow<List<StreamAudioDevice>>getDevices()final MediaManagerImplgetMediaManager()final BooleangetPreferSpeakerphone()final Unitenable(Boolean fromUser)Enable the audio, the rtc engine will automatically inform the SFU final Unitpause(Boolean fromUser)final Unitresume(Boolean fromUser)final Unitdisable(Boolean fromUser)Disable the audio track. final UnitsetEnabled(Boolean enabled, Boolean fromUser)Enable or disable the microphone final Unitselect(StreamAudioDevice device)Select a specific device final StateFlow<List<StreamAudioDevice>>listDevices()List the devices, returns a stateflow with audio devices final Unitcleanup()-
-
Constructor Detail
-
MicrophoneManager
MicrophoneManager(MediaManagerImpl mediaManager, Boolean preferSpeakerphone)
-
-
Method Detail
-
getStatus
final StateFlow<DeviceStatus> getStatus()
-
getSelectedDevice
final StateFlow<StreamAudioDevice> getSelectedDevice()
-
getDevices
final StateFlow<List<StreamAudioDevice>> getDevices()
-
getMediaManager
final MediaManagerImpl getMediaManager()
-
getPreferSpeakerphone
final Boolean getPreferSpeakerphone()
-
enable
final Unit enable(Boolean fromUser)
Enable the audio, the rtc engine will automatically inform the SFU
-
disable
final Unit disable(Boolean fromUser)
Disable the audio track. Audio is still captured, but not send. This allows for the "you are muted" toast to indicate you are talking while muted
-
setEnabled
final Unit setEnabled(Boolean enabled, Boolean fromUser)
Enable or disable the microphone
-
select
final Unit select(StreamAudioDevice device)
Select a specific device
-
listDevices
final StateFlow<List<StreamAudioDevice>> listDevices()
List the devices, returns a stateflow with audio devices
-
-
-
-