开发者

Android Error: Code undefined, Message Undefined

I am trying to execute the phoneGap's media example but it's giving such开发者_JAVA技巧 error. When i click on the given link it suppose to play a mp3 file but it gives error. Why so?

Someone has any idea about it.


To address a local file use

    function clickSound() {
    alert("Sound");
        playAudio("/android_asset/www/foo.mp3");
    }

This works for me.


I had this problem as well but noticed that it worked if you reference a full url to a sound on the internet, Using the sample url rockGuitar.mp3">http://audio.ibeat.org/content/p1rj1s/p1rj1s-_rockGuitar.mp3 works for me.

    function clickSound() {
        alert("Sound");
        playAudio("http://audio.ibeat.org/content/p1rj1s/p1rj1s_-_rockGuitar.mp3");
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜