Open Deodes opened 2 years ago
I'm unsure about iOS but we have an working implementation of this on our internal patches. I'll follow up a simple PR when I got some time, just commenting here for my own tracking
Here's what we found out by far:
<Video />
playing simultaneously with different mixWithOther
or ignoreSilentSwitch
props will likely result in unintended behaviour on iOS.ignoreSilentSwitch
or mixWithOther
prop; it uses onAudioFocusChanged
and disableFocus
props to manage them. However, pausing/playing a video will result in audio focus change because this behaviour is hard-coded in Android native code.
Almost same here, I'm trying to Play background music when video muted -> stop background music when video unmuted But even with the Appdelegate change and ignoreSilentSwitch. if I have mixWithOther={isVideoMuted ? 'mix' : 'inherit'} the inherit doesn't apply
i believe it should be mixWithOther={isVideoMuted ? 'mix' : 'duck'} - this should lower the background music if the foreground is unmuted
Bug
I don't want to disable audio from other app on some
<Video/>
components, and in some cases I need to disable it. As I see in docs, we have a section "Audio Mixing", which tell us to use:in AppDelegate.m/mm and use
ignoreSilentSwitch
prop(To be honest, don't understand how it should affect..)At first it doesn't work personally for me. The second thing is that
mixWithOther
prop can help in case I need to mix audio, but what am I suppose to do in case, when I actually need to disable sound from other apps?Platform
Which player are you experiencing the problem on:
Environment info
React native info output:
Library version: 5.2.0
Steps To Reproduce
mixWithOther
prop or "Audio Mixing" topic from docs for disabling/enabling sound from other appsExpected behaviour