HTML5音频标签不工作的机器人 [英] HTML5 audio tag is not working in Android

查看:145
本文介绍了HTML5音频标签不工作的机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创造了android的芯片样品手机的差距应用程序。而下的index.html有这样的音频标签。

I have created a sample phone gap application for android ics . And the index.html has an audio tag like this.

<audio id="player1" controls preload><source src="media/track1.mp3" type="audio/mp3" /></audio>

我不能够播放音频的。我看到到处都是它提到,音频标签将升级Froyo发布后正常工作的堆栈溢出的职位。但是,我测试它在gingerbeard和ICS和它不工作anywwhere。

I am not able to play the audio at all. I saw the stack overflow posts everywhere it's mentioned that the audio tag will work fine after froyo release. But, i am testing it in gingerbeard and in ICS and it's not working anywwhere.

推荐答案

HTML5音频支持是在不同的设备/操作系统不一致由于codeC许可问题和OS实施/支持。如果你只是播放MP3文件,您可以通过使用PhoneGap的的媒体类,这将提供一致和可靠的音频节目在所有平台上。

HTML5 Audio support is not consistent across different devices/OSes due to codec licensing issues and OS implementation/support. If you are just playing MP3 files, you can reliably handle those by using PhoneGap's Media class, which will provide consistent and reliable audio programming on all platforms.

如果您希望能够preLOAD音频和有更先进的场景,如复音或分层(如视频游戏效果),可以使用<一个href="https://github.com/phonegap/phonegap-plugins/tree/master/Android/LowLatencyAudio">LowLatencyAudio PhoneGap的本机插件。

If you want the ability to preload audio and have more advanced scenarios like polyphony or layering (like video game effects), you can use the LowLatencyAudio PhoneGap native plugin.

这篇关于HTML5音频标签不工作的机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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