Why will mp4 file not play via an intermediary script on an iPad when it will on all other platforms

Posted on 2014-08-12
Last Modified: 2014-08-18
We have installed video.js and can use it easily (great program) when directly accessing an mp4 file. ie we call the file directly from the javascript code.

In order to introduce security and stop people seeing the location of the file we changed the file location to be a  .asp file which does a look up on an ID to get the file name and location path from the database and then run the video.

This is simple code and works fine on all computers we have tried it on and android devices ... however it will not play on an iPad or iPhone though. If we hit the mp4 directly the iPad plays it, if we hit the file first it will not.

Does anybody have any idea why not? We do not have access to Apple development tools to troubleshoot it.
Question by:Laride
    LVL 82

    Expert Comment

    by:Dave Baldwin
    That sounds like a 'file association' or MIME type problem.  Do you have the ability to return the correct 'Content-Type' header for the MP4s?

    Author Comment

    We are actually using a PHP file.  We are using the following line of code:

    header("Content-Type: video/mp4");

    It is also being set up as a 206 return for partial content so we can seek to a particular point in the file to record where somebody has got to and save their point in the file to database.

    Accepted Solution

    Problem resolved. The headers in the files were not consistent with what APPLE OS is expecting - (I hate APPLE). Running our file through a program called 'Handshake' and ticking the box which 'make it work on APPLE!) solves the issue .... ARGGGHHHH!

    I hope this helps somebody else with the same problem in future. It took us 2 days to find this solution.

    Author Closing Comment

    Solved ourselves.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    There is a security feature on iOS devices that is nearly impenetrable when it has been activated.  This article will provide some possible solutions as well as necessary steps to take to ensure you do not end up with a locked device.
    In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video discusses moving either the default database or any database to a new volume.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now