Added EndAllBreakoutRoomsRequest broadcast from client to bigbluebutton-apps.
This commit is contained in:
parent
2914e9105d
commit
8b1f0d4bae
@ -0,0 +1,41 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2015 BigBlueButton Inc. and by respective authors (see below).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along
|
||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.messages;
|
||||
|
||||
import org.bigbluebutton.common.messages.IBigBlueButtonMessage;
|
||||
import org.bigbluebutton.messages.payload.EndAllBreakoutRoomsRequestPayload;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
public class EndAllBreakoutRoomsRequest implements IBigBlueButtonMessage {
|
||||
public final static String NAME = "EndAllBreakoutRoomsRequest";
|
||||
|
||||
public final Header header;
|
||||
public final EndAllBreakoutRoomsRequestPayload payload;
|
||||
|
||||
public EndAllBreakoutRoomsRequest(EndAllBreakoutRoomsRequestPayload payload) {
|
||||
this.header = new Header(NAME);
|
||||
this.payload = payload;
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
Gson gson = new Gson();
|
||||
return gson.toJson(this);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2015 BigBlueButton Inc. and by respective authors (see below).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along
|
||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.messages.payload;
|
||||
|
||||
public class EndAllBreakoutRoomsRequestPayload {
|
||||
public final String meetingId;
|
||||
|
||||
public EndAllBreakoutRoomsRequestPayload(String meetingId) {
|
||||
this.meetingId = meetingId;
|
||||
}
|
||||
}
|
@ -4,7 +4,9 @@ import java.util.Map;
|
||||
|
||||
import org.bigbluebutton.common.messages.*;
|
||||
import org.bigbluebutton.messages.CreateBreakoutRoomsRequest;
|
||||
import org.bigbluebutton.messages.EndAllBreakoutRoomsRequest;
|
||||
import org.bigbluebutton.messages.payload.CreateBreakoutRoomsRequestPayload;
|
||||
import org.bigbluebutton.messages.payload.EndAllBreakoutRoomsRequestPayload;
|
||||
import org.bigbluebutton.red5.pubsub.redis.MessageSender;
|
||||
|
||||
public class MessagePublisher {
|
||||
@ -271,9 +273,14 @@ public class MessagePublisher {
|
||||
LockLayoutRequestMessage msg = new LockLayoutRequestMessage(meetingID, setById, lock, viewersOnly, layout);
|
||||
sender.send(MessagingConstants.TO_USERS_CHANNEL, msg.toJson());
|
||||
}
|
||||
|
||||
public void createBreakoutRooms(CreateBreakoutRoomsRequestPayload playload) {
|
||||
CreateBreakoutRoomsRequest msg = new CreateBreakoutRoomsRequest(playload);
|
||||
|
||||
public void createBreakoutRooms(CreateBreakoutRoomsRequestPayload payload) {
|
||||
CreateBreakoutRoomsRequest msg = new CreateBreakoutRoomsRequest(payload);
|
||||
sender.send(MessagingConstants.TO_USERS_CHANNEL, msg.toJson());
|
||||
}
|
||||
|
||||
public void endAllBreakoutRooms(EndAllBreakoutRoomsRequestPayload payload){
|
||||
EndAllBreakoutRoomsRequest msg = new EndAllBreakoutRoomsRequest(payload);
|
||||
sender.send(MessagingConstants.TO_USERS_CHANNEL, msg.toJson());
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ import java.util.Map;
|
||||
|
||||
import org.bigbluebutton.messages.payload.BreakoutRoomRequestPayload;
|
||||
import org.bigbluebutton.messages.payload.CreateBreakoutRoomsRequestPayload;
|
||||
import org.bigbluebutton.messages.payload.EndAllBreakoutRoomsRequestPayload;
|
||||
import org.bigbluebutton.red5.pubsub.MessagePublisher;
|
||||
import org.red5.logging.Red5LoggerFactory;
|
||||
import org.red5.server.api.Red5;
|
||||
@ -47,8 +48,17 @@ public class BreakoutRoomService {
|
||||
ArrayList<BreakoutRoomRequestPayload> breakoutRooms = (ArrayList<BreakoutRoomRequestPayload>) msg
|
||||
.get("rooms");
|
||||
|
||||
CreateBreakoutRoomsRequestPayload playload = new CreateBreakoutRoomsRequestPayload(
|
||||
CreateBreakoutRoomsRequestPayload payload = new CreateBreakoutRoomsRequestPayload(
|
||||
meetingId, breakoutRooms, duration);
|
||||
red5GW.createBreakoutRooms(playload);
|
||||
red5GW.createBreakoutRooms(payload);
|
||||
}
|
||||
|
||||
public void endAllBreakoutRooms(Map<String, Object> msg) {
|
||||
IScope scope = Red5.getConnectionLocal().getScope();
|
||||
String meetingId = (String) msg.get("meetingId");
|
||||
|
||||
EndAllBreakoutRoomsRequestPayload payload = new EndAllBreakoutRoomsRequestPayload(
|
||||
meetingId);
|
||||
red5GW.endAllBreakoutRooms(payload);
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,8 @@ package org.bigbluebutton.main.events {
|
||||
|
||||
public static const REQUEST_BREAKOUT_JOIN_URL:String = "REQUEST_BREAKOUT_JOIN_URL";
|
||||
|
||||
public static const END_ALL_BREAKOUT_ROOMS:String = "END_ALL_BREAKOUT_ROOMS";
|
||||
|
||||
public var meetingId:String;
|
||||
|
||||
public var breakoutId:String;
|
||||
|
@ -212,7 +212,7 @@ package org.bigbluebutton.main.model.users
|
||||
}
|
||||
|
||||
public function endAllBreakoutRooms(e:BreakoutRoomEvent):void{
|
||||
// TODO
|
||||
sender.endAllBreakoutRooms(_conferenceParameters.meetingID);
|
||||
}
|
||||
|
||||
public function kickUser(e:KickUserEvent):void{
|
||||
|
@ -72,6 +72,10 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<MethodInvoker generator="{UserService}" method="requestBreakoutJoinUrl" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{BreakoutRoomEvent.END_ALL_BREAKOUT_ROOMS}" >
|
||||
<MethodInvoker generator="{UserService}" method="endAllBreakoutRooms" arguments="{event}" />
|
||||
</EventHandlers>
|
||||
|
||||
<!-- Viewers Stuff -->
|
||||
<EventHandlers type="{EmojiStatusEvent.EMOJI_STATUS}" >
|
||||
<MethodInvoker generator="{UserService}" method="emojiStatus" arguments="{event}" />
|
||||
|
@ -20,6 +20,9 @@ package org.bigbluebutton.modules.users.services
|
||||
{
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import flash.net.URLRequest;
|
||||
import flash.net.navigateToURL;
|
||||
|
||||
import org.as3commons.logging.api.ILogger;
|
||||
import org.as3commons.logging.api.getClassLogger;
|
||||
import org.bigbluebutton.core.BBB;
|
||||
@ -590,6 +593,7 @@ package org.bigbluebutton.modules.users.services
|
||||
private function handleBreakoutRoomJoinURL(msg:Object):void{
|
||||
var map:Object = JSON.parse(msg.msg);
|
||||
// TODO : BreakoutRoom : display Join button to the user
|
||||
navigateToURL(new URLRequest(map.joinURL));
|
||||
}
|
||||
|
||||
private function handleUpdateBreakoutUsers(msg:Object):void{
|
||||
|
@ -120,6 +120,22 @@ package org.bigbluebutton.modules.users.services
|
||||
message
|
||||
);
|
||||
}
|
||||
|
||||
public function endAllBreakoutRooms(meetingId:String):void{
|
||||
var message:Object = new Object();
|
||||
message["meetingId"] = meetingId;
|
||||
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage("breakoutroom.endAllBreakoutRooms", function(result:String):void
|
||||
{
|
||||
// On successful result
|
||||
}, function(status:String):void
|
||||
{ // status - On error occurred
|
||||
LOGGER.error(status);
|
||||
},
|
||||
message
|
||||
);
|
||||
}
|
||||
|
||||
public function addStream(userID:String, streamName:String):void {
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
|
@ -439,6 +439,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
private function endAllBreakoutRoomsHandler(event:MouseEvent):void{
|
||||
dispatcher.dispatchEvent(new BreakoutRoomEvent(BreakoutRoomEvent.END_ALL_BREAKOUT_ROOMS));
|
||||
}
|
||||
|
||||
private function focusWindow(e:ShortcutEvent):void{
|
||||
focusManager.setFocus(titleBarOverlay);
|
||||
}
|
||||
@ -538,7 +542,9 @@
|
||||
</mx:columns>
|
||||
</mx:DataGrid>
|
||||
|
||||
<mx:Button id="closeRoomsBtn" label="{ResourceUtil.getInstance().getString('bbb.users.breakout.closeAllRooms')}" visible="false" includeInLayout="false"/>
|
||||
<mx:Button id="closeRoomsBtn" label="{ResourceUtil.getInstance().getString('bbb.users.breakout.closeAllRooms')}"
|
||||
click="endAllBreakoutRoomsHandler(event)"
|
||||
visible="false" includeInLayout="false"/>
|
||||
|
||||
</mx:VBox>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user