Fix ogg/oga not play in Firefox 3.6

Native audio support was introduced in since Firefox 3.5 . Ogg is one of the media format supported by Firefox. However, sometimes you may find it doesn’t work even if you set the right source path. And you just check the network status of audio element:

document.getElementsByTagName(“audio”)[0].networkState

Then you get the constant of a 4, which is HTMLMediaElement.NETWORK_NO_SOURCE.

This is because firefox checks the Content-Type header to make sure it’s a media file. (Webkit based browsers don’t have this restriction.) However, ogg format is not configured on most http servers. You can check the content type by:
curl -I <url-to-media-file>

Take Apache as example, you can add following content to your configuration file:
AddType audio/ogg .oga
AddType video/ogg .ogv .ogg

For more, check this article:
https://developer.mozilla.org/en/Configuring_servers_for_Ogg_media

悲剧不止你一个

近日连连悲剧,今天一早收到root@apache.org发送的邮件:
issues.apache.org compromised: please update your password

事情发生在4月6日,大意是apache的jira被黑,怀疑内部的用户资料包括SHA-512加密的密码被黑客拷贝,请大家更新所有相关的密码,以免造成更严重的损失。

详细的情况在这里:
https://blogs.apache.org/infra/entry/apache_org_04_09_2010

终于有个契机,把我的gmail密码更新一下了。这世上的悲剧啊。