[英]Playback audio on android @ website
I'm looking for a way to play an audio stream on android without using flash.我正在寻找一种不使用 flash 在 android 上播放音频 stream 的方法。
What I've tried so far:到目前为止我已经尝试过:
This just claims "Sorry, this video cannot be played."这只是声称“抱歉,无法播放此视频”。
<video id="video" controls="controls" preload="none" autoplay="autoplay" src="http://194.106.119.243/powerhit_hi.ogg" tabindex="0"></video>
The following simply doesn't do anything.以下根本不做任何事情。 As far as I googled it looks like Android does not support the audio tag at all till 2.3 and at 2.3 it does support it but non of the codecs work so it doesn't actually work.
据我谷歌搜索,Android 在 2.3 之前根本不支持音频标签,在 2.3 时它确实支持它,但没有编解码器工作,所以它实际上不起作用。
<audio id="audio" controls="controls" preload="none" autoplay="autoplay" tabindex="0">
<source src="http://194.106.119.243/powerhit_hi.ogg"></source>
<source src="http://194.106.119.243/powerhit_hi.mp3"></source>
</audio>
I have an Android 2.2 device and I can get video
to work , though you should note a few things:我有一个 Android 2.2 设备,我可以让
video
工作,但你应该注意一些事情:
I think your example is failing because .ogg
is usually an audio file (MIME audio/ogg), the equivalent video container would be .ogv
(MIME video/ogg), but simply renaming the file is unlikely to work, you'd have to get the audio encoded into a video file, perhaps with some static picture for the video.我认为您的示例失败了,因为
.ogg
通常是音频文件(MIME 音频/ogg),等效的视频容器将是.ogv
(MIME 视频/ogg),但简单地重命名文件不太可能工作,你有将音频编码为视频文件,可能带有一些 static 图片用于视频。
Like you, I couldn't get audio
to play anything on my device .和你一样,我无法在我的设备上播放任何
audio
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.