Forums

/

Pseudostreaming and html5 for the Iphone problem

3 replies [Last post]

Hello, I have an IIS 5 server with the pseudostreaming module from codeshop (mod_h264_streaming.dll v2.2.7) that works with the JW Player. I am using JWPlayer v5.4 with the provider: "http" correctly set and I am able to stream h264 files successfully to all clients that have the flash player installed. These clients have the ability to seek to non-downloaded parts. So far, everything works perfectly.

Now comes the Iphone and I have tried to support the Iphone using HTML5 following your recipy but I have a problem. The Iphone refuses to play the MP4 files if it has gone through the pseudostreaming module (error displayed on the Iphone: "the server not configured correctly"). Why ? Can somepone explain this ? If I disable the pseudostreaming module then the Iphone can download the mp4 files but the flash clients lose the ability to seek to non-downloaded parts.

I came to the conclusion that I need different Mp4 files server to serve the two purposes (am I wrong ? alternate suggestions welcome! ). A plain MP4 download for the Iphone and a pseudostreaming server for the flash clients. But then I am failing to have a script that allows to have different URL for the video because the JWplayer.js library always replace the source "scr" in the <video> tag with the "file" found in the setup script.

Any help would be appreciated. Albert.

Here is an example of an MP4 URL which supports seudostreaming but cannot be played on the Iphone: http://home.paceweb.org/slaves/html5/v.mp4

and below the html sample code for the client where the iphone-version.mp4 url get replaced by the pseudo streaming URL:

<video  src="/uploads/iphone-version.mp4"    
   id="container"
   poster="/uploads/image.jpg" >
</video>
 
<script type="text/javascript">
jwplayer("container").setup({
     file: "/uploads/ pseudostreaming-version.mp4.mp4",
      flashplayer: "/jwplayer/player.swf"
});
</script>

This is because iPhones (aka HTML5) do not support pseudo-streaming like this, you will have to use progressive download.

More information - http://www.longtailvideo.com/support/blog/15095/jw-player-53-html5-and-you

Yes, thanks for the answer.

I was already aware of the document you mentioned and my problem was exactly how to mix pseudo-streaming and progressive download from the same server.

Actually I have been able to solve my problem with the following script, which I hope can help others:

<script type="text/javascript">
jwplayer("container").setup({
controlbar: "bottom",
                file: "/pseudostreaming/video.mp4",
                provider: "http",                          
flashplayer: "/jwplayer/player.swf",
                events:
                {
                        onReady: function()
                        {
                           if (this.container.tagName.toLowerCase() == "object")
                           {
                              // Flash case
                              this.load({
                                   file: "/pseudostreaming/video.mp4", provider: "http"
                              });
                           }
                           else
                           {
                              // HTML5 case
                              this.load({
                                   file: "/progressivedownload/video.m3u8"
                              });
                           }
                           //this.play();
                        }
                }
});
</script>

Thanks, that will definitely help others!