After several days of investigation, I still had no luck on this issue, thanks in advance if you can help me!
I am using cordova 3.3 for my iOS application, one of the functions is playing the audio clip at the URL.
I use the cordless api environment, here is how I use it according to their official examples
var myMedia = new Media (" http://123.com/xyz.mp3 "); myMedia.play ()
this is the problem: when the game event is triggered, the user interface is delayed for a few seconds,
I believe that this is due to retrieving the remote resource from http://123.com/xyz.mp3 , when you play mp3 locally, there is no such problem.
The media api does not seem to offer a preload function.
when downloading a remote mp3 file, it uses the same stream as the user interface, so it freezes until the download task is completed.
Does anyone have a similar problem? How to solve this problem?
Thank you so much for the time :)
source
share