Closed wilmxre closed 5 months ago
Often, problems occur due to a lost Audio session. In certain circumstances, using VolumeManager.enable(true)
may resolve these issues. It is possible that third-party libraries could be terminating the audio session prematurely. Note that the VolumeManager will only operate when there is an active Audio Session.
Okay, would you recommend calling VolumeManager.enable(true)
before this?
await VolumeManager.setCategory('PlayAndRecord', false);
await VolumeManager.setMode('VideoChat'); // i tried it with VoiceChat and SpokenAudio too
await VolumeManager.setActive(true, true);
Regrettably, I'm not familiar with the inner workings of the other libraries in question, so some experimentation may be required on your part. I suspect that initiating or terminating a call, or sending the app to the background, might disrupt the audio session. As a result, you may need to re-enable it. The setActive
method only toggles the current session's active state, whereas using enable
can provide a more comprehensive solution by asserting control at a higher level. It might prove beneficial in this context.
I had similar issue requests in the past and enable
seemed to solve it for all of them.
See #21 and #22
Hello.
Has anyone tried to set the volume of the video call, with this library? I tried doing it, but with no success. Sometimes it works for a certain amount of time, then stops working completely when the video call screen is in focus again. Sometimes it doesn't even work at all.
I am using
react-native-callkeep
andreact-native-incall-manager
to handle my calls, and to route the audio to the speakers, maybereact-native-volume-manager
has a conflict when used with those libraries (maybe a specific library has the superior control over the audio session or more permission, overruling the others), i don't know.When the video call screen is in focus, i call these:
Then, when i set the volume of the call:
When the video call screen is out of focus/unmounted, i call this, to clean the audio session:
Am i doing something wrong? Did anyone implement this use case successfully before?
My environment is:
Dependencies: