これは、オーディオをストリーミングするためのバイナリとしてphpファイルを機能させる私のphpコードです
try {
if(file_exists($filePath)) {
header("Content-Transfer-Encoding: binary");
header("Content-Type: audio/mpeg, audio/x-mpeg, audio/x-mpeg-3, audio/mpeg3");
header('Content-length: ' . filesize($filePath));
header('Content-Disposition:attachment; filename="$filePath"');
header('X-Pad: avoid browser bug');
header('Cache-Control: no-cache');
print readfile($filePath);
} else {
throw new Exception("File does not exist");
}
} catch (Exception $e) {
}
Mac Mini では動作しますが、iPad と iPhone では動作しません。ストリーミングでも他のスマートフォンで動作しています。ハンドヘルド デバイスで動作させるために何か追加する必要はありますか?