Native audio stop parallel music app while loading audio (only first load)


#1

I am working on a ionic 2 app and i need to add custom ringtone in my app for messages so i added Plugin: cordova-plugin-media as well as Plugin: cordova-plugin-nativeaudio but it stop any other music player so i tried this js code

var mySound = new Audio('sounds/entering.mp3'); mySound.play();

it is working with many media players but is stop google play music and anothers music app.

also i have tried

cordova add plugin cordova-allow-background-audio but this is also not working for me.

Any ideas?


#2

i have noticed for first load it is not working but after play again music… its play continuous on play sound. for native-audio andvar mySound = new Audio('sounds/entering.mp3'); mySound.play();