 		}
 		private function listenToMp4(active:Boolean):void {
 			if(active) {
-                myMp4Player.addEventListener(JplayerEvent.DEBUG_MSG, jPlayerFlashEvent);
+                if (debug) {
+                    myMp4Player.addEventListener(JplayerEvent.DEBUG_MSG, jPlayerFlashEvent);
+                }
 
 				myMp4Player.addEventListener(JplayerEvent.JPLAYER_ERROR, jPlayerFlashEvent);
 				myMp4Player.addEventListener(JplayerEvent.JPLAYER_PROGRESS, jPlayerFlashEvent);


				myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_LOADEDMETADATA, jPlayerMetaDataHandler); // Note the unique handler
			} else {
                myRtmpPlayer.removeEventListener(JplayerEvent.DEBUG_MSG, jPlayerFlashEvent);

				myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_ERROR, jPlayerFlashEvent);
				myRtmpPlayer.removeEventListener(JplayerEvent.JPLAYER_PROGRESS, jPlayerFlashEvent);


		private function listenToRtmp(active:Boolean):void {
			if(active) {
                if (debug) {
                    myRtmpPlayer.addEventListener(JplayerEvent.DEBUG_MSG, jPlayerFlashEvent);
                }

				myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_ERROR, jPlayerFlashEvent);
				myRtmpPlayer.addEventListener(JplayerEvent.JPLAYER_PROGRESS, jPlayerFlashEvent);
