MEDIA_ERR_SRC_NOT_SUPPORTED html5音频问题

jsh*_*hen 12 audio html5

我正在使用html5音频播放器,当我从与html页面相同的主机服务.ogg文件时,一切正常.当我把ogg文件放入我的cdn时它失败了,错误代码是MEDIA_ERR_SRC_NOT_SUPPORTED

例如,这很好

<audio src="/song.ogg" id="player">
  Your browser does not support the <code>audio</code> element.
</audio>
Run Code Online (Sandbox Code Playgroud)

但是上面的错误代码失败了

<audio src="http://mycdn.com/song.ogg" id="player">
  Your browser does not support the <code>audio</code> element.
</audio>
Run Code Online (Sandbox Code Playgroud)

失败的音频文件的标题看起来像这样(这是来自不同的ogg文件,表现出相同的行为)

HTTP/1.1 200 OK
Server: CacheFlyServe v26b
Date: Sat, 13 Feb 2010 21:10:48 GMT
Content-Type: application/octet-stream
Connection: close
ETag: "c6ee7d86e808cc44bbd74a8db94a5aae"
X-CF1: fA.syd1:cf:cacheD.syd1-01
Content-Length: 2398477
Last-Modified: Sat, 13 Feb 2010 20:50:56 GMT
Accept-Ranges: bytes
X-Cache: MISS from deliveryD-syd1
Run Code Online (Sandbox Code Playgroud)

Nic*_*lay 7

Content-Type = octet/stream标头是问题所在,但如果我正确读取规范,则不应该.这是一个测试用例:http://mozilla.doslash.org/stuff/video-test/video.html

我在Mozilla的bugzilla中提出了一个关于此问题的错误.[编辑]回复:

我们不做任何内容嗅探来弄清楚内容是什么 - 我们依赖于提供的正确mime类型.这就是为什么application/octet-stream不播放以及我们为canPlayType返回""的原因.