Add pause sharing client event.
This commit is contained in:
parent
83c77f5746
commit
9cfbc77699
@ -0,0 +1,17 @@
|
||||
package org.bigbluebutton.modules.screenshare.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class RequestToPauseSharing extends Event
|
||||
{
|
||||
|
||||
public static const REQUEST_SHARE_PAUSE:String = "screenshare request to pause sharing event";
|
||||
|
||||
public function RequestToPauseSharing()
|
||||
{
|
||||
super(REQUEST_SHARE_PAUSE, true, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -147,6 +147,10 @@ package org.bigbluebutton.modules.screenshare.managers {
|
||||
service.requestStartSharing();
|
||||
}
|
||||
|
||||
public function handleRequestPauseSharingEvent():void {
|
||||
service.requestPauseSharing(ScreenshareModel.getInstance().streamId);
|
||||
}
|
||||
|
||||
public function handleRequestStopSharingEvent():void {
|
||||
service.requestStopSharing(ScreenshareModel.getInstance().streamId);
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.modules.screenshare.events.ModuleEvent;
|
||||
import org.bigbluebutton.modules.screenshare.events.RequestToStartSharing;
|
||||
import org.bigbluebutton.modules.screenshare.events.RequestToStopSharing;
|
||||
import org.bigbluebutton.modules.screenshare.events.RequestToPauseSharing;
|
||||
import org.bigbluebutton.modules.screenshare.events.ShareEvent;
|
||||
import org.bigbluebutton.modules.screenshare.events.ShareStartRequestResponseEvent;
|
||||
import org.bigbluebutton.modules.screenshare.events.ShareWindowEvent;
|
||||
@ -64,6 +65,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<MethodInvoker generator="{ScreenshareManager}" method="handleRequestStartSharingEvent"/>
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{RequestToPauseSharing.REQUEST_SHARE_PAUSE}">
|
||||
<MethodInvoker generator="{ScreenshareManager}" method="handleRequestPauseSharingEvent"/>
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{RequestToStopSharing.REQUEST_SHARE_STOP}">
|
||||
<MethodInvoker generator="{ScreenshareManager}" method="handleRequestStopSharingEvent"/>
|
||||
</EventHandlers>
|
||||
|
@ -42,6 +42,10 @@ package org.bigbluebutton.modules.screenshare.services
|
||||
conn.stopShareRequest(meetingId, streamId);
|
||||
}
|
||||
|
||||
public function pauseShareRequest(meetingId: String, userId: String, streamId: String):void {
|
||||
conn.pauseShareRequest(meetingId, userId, streamId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -88,6 +88,10 @@ package org.bigbluebutton.modules.screenshare.services {
|
||||
sender.stopShareRequest(UsersUtil.getInternalMeetingID(), streamId);
|
||||
}
|
||||
|
||||
public function requestPauseSharing(streamId:String):void {
|
||||
sender.pauseShareRequest(UsersUtil.getInternalMeetingID(), UsersUtil.getMyUserID(), streamId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -179,6 +179,19 @@ package org.bigbluebutton.modules.screenshare.services.red5 {
|
||||
}
|
||||
}
|
||||
|
||||
public function pauseShareRequest(meetingId:String, userId:String, streamId:String):void {
|
||||
var message:Object = new Object();
|
||||
message["meetingId"] = meetingId;
|
||||
message["userId"] = userId;
|
||||
message["streamId"] = streamId;
|
||||
|
||||
sendMessage("screenshare.pauseShareRequest", function(result:String):void { // On successful result
|
||||
LOGGER.debug(result);
|
||||
}, function(status:String):void { // status - On error occurred
|
||||
LOGGER.error(status);
|
||||
}, message);
|
||||
}
|
||||
|
||||
public function startShareRequest(meetingId:String, userId:String, record:Boolean):void {
|
||||
var message:Object = new Object();
|
||||
message["meetingId"] = meetingId;
|
||||
|
@ -55,6 +55,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||
import org.bigbluebutton.main.views.MainCanvas;
|
||||
import org.bigbluebutton.modules.screenshare.events.RequestToStopSharing;
|
||||
import org.bigbluebutton.modules.screenshare.events.RequestToPauseSharing;
|
||||
import org.bigbluebutton.modules.screenshare.events.ShareWindowEvent;
|
||||
import org.bigbluebutton.modules.screenshare.events.StartShareRequestSuccessEvent;
|
||||
import org.bigbluebutton.modules.screenshare.events.StopSharingButtonEvent;
|
||||
@ -199,6 +200,17 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
closeWindow();
|
||||
}
|
||||
|
||||
public function pauseSharing():void {
|
||||
LOGGER.debug("Calling pauseSharing");
|
||||
if (streaming) {
|
||||
stopStream();
|
||||
var streamEvent:RequestToPauseSharing = new RequestToPauseSharing();
|
||||
dispatchEvent(streamEvent);
|
||||
}
|
||||
sharingFullScreen = false;
|
||||
streaming = false;
|
||||
}
|
||||
|
||||
public function stopSharingEvent(evt:StopSharingButtonEvent):void{
|
||||
if (streaming) {
|
||||
stopStream();
|
||||
@ -407,7 +419,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
label="{ResourceUtil.getInstance().getString('bbb.screensharePublish.stop.label')}"
|
||||
visible="true"
|
||||
enabled="false"
|
||||
click="stopSharing()"
|
||||
click="pauseSharing()"
|
||||
tabIndex="{baseIndex+5}"/>
|
||||
<mx:Spacer width="100%"/>
|
||||
<mx:Button id="btnRegionPublish"
|
||||
|
Loading…
Reference in New Issue
Block a user