- make sure we are connected first before vieweing deskshare stream

This commit is contained in:
Richard Alam 2015-07-24 19:59:54 +00:00
parent 7ee48e9397
commit 6a1a7e796a
2 changed files with 11 additions and 7 deletions

View File

@ -248,7 +248,6 @@ package org.bigbluebutton.modules.deskshare.services.red5
break; break;
case "NetConnection.Connect.NetworkChange": case "NetConnection.Connect.NetworkChange":
LogUtil.info("Detected network change. User might be on a wireless and temporarily dropped connection. Doing nothing. Just making a note.");
trace(LOG + "Detected network change. User might be on a wireless and temporarily dropped connection. Doing nothing. Just making a note."); trace(LOG + "Detected network change. User might be on a wireless and temporarily dropped connection. Doing nothing. Just making a note.");
break; break;
@ -334,12 +333,15 @@ package org.bigbluebutton.modules.deskshare.services.red5
*/ */
public function appletStarted(videoWidth:Number, videoHeight:Number):void{ public function appletStarted(videoWidth:Number, videoHeight:Number):void{
trace(LOG + "Got applet started"); trace(LOG + "Got applet started");
if (nc != null && nc.connected) {
var event:AppletStartedEvent = new AppletStartedEvent(); var event:AppletStartedEvent = new AppletStartedEvent();
event.videoWidth = videoWidth; event.videoWidth = videoWidth;
event.videoHeight = videoHeight; event.videoHeight = videoHeight;
dispatcher.dispatchEvent(event); dispatcher.dispatchEvent(event);
} }
}
/** /**
* Call this method to send out a room-wide notification to start viewing the stream * Call this method to send out a room-wide notification to start viewing the stream
* *

View File

@ -242,6 +242,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
} }
private function onAppletStart(event:AppletStartedEvent):void{ private function onAppletStart(event:AppletStartedEvent):void{
if (!connection.connected) return;
trace("DeskShareWindow::onAppletStart"); trace("DeskShareWindow::onAppletStart");
startPreviewStream(connection, room, event.videoWidth, event.videoHeight); startPreviewStream(connection, room, event.videoWidth, event.videoHeight);
var streamEvent:StreamEvent = new StreamEvent(StreamEvent.START); var streamEvent:StreamEvent = new StreamEvent(StreamEvent.START);