How does php output mp4 files that can be directly played by google browsers?

Source: Internet
Author: User
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:

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.