Forum Moderators: travelin cat
test.asp?file_id=123456
In the ASP file, I'm setting the "Content-Type" to "audio/mpeg" (I've also tried audio/mp3 & audio/x-mpeg), adding a "Content-disposition" header that says "filename=C:\mydirectory\audio\filename.mp3"
This works fine (on a PC) with IE 6, Opera 7.54, even Netscape 6.2. The only problems I'm having, are with a Mac (OS 9), using IE 5.2 & Safari.
This is what happens: QuickTime recognizes that an audio file needs to be played, even calculates the file size (3.6mb -- the test file I'm using). But when it tries to stream, it lists "test.asp" as the title of the object it's streaming, and no sound comes out. I have another version of streaming, using an m3u file, and it works perfectly everywhere. It's just when I try to do the "test.asp?file_id=123456" it doesn't work... Is there a trick to a Mac browser that I'm missing?
One thing though: Could you clarify what browsers you're using that give the error? You mention OS 9 and Safari, but Safari doesn't run under OS 9.
Can you post an example of what you are describing? I'm confused by your statement because only one Content-Type can be declared for a page.
Yes and no. If your movie appears on a Web page, then the (asp-generated) web page and the (possibly asp-generated) movie each would have its own headers, including content-type.
But in any case, it looks like Span caught the bug: you're streaming video, not audio, and the header should reflect that.
adding a "Content-disposition" header that says "filename=C:\mydirectory\audio\filename.mp3"
That's not supposed be the path on your server, but rather the name of the file the end user gets. So use "filename=filename.mp3" instead.
The way you had it would try to create a *file* called "C:\mydirectory\audio\filename.mp3" but the colon is an illegal character in Mac file names. I would avoid colons (:) and forward slashes (/) in file names.