I need to serve mp4 files to iPads through a PHP script for authentication reasons. I am using the rangeDownload function found here. The script is embedded like this:
It works, kinda.. the issues I'm having are:
<video width="640" height="480" controls="true">
<source src="download.php?id=123" type="video/mp4" />
1) Consistency: sometimes I get a black box with a play button, and sometimes the video starts to load automatically.
2) Buffer issues: If the video catches up to the buffer, it stops the download, or just continues on without playing or downloading the video. It looks like when this happens, it repeatedly requests the next byte range, but doesn't wait for it, it just asks for the next range over and over.
3) 'Server configuration' errors: Sometimes I just get a dialog box saying the server isn't configured properly.
(PHP on IIS 6, BTW, but I get issues 1&2 on my Apache/Mac install too)
Does anyone have experience with this or have other ideas how to address these issues? I am posting this to an Apple/iPad forum too, but thought someone here might know something. Thanks.