set willPausedWhenDucked to true for RecordVoiceMessage
per review feedback - need true here so the onFocusLost callback actually fires on all Android versions Signed-off-by: vmfunc <celeste@linux.com>
This commit is contained in:
parent
bddc5a63f4
commit
73a3468dbc
1 changed files with 2 additions and 4 deletions
|
|
@ -100,10 +100,8 @@ private fun AudioFocusRequester.willPausedWhenDucked(): Boolean {
|
||||||
return when (this) {
|
return when (this) {
|
||||||
// (note that for Element Call, there is no action when the focus is lost)
|
// (note that for Element Call, there is no action when the focus is lost)
|
||||||
AudioFocusRequester.ElementCall,
|
AudioFocusRequester.ElementCall,
|
||||||
AudioFocusRequester.VoiceMessage -> true
|
AudioFocusRequester.VoiceMessage,
|
||||||
// no audio output to duck when recording, and we don't want notification
|
AudioFocusRequester.RecordVoiceMessage -> true
|
||||||
// sounds to interrupt a recording via transient focus loss
|
|
||||||
AudioFocusRequester.RecordVoiceMessage -> false
|
|
||||||
// For the MediaViewer, we let the system automatically handle the ducking
|
// For the MediaViewer, we let the system automatically handle the ducking
|
||||||
// https://developer.android.com/media/optimize/audio-focus#automatic-ducking
|
// https://developer.android.com/media/optimize/audio-focus#automatic-ducking
|
||||||
AudioFocusRequester.MediaViewer -> false
|
AudioFocusRequester.MediaViewer -> false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue