MP4 plays when accessed directly, but not when read through PHP, on iOS

前端 未结 6 1812
花落未央
花落未央 2020-12-03 00:01

I use a PHP script to validate video requests before serving them. This script works as expected on the desktop, with Safari and Chrome. But on iOS, I get a broken play bu

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 00:10

    I had problem with that code.

    Fix:

     set_time_limit(0); // Reset time limit for big files
    
     ob_clean(); //added
    
     echo fread($fp, $buffer);
     flush(); // Free up memory. Otherwise large files will trigger PHP's memory limit.
    

提交回复
热议问题