forum
FORUM

ionic 2 sounds stop background music while loading audio

<p>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(&#39;sounds/entering.mp3&#39;); 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?</p>


Added By : Saddam (1 year3 month 14 days ago)


Comments

var mySound = new Audio(); var mySound = new Audio('sounds/entering.mp3'); mySound.play(); this may work.
Birbal
Please share your views with us
Check if you want to display your email-id.
Enter the sum of digits
2+6 =