I just recently downloaded Wowza Trial and have been trying to get it setup for a Live Stream from a rtsp camera feed. I have it working for RTMP with JWPlayer just fine. I cannot for the life of me get it to work for IOS or Android. Currently I have the stream setup to use all of the available client. I also have it setup to Transcode in order to put in a watermark and have multiple resolutions for variable bit-rates. Currently I have it working on RTMP on 720p with the watermark. For my Iphone, I get a white page with a play button, but when I hit play it does nothing at all. For the Android I have here, RTSP won’t work because it is on the newest OS, so I am also using the APPLE way for that. I get the same thing, a black screen with a play button that you can press but wont actually play anything. I am also trying to have some code that will recognize what device is being used (copied, pasted, edited). When I use this page it seems to work fine with selecting which player to use and works for the PC, but not for mobile devices. Here is the html code:
<HTML>
<HEAD>
<TITLE>Player</TITLE>
<script type="text/javascript" src="http://wowza.jcwifi.com:8080/jwplayer/jwplayer.js"></script>
<script type="text/javascript">
jwplayer.defaults = { "ph": 2 };
</script>
</HEAD>
<BODY STYLE="margin: 0px; background-color: white">
<div id="videoframe"></div>
<SCRIPT type="text/javascript">
// Browser-aware video player for JW Player and Wowza
// V0.3 - May 19, 2014
// (c)2014 Ian Beyer
// Released under the GPL
var container='videoframe';
var width="100%";
var aspect="16:9";
//This section calculates actual sizes for player when using non-responsive elements.
var multiplier=aspect.split(":");
var fixedwidth = Math.floor(window.innerWidth*width.split("%")[0]/100);
var fixedheight = Math.floor(window.innerWidth*multiplier[1]/multiplier[0]*width.split("%")[0]/100);
console.log ('Size: '+width+', '+aspect+' ('+fixedwidth+' x '+fixedheight+')');
var streamserver='wowza.jcwifi.com';
var streamport='1935';
var streamapp='live';
var streamname='LCF.stream_720p';
var streambase=streamserver+':'+streamport+'/'+streamapp+'/_definst_/'+streamname;
var cupertinourl='http://wowza.jcwifi.com:1935/live/ngrp:LCF.stream_all/playlist.m3u8';
var sanjoseurl='http://wowza.jcwifi.com:1935/live/ngrp:LCF.stream_all/Manifest.f4m';
var smoothurl='http://wowza.jcwifi.com:1935/live/ngrp:LCF.stream_all/Manifest';
var dashurl='http://wowza.jcwifi.com:1935/live/ngrp:LCF.stream_all/manifest.mpd';
var rtmpurl='rtmp://'+streambase;
var rtspurl='rtsp://'+streambase;
var agent=navigator.userAgent.toLowerCase();
var is_iphone = (agent.indexOf('iphone')!=-1);
var is_ipad = (agent.indexOf('ipad')!=-1);
var is_ipod = (agent.indexOf('ipod')!=-1);
var is_safari = (agent.indexOf('safari')!=-1);
var is_iemobile = (agent.indexOf('iemobile')!=-1);
var is_blackberry = (agent.indexOf('blackberry')!=-1);
var is_android1= (agent.indexOf('android\ 1')!=-1);
var is_android2= (agent.indexOf('android\ 2')!=-1);
var is_android3= (agent.indexOf('android\ 3')!=-1);
var is_android4 = (agent.indexOf('android\ 4')!=-1);
var is_android5 = (agent.indexOf('android\ 5')!=-1);
var is_chrome = (agent.indexOf('chrome')!=-1);
if (is_iphone) { iosPlayer(); }
else if (is_ipad) { iosPlayer(); }
else if (is_ipod) { iosPlayer(); }
else if (is_android1) { rtspPlayer(); }
else if (is_android2) { rtspPlayer(); }
else if (is_android4) { a4Player(); }
else if (is_android5) { a4Player(); }
else if (is_blackberry) { rtspPlayer(); }
else if (is_iemobile) { rtspPlayer(); }
else { flashPlayer(); }
function iosPlayer()
{
var player=document.getElementById(container)
player.innerHTML='<VIDEO '+
' SRC="'+cupertinourl+'"'+
' HEIGHT="'+fixedheight+'"'+
' WIDTH="'+fixedwidth+'"'+
' poster="poster.png"'+
' title="Live Stream"'+
' CONTROLS>'+
'</video>';
}
function windowsPlayer()
{
// Need to add code here for silverlight player in Windows Phone to support the 12 users that actually have one. Until then use rtspPlayer();
}
function a4Player()
{
var player=document.getElementById(container)
player.innerHTML='<A HREF="'+cupertinourl+'">'+
'<IMG SRC="player.png" '+
'ALT="Start Mobile Video" '+
'BORDER="1" '+
'WIDTH="'+width+'">'+
'</A>';
}
function dashPlayer()
{
// Reserved for future use
}
function rtspPlayer()
{
var player=document.getElementById(container)
player.innerHTML='<A HREF="'+rtspurl+'">'+
'<IMG SRC="player.png" '+
'ALT="Start Mobile Video" '+
'BORDER="0" '+
'WIDTH="'+width+'">'+
'</A>';
}
function flashPlayer()
{
//If using JW6 Premium or Enterprise, you can also use the cupertinourl here.
jwplayer(container).setup({
width: width,
aspectratio: aspect,
file: rtmpurl,
autostart: true
});
}
</SCRIPT>
</BODY>
</HTML>