Fixes issue with second window after ext installation

This commit is contained in:
perroned 2017-02-09 19:35:09 +00:00
parent 0c64b0e0dc
commit 92026952e5

View File

@ -82,12 +82,21 @@ package org.bigbluebutton.modules.screenshare.managers
var event:CloseWindowEvent = new CloseWindowEvent(CloseWindowEvent.CLOSE_WINDOW_EVENT);
event.window = window;
globalDispatcher.dispatchEvent(event);
shareWindow = null;
}
public function startViewing(rtmp:String, videoWidth:Number, videoHeight:Number):void{
shareWindow = new WebRTCDesktopPublishWindow();
shareWindow.visible = true;
openWindow(shareWindow);
/* re use window object that is used to display installaion instructions */
/* the window is first created for the instructions prompting the user to
install the extension. this way after the extension is installed and the user
retries when the video stream comes in it re uses the window element instead of
making a second window and preventing the first from being removed */
if (shareWindow == null) {
shareWindow = new WebRTCDesktopPublishWindow();
shareWindow.visible = true;
openWindow(shareWindow);
}
shareWindow.startVideo(rtmp, videoWidth, videoHeight);
}
}