Why is PHP interfering with my HTML5 MP4 video?

后端 未结 3 1964
梦谈多话
梦谈多话 2021-01-03 08:22

I\'m writing a web app that serves H.264 encoded MP4 video. In Chrome and Safari, it does this via an HTML5 video tag.

In order to control access to these videos, th

3条回答
  •  天命终不由人
    2021-01-03 08:54

    See comments!

    Using readfile is not recommended for streaming video files since it loads the whole file into memory before outputting. This causes serious problems with memory running out.

    Try reading and outputting the file chunk by chunk.

提交回复
热议问题