分页: 1 / 1

firefox怎么就杯具了[解决]

发表于 : 2010-11-30 12:54
JiangHui
2010-11-30-124307_690x411_scrot.png
如图,HTML5 的audio标签
同一个文件,opera和chome测试正常,firefox怎么就是一个叉 :em20

这个例子倒是都好好的
http://www.w3schools.com/html5/tryit.as ... dio_simple
就改了个src内容,firefox就杯具了

Re: firefox怎么就杯具了

发表于 : 2010-11-30 13:00
delectate
只支持ogg,ogv

Re: firefox怎么就杯具了

发表于 : 2010-11-30 13:04
JiangHui
delectate 写了:只支持ogg,ogv

就是个ogg文件啊,这三个同时支持的也只有Ogg Vorbis了

Re: firefox怎么就杯具了

发表于 : 2010-11-30 13:10
delectate
JiangHui 写了:
delectate 写了:只支持ogg,ogv

就是个ogg文件啊,这三个同时支持的也只有Ogg Vorbis了

Re: firefox怎么就杯具了

发表于 : 2010-11-30 13:14
JiangHui
w3schools的例子我用ff测着也正常啊

我就是搞不懂为什么改了下源文件ff就杯具了,而其他两个就正常

Re: firefox怎么就杯具了

发表于 : 2010-11-30 13:18
delectate
代码

Re: firefox怎么就杯具了

发表于 : 2010-11-30 13:23
JiangHui
<!DOCTYPE HTML>
<html>
<body>

<audio src="http://blog.dan-teng.info/sites/default ... 30/鳥の詩.ogg" controls="controls">
Your browser does not support the audio element.
</audio>

</body>
</html>

Re: firefox怎么就杯具了

发表于 : 2010-11-30 13:37
delectate
[html4strict]<!DOCTYPE HTML>
<html>
<body>

<audio src="http://blog.dan-teng.info/sites/default ... %A9%A9.ogg" controls="controls">
Your browser does not support the audio element.
</audio>

</body>
</html>[/html4strict]
filename
睡觉去了

Re: firefox怎么就杯具了

发表于 : 2010-11-30 13:42
JiangHui
delectate 写了:[html4strict]<!DOCTYPE HTML>
<html>
<body>

<audio src="http://blog.dan-teng.info/sites/default ... %A9%A9.ogg" controls="controls">
Your browser does not support the audio element.
</audio>

</body>
</html>[/html4strict]
filename
睡觉去了

:em20 不是文件名的问题啊,我一开始是上传到skydriver外链的,文件名就是乱七八糟的英文,后来上传到自己空间,都一样的问题,改成1.ogg 也没用,就算链接含有中文也一样可以解析的啊

Re: firefox怎么就杯具了

发表于 : 2010-11-30 13:48
JiangHui
2010-11-30-134734_295x105_scrot.png
2010-11-30-134734_295x105_scrot.png (5.49 KiB) 查看 4594 次
看吧,复制你的码还是个叉啊,难道你那可以?又是我人品问题?

Re: firefox怎么就杯具了

发表于 : 2010-11-30 15:07
jarryson
默认的可以,换成lz提供的就不行了,和lz一样的阿结果,ff3.6.12

我还是最喜欢opera的处理方式,调用系统的gstreamer,这样什么格式都支持。

Re: firefox怎么就杯具了

发表于 : 2010-11-30 15:10
tenzu
我这里firefox就像挂了一样,google都打不开,只能先用chromium
不知道是学校的问题还是firefox的问题

Re: firefox怎么就杯具了

发表于 : 2010-11-30 15:31
JiangHui
我的那个例子,用相对路径的话文件名是什么都可以,用html绝对路径的话文件名全英文的也不行

w3schools.com的那个
<!DOCTYPE HTML>
<html>
<body>

<audio src="http://www.w3schools.com/html5/song.ogg" controls="controls">
Your browser does not support the audio element.
</audio>

</body>
</html>

改成http的绝对路径照样可以 :em20 真不知道ff到底怎么实现的

搜了下说绝对路径相对路径都应该可以的啊,文件名也没什么要求,算了,懒得管了

Re: firefox怎么就杯具了

发表于 : 2010-12-01 12:09
JiangHui
知道原因了
不是文件名也不是路径的问题

https://developer.mozilla.org/en/HTML/Element/audio
Also, the server must serve the file using the correct MIME type in order for Gecko to play it correctly.
MIME type的问题,nginx默认没有ogg的MIME type定义

vim /etc/nginx/mime.types
加上
video/ogg ogm;
video/ogg ogv;
video/ogg ogg;

重启服务器

Re: firefox怎么就杯具了

发表于 : 2011-02-24 14:20
sciolist
JiangHui 写了:知道原因了
不是文件名也不是路径的问题

https://developer.mozilla.org/en/HTML/Element/audio
Also, the server must serve the file using the correct MIME type in order for Gecko to play it correctly.
MIME type的问题,nginx默认没有ogg的MIME type定义

vim /etc/nginx/mime.types
加上
video/ogg ogm;
video/ogg ogv;
video/ogg ogg;

重启服务器
这个问题我也遇到了,nginx 默认没有添加ogv 的mime type.

谢谢ls。 :em11