user575363
user575363

Reputation:

Android Error: Code undefined, Message Undefined

I am trying to execute the phoneGap's media example but it's giving such 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.

Upvotes: 1

Views: 2245

Answers (2)

TyrusC
TyrusC

Reputation: 29

To address a local file use

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

This works for me.

Upvotes: 1

TyrusC
TyrusC

Reputation: 29

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");
    }

Upvotes: 0

Related Questions