jPlayer和PhoneGap Build兼容性 [英] jPlayer and PhoneGap Build compatibility

查看:87
本文介绍了jPlayer和PhoneGap Build兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将jPlayer用于Web应用程序,该Web应用程序将使用PhoneGap Build服务针对iPhone,Android和Blackberry进行本机编译.我正在使用播放器播放MP3音频片段,并且在Web浏览器中可以正常工作.

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.

但是,当使用PhoneGap进行编译时,音频将不会播放,并且不会在播放器中显示文件的长度.看起来好像找不到文件,尽管我使用相对路径(../audio/myaudio.mp3)引用它.

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.mp3).

有人有没有让jPlayer在通过PhoneGap编译的本机应用程序上工作的经验?

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

推荐答案

这根本不可能与PhoneGap Build有关.在许多移动平台上,b/c html5音频支持可能很糟糕. HTML5音频在Android 2.x或更旧的黑莓设备上不起作用.即使在支持html5音频的情况下,它也不总是能够像您期望的那样运行(无法搜索,一次不能播放多个剪辑,等等.).您可能需要查看phonegap的Media类,以便在不支持html5音频的情况下跨平台进行一致的音频播放:

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

这篇关于jPlayer和PhoneGap Build兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆