Playing local sound in phonegap

后端 未结 3 1047
半阙折子戏
半阙折子戏 2020-11-30 04:50

I have a .wav file in my www folder. I am using jQuery with the following code. The alerts go off but the sound does not play. Am I doing something

3条回答
  •  無奈伤痛
    2020-11-30 05:09

    Try giving an absolute local path. E.g.

    new Media("/android_asset/www/test.wav");

    That should work on Android. Hopefully they'll fix this in PhoneGap, as it's something of a bug in the cross-device support.

提交回复
热议问题