- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry guys, I am back to the troublesome cordova media plugin again! Now I got a new problem of playing multiple sounds using the media plugin in intel xdk. I have a background music loop playing in the app. I also have another sound of some kind for object moving in the app. However, the two sounds interfere with each other when they are playing at the same time. I mean the sound for object moving played initially when the background music was loop playing at the same time, but it then stopped after a while and no more play while the background music is still on. It seems it is a bug in cordova media plugin. Is there any walkaround to overcome the problem? I googled a lot and only got a negative response from the internet. Thanks a lot for any help.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Try following this link. I think it has chunks of code for game where multiple music and sounds are played. So this should be helpful.
http://www.html5rocks.com/en/tutorials/webaudio/games/
or see if you can us ethis web audio library
http://goldfirestudios.com/blog/104/howler.js-Modern-Web-Audio-Javascript-Library
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You want them to play at the same time and now they don't?
A few things to consider:
- According to their documentation, Android and iOS allow two sounds being played simultaneously. Windows and Blackberry (a few devices) do not.
- Make sure you are not using the same media object for the second sound
- It could be a device issue. Do try it on another device to confirm.
- A popular alternative to Cordova media plugin esp when targeting concurrency is: https://github.com/floatinghotpot/cordova-plugin-nativeaudio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, after several hours research and testing, I found cordorva-plugin-nativeaudio from floatinghotpot can meet my requirement. It enables low latency and polyphony. I switched to this wonderful plugin and it is working perfectly on my android phone. Thanks a lot to all for helps.
![](/skins/images/C4F7392A5C68ACA60290C9576F107044/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page