Closed Kursorr closed 4 years ago
I don't think the native media players support two audio sources at once. So you'll need to create two instances of the audio players to do this.
Thank you ! :)
Works like a charm.
Here the code, that will help others too :)
async playSongs() {
console.log("play")
this.player = new audio.TNSPlayer()
const playerOptions = {
audioFile: "~/assets/audio/rocks.mp4",
loop: false
}
const secondPlayer = new audio.TNSPlayer()
const secondPlayerOptions = {
audioFile: "~/assets/audio/heart.mp4",
loop: false
}
await this.player.playFromUrl(playerOptions)
await secondPlayer.playFromUrl(secondPlayerOptions)
}
I'm opening it again because I have a big problem. ^^
I'm making a songs editor :
When my timeline touch a song, that should play it for now, with what i have that play a song, but when that touch another song, that stop the first to launch the second
Here a repo : https://github.com/Ravaniss/song-editor
Someone can help with that please ? <3
Does it work on both android and iOS?
Hello everyone ! :)
I'm making a song editor with Nativescript, here is my question : How can i play 2 or 3 or ... songs at the same time ?
Thank you ! :)
Regards, Rav'