How PHP outputs MP4 files that can be played directly by Google Browser

Source: Internet
Author: User
If we put a MP4 file directly on the server and then open it in Google Chrome, the browser will watch it online by default.
But often files are not so naked to save, if it is to use PHP to output MP4 files, a long time, the browser will be directly as a file download, and will not try to play online.
At first I thought it was necessary to support the disconnection download, and then change it, and then it is useless, the browser or default directly as a file download.
I wonder if Daniel can solve this problem which has made me headache for a long time.


Reply to discussion (solution)

Write HTML code in PHP script, use HTML5 video tag to solve playback problem

Write HTML code in PHP script, use HTML5 video tag to solve playback problem


I do not want this, if so, then the phone will not be able to play directly.
I've solved this problem, look underneath.

This problem I have solved, 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.