// JavaScript Document
$f("player", {src: "./flowplayer/flowplayer-3.1.5.swf"}, { 
    clip: { 
        provider: 'mrosary',
		metaData: false,
		live:true,
		autoPlay: true,
		autoBuffering: true,
		url:'mrosary'
	},
    plugins: { 
        lrosary: {
            url:"./flowplayer/flowplayer.rtmp-3.1.3.swf",
			netConnectionUrl:'rtmp://173.160.128.186/lrosary'
 		 },
		 mrosary: {
            url:"./flowplayer/flowplayer.rtmp-3.1.3.swf",
			netConnectionUrl:'rtmp://173.160.128.186/mrosary'
 		 },
		 hrosary: {
            url:"./flowplayer/flowplayer.rtmp-3.1.3.swf",
			netConnectionUrl:'rtmp://173.160.128.186/hrosary'
 		 },
		prerecord: { 
            url: "./flowplayer/flowplayer.rtmp-3.1.3.swf",
			netConnectionUrl:'rtmp://173.160.128.186/rosaryprerecord'
 		 },
		 liveAlert: {
			 url: "./flowplayer/flowplayer.content-3.1.0.swf",
			 display:'none',
			 top:0,
			 right:0,
			 border:0,
			 radius:0,
			 width:75,
			 height:30,
			 backgroundImage:'url(./img/alert.jpg)',
			 onClick: function(){
				 controlPlayer.clip('mrosary','mrosary');
			 }
		 },
		 controls:null
	},
	canvas: { 
    	backgroundColor: '#b6b6b6',
    	backgroundGradient: [0.4, 0.6, 0.4]
	},
	onError: function(errorCode,errorMessage) {
		if(errorCode == '200' || errorCode == '202') {
			controlPlayer.clip('currentRosary','prerecord');
			document.getElementById('qualitySettings').style.visibility = 'hidden';
			//controlPlayer.clip.checkStatus = setInterval(checkLive,10000);
		}
	}
   })