问题
Describe the bug:
I'm using react-native in my application, I want to play the multiple tracks at a time. I tried some node modules but they only allows me to play a song at a time. Is there any way to do this?
Expected behavior: Play the multiple songs at a time
Platform: Android
回答1:
This could be possible with react-native-audio-toolkit module. You could create multiple Player instance at same time and play multiple tracks.
import {Player} from '@react-native-community/audio-toolkit';
const PLAYER_ONE = new Player(songUrl1).play();
const PLAYER_TWO = new Player(songUrl2).play();
来源:https://stackoverflow.com/questions/61708473/how-to-run-multiple-tracks-at-a-time-simultaneously-in-react-native