OGG ファイルを html5 (オーディオ タグ) で開きます。一方のサイトでは機能しますが、もう一方のサイトでは機能しません。なんで?
例:
http://devluntegg.fishok.getmyip.com:39875/webim/sounds/new_user.ogg - 動作 (再生)
http://lovisnami.ru/webim/sounds/new_user.ogg - 動作しない (維持することを提案します)
html と js は同じです。
OGG ファイルを html5 (オーディオ タグ) で開きます。一方のサイトでは機能しますが、もう一方のサイトでは機能しません。なんで?
例:
http://devluntegg.fishok.getmyip.com:39875/webim/sounds/new_user.ogg - 動作 (再生)
http://lovisnami.ru/webim/sounds/new_user.ogg - 動作しない (維持することを提案します)
html と js は同じです。
最初の URL が返されます
Content-Type: audio/ogg
2番目のもの
Content-Type: application/octet-stream
別の Web サーバーのセットアップ。
それらの 1 つだけが ogg ファイルです。もう 1 つは、バイナリ データの塊です。
(少なくとも、それはサーバーがブラウザに伝えるものです)。
サーバーを正しく構成する必要があります。
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: 13889