Skip to content
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

Stop Other Music App #301

Open
y-daniel-1113 opened this issue Apr 26, 2024 · 9 comments
Open

Stop Other Music App #301

y-daniel-1113 opened this issue Apr 26, 2024 · 9 comments

Comments

@y-daniel-1113
Copy link

When the app goes into the background, other music apps stop working.

@y-daniel-1113
Copy link
Author

The cause is probably

  • (void)didEnterBackground:(NSNotification*)notification
    {
    rive::AudioEngine::RuntimeEngine()->stop();
    }

@AlexanderBZ
Copy link

Would love to get this fixed as well. Users are messaging our team and saying they won't use the app since our Rive animations are stopping their other music apps.

@molind
Copy link

molind commented May 12, 2024

We've rolled back rive to the previous release until this bug is fixed. It's a critical bug and I'm surprised it haven't received enough attention.

@AlexanderBZ
Copy link

Awesome, thank you!

rlods referenced this issue May 28, 2024
- Fixes a crash when a sound is still playing and Artboard is de-allocated. Easy to cause with long sounds as sound resources would get nuked and the engine would keep trying to decode from a dead buffer.
- Stops audio when going in background, resumes when coming to foreground.

The way I did the backgrounding is on the RiveRendererView as I couldn't find a better general spot to do this but maybe @mjtalbot has an idea.

This does not stop long sounds (like songs) when exiting a view, we can address that separately...

Diffs=
4a9947630 Stop audio in iOS when backgrounded. (#7055)

Co-authored-by: Luigi Rosso <[email protected]>
@psbss
Copy link

psbss commented May 29, 2024

Same. This is critical issue for our product. We rolled back to v5.10.0, so We couldn't use sound feature.
Please provide us the handler.

@Kaspik
Copy link

Kaspik commented Jun 3, 2024

As long as your rive animations don't have audio included this should now be fixed in 5.12.1 where Rive doesn't initialize audio at all until it's needed.

@dskuza
Copy link
Collaborator

dskuza commented Jul 22, 2024

rive-ios v5.15.1 and above will now by default mix audio rather than stop other audio sources from playing, so if you update to the latest runtime, you should see this behavior fixed.

@molind
Copy link

molind commented Aug 9, 2024

It could be closed already as resolved.

@dskuza
Copy link
Collaborator

dskuza commented Aug 29, 2024

@molind Our latest release changes how audio works a little bit. Check out our latest docs here for playing audio on iOS. TL;DR - you might need to configure your AVAudioSession shared instance a bit more, but we now respect those settings, which allows for a lot more configurability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants