我用html5 (音频标签)打开OGG文件。在一个网站上工作,另一个则不起作用。为什么?
例如:
http://devluntegg.fishok.getmyip.com:39875/webim/sounds/new_user.ogg -工作(娱乐)
http://lovisnami.ru/webim/sounds/new_user.ogg -不工作(建议维护)
html和js是一样的。
发布于 2012-10-04 21:00:48
第一个URL返回
Content-Type: audio/ogg第二个
Content-Type: application/octet-stream不同的web服务器设置。
发布于 2012-10-04 21:03:16
其中只有一个是ogg文件。另一个是二进制数据的blob。
(至少,这是服务器告诉浏览器的)。
您需要正确配置服务器。
user@host:~ # curl -I http://devluntegg.fishok.getmyip.com:39875/webim/sounds/new_user.ogg | grep Content
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 13889 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Content-Length: 13889
Content-Type: audio/ogg
user@host:~ # curl -I http://lovisnami.ru/webim/sounds/new_user.ogg | grep Content % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 13889 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Content-Type: application/octet-stream
Content-Length: 13889https://stackoverflow.com/questions/12727820
复制相似问题