I spoke with a tech support representative at Apple, who directed me to HTML Scripting Guide for QuickTime and JavaScript Scripting Guide for QuickTime for documentation.
I was able to solve my problem by turning off zlib.output_compression
in PHP, and supplying the HTTP Content-Length
header. I am not serving the file with a fake extension, but am using audio/x-gsm
as the Content-Type
header. Quicktime appears to be fine with or without the Content-disposition: attachment;...
header. My files now play fine in OSX and Windows.
Worth note is the discussion at https://groups.google.com/forum/?fromgroups=#!topic/iphonewebdev/-5x2QNVCgII, particularly the mention of the source code at http://code.google.com/p/asterisk-voicemail-for-iphone/source/browse/trunk/iphone/i_functions.php#29. It contains one of the best 206 handlers I've seen, and put me on the right path and might be more helpful than doing exactly what worked for me (I didn't need the 206 handling, but you might).
Please find below the portion of the file downloader script which serves the file:
header('Content-Type: audio/x-gsm');
header("Content-disposition: attachment; filename=file.gsm");
ini_set("zlib.output_compression", "Off");
header("Content-Length: ".strlen($file));
echo $file;
exit;