jw player + rtmp + ios/ipad issues

I have been working with a few really great guys trying to come up with a solution, but so far we have none.

I am simply trying to play video’s and live streams from my wowza server across all platforms including the iphone/ipad.

Here is a piece of example code that we are currently trying, yet it does not work. I am hoping someone here may have some further experience to help us figure out where we are going wrong.

We are using Adobe Media Encoder set at .h264 base =3, AAC audio 44.1 at 32kb

<div id="videoframe"></div>

<SCRIPT type="text/javascript">
// Browser-aware video player for JW Player and Wowza
// V0.2 - June 2, 2010
// (c)2010 Ian Beyer
// Released under the GPL

var agent=navigator.userAgent.toLowerCase();
var is_iphone = (agent.indexOf('iphone')!=-1);
var is_ipad = (agent.indexOf('ipad')!=-1);
var is_playstation = (agent.indexOf('playstation')!=-1);
var is_safari = (agent.indexOf('safari')!=-1);
var is_iemobile = (agent.indexOf('iemobile')!=-1);
var is_blackberry = (agent.indexOf('blackberry')!=-1);
var is_android = (agent.indexOf('android')!=-1);
var is_webos = (agent.indexOf('webos')!=-1);

if (is_iphone) { html5Player();}
else if (is_ipad) { html5Player(); }
else if (is_android) { rtspPlayer(); }
else if (is_webos) { rtspPlayer(); }
else if (is_blackberry) { rtspPlayer(); }
else if (is_iemobile) { windowsPlayer(); }
else if (is_playstation) { oldJWPlayer(); }
else { newJWPlayer(); }

function html5Player()
{
var player=document.getElementById("videoframe")
player.innerHTML='<video '+
'HEIGHT="338" '+
'WIDTH="600" '+
'poster="http://website.com/image.jpg" '+
'title="Live Stream">'+
'<source src="http://server-ip:1935/jgm-liverecord/livestream/playlist.m3u8" type="video/mp4"/> '+
'</video>';
}

function rtspPlayer()
{
var player=document.getElementById("videoframe")
player.innerHTML='<A HREF="rtmp://server-ip:1935/jgm-liverecord/livestream">'+
'<IMG SRC="http://website.com/image.jpg" '+
'ALT="Start Mobile Video" '+
'BORDER="0" '+
'HEIGHT="480" '+
'WIDTH="640">'+
'</A>';
}

function windowsPlayer()
{
var player=document.getElementById("videoframe")
player.innerHTML='<A HREF="mms://windows/pubpoint">'+
'<IMG SRC="http://website.com/image.jpg" '+
'ALT="Start Windows Mobile Video" '+
'BORDER="0" '+
'HEIGHT="480" '+
'WIDTH="640">'+
'</A>';
}

function oldJWPlayer()
{
var so = new SWFObject('/jw/player-45.swf','mpl','640','480','8');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('autostart', 'false');
so.addVariable('type', 'rtmp');
so.addVariable('streamer','rtmp://server-ip:1935/jgm-liverecord');
so.addVariable('file','livestream');
so.addVariable('controlbar','over');
so.addVariable('dock','true');
so.write('videoframe');
}

function newJWPlayer()
{
var so = new SWFObject('/jw/player-5-5.swf','mpl','600','338','10');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('autostart', 'false');
so.addVariable('type', 'rtmp');
so.addVariable('streamer','rtmp://server-ip:1935/jgm-liverecord');
so.addVariable('file','livestream');
so.addVariable('controlbar','over');
so.addVariable('dock','true');
so.write('videoframe');
}

</SCRIPT>

**I do not HAVE to use the jw player. Frankly at this point I would take any player/script that works properly.

btw

If this is solved it would make a really great ‘how-to’ article for wowza as what I am trying to do is pretty standard, and so far I can’t find an easy to follow guide.

thank you

Here is another attempt with a different code base, but still no joy in the iphone/ipad.

http://tiltshift.wptumble.com/live-broadcast/

Once again video is created via Adobe Media Encoder .h264 base 3.0 AAC 44.1/32