Helmut Granda wrote:
So
to recap.
1. headers in multimedia247.net are set up properly
2. headers in hamsterballstudios.com are not set up correctly
3. code does not validate
- solution
1. fix the headers in hamsterballstudios.com
2. fix HTML
So my fears that the server in hamsterballstudios.com is not set up
correctly which is the clients server.
Yeah, that's right. As hamsterballstudios.com is sending it as
"text/plain" Firefox will pass it to the plugin for "text/plain" rather
than the plugin for "audio/x-mp3" or "audio/mpeg". As Firefox can't
handle a plugin of "text/plain" nothing will happen. You can see how
your Firefox is configured for plugins by typing "about:plugins" into
your Firefox address bar -- this will tell you what's installed. But
yeah, you need to fix the headers on the server to get Firefox to work.
Fixing the headers can be done at the webserver level, or - if you've
got PHP installed - you could do something like,
<?php
$pathToFile = "path";
header ("Cache-Control:
must-revalidate, post-check=0, pre-check=0");
header ("Content-Type:
audio/x-mp3");
header ("Content-Length: " . filesize($pathToFile));
header ("Content-Disposition:
attachment; filename=$pathToFile");
readfile($pathToFile);
?>
(If you use this, make sure there's no whitespace on either side of the
<?php ... ?>
As for step 2,
This HTML works for me on a server that responds to mp3 files with
"audio/x-mp3"
<object type="audio/wav" data="">
<param name="filename" value="audio/s001.mp3"/>
</object>
ps. the reason why IE works is that it ignores the mime-type, and
follows this logic,
- If
the server returns a content-type, IE will remember that.
- However,
IE also runs the beginning of the stream through a 'buffer check' to
verify whether the data actually looks like the content-type being
passed to it. If IE thinks the content-type is invalid, it'll just
ignore it and do whatever else it can to parse the data, including
falling back on the extension of the URL given.
-- http://msdn.microsoft.com/workshop/networking/moniker/overview/appendix_a.asp
.Matthew Cruickshank
http://holloway.co.nz/
|