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

Issue: Can I play multiple songs at the same time? Using many different SoundPlayer? #48

Closed
mlop113 opened this issue Apr 16, 2019 · 5 comments

Comments

@mlop113
Copy link

mlop113 commented Apr 16, 2019

No description provided.

@mlop113
Copy link
Author

mlop113 commented Apr 16, 2019

just like this:

import SoundPlayer from 'react-native-sound-player'

const SoundPlayer2 = new SoundPlayer
const SoundPlayer3 = new SoundPlayer

SoundPlayer.playSoundFile('All rise', 'wav')
SoundPlayer2.playSoundFile('Bang_bang_bang', 'wav')
SoundPlayer3.playSoundFile('love_story', 'wav')

@johnsonsu
Copy link
Owner

Hi @mlop113 No, this library cannot play multiple songs at the same time. The current implementation is similar to a singleton, when a new song is played, the previous instance of player will be either reused or destroyed.

To do what you wanted, we will need a completely new architecture for the library with new usage APIs. I will mark this as enhancement for now, but I cannot give you a date on when I'm able to implement it.

@mlop113
Copy link
Author

mlop113 commented Apr 17, 2019

thank you

@RWOverdijk
Copy link

@mlop113 https://github.com/zmxv/react-native-sound can do this. It has been around for a while now but it works well :)

@mlop113
Copy link
Author

mlop113 commented May 17, 2019

@RWOverdijk it maybe good with iOS but when I use for android, it load song from url get more time.

@mlop113 mlop113 closed this as completed May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants