wrote a small website, video playback with video tags, you need to separate the videos (both MP4) and Web files, so the video stream through the background to read the video streaming, on the PC side and Android normal access, but not on the Apple display, but the Apple can play fixed-address video, such as/ Test.mp4, the background code is as follows:
//$name 文件名, $path 文件路径 header("Pragma: public"); header("Expires: 0"); header("Content-Type: application/octet-stream"); //文件mime类型 header("Content-Disposition: attachment; filename=\"".$name."\";" ); header("Content-Length: ".filesize($path)); //文件大小$fsize ob_clean(); flush(); readfile( $path );
The web says that there is no range set in the HTTP protocol, but none of them give an example or a detailed explanation.
Reply content:
wrote a small website, video playback with video tags, you need to separate the videos (both MP4) and Web files, so the video stream through the background to read the video streaming, on the PC side and Android normal access, but not on the Apple display, but the Apple can play fixed-address video, such as/ Test.mp4, the background code is as follows:
//$name 文件名, $path 文件路径 header("Pragma: public"); header("Expires: 0"); header("Content-Type: application/octet-stream"); //文件mime类型 header("Content-Disposition: attachment; filename=\"".$name."\";" ); header("Content-Length: ".filesize($path)); //文件大小$fsize ob_clean(); flush(); readfile( $path );
The web says that there is no range set in the HTTP protocol, but none of them give an example or a detailed explanation.
You can try to change the location of the video file, which may be a problem with the path.