Single PHP “exit;” statement prevents HTML5 video in Safari

前端 未结 3 1152
独厮守ぢ
独厮守ぢ 2021-01-19 09:16

Bizarre bug: in a PHP script that serves video files, I have a few test conditions (authenticate token, make sure file exists, etc.) before sending a \"video/mp4\" header an

3条回答
  •  有刺的猬
    2021-01-19 10:09

    Without the video/mp4 header, the server will send the default content type header, usually text/html, some browser may look at what's being served and ignore the MIME type.

    Add error_reporting(E_ALL);to the beginning of the script, and use firebug or similar to examine the headers being sent.

提交回复
热议问题