-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[expo-av][iOS] Duck / unduck is not working properly on iOS #29077
Comments
Just my two cents, I agree #16578 has caused this regression which it seems I did worry about at the time. It's been years since I've done anything with the expo sdk or objective-c, but I'd suggest at least the For example something like this should resolve ducking and not cause framedrops, but I haven't made any attempt to handle potential errors and I'm not sure the EX_* stuff is correct. if (!shouldBeActive && _sessionIsActive) {
EX_WEAKIFY(self);
dispatch_async(dispatch_get_main_queue(), ^{
EX_ENSURE_STRONGIFY(self);
NSError *error;
[session setActive:NO error:&error];
if (!error) {
self->_sessionIsActive = NO;
}
// Does not handle the error
});
} |
Experiencing the same issue |
Was someone able to fix this problem? |
Same! |
Minimal reproducible example
https://github.com/andrecrimb/expo-av-duck-unduck-issue.git
What platform(s) does this occur on?
iOS
Did you reproduce this issue in a development build?
Yes
Summary
Problem:
On iOS, with the audio mode setting
interruptionModeIOS: InterruptionModeIOS.DuckOthers
, the volume of ongoing music is reduced when a new sound is played. However, once the new sound is unloaded, the volume of the ongoing music does not return to its original level. This issue does not occur on Android, where the volume returns to normal as expected.References:
Workaround Attempt:
I tried bypassing the use of
interruptionModeIOS
by implementing a custom solution for handling ducking/unducking on iOS, following this example. This workaround did not result in massive frame drops.Preview - Turn on the video sound 🔉
example-android-no-issue.mp4
example-ios-with-issue.MP4
Steps to Reproduce:
interruptionModeIOS: InterruptionModeIOS.DuckOthers
.Expected Behavior:
After unloading the new sound, the volume of the ongoing music should return to its original level.
Actual Behavior:
The volume of the ongoing music remains reduced.
Environment
Expo Doctor Diagnostics
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check for issues with metro config
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that packages match versions required by installed Expo SDK
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK
Didn't find any issues with the project!
The text was updated successfully, but these errors were encountered: