HTML5 <音频>Android 上的标签 [英] HTML5 <audio> tag on Android

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

问题描述

我发现了许多讨论 Android 上标签支持的主题.到目前为止,即使是 Android Froyo 2.2 也无法播放音频(我已经在 nexus One 上进行了测试).

I have found many threads discussing the support of tag on Android. So far it looks, that even Android Froyo 2.2 cannot play audio (i have made tests on nexus One).

根据 www.html5test.com 网页,支持标签本身,但浏览器中没有编解码器(mp3、ogg ..).那么我该如何解决这个问题?

According to the www.html5test.com web page, the tag itself is supported, but no codecs are in the browser (mp3, ogg..). So how I can solve the problem?

到目前为止,我只看到一种解决方案,使用可以流式传输 mp3 的嵌入式 Flex 或 Flash 播放器.那是对的吗?这是我在 Android 网络浏览器中播放 .mp3 或其他音频流的唯一方法吗?

So far I see only one solution, use the embedded Flex or Flash player, which can stream mp3. Is that correct? Is that the only way I can play the .mp3 or other audio stream in Android web browser?

Android 2.3 Gingerbread 是否支持一些音频流???

Does Android 2.3 Gingerbread support some audio stream???

非常感谢BR斯坦

稍后添加:我最终使用的工作解决方案是用于流式传输的小型 Flex .swf.它可以很容易地与 HTML 网页集成(Flex-Javascript 通信效果很好).唯一的问题是在某些手机上没有重新安装 Flash Player,必须先从 Android Market 下载.

Added later:The working solution I finally used is a small Flex .swf for streaming. It can be pretty easily integrated with the HTML web page (Flex-Javascript communication works pretty well). The only problem is that on some phones the Flash Player is not reinstalled and must be downloaded from Android Market first.

更晚添加:好吧,即使在 Android 2.3 上,<audio> 元素也有问题 - 我不知道 Google 在做什么一个简单的事情就是一个问题.使用 Flex Player 没问题,但问题是在某些手机上无法从 Android 市场安装 Adob​​e Flash 播放器,因为有一些 Adob​​e 硬件要求,例如 1Ghz CPU 等.一些供应商如 HTC 提供自己的 Flash 播放器,但这些都非常糟糕,并且不能在 AS 3.0 上正常工作......到目前为止,一切都完美无缺,尤其是在三星手机(如 Nexus S 或 Galaxy S)上.

Added even later: Well, the <audio> element is buggy even on Android 2.3 - I do not know what are doing in Google that such a simple thing is a problem. Using the Flex Player is okey, but the problem is that on some phones the Adobe Flash player cannot be installed from Android market, because there are some Adobe HW requirements like 1Ghz CPU, etc. Some vendors like HTC are providing the own Flash players, but those are pretty bad and do not work correctly with the AS 3.0... So far everything works perfectly especially on Samsung phones (like Nexus S or Galaxy S).

推荐答案

你发现的也与我遇到的一致.2.2 支持音频标签,但没有支持它的编解码器,这显然是一个错误,已在 Froyo 以外的版本中修复:

What you dug up agrees with what I've run into as well. 2.2 supports the audio tag but has no codecs to back it, this is apparently a bug that's been fixed in releases beyond Froyo:

http://code.google.com/p/android/问题/详细信息?id=9372

我在我的 Nexus S 上使用了带有 mp3 文件的音频标签,它在那里工作正常(至少对于最新的固件版本).

I've used the audio tag with an mp3 file on my Nexus S, it's working correctly there (for the most recent firmware release at least).

这篇关于HTML5 &lt;音频&gt;Android 上的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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