开发者

jPlayer and PhoneGap Build compatibility

开发者 https://www.devze.com 2023-03-24 23:44 出处:网络
I\'m trying to use jPlayer for a web app that will be native compiled for iPhone, Android and Blackberry using the PhoneGap Build service. I\'m using the player to play short MP3 audio snippets and it

I'm trying to use jPlayer for a web app that will be native compiled for iPhone, Android and Blackberry using the PhoneGap Build service. I'm using the player to play short MP3 audio snippets and it works fine in the web browser.

However, when this is compiled using PhoneGap, the audio won't play and it doesn't display the length of the file in the player. It looks like it can't find the file, although I'm referencing it using a relative path (../audio/myaudio.mp开发者_Python百科3).

Does anybody have any experience of getting jPlayer to work on a native app compiled through PhoneGap?


This is not likely related to PhoneGap Build at all. It is probably having issues b/c html5 audio support is terrible across many mobile platforms. Html5 audio does not work on Android 2.x or older blackberry devices. Even where html5 audio is supported, it does not always behave as you might expect (can't seek, can't play more than one clip at a time, etc...). You might want to look at phonegap's Media class for consistent audio playback across platforms, even where html5 audio is not supported: http://docs.phonegap.com/en/2.0.0/cordova_media_media.md.html#Media

0

精彩评论

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

关注公众号