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

Music players stops when I start my app Xamarin.ios with media manager #816

Open
1 of 7 tasks
DamienDoumer opened this issue May 31, 2021 · 7 comments
Open
1 of 7 tasks

Comments

@DamienDoumer
Copy link

🐛 Bug Report

When I add media manager to my project, and initialize it, then deploy the app on my device. If I play music on a music player like Spotify before launching my app, the player stops playing music.
I tried changing the AVAudioSession Category inside the app delegate, before initializing Xamarin media manager as follows; but it didn't work.

AVAudioSession.SharedInstance().SetActive(false); AVAudioSession.SharedInstance().SetCategory(AVAudioSession.CategoryAmbient); AVAudioSession.SharedInstance().SetActive(true); CrossMediaManager.Current.Init();

Expected behavior

When launching a the app, it should stop the media player only when we start playing media in our app, and not at app start.

Reproduction steps

  • install Xamarin Media Manager in your xamarin ios project
  • Initialize in app delegate
  • Deploy to an iOS device
  • Start a music player and launch music on it (Spotify etc)
  • Start our app we deployed earlier
  • As soon as the app launches, the media player's music stops

Configuration

Version: 1.x

Platform:

  • 📱 iOS
  • 🤖 Android
  • 🏁 WPF
  • 🌎 UWP
  • 🍎 MacOS
  • 📺 tvOS
  • 🐒 Xamarin.Forms
@DamienDoumer DamienDoumer changed the title The music player stops when I start my app Xamarin.ios with media manager Music players stops when I start my app Xamarin.ios with media manager May 31, 2021
@mtaranovsky
Copy link

I have the same problem with Media Manager on ios.

@eugene-stanovoy
Copy link

Same here

@ihassantariq
Copy link

Same for me @eugene-stanovoy @mtaranovsky @DamienDoumer do let me know if you have already found solution.

@ipon85
Copy link

ipon85 commented Dec 22, 2021

same bug encountered. Hope it will be fixed next release

@ipon85
Copy link

ipon85 commented Aug 12, 2022

Any news?

@narciszait
Copy link

maybe an idea would be to choose if we want to hijack the AudioSession when we call CrossMediaManager.Current.Init();
that causes the issue on iOS - line 106 here:

audioSession.SetActive(true, out var activationError);

@stavroaudisho
Copy link

Any news? @martijn00

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

7 participants