views:

17

answers:

1

ASP.NET MVC2, framework 3.5

Machine 1: dev box - Win7 Ultimate x64(IIS 7.5), VS2010 Ultimate, Firefox 3.6

Machine 2: dev server - Win server 2003 (IIS 6).

Code on the server is compiled from SVN and deployed to the IIS folders on the server by TeamCity.

The problem is this: I have a page which shows a video using FlowPlayer. I have assigned an error handler like so:

<script language="javascript">

    function playerError(errorCode, errorMessage) {
        window.location = "/videos/unavailable";
    }

    flowplayer("player"
    , "/scripts/flowplayer/flowplayer-3.2.2.swf"
    , {
        onError: playerError
        ,
        clip: { autoPlay: false, autoBuffering: true }
      }
    );
</script>

When the player cannot find the video it's supposed to play, I expect it to call its onError handler, which would then redirect the user to the "Unavailable" page. This works as expected on my dev box. Identical code on the server does not work. I am viewing both in the same browser from the same machine.

This is bizarre. Ideas?

A: 

Turns out that there are several ways to encode movie files. In the MP4s we are using, it appears that a block of meta data containing some attributes that are required to start playing the file can be located at the end of the file, or at the beginning.

For streaming, this must be at the beginning of the file. Otherwise, the player must download the entire file before it can start playing. With a 100MB file this is, obviously, less than ideal.

There are several freeware utilities available that will move this head to the required position for streaming.

Hopefully this will help someone else.

David Lively