title: Soundmanager2, Safari and PHP streaming error
body: <p>I am using soundmanager2 and I have a problem with Safari.</p>
  
  <p>I am successfully streaming protected files (outside the webroot) from PHP to Soundmanager2, using something like this :</p>
  
  <pre><code>//check if user is logged in and has rights on $file
  //if yes stream file
  
          if (file_exists($file)) { 
              $filepath = $file;
              $filesize = filesize($filepath);
  
              header("Pragma: no-cache");
              header("Expires: 0");
              header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
              header('Content-Disposition: attachment;filename="'.$filename.'"');
              header("Content-Transfer-Encoding: binary");
              header('Content-Type: audio/mpeg');
              header('Content-Length: '.$filesize);
              @readfile($filepath);
              exit(0);
          } 
  </code></pre>
  
  <p>This works fine on Firefox and Chrome, the mp3 files are playing, but in Safari I get : </p>
  
  <pre><code>soundmanager2.js:1190basicMP3Sound0: Using HTML5
  soundmanager2.js:1190basicMP3Sound0: play(): Attempting to load
  soundmanager2.js:1190basicMP3Sound0: load (/privateaccess/index/1415)
  soundmanager2.js:1190basicMP3Sound0: waiting
  soundmanager2.js:1190basicMP3Sound0: loadstart
  soundmanager2.js:1190basicMP3Sound0: loadedmetadata
  soundmanager2.js:1190basicMP3Sound0: HTML5 error, code 3
  soundmanager2.js:1188basicMP3Sound0: Failed to load / invalid sound? Zero-length duration reported. (/privateaccess/index/1415)
  </code></pre>
  
  <p>I only get this error when I stream a file from PHP, it's working with files that are in the webroot (delivered by apache instead of PHP).</p>
  
  <p>If I hit www.myurl.com/privateaccess/index/1415 directly, the file is downloaded, so it really seems like an issue between Safari,Soundmanager2 and PHP file streaming.</p>
  
  <p>Anyone? an idea to fix/workaround this?</p>