How does php output mp4 files that can be directly played by google? if we put an MP4 file on the server and open it in google, the browser will watch the mp4 file online by default.
However, files are often not stored so naked. if you use php to output mp4 files for a long time, the browser will directly download them as files instead of playing them online.
At first, I thought it was necessary to support disconnected download, and then changed it. later it was useless. the browser still directly downloads the file as a default.
I don't know if Daniel can solve this problem that has caused me a long headache ..
Reply to discussion (solution)
Write html code in a php script and use the html5 video tag to solve the playback problem.
Write html code in a php script and use the html5 video tag to solve the playback problem.
I don't want to do this. if so, the phone won't be able to play it directly.
I have solved this problem. refer to the following:
The code is as follows: