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

Multiple instances of media player #16

Open
nidhinprathap opened this issue Oct 3, 2018 · 6 comments
Open

Multiple instances of media player #16

nidhinprathap opened this issue Oct 3, 2018 · 6 comments

Comments

@nidhinprathap
Copy link

nidhinprathap commented Oct 3, 2018

While playing a song in Media Player, if we send it to the background and then back to the foreground & click on any song, it creates a new instance of MediaPlayer and both the songs are played together.

@sadikyalcin
Copy link

Yes - spotted this on my first run.

@sadikyalcin
Copy link

In addition; clearing all running apps doesn't close the app but you have to manually click 'X' on the drawer to close it.

@femibiwoye
Copy link

Has this been fixed, i am also stuck at this point.

A working solution is appreciated

@nidhinprathap
Copy link
Author

@femibiwoye currently its not, but its an easy fix. Either use static Media Player and update the actions on the MediaPlayer instance rather than creating a new one Or Use service so that background playback is supported

@femibiwoye
Copy link

@nidhinprathap, thank you for your response.
How do i use services to play song in the background, can you share code sample with me or link to work sample.

Thanks

@nidhinprathap
Copy link
Author

Sry haven't implemented with flutter. Just search Android Music Player + android service. Many examples are out there. With that, you need to connect flutter to native code like in the example of the project.

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

3 participants