function silentHandler() { return false}
window.onerror = silentHandler;
$(function() {
// setup scrolling for the playlist elements
});
function loadClipById(clipID, conn){
var clips = new Array();
var clipdesc = new Array();
var clipUrl = "";
clips[0] = "princesstreet.stream";
clipdesc[0] = "Edinburgh City Centre HD Streaming Edinburgh Webcam";
clips[1] = "rosestreet.stream";
clipdesc[1] = "Edinburgh Rose Street Streaming People Watching Webcam Edinburgh Scotland";
clips[2] = "edinburgh100936.stream";
clipdesc[2] = "Live Edinburgh Royal Mile People Watching Streaming Video Audio Webcam";
clips[3] = "trafalgarsq.stream";
clipdesc[3] = "Live London Streaming Trafalgar Square Webcam";
clips[4] = "chinatown2.stream";
clipdesc[4] = "London Web Cam Chinatown Live Streaming Video London Webcam";
//clips[0] = "camvista";
//clipdesc[0] = "Live HD London River Thames Video Streaming Camera";
//clips[1] = "trafalgarsq";
//clipdesc[1] = "London streaming webcam overlooking London's Trafalgar Square";
//clips[2] = "chinatown2";
//clipdesc[2] = "London Chinatown Live Streaming HD webcam";
//clips[3] = "victoria";
//clipdesc[3] = "Pitlochry Town Centre Live Streaming Webcam";
//clips[4] = "belushis";
//clipdesc[4] = "Belushis Bar streaming webcam";
//clips[4] = "cheekymonkeys";
//clipdesc[4] = "Cheeky Monkeys Bar and Diner in Byron Bay";
var clipUrl = clips[clipID];
clipTxt = clipdesc[clipID];
//playerdesc = clipTxt;
$('#playerdesc').html(clipTxt);
//alert(clipID+" : "+clips.length);
if(clipID < clips.length - 1)
clipID++;
else clipID = 0;
var isiPad = navigator.userAgent.match(/iPad/i) != null;
var ua = navigator.userAgent;
//alert(ua);
var isiPad = /iPad/i.test(ua) || /iPhone/i.test(ua);
var isAndroid = /Android/i.test(ua);
var matches = clipUrl.match(/mp4/g);
var sva= 'streaming2.camvista.com';
if(!matches){
htmllabel = "Live";
bg = "#90c800";
//clipUrl += ".stream";
}
else {
htmllabel = "Archive";
bg = "#fd5f00";
}
var svpr = 'rtmp';
var svpo = '1935';
var sk = 'doPlay';
switch(conn){
case 1:
connection = 'rtplive';
break;
case 2:
connection = 'vod';
break;
case 3:
connection = 'usercams';
sva= 'streaming.camvista.com';
break;
case 4:
connection = 'usercams';
sva= 'server1.txt9.com';
break;
}
var skv = 'AhZaex6icamvista2004';
if(isiPad){
iPadHtml = '
Buffering ...
';
$('#player').html(iPadHtml);
iPadHtml = '';
iPadHtml += '
';
setTimeout("$('#player').html(iPadHtml)", 15000);
//alert("PUBLISHING_SERVER_HTTP/playlist.m3u8");
}else
if(isAndroid){
AndroidHtml = 'Buffering ...
';
$('#player').html(AndroidHtml);
AndroidHtml = '';
AndroidHtml += '

';
//alert(AndroidHtml);
setTimeout("$('#player').html(AndroidHtml)", 5000);
}else{
flowplayer("player", "/player/flowplayer-3.2.5.swf", {
clip: {
url: clipUrl,
live: true,
bufferLength: 3,
autoPlay: true,
// configure clip to use influxis as our provider, it uses our rtmp plugin
provider: 'influxis'
},
plugins: {
controls: null,
// here is our rtpm plugin configuration
influxis: {
url: '/player/flowplayer.rtmp-3.2.3.swf',
// netConnectionUrl defines where the streams are found
netConnectionUrl: svpr+'://'+sva+':'+svpo+'/'+connection+'?'+sk+'='+skv
},
content: {
// location of the plugin
url: '/player/flowplayer.content-3.2.0.swf',
stylesheet: '/css/video-overlay.css',
// display properties
top: 20,
width: 55,
left: 20,
height: 27,
backgroundColor: bg,
border:'1px solid #FFFFFF',
// styling properties
borderRadius: 0,
html: htmllabel,
opacity: 0.9,
style: {
body: {
fontSize: 12,
fontFamily: 'Arial',
textAlign: 'center',
color: '#ffffff'
}
}
}
},
logo: {
url: '/images/logo.png',
fullscreenOnly: false,
opacity: 0.7
},
key: '#$ff774653725c88d7ec8'
}).ipad();
}
setTimeout("reloadClipId("+clipID+")", 30*1000);
}
function loadClip(clipUrl,conn,playStatus){
//alert(clipID+" : "+clips.length);
//alert(clipUrl+''+conn);
var clipShortUrl = clipUrl;
var isiPad = navigator.userAgent.match(/iPad/i) != null;
var ua = navigator.userAgent;
//alert(ua);
var isiPad = /iPad/i.test(ua) || /iPhone/i.test(ua);
var isAndroid = /Android/i.test(ua);
var matches = clipUrl.match(/mp4/g);
var sva= 'streaming2.camvista.com';
if(!matches && conn!=3 && conn!=4){
htmllabel = "Live";
bg = "#90c800";
clipUrl += ".stream";
}else
if(conn==3){
htmllabel = "Live";
bg = "#CC0000";
}else
if(conn==4){
htmllabel = "Live";
bg = "#90c800";
}else {
htmllabel = "Archive";
bg = "#fd5f00";
}
var svpr = 'rtmp';
var svpo = '1935';
var sk = 'doPlay';
switch(conn){
case 1:
connection = 'rtplive';
break;
case 2:
connection = 'vod';
break;
case 3:
connection = 'usercams';
sva= 'streaming.camvista.com';
break;
case 4:
connection = 'usercams';
sva= 'server1.txt9.com';
break;
}
var skv = 'AhZaex6icamvista2004';
if(isiPad){
iPadHtml = 'Buffering ...
';
$('#player').html(iPadHtml);
iPadHtml = '';
iPadHtml += '';
//setTimeout("$('#player').html(iPadHtml)", 15000);
$('#player').html(iPadHtml);
//alert("PUBLISHING_SERVER_HTTP/playlist.m3u8");
}else
if(isAndroid){
//AndroidHtml = 'Buffering ...
';
//$('#player').html(AndroidHtml);
AndroidHtml = '';
AndroidHtml += '

';
//alert(AndroidHtml);
$('#player').html(AndroidHtml);
//setTimeout("$('#player').html(AndroidHtml)", 5000);
}else{
flowplayer("player", "/player/flowplayer-3.2.5.swf", {
clip: {
url: clipUrl,
live: true,
bufferLength: 3,
autoPlay: playStatus,
// configure clip to use influxis as our provider, it uses our rtmp plugin
provider: 'influxis'
},
plugins: {
controls: {
all: false,
fullscreen: true,
volume: true,
mute: true,
autoHide: true,
backgroundColor: '#333333',
opacity: 0.55,
tooltips: {
buttons: true,
fullscreen: 'Enter fullscreen mode'
}
},
// here is our rtpm plugin configuration
influxis: {
url: '/player/flowplayer.rtmp-3.2.3.swf',
// netConnectionUrl defines where the streams are found
netConnectionUrl: svpr+'://'+sva+':'+svpo+'/'+connection+'?'+sk+'='+skv
},
content: {
// location of the plugin
url: '/player/flowplayer.content-3.2.0.swf',
stylesheet: '/css/video-overlay.css',
// display properties
top: 20,
width: 55,
left: 20,
height: 27,
backgroundColor: bg,
border:'1px solid #FFFFFF',
// styling properties
borderRadius: 0,
html: htmllabel,
opacity: 0.9,
style: {
body: {
fontSize: 12,
fontFamily: 'Arial',
textAlign: 'center',
color: '#ffffff'
}
}
}
},
logo: {
url: '/images/logo.png',
fullscreenOnly: false,
opacity: 0.7
},
key: '#$ff774653725c88d7ec8'
}).ipad();
}
//alert(clipUrl);
setTimeout("reloadClipByUrl('"+clipShortUrl+"')", 15*60*1000);
}
function reloadClipByUrl(clipUrl){
//alert(clipUrl);
loadClip(clipUrl,1,false);
}
function reloadClipId(clipID, conn){
//alert(clipID);
loadClipById(clipID,conn);
}