- if participant is already presenter, ignore make presenter request
- stop sharing when sharer clicks logout button git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@2712 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
parent
635d66aabc
commit
ac50037a9b
@ -9,7 +9,7 @@ package org.bigbluebutton.modules.deskShare.events
|
||||
public static const START_MODULE_EVENT:String = "Start Module Event";
|
||||
public var module:IBigBlueButtonModule;
|
||||
|
||||
public function StartModuleEvent(module:IBigBlueButtonModule, bubbles:Boolean=false, cancelable:Boolean=false)
|
||||
public function StartModuleEvent(module:IBigBlueButtonModule, bubbles:Boolean=true, cancelable:Boolean=false)
|
||||
{
|
||||
this.module = module;
|
||||
super(START_MODULE_EVENT, bubbles, cancelable);
|
||||
|
@ -6,7 +6,7 @@ package org.bigbluebutton.modules.deskShare.events
|
||||
{
|
||||
public static const STOP_MODULE_EVENT:String = "Stop Module Event";
|
||||
|
||||
public function StopModuleEvent(bubbles:Boolean=false, cancelable:Boolean=false)
|
||||
public function StopModuleEvent(bubbles:Boolean=true, cancelable:Boolean=false)
|
||||
{
|
||||
super(STOP_MODULE_EVENT, bubbles, cancelable);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package org.bigbluebutton.modules.deskShare.maps
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import org.bigbluebutton.common.IBbbModuleWindow;
|
||||
import org.bigbluebutton.main.events.CloseWindowEvent;
|
||||
import org.bigbluebutton.main.events.MadePresenterEvent;
|
||||
import org.bigbluebutton.main.events.OpenWindowEvent;
|
||||
import org.bigbluebutton.main.events.ToolbarButtonEvent;
|
||||
@ -34,6 +35,7 @@ package org.bigbluebutton.modules.deskShare.maps
|
||||
}
|
||||
|
||||
public function stopModule():void {
|
||||
LogUtil.debug("Deskshare Module stopping");
|
||||
sendStopViewingCommand();
|
||||
service.disconnect();
|
||||
}
|
||||
@ -46,6 +48,7 @@ package org.bigbluebutton.modules.deskShare.maps
|
||||
}
|
||||
|
||||
public function sendStopViewingCommand():void {
|
||||
LogUtil.debug("sendStopViewingCommand()");
|
||||
if (isSharing) {
|
||||
button.enabled = true;
|
||||
service.sendStopViewingNotification();
|
||||
@ -109,6 +112,9 @@ package org.bigbluebutton.modules.deskShare.maps
|
||||
}
|
||||
|
||||
private function resetWindow():void {
|
||||
var event:CloseWindowEvent = new CloseWindowEvent(CloseWindowEvent.CLOSE_WINDOW_EVENT);
|
||||
event.window = window;
|
||||
globalDispatcher.dispatchEvent(event);
|
||||
window = null;
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,8 @@ package org.bigbluebutton.modules.deskShare.services
|
||||
* Sends a notification through the server to all the participants in the room to stop viewing the stream
|
||||
*
|
||||
*/
|
||||
public function sendStopViewingNotification():void{
|
||||
public function sendStopViewingNotification():void{
|
||||
LogUtil.debug("Sending stop viewing notification to other clients.");
|
||||
try{
|
||||
deskSO.send("stopViewing");
|
||||
} catch(e:Error){
|
||||
|
@ -132,6 +132,13 @@
|
||||
dispatchEvent(new Event(ViewersModuleConstants.VIEWER_SELECTED_EVENT));
|
||||
}
|
||||
|
||||
private function assignPresenterClicked():void {
|
||||
// Ignore if the selected user is already the presenter.
|
||||
if (viewersGrid.selectedItem.presenter) return;
|
||||
|
||||
dispatchEvent(new AssignPresenterEvent(viewersGrid.selectedItem.userid, viewersGrid.selectedItem.name));
|
||||
}
|
||||
|
||||
private function playSound(e:ParticipantJoinEvent):void{
|
||||
if (e.join){
|
||||
userJoinSound.end();
|
||||
@ -156,7 +163,8 @@
|
||||
<mx:ControlBar width="100%">
|
||||
<mx:Button id="presentBtn" icon="{presenterIcon}" visible="{isModerator}" enabled="{viewersGrid.selectedItem != null}"
|
||||
width="20" height="20"
|
||||
toolTip="Select web participant to be presenter." click="dispatchEvent(new AssignPresenterEvent(viewersGrid.selectedItem.userid, viewersGrid.selectedItem.name))"/>
|
||||
toolTip="Select web participant to be presenter."
|
||||
click="assignPresenterClicked()"/>
|
||||
<mx:Spacer width="100%"/>
|
||||
<mx:Button id="raiseHandImage" icon="{handIcon}" toggle="true"
|
||||
width="20" height="20"
|
||||
|
Loading…
Reference in New Issue
Block a user