IE9中的HTML5音频 [英] HTML5 audio in IE9

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

问题描述

我在使用IE9 +和HTML5音频标签时遇到了一个奇怪的问题.

I've got a curious problem with IE9+ and the HTML5 audio tag.

看看这个网站: https ://www.phasetrax.de/artist/Chryso/album/42/lipstick-of-the-reddest-color

在Firefox,Chrome和Safari中,它可以正常工作,但是在IE9 +中,我只是获得了一个黑色区域,音频元素带有红色符号.

In Firefox,Chrome and Safari it's working correctly, but in IE9+ I'm just getting a black field with a red sign for the audio element.

我还检查了OGG源的HTML标头,对我来说看起来不错.

I've also checked the HTML header for the OGG source, and for me it's looking good.

curl -k -I https://www.phasetrax.de//cdn/song/323/lipstick-of-the-reddest-color.ogg
HTTP/1.1 200 OK
Server: nginx/1.2.0
Date: Sat, 30 Mar 2013 14:59:50 GMT
Content-Type: application/octet-stream
Connection: keep-alive
Status: 200 OK
Content-Disposition: attachment; filename="01_Lipstick_Of_The_Reddest_Color.ogg"
Content-Transfer-Encoding: binary
Cache-Control: private
X-UA-Compatible: IE=Edge,chrome=1

这是音频元素代码:

<audio controls autobuffer  id="pt_player_1">
<source class="mp3_src" src="https://www.phasetrax.de//cdn/song/323/lipstick-of-the-reddest-color.mp3">
<source class="ogg_src" src="https://www.phasetrax.de//cdn/song/323/lipstick-of-the-reddest-color.ogg">
  Your browser does not support the audio element. Get newest
  Firefox!
</audio>

负责ogg的应用程序是Rails with Unicorn和NGINX.

The app which is responsible for serving the ogg is Rails with Unicorn and NGINX.

也许,任何人都知道IE在这种情况下出了什么问题.或更准确地说,我在做什么错了?

Maybe, anyone knows what's going wrong with IE in this case.. or better said, what am I doing wrong?

关于Alex,

推荐答案

我尝试使用其他音频,并且可以正常工作. 我认为您的音频比特率与此有关. 尝试以128kbps 44khz单声道播放.而且,您可以通过反复试验尝试其他组合.

I tried with a different audio and it works properly. I think your audio bitrate has something to do with this. Try 128kbps 44khz mono. And you can try other combinations through trial and error.

我将格式工厂用于这些音频转换.

I use format factory for these audio conversions.

这篇关于IE9中的HTML5音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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