MP4 video delivery via PHP fails in Google Chrome
===

I'm currently trying to deliver MP4 video for use in HTML5 video (using video-js) via a PHP script for controlling video access. After some research I was able to get this working, with the help of the [stackoverflow article found here][1]. If I navigate to the PHP script, I can view the video as if I were viewing it via its absolute path (for instance localhost/myvideo.mp4 rather than localhost/myscript.php) in Firefox, Safari and IE. My problem is with Google Chrome, which simply shows a blacked out screen with a small media player in the centre, and does nothing. 

I did try using a quick rewrite such as localhost/avideo.mp4 which routes to the PHP script, but unfortunately this didn't change anything.

Here's my script:

        if (is_file($uri)) {
            header('Content-Type: video/mp4');
            if (isset($_SERVER['HTTP_RANGE'])) {
                $this->rangeDownload($uri);
                die();
                exit;
            } else {
                header("Content-Length: " . filesize($uri));
                $this->readfile_chunked($uri);
                die();
                exit;
            }
        } else {
            //error
        }

The rangeDownload method has been taken directly from appendix A of http://mobiforge.com/developing/story/content-delivery-mobile-devices as suggested in the aforementioned stackoverflow article.

Thanks

  [1]: http://stackoverflow.com/questions/5924061/using-php-to-output-an-mp4-video