0

I am planning to create a music app which allows user to choose from a number of inbuilt audio. The closest thing I found on the web was jPlayer plugin for jQuery which I couldn't make it work on Android. My app is based on jQuery mobile.

Is there any really simple way to add audio to my web app which I am planning to convert to .apk using phonegap. I intend to provide a list of links/file names to user in my app and on clicking the file name/link, the audio player controls shall be displayed and the selected audio shall start playing.

I have also tried the HTML embed tag and it also didn't work in the apk.

4

2 回答 2

0

据我所知,PhoneGap 还不支持该标签。

我听说有人通过本教程成功使用 PhoneGap API +jQuery Mobile 让它工作:http ://www.mobiledevelopersolutions.com/home/start/twominutetutorials/tmt1part1

于 2013-02-21T18:07:56.040 回答
0

看起来您可以使用 PhoneGap 插件来执行此操作:

window.plugins.webintent.startActivity({
    action: WebIntent.ACTION_VIEW,
    url: 'http"//whatever.mp4'}, 
    function() {console.log('Wow this actually worked!');}, 
    function() {console.log('Failed to open URL via Android Intent');}
);

https://groups.google.com/forum/?fromgroups=#!topic/phonegap/nEm47r1Bhak

于 2013-02-21T18:18:14.640 回答