Merge branch 'hangout-style' into camera-hints

This commit is contained in:
Richard Alam 2011-11-04 01:45:32 +00:00
commit 33dcc49893
94 changed files with 1232 additions and 1244 deletions

View File

@ -45,7 +45,7 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
@Override
public boolean appStart(IScope app) {
log.debug("Starting BigBlueButton version {}", version);
log.debug("Starting BigBlueButton version " + version);
IContext context = app.getContext();
appCtx = (AbstractApplicationContext) context.getApplicationContext();
appCtx.addApplicationListener(new ShutdownHookListener());
@ -55,13 +55,13 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
@Override
public void appStop(IScope app) {
log.debug("Stopping BigBlueButton version {}", version);
log.debug("Stopping BigBlueButton version " + version);
super.appStop(app);
}
@Override
public boolean roomStart(IScope room) {
log.debug("Starting room [{}].", room.getName());
log.debug("Starting room [" + room.getName() + "].");
assert participantsApplication != null;
return super.roomStart(room);
@ -69,7 +69,7 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
@Override
public void roomStop(IScope room) {
log.debug("Stopping room [{}]", room.getName());
log.debug("Stopping room [" + room.getName() + "].");
super.roomStop(room);
assert participantsApplication != null;
participantsApplication.destroyRoom(room.getName());
@ -82,7 +82,7 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
assert recorderApplication != null;
recorderApplication.destroyRecordSession(bbbSession.getSessionName());
log.debug("Stopped room [{}]", room.getName());
log.debug("Stopped room [" + room.getName() + "].");
}
@Override
@ -90,7 +90,7 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
String remoteHost = Red5.getConnectionLocal().getRemoteAddress();
int remotePort = Red5.getConnectionLocal().getRemotePort();
String clientId = Red5.getConnectionLocal().getClient().getId();
log.info("[clientid={}] connected from {}.", clientId, remoteHost + ":" + remotePort);
log.info("[clientid=" + clientId + "] connected from " + remoteHost + ":" + remotePort + ".");
String username = ((String) params[0]).toString();
String role = ((String) params[1]).toString();
@ -107,7 +107,7 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
String room = sessionName;
assert recorderApplication != null;
boolean record = (Boolean)params[5];
log.debug("record value - [{}]", record);
log.debug("record value - [" + record + "]");
String externUserID = ((String) params[6]).toString();
@ -132,17 +132,17 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter {
String remoteHost = Red5.getConnectionLocal().getRemoteAddress();
int remotePort = Red5.getConnectionLocal().getRemotePort();
String clientId = Red5.getConnectionLocal().getClient().getId();
log.info("[clientid={}] disconnnected from {}.", clientId, remoteHost + ":" + remotePort);
log.info("[clientid=" + clientId + "] disconnnected from " + remoteHost + ":" + remotePort + ".");
BigBlueButtonSession bbbSession = (BigBlueButtonSession) Red5.getConnectionLocal().getAttribute(Constants.SESSION);
log.info("User [{}] disconnected from room [{}]", bbbSession.getUsername(), bbbSession.getRoom());
log.info("User [" + bbbSession.getUsername() + "] disconnected from room [" + bbbSession.getRoom() +"]");
super.roomDisconnect(conn);
}
public String getMyUserId() {
BigBlueButtonSession bbbSession = (BigBlueButtonSession) Red5.getConnectionLocal().getAttribute(Constants.SESSION);
assert bbbSession != null;
return bbbSession.getUserid()+"";
return Long.toString(bbbSession.getUserid());
}
public void setParticipantsApplication(ParticipantsApplication a) {

View File

@ -56,7 +56,7 @@ public class ParticipantUpdatingRoomListener implements IRoomListener{
Gson gson= new Gson();
messagingService.send(MessagingConstants.PARTICIPANTS_CHANNEL, gson.toJson(map));
log.debug("Publishing a status change in:{}",this.room.getName());
log.debug("Publishing a status change in: " + this.room.getName());
}
}
@ -71,7 +71,7 @@ public class ParticipantUpdatingRoomListener implements IRoomListener{
Gson gson= new Gson();
messagingService.send(MessagingConstants.PARTICIPANTS_CHANNEL, gson.toJson(map));
log.debug("Publishing message participant joined in {}",this.room.getName());
log.debug("Publishing message participant joined in " + this.room.getName());
}
}
@ -84,7 +84,7 @@ public class ParticipantUpdatingRoomListener implements IRoomListener{
Gson gson= new Gson();
messagingService.send(MessagingConstants.PARTICIPANTS_CHANNEL, gson.toJson(map));
log.debug("Publishing message participant left in {}",this.room.getName());
log.debug("Publishing message participant left in " + this.room.getName());
}
}

View File

@ -67,16 +67,14 @@ public class Room implements Serializable {
public void addParticipant(Participant participant) {
synchronized (this) {
log.debug("adding participant {}",participant.getUserid());
log.debug("adding participant " + participant.getUserid());
participants.put(participant.getUserid(), participant);
// unmodifiableMap = Collections.unmodifiableMap(participants)
}
log.debug("addparticipant - informing roomlisteners {}",listeners.size());
log.debug("Informing roomlisteners " + listeners.size());
for (Iterator it = listeners.values().iterator(); it.hasNext();) {
//for (IRoomListener listener : listeners) {
log.debug("calling participantJoined on listener");
IRoomListener listener = (IRoomListener) it.next();
log.debug("calling participantJoined on listener {}",listener.getName());
log.debug("calling participantJoined on listener " + listener.getName());
listener.participantJoined(participant);
}
}
@ -92,9 +90,8 @@ public class Room implements Serializable {
}
if (present) {
for (Iterator it = listeners.values().iterator(); it.hasNext();) {
log.debug("calling participantLeft on listener");
IRoomListener listener = (IRoomListener) it.next();
log.debug("calling participantLeft on listener {}",listener.getName());
log.debug("calling participantLeft on listener " + listener.getName());
listener.participantLeft(userid);
}
}
@ -114,9 +111,8 @@ public class Room implements Serializable {
}
if (present) {
for (Iterator it = listeners.values().iterator(); it.hasNext();) {
log.debug("calling participantStatusChange on listener");
IRoomListener listener = (IRoomListener) it.next();
log.debug("calling participantStatusChange on listener {}",listener.getName());
log.debug("calling participantStatusChange on listener " + listener.getName());
listener.participantStatusChange(userid, status, value);
}
}
@ -125,7 +121,7 @@ public class Room implements Serializable {
public void endAndKickAll() {
for (Iterator it = listeners.values().iterator(); it.hasNext();) {
IRoomListener listener = (IRoomListener) it.next();
log.debug("calling endAndKickAll on listener {}",listener.getName());
log.debug("calling endAndKickAll on listener " + listener.getName());
listener.endAndKickAll();
}
}

View File

@ -47,7 +47,7 @@ public class RoomsManager {
}
public void addRoom(Room room) {
log.debug("Adding room {}", room.getName());
log.debug("Adding room " + room.getName());
room.addRoomListener(new ParticipantUpdatingRoomListener(room,messagingService));
if (checkPublisher()) {
@ -64,7 +64,7 @@ public class RoomsManager {
}
public void removeRoom(String name) {
log.debug("Remove room {}", name);
log.debug("Remove room " + name);
Room room = rooms.remove(name);
if (checkPublisher() && room != null) {
room.endAndKickAll();
@ -104,7 +104,7 @@ public class RoomsManager {
*/
//TODO: this method becomes public for ParticipantsApplication, ask if it's right?
public Room getRoom(String name) {
log.debug("Get room {}", name);
log.debug("Get room " + name);
return rooms.get(name);
}
@ -113,7 +113,7 @@ public class RoomsManager {
if (r != null) {
return r.getParticipants();
}
log.warn("Getting participants from a non-existing room {}", roomName);
log.warn("Getting participants from a non-existing room " + roomName);
return null;
}
@ -123,7 +123,7 @@ public class RoomsManager {
r.addRoomListener(listener);
return;
}
log.warn("Adding listener to a non-existing room {}", roomName);
log.warn("Adding listener to a non-existing room " + roomName);
}
// TODO: this must be broken, right? where is roomName? (JRT: 9/25/2009)
@ -138,7 +138,7 @@ public class RoomsManager {
// }
public void addParticipant(String roomName, Participant participant) {
log.debug("Add participant {}", participant.getName());
log.debug("Add participant " + participant.getName());
Room r = getRoom(roomName);
if (r != null) {
/* if (checkPublisher()) {
@ -158,11 +158,11 @@ public class RoomsManager {
return;
}
log.warn("Adding participant to a non-existing room {}", roomName);
log.warn("Adding participant to a non-existing room " + roomName);
}
public void removeParticipant(String roomName, Long userid) {
log.debug("Remove participant {} from {}", userid, roomName);
log.debug("Remove participant " + userid + " from " + roomName);
Room r = getRoom(roomName);
if (r != null) {
if (checkPublisher()) {
@ -173,17 +173,17 @@ public class RoomsManager {
return;
}
log.warn("Removing listener from a non-existing room ${roomName}");
log.warn("Removing listener from a non-existing room " + roomName);
}
public void changeParticipantStatus(String roomName, Long userid, String status, Object value) {
log.debug("Change participant status {} - {} [" + value + "]", userid, status);
log.debug("Change participant status " + userid + " - " + status + " [" + value + "]");
Room r = getRoom(roomName);
if (r != null) {
r.changeParticipantStatus(userid, status, value);
return;
}
log.warn("Changing participant status on a non-existing room {}", roomName);
log.warn("Changing participant status on a non-existing room " + roomName);
}
public void setMessagingService(MessagingService messagingService) {
@ -199,12 +199,12 @@ public class RoomsManager {
@Override
public void endMeetingRequest(String meetingId) {
log.debug("End meeting request for room: {} ", meetingId);
log.debug("End meeting request for room: " + meetingId);
Room room = getRoom(meetingId); // must do this because the room coming in is serialized (no transient values are present)
if (room != null)
room.endAndKickAll();
else
log.debug("Could not find room {}", meetingId);
log.debug("Could not find room " + meetingId);
}
@Override

View File

@ -55,7 +55,7 @@ public class ChatApplication {
roomsManager.addRoomListener(room, listener);
return true;
}
log.warn("Adding listener to a non-existant room {}", room);
log.warn("Adding listener to a non-existant room " + room);
return false;
}

View File

@ -57,25 +57,25 @@ public class ChatHandler extends ApplicationAdapter implements IApplication{
@Override
public boolean appJoin(IClient client, IScope scope) {
log.debug("appJoin: {}", scope.getName());
log.debug("appJoin: " + scope.getName());
return true;
}
@Override
public void appLeave(IClient client, IScope scope) {
log.debug("appLeave: {}", scope.getName());
log.debug("appLeave: " + scope.getName());
}
@Override
public boolean appStart(IScope scope) {
this.scope = scope;
log.debug("appStart: {}", scope.getName());
log.debug("appStart: " + scope.getName());
return true;
}
@Override
public void appStop(IScope scope) {
log.debug("appStop: {}", scope.getName());
log.debug("appStop: " + scope.getName());
}
@Override
@ -85,7 +85,7 @@ public class ChatHandler extends ApplicationAdapter implements IApplication{
log.debug("Setting up recorder");
ChatMessageSender messageSender = new ChatMessageSender(so);
ChatEventRecorder recorder = new ChatEventRecorder(connection.getScope().getName(), recorderApplication);
log.debug("adding event recorder to {}", connection.getScope().getName());
log.debug("adding event recorder to " + connection.getScope().getName());
log.debug("Adding room listener");
chatApplication.addRoomListener(connection.getScope().getName(), recorder);
chatApplication.addRoomListener(connection.getScope().getName(), messageSender);
@ -100,25 +100,25 @@ public class ChatHandler extends ApplicationAdapter implements IApplication{
@Override
public boolean roomJoin(IClient client, IScope scope) {
log.debug("roomJoin {}", scope.getName(), scope.getParent().getName());
log.debug("roomJoin " + scope.getName(), scope.getParent().getName());
return true;
}
@Override
public void roomLeave(IClient client, IScope scope) {
log.debug("roomLeave: {}", scope.getName());
log.debug("roomLeave: " + scope.getName());
}
@Override
public boolean roomStart(IScope scope) {
log.debug("roomStart {}", scope.getName());
log.debug("roomStart " + scope.getName());
chatApplication.createRoom(scope.getName());
if (!hasSharedObject(scope, CHAT_SO)) {
if (createSharedObject(scope, CHAT_SO, false)) {
return true;
}
}
log.error("Failed to start room {}", scope.getName());
log.error("Failed to start room " + scope.getName());
return false;
}

View File

@ -23,6 +23,7 @@ import java.util.ArrayList;
import java.util.List;
import org.bigbluebutton.conference.service.chat.IChatRoomListener; import org.red5.server.api.so.ISharedObject;
import org.red5.server.api.statistics.ISharedObjectStatistics;
import org.slf4j.Logger;
import org.red5.logging.Red5LoggerFactory;
@ -38,13 +39,19 @@ private static Logger log = Red5LoggerFactory.getLogger( ChatMessageSender.class
this.so = so;
}
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void newChatMessage(String message) {
log.debug("New chat message...");
List list=new ArrayList();
List<String> list = new ArrayList<String>();
list.add(message);
log.debug("Sending public chat message [" + message + "]");
if (so.isLocked()) log.info("Chat message SO is locked");
if (so.isAcquired()) log.info("Chat message SO is acquired");
ISharedObjectStatistics stats = so.getStatistics();
log.debug("Before: Chat SO stats [total-sends=" + stats.getTotalSends() + "]");
so.sendMessage("newChatMessage", list);
log.debug("After: Chat SO stats [total-sends=" + stats.getTotalSends() + "]");
if (so.isLocked()) log.info("Chat message SO is locked");
if (so.isAcquired()) log.info("Chat message SO is acquired");
}
@Override

View File

@ -70,7 +70,7 @@ public class ChatRoom {
for (Iterator iter = listeners.values().iterator(); iter.hasNext();) {
log.debug("calling on listener");
IChatRoomListener listener = (IChatRoomListener) iter.next();
log.debug("calling newChatMessage on listener {}",listener.getName());
log.debug("calling newChatMessage on listener " + listener.getName());
listener.newChatMessage(msg);
}
}

View File

@ -40,17 +40,17 @@ public class ChatRoomsManager {
}
public void addRoom(ChatRoom room) {
log.debug("In ChatRoomsManager adding room {}", room.getName());
log.debug("In ChatRoomsManager adding room " + room.getName());
rooms.put(room.getName(), room);
}
public void removeRoom(String name) {
log.debug("In ChatRoomsManager remove room {}", name);
log.debug("In ChatRoomsManager remove room " + name);
rooms.remove(name);
}
public boolean hasRoom(String name) {
log.debug("In ChatRoomsManager has Room {}", name);
log.debug("In ChatRoomsManager has Room " + name);
return rooms.containsKey(name);
}
@ -59,7 +59,7 @@ public class ChatRoomsManager {
* Keeping getRoom private so that all access to ChatRoom goes through here.
*/
private ChatRoom getRoom(String name) {
log.debug("In ChatRoomsManager get room {}", name);
log.debug("In ChatRoomsManager get room " + name);
return rooms.get(name);
}
@ -68,7 +68,7 @@ public class ChatRoomsManager {
if (r != null) {
return r.getChatMessages();
}
log.warn("Getting messages from a non-existing room {}", room);
log.warn("Getting messages from a non-existing room " + room);
return null;
}
@ -77,7 +77,7 @@ public class ChatRoomsManager {
if (r != null) {
r.sendMessage(message);
} else {
log.warn("Sending message to a non-existing room {}", room);
log.warn("Sending message to a non-existing room " + room);
}
}
@ -87,7 +87,7 @@ public class ChatRoomsManager {
r.addRoomListener(listener);
return;
}
log.warn("Adding listener to a non-existing room {}", roomName);
log.warn("Adding listener to a non-existing room " + roomName);
}
//TODO: roomName?

View File

@ -44,12 +44,17 @@ public class ChatService {
application = a;
}
public void privateMessage(String message, String sender, String recepient){
log.debug("Received private message: " + message + " from " + sender + " to " + recepient + " The client scope is: " + Red5.getConnectionLocal().getScope().getName());
ISharedObject sharedObject = application.handler.getSharedObject(Red5.getConnectionLocal().getScope(), recepient);
ArrayList<String> arguments = new ArrayList<String>();
arguments.add(sender);
arguments.add(message);
sharedObject.sendMessage("messageReceived", arguments);
public void privateMessage(String message, String sender, String receiver){
log.debug("Received private message: " + message + " from " + sender + " to " + receiver + ". The client scope is: " + Red5.getConnectionLocal().getScope().getName());
ISharedObject sharedObject = application.handler.getSharedObject(Red5.getConnectionLocal().getScope(), receiver);
if (sharedObject != null) {
ArrayList<String> arguments = new ArrayList<String>();
arguments.add(sender);
arguments.add(message);
sharedObject.sendMessage("messageReceived", arguments);
} else {
log.debug("Not sending private message from " + sender + " to " + receiver + " as the user may have already left.");
}
}
}

View File

@ -68,7 +68,7 @@ public class RedisMessagingService implements MessagingService{
try {
jedis.publish(channel, message);
} catch(Exception e){
log.warn("Cannot publish the message to redis",e);
log.warn("Cannot publish the message to redis", e);
}finally{
redisPool.returnResource(jedis);
}
@ -126,7 +126,7 @@ public class RedisMessagingService implements MessagingService{
@Override
public void onPSubscribe(String pattern, int subscribedChannels) {
log.debug("Subscribed to the pattern:"+pattern);
log.debug("Subscribed to the pattern: " + pattern);
}
@Override

View File

@ -30,7 +30,7 @@ public class ParticipantsApplication {
public boolean createRoom(String name) {
if(!roomsManager.hasRoom(name)){
log.info("Creating room {}", name);
log.info("Creating room " + name);
roomsManager.addRoom(new Room(name));
return true;
}
@ -39,10 +39,10 @@ public class ParticipantsApplication {
public boolean destroyRoom(String name) {
if (roomsManager.hasRoom(name)) {
log.info("Destroying room {}", name);
log.info("Destroying room " + name);
roomsManager.removeRoom(name);
} else {
log.warn("Destroying non-existing room {}", name);
log.warn("Destroying non-existing room " + name);
}
return true;
}
@ -60,7 +60,7 @@ public class ParticipantsApplication {
roomsManager.addRoomListener(room, listener);
return true;
}
log.warn("Adding listener to a non-existant room {}",room);
log.warn("Adding listener to a non-existant room " + room);
return false;
}
@ -71,7 +71,7 @@ public class ParticipantsApplication {
public Map getParticipants(String roomName) {
log.debug("getParticipants - " + roomName);
if (! roomsManager.hasRoom(roomName)) {
log.warn("Could not find room "+roomName+" Total rooms "+roomsManager.numberOfRooms());
log.warn("Could not find room " + roomName + ". Total rooms " + roomsManager.numberOfRooms());
return null;
}
@ -82,7 +82,7 @@ public class ParticipantsApplication {
log.debug("Participant " + userid + " leaving room " + roomName);
if (roomsManager.hasRoom(roomName)) {
Room room = roomsManager.getRoom(roomName);
log.debug("Removing "+ userid + " from room " + roomName);
log.debug("Removing " + userid + " from room " + roomName);
room.removeParticipant(userid);
return true;
}
@ -97,10 +97,10 @@ public class ParticipantsApplication {
Participant p = new Participant(userid, username, role, externUserID, status);
Room room = roomsManager.getRoom(roomName);
room.addParticipant(p);
log.debug(":participant joined room "+roomName);
log.debug("participant joined room " + roomName);
return true;
}
log.debug(":participant failed to join room"+roomName);
log.debug("participant failed to join room " + roomName);
return false;
}

View File

@ -56,10 +56,10 @@ public class ParticipantsEventSender implements IRoomListener {
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void participantJoined(Participant p) {
log.debug("A participant has joined {}.",p.getUserid());
log.debug("A participant has joined " + p.getUserid());
ArrayList args = new ArrayList();
args.add(p.toMap());
log.debug("Sending participantJoined {} to client.",p.getUserid());
log.debug("Sending participantJoined " + p.getUserid() + " to client.");
so.sendMessage("participantJoined", args);
}
@ -74,7 +74,7 @@ public class ParticipantsEventSender implements IRoomListener {
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void participantStatusChange(Long userid, String status, Object value) {
log.debug("A participant's status has changed "+userid+" "+status+" "+value);
log.debug("A participant's status has changed " + userid + " " + status + " " + value);
ArrayList args = new ArrayList();
args.add(userid);
args.add(status);

View File

@ -47,46 +47,46 @@ public class ParticipantsHandler extends ApplicationAdapter implements IApplicat
@Override
public boolean appConnect(IConnection conn, Object[] params) {
log.debug(APP+":appConnect");
log.debug(APP + ":appConnect");
return true;
}
@Override
public void appDisconnect(IConnection conn) {
log.debug( APP+":appDisconnect");
log.debug( APP + ":appDisconnect");
}
@Override
public boolean appJoin(IClient client, IScope scope) {
log.debug( APP+":appJoin "+scope.getName());
log.debug( APP + ":appJoin " + scope.getName());
return true;
}
@Override
public void appLeave(IClient client, IScope scope) {
log.debug(APP+":appLeave "+scope.getName());
log.debug(APP + ":appLeave " + scope.getName());
}
@Override
public boolean appStart(IScope scope) {
log.debug(APP+":appStart "+scope.getName());
log.debug(APP + ":appStart " + scope.getName());
return true;
}
@Override
public void appStop(IScope scope) {
log.debug(APP+":appStop "+scope.getName());
log.debug(APP + ":appStop " + scope.getName());
}
@Override
public boolean roomConnect(IConnection connection, Object[] params) {
log.debug(APP+":roomConnect");
log.debug(APP + ":roomConnect");
ISharedObject so = getSharedObject(connection.getScope(), PARTICIPANTS_SO);
ParticipantsEventSender sender = new ParticipantsEventSender(so);
ParticipantsEventRecorder recorder = new ParticipantsEventRecorder(connection.getScope().getName(), recorderApplication);
log.debug("Adding room listener {}", connection.getScope().getName());
log.debug("Adding room listener " + connection.getScope().getName());
participantsApplication.addRoomListener(connection.getScope().getName(), recorder);
participantsApplication.addRoomListener(connection.getScope().getName(), sender);
log.debug("Done setting up recorder and listener");
@ -96,19 +96,19 @@ public class ParticipantsHandler extends ApplicationAdapter implements IApplicat
@Override
public void roomDisconnect(IConnection connection) {
log.debug(APP+":roomDisconnect");
log.debug(APP + ":roomDisconnect");
}
@Override
public boolean roomJoin(IClient client, IScope scope) {
log.debug(APP+":roomJoin "+scope.getName()+" - "+scope.getParent().getName());
log.debug(APP + ":roomJoin " + scope.getName() + " - " + scope.getParent().getName());
participantJoin();
return true;
}
@Override
public void roomLeave(IClient client, IScope scope) {
log.debug(APP+":roomLeave "+scope.getName());
log.debug(APP + ":roomLeave " + scope.getName());
BigBlueButtonSession bbbSession = getBbbSession();
if (bbbSession == null) {
log.debug("roomLeave - session is null");
@ -126,7 +126,7 @@ public class ParticipantsHandler extends ApplicationAdapter implements IApplicat
ParticipantsEventSender sender = new ParticipantsEventSender(so);
ParticipantsEventRecorder recorder = new ParticipantsEventRecorder(scope.getName(), recorderApplication);
log.debug("Adding room listener {}", scope.getName());
log.debug("Adding room listener " + scope.getName());
participantsApplication.addRoomListener(scope.getName(), recorder);
participantsApplication.addRoomListener(scope.getName(), sender);
log.debug("Done setting up recorder and listener");
@ -134,20 +134,20 @@ public class ParticipantsHandler extends ApplicationAdapter implements IApplicat
@Override
public boolean roomStart(IScope scope) {
log.debug(APP+" - roomStart "+scope.getName());
log.debug(APP + " - roomStart "+scope.getName());
// create ParticipantSO if it is not already created
if (!hasSharedObject(scope, PARTICIPANTS_SO)) {
if (createSharedObject(scope, PARTICIPANTS_SO, false)) {
return true;
}
}
log.error("Failed to start room {}",scope.getName());
log.error("Failed to start room " + scope.getName());
return false;
}
@Override
public void roomStop(IScope scope) {
log.debug(APP+":roomStop "+scope.getName());
log.debug(APP + ":roomStop " + scope.getName());
if (!hasSharedObject(scope, PARTICIPANTS_SO)) {
clearSharedObjects(scope, PARTICIPANTS_SO);
}
@ -155,30 +155,30 @@ public class ParticipantsHandler extends ApplicationAdapter implements IApplicat
@SuppressWarnings("unchecked")
public boolean participantJoin() {
log.debug(APP+":participantJoin - getting userid");
log.debug(APP + ":participantJoin - getting userid");
BigBlueButtonSession bbbSession = getBbbSession();
if (bbbSession == null) {
log.warn("bbb session is null");
}
Long userid = bbbSession.getUserid();
log.debug(APP+":participantJoin - userid "+userid);
log.debug(APP + ":participantJoin - userid " + userid);
String username = bbbSession.getUsername();
log.debug(APP+":participantJoin - username "+username);
log.debug(APP + ":participantJoin - username " + username);
String role = bbbSession.getRole();
log.debug(APP+":participantJoin - role "+role);
log.debug(APP + ":participantJoin - role " + role);
String room = bbbSession.getRoom();
log.debug(APP+":participantJoin - room "+room);
log.debug(APP + ":participantJoin - room " + room);
String externUserID = bbbSession.getExternUserID();
log.debug(APP+":participantJoin");
log.debug(APP + ":participantJoin");
Map status = new HashMap();
status.put("raiseHand", false);
status.put("presenter", false);
status.put("hasStream", false);
log.debug(APP+":participantJoin setting status");
log.debug(APP + ":participantJoin setting status");
return participantsApplication.participantJoin(room, userid, username, role, externUserID, status);
}

View File

@ -38,17 +38,17 @@ public class ParticipantsService {
@SuppressWarnings("unchecked")
public Map getParticipants() {
String roomName = Red5.getConnectionLocal().getScope().getName();
log.debug("getting participants for {}",roomName);
log.debug("getting participants for " + roomName);
Map p = application.getParticipants(roomName);
log.debug("getting participants for {}",roomName);
log.debug("getting participants for " + roomName);
Map participants = new HashMap();
if (p == null) {
participants.put("count", 0);
log.debug("partipants of {} is null",roomName);
log.debug("partipants of " + roomName + " is null");
} else {
participants.put("count", p.size());
log.debug("number of partipants is {}",p.size());
log.debug("number of partipants is " + p.size());
if (p.size() > 0) {
/**
* Somehow we need to convert to Map so the client will be
@ -69,7 +69,7 @@ public class ParticipantsService {
public void setParticipantStatus(Long userid, String status, Object value) {
String roomName = Red5.getConnectionLocal().getScope().getName();
log.debug("Setting participant status "+roomName+" "+userid+" "+status+" "+value);
log.debug("Setting participant status " + roomName + " " + userid + " " + status + " " + value);
application.setParticipantStatus(roomName, userid, status, value);
}

View File

@ -64,7 +64,7 @@ public class ConversionUpdatesMessageListener {
message.put("presentationName", presentationName);
message.put("messageKey", messageKey);
log.debug("JMS: {}[{}]",messageKey,presentationName);
log.debug("Message: " + messageKey + "[ " + presentationName + "]");
if(messageKey.equalsIgnoreCase(OFFICE_DOC_CONVERSION_SUCCESS_KEY)||
messageKey.equalsIgnoreCase(OFFICE_DOC_CONVERSION_FAILED_KEY)||
@ -73,11 +73,10 @@ public class ConversionUpdatesMessageListener {
messageKey.equalsIgnoreCase(GENERATING_THUMBNAIL_KEY)||
messageKey.equalsIgnoreCase(GENERATED_THUMBNAIL_KEY)||
messageKey.equalsIgnoreCase(PAGE_COUNT_FAILED_KEY)){
log.debug("message: {}[{}]",messageKey,presentationName);
conversionUpdatesProcessor.process(message);
}
else if(messageKey.equalsIgnoreCase(PAGE_COUNT_EXCEEDED_KEY)){
log.debug("JMS: {}[{}]",messageKey,presentationName);
String numberOfPages = (String) mapMessage.get("numberOfPages");
String maxNumberPages = (String) mapMessage.get("maxNumberPages");
message.put("numberOfPages", numberOfPages);
@ -90,13 +89,11 @@ public class ConversionUpdatesMessageListener {
message.put("numberOfPages", numberOfPages);
message.put("pagesCompleted", pagesCompleted);
log.debug("message: {}[{}]",messageKey,presentationName);
conversionUpdatesProcessor.process(message);
}
else if(messageKey.equalsIgnoreCase(CONVERSION_COMPLETED_KEY)){
String slidesInfo = (String) mapMessage.get("slidesInfo");
message.put("slidesInfo", StringEscapeUtils.unescapeXml(slidesInfo));
log.debug("message: {}[{}]",messageKey,presentationName);
conversionUpdatesProcessor.process(message);
}
else{

View File

@ -56,7 +56,7 @@ public class PresentationApplication {
roomsManager.addRoomListener(room, listener);
return true;
}
log.warn("Adding listener to a non-existant room {}",room);
log.warn("Adding listener to a non-existant room " + room);
return false;
}
@ -67,14 +67,14 @@ public class PresentationApplication {
roomsManager.sendUpdateMessage(message);
return;
}
log.warn("Sending update message to a non-existant room {}",room);
log.warn("Sending update message to a non-existant room " + room);
}
public ArrayList getCurrentPresenter(String room){
if (roomsManager.hasRoom(room)){
return roomsManager.getCurrentPresenter(room);
}
log.warn("Getting presenter on a non-existant room {}",room);
log.warn("Getting presenter on a non-existant room " + room);
return null;
}
@ -82,7 +82,7 @@ public class PresentationApplication {
if (roomsManager.hasRoom(room)){
return roomsManager.getPresentations(room);
}
log.warn("Getting presentations on a non-existant room {}",room);
log.warn("Getting presentations on a non-existant room " + room);
return null;
}
@ -90,7 +90,7 @@ public class PresentationApplication {
if (roomsManager.hasRoom(room)){
roomsManager.removePresentation(room, name);
} else {
log.warn("Removing presentation from a non-existant room {}",room);
log.warn("Removing presentation from a non-existant room " + room);
}
}
@ -98,7 +98,7 @@ public class PresentationApplication {
if (roomsManager.hasRoom(room)){
return roomsManager.getCurrentSlide(room);
}
log.warn("Getting slide on a non-existant room {}",room);
log.warn("Getting slide on a non-existant room " + room);
return -1;
}
@ -106,7 +106,7 @@ public class PresentationApplication {
if (roomsManager.hasRoom(room)){
return roomsManager.getCurrentPresentation(room);
}
log.warn("Getting current presentation on a non-existant room {}",room);
log.warn("Getting current presentation on a non-existant room " + room);
return null;
}
@ -114,7 +114,7 @@ public class PresentationApplication {
if (roomsManager.hasRoom(room)){
return roomsManager.getPresenterSettings(room);
}
log.warn("Getting settings information on a non-existant room {}",room);
log.warn("Getting settings information on a non-existant room " + room);
return null;
}
@ -122,17 +122,17 @@ public class PresentationApplication {
if (roomsManager.hasRoom(room)){
return roomsManager.getSharingPresentation(room);
}
log.warn("Getting share information on a non-existant room {}",room);
log.warn("Getting share information on a non-existant room " + room);
return null;
}
public void resizeAndMoveSlide(String room, Double xOffset, Double yOffset, Double widthRatio, Double heightRatio) {
if (roomsManager.hasRoom(room)){
log.debug("Request to resize and move slide["+xOffset+","+yOffset+","+widthRatio+","+heightRatio+"]");
log.debug("Request to resize and move slide[" + xOffset + "," + yOffset + "," + widthRatio + "," + heightRatio + "]");
roomsManager.resizeAndMoveSlide(room, xOffset, yOffset, widthRatio, heightRatio);
return;
}
log.warn("resizeAndMoveSlide on a non-existant room {}",room);
log.warn("resizeAndMoveSlide on a non-existant room " + room);
}
public void assignPresenter(String room, ArrayList presenter){
@ -140,25 +140,25 @@ public class PresentationApplication {
roomsManager.assignPresenter(room, presenter);
return;
}
log.warn("Assigning presenter on a non-existant room {}",room);
log.warn("Assigning presenter on a non-existant room " + room);
}
public void gotoSlide(String room, int slide){
if (roomsManager.hasRoom(room)){
log.debug("Request to go to slide {} for room {}",slide,room);
log.debug("Request to go to slide " + slide + " for room " + room);
roomsManager.gotoSlide(room, slide);
return;
}
log.warn("Changing slide on a non-existant room {}",room);
log.warn("Changing slide on a non-existant room " + room);
}
public void sharePresentation(String room, String presentationName, Boolean share){
if (roomsManager.hasRoom(room)){
log.debug("Request to share presentation "+presentationName+" "+share+" for room "+room);
log.debug("Request to share presentation " + presentationName + " " + share + " for room " + room);
roomsManager.sharePresentation(room, presentationName, share);
return;
}
log.warn("Sharing presentation on a non-existant room {}",room);
log.warn("Sharing presentation on a non-existant room " + room);
}
public void setRoomsManager(PresentationRoomsManager r) {

View File

@ -81,6 +81,8 @@ public class PresentationEventSender implements IPresentationRoomListener {
list.add(presentationName);
list.add(messageKey);
log.debug("message " + messageKey + "[" + presentationName + "]");
if(messageKey.equalsIgnoreCase(OFFICE_DOC_CONVERSION_SUCCESS_KEY)||
messageKey.equalsIgnoreCase(OFFICE_DOC_CONVERSION_FAILED_KEY)||
messageKey.equalsIgnoreCase(SUPPORTED_DOCUMENT_KEY)||
@ -88,25 +90,21 @@ public class PresentationEventSender implements IPresentationRoomListener {
messageKey.equalsIgnoreCase(GENERATING_THUMBNAIL_KEY)||
messageKey.equalsIgnoreCase(GENERATED_THUMBNAIL_KEY)||
messageKey.equalsIgnoreCase(PAGE_COUNT_FAILED_KEY)){
log.debug("{}[{}]",messageKey,presentationName);
// no extra data to send
so.sendMessage("conversionUpdateMessageCallback", list);
}
else if(messageKey.equalsIgnoreCase(PAGE_COUNT_EXCEEDED_KEY)){
log.debug("{}[{}]",messageKey,presentationName);
list.add(message.get("numberOfPages"));
list.add(message.get("maxNumberPages"));
so.sendMessage("pageCountExceededUpdateMessageCallback", list);
}
else if(messageKey.equalsIgnoreCase(GENERATED_SLIDE_KEY)){
log.debug("{}[{}]",messageKey,presentationName);
list.add(message.get("numberOfPages"));
list.add(message.get("pagesCompleted"));
so.sendMessage("generatedSlideUpdateMessageCallback", list);
//recordEvent(parsePresentationToXML(list, this.RECORD_EVENT_GENERATED_SLIDE));
}
else if(messageKey.equalsIgnoreCase(CONVERSION_COMPLETED_KEY)){
log.debug("{}[{}]",messageKey,presentationName);
list.add(message.get("slidesInfo"));
so.sendMessage("conversionCompletedUpdateMessageCallback", list);
}
@ -118,7 +116,7 @@ public class PresentationEventSender implements IPresentationRoomListener {
@SuppressWarnings("unchecked")
public void removePresentation(String name){
log.debug("calling removePresentationCallback {}",name);
log.debug("calling removePresentationCallback " + name);
ArrayList list=new ArrayList();
list.add(name);
so.sendMessage("removePresentationCallback", list);
@ -126,7 +124,7 @@ public class PresentationEventSender implements IPresentationRoomListener {
@SuppressWarnings("unchecked")
public void gotoSlide(int slide){
log.debug("calling gotoSlideCallback {}",slide);
log.debug("calling gotoSlideCallback " + slide);
ArrayList list=new ArrayList();
list.add(slide);
so.sendMessage("gotoSlideCallback", list);
@ -135,7 +133,7 @@ public class PresentationEventSender implements IPresentationRoomListener {
@SuppressWarnings("unchecked")
@Override
public void sharePresentation(String presentationName, Boolean share){
log.debug("calling sharePresentationCallback {} {}",presentationName,share);
log.debug("calling sharePresentationCallback " + presentationName + " " + share);
ArrayList list=new ArrayList();
list.add(presentationName);
list.add(share);
@ -145,14 +143,14 @@ public class PresentationEventSender implements IPresentationRoomListener {
@SuppressWarnings("unchecked")
@Override
public void assignPresenter(ArrayList presenter) {
log.debug("calling assignPresenterCallback "+presenter.get(0)+", "+presenter.get(1)+" "+presenter.get(2));
log.debug("calling assignPresenterCallback " + presenter.get(0) + ", " + presenter.get(1) + " " + presenter.get(2));
so.sendMessage("assignPresenterCallback", presenter);
}
@SuppressWarnings("unchecked")
@Override
public void resizeAndMoveSlide(Double xOffset, Double yOffset, Double widthRatio, Double heightRatio) {
log.debug("calling moveCallback["+xOffset+","+yOffset+","+widthRatio+","+heightRatio+"]");
log.debug("calling moveCallback[" + xOffset + "," + yOffset + "," + widthRatio + "," + heightRatio + "]");
ArrayList list=new ArrayList();
list.add(xOffset);
list.add(yOffset);

View File

@ -53,43 +53,42 @@ public class PresentationHandler extends ApplicationAdapter implements IApplicat
@Override
public boolean appConnect(IConnection conn, Object[] params) {
log.debug("{}:appConnect",APP);
log.debug(APP + ":appConnect");
return true;
}
@Override
public void appDisconnect(IConnection conn) {
log.debug( "{}:appDisconnect",APP);
log.debug(APP + ":appDisconnect");
}
@Override
public boolean appJoin(IClient client, IScope scope) {
log.debug( "{}:appJoin {}",APP,scope.getName());
log.debug(APP + ":appJoin " + scope.getName());
return true;
}
@Override
public void appLeave(IClient client, IScope scope) {
log.debug("{}:appLeave {}",APP,scope.getName());
log.debug(APP + ":appLeave " + scope.getName());
}
@Override
public boolean appStart(IScope scope) {
log.debug("{}:appStart {}",APP,scope.getName());
log.debug(APP + ":appStart " + scope.getName());
conversionUpdatesMessageListener.start();
return true;
}
@Override
public void appStop(IScope scope) {
log.debug("{}:appStop {}",APP,scope.getName());
log.debug(APP + ":appStop " + scope.getName());
conversionUpdatesMessageListener.stop();
}
@Override
public boolean roomConnect(IConnection connection, Object[] params) {
log.debug("{}:roomConnect",APP);
log.debug(APP + ":roomConnect");
log.debug("In live mode");
ISharedObject so = getSharedObject(connection.getScope(), PRESENTATION_SO);
@ -107,28 +106,28 @@ public class PresentationHandler extends ApplicationAdapter implements IApplicat
@Override
public void roomDisconnect(IConnection connection) {
log.debug("{}:roomDisconnect",APP);
log.debug(APP + ":roomDisconnect");
}
@Override
public boolean roomJoin(IClient client, IScope scope) {
log.debug(APP+":roomJoin "+scope.getName()+" - "+scope.getParent().getName());
log.debug(APP + ":roomJoin " + scope.getName() + " - " + scope.getParent().getName());
return true;
}
@Override
public void roomLeave(IClient client, IScope scope) {
log.debug("{}:roomLeave {}",APP,scope.getName());
log.debug(APP + ":roomLeave " + scope.getName());
}
@Override
public boolean roomStart(IScope scope) {
log.debug("{} - roomStart {}",APP,scope.getName());
log.debug(APP + " - roomStart "+ scope.getName());
presentationApplication.createRoom(scope.getName());
if (!hasSharedObject(scope, PRESENTATION_SO)) {
if (createSharedObject(scope, PRESENTATION_SO, false)) {
log.debug("{} - scanning for presentations - ", APP, scope.getName());
log.debug(APP + " - scanning for presentations - " + scope.getName());
try {
// TODO: this is hard-coded, and not really a great abstraction. need to fix this up later
String folderPath = "/var/bigbluebutton/" + scope.getName() + "/" + scope.getName();
@ -137,12 +136,12 @@ public class PresentationHandler extends ApplicationAdapter implements IApplicat
if (folder.exists() && folder.isDirectory()) {
File[] presentations = folder.listFiles(new FileFilter() {
public boolean accept(File path) {
log.debug("\tfound: {}", path.getAbsolutePath());
log.debug("\tfound: " + path.getAbsolutePath());
return path.isDirectory();
}
});
for (File presFile : presentations) {
log.debug("\tshare: {}", presFile.getName());
log.debug("\tshare: " + presFile.getName());
presentationApplication.sharePresentation(scope.getName(), presFile.getName(), true);
}
}
@ -152,13 +151,13 @@ public class PresentationHandler extends ApplicationAdapter implements IApplicat
return true;
}
}
log.error("Failed to start room {}",scope.getName());
log.error("Failed to start room " + scope.getName());
return false;
}
@Override
public void roomStop(IScope scope) {
log.debug("{}:roomStop {}",APP,scope.getName());
log.debug(APP + ":roomStop " + scope.getName());
presentationApplication.destroyRoom(scope.getName());
if (!hasSharedObject(scope, PRESENTATION_SO)) {
clearSharedObjects(scope, PRESENTATION_SO);

View File

@ -78,7 +78,7 @@ public class PresentationRoom {
for (Iterator iter = listeners.values().iterator(); iter.hasNext();) {
log.debug("calling on listener");
IPresentationRoomListener listener = (IPresentationRoomListener) iter.next();
log.debug("calling sendUpdateMessage on listener {}",listener.getName());
log.debug("calling sendUpdateMessage on listener " + listener.getName());
listener.sendUpdateMessage(message);
}
@ -91,7 +91,7 @@ public class PresentationRoom {
String messageKey = (String) message.get("messageKey");
if (messageKey.equalsIgnoreCase("CONVERSION_COMPLETED")) {
log.debug("{}[{}]",messageKey,presentationName);
log.debug(messageKey + "[" + presentationName + "]");
presentationNames.add(presentationName);
}
}
@ -105,7 +105,7 @@ public class PresentationRoom {
for (Iterator iter = listeners.values().iterator(); iter.hasNext();) {
log.debug("calling on listener");
IPresentationRoomListener listener = (IPresentationRoomListener) iter.next();
log.debug("calling sendUpdateMessage on listener {}",listener.getName());
log.debug("calling sendUpdateMessage on listener " + listener.getName());
listener.resizeAndMoveSlide(xOffset, yOffset, widthRatio, heightRatio);
}
}
@ -115,26 +115,26 @@ public class PresentationRoom {
for (Iterator iter = listeners.values().iterator(); iter.hasNext();) {
log.debug("calling on listener");
IPresentationRoomListener listener = (IPresentationRoomListener) iter.next();
log.debug("calling sendUpdateMessage on listener {}",listener.getName());
log.debug("calling sendUpdateMessage on listener " + listener.getName());
listener.assignPresenter(presenter);
}
}
@SuppressWarnings("unchecked")
public void gotoSlide(int curslide){
log.debug("Request to go to slide $it for room $name");
log.debug("Request to go to slide " + curslide + "for room " + name);
currentSlide = curslide;
for (Iterator iter = listeners.values().iterator(); iter.hasNext();) {
log.debug("calling on listener");
IPresentationRoomListener listener = (IPresentationRoomListener) iter.next();
log.debug("calling sendUpdateMessage on listener {}",listener.getName());
log.debug("calling sendUpdateMessage on listener " + listener.getName());
listener.gotoSlide(curslide);
}
}
@SuppressWarnings("unchecked")
public void sharePresentation(String presentationName, Boolean share){
log.debug("Request share presentation "+presentationName+" "+share+" for room "+name);
log.debug("Request share presentation " + presentationName + " " + share + " for room " + name);
sharing = share;
if (share) {
currentPresentation = presentationName;
@ -146,17 +146,17 @@ public class PresentationRoom {
for (Iterator iter = listeners.values().iterator(); iter.hasNext();) {
log.debug("calling on listener");
IPresentationRoomListener listener = (IPresentationRoomListener) iter.next();
log.debug("calling sharePresentation on listener {}",listener.getName());
log.debug("calling sharePresentation on listener " + listener.getName());
listener.sharePresentation(presentationName, share);
}
}
public void removePresentation(String presentationName){
log.debug("Request remove presentation {}",presentationName);
log.debug("Request remove presentation " + presentationName);
int index = presentationNames.indexOf(presentationName);
if (index < 0) {
log.warn("Request remove presentation {}. Presentation not found.",presentationName);
log.warn("Request remove presentation " + presentationName + ". Presentation not found.");
return;
}
@ -165,7 +165,7 @@ public class PresentationRoom {
for (Iterator iter = listeners.values().iterator(); iter.hasNext();) {
log.debug("calling on listener");
IPresentationRoomListener listener = (IPresentationRoomListener) iter.next();
log.debug("calling removePresentation on listener {}",listener.getName());
log.debug("calling removePresentation on listener " + listener.getName());
listener.removePresentation(presentationName);
}

View File

@ -46,17 +46,17 @@ public class PresentationRoomsManager {
}
public void addRoom(PresentationRoom room) {
log.debug("In PresentationRoomsManager adding room {}",room.getName());
log.debug("In PresentationRoomsManager adding room " + room.getName());
rooms.put(room.getName(), room);
}
public void removeRoom(String name) {
log.debug("In PresentationRoomsManager remove room {}",name);
log.debug("In PresentationRoomsManager remove room " + name);
rooms.remove(name);
}
public boolean hasRoom(String name) {
log.debug("In PresentationRoomsManager has Room {}",name);
log.debug("In PresentationRoomsManager has Room " + name);
return rooms.containsKey(name);
}
@ -65,7 +65,7 @@ public class PresentationRoomsManager {
* Keeping getRoom private so that all access to ChatRoom goes through here.
*/
private PresentationRoom getRoom(String name) {
log.debug("In PresentationRoomsManager get room {}",name);
log.debug("In PresentationRoomsManager get room " + name);
return rooms.get(name);
}
@ -75,7 +75,7 @@ public class PresentationRoomsManager {
r.addRoomListener(listener);
return;
}
log.warn("Adding listener to a non-existing room {}",roomName);
log.warn("Adding listener to a non-existing room " + roomName);
}
//TODO: where is roomName???
/*public void removeRoomListener(IPresentationRoomListener listener) {
@ -94,7 +94,7 @@ public class PresentationRoomsManager {
r.sendUpdateMessage(message);
return;
}
log.warn("Sending update message to a non-existing room {}",room);
log.warn("Sending update message to a non-existing room " + room);
}
public ArrayList getCurrentPresenter( String room){
@ -102,7 +102,7 @@ public class PresentationRoomsManager {
if (r != null) {
return r.getCurrentPresenter();
}
log.warn("Getting presenter from a non-existing room {}",room);
log.warn("Getting presenter from a non-existing room " + room);
return null;
}
@ -111,7 +111,7 @@ public class PresentationRoomsManager {
if (r != null) {
return r.getSharing();
}
log.warn("Getting sharing from a non-existing room {}",room);
log.warn("Getting sharing from a non-existing room " + room);
return null;
}
@ -121,7 +121,7 @@ public class PresentationRoomsManager {
r.assignPresenter(presenter);
return;
}
log.warn("Assigning presenter to a non-existing room {}",room);
log.warn("Assigning presenter to a non-existing room " + room);
}
@SuppressWarnings("unchecked")
@ -135,38 +135,38 @@ public class PresentationRoomsManager {
settings.put("heightRatio", r.getHeightRatio());
return settings;
}
log.warn("Getting settings information on a non-existant room {}",room);
log.warn("Getting settings information on a non-existant room " + room);
return null;
}
public void resizeAndMoveSlide(String room, Double xOffset, Double yOffset, Double widthRatio, Double heightRatio) {
PresentationRoom r = getRoom(room);
if (r != null){
log.debug("Request to resize and move slide["+xOffset+","+yOffset+","+widthRatio+","+heightRatio+"]");
log.debug("Request to resize and move slide[" + xOffset + "," + yOffset + "," + widthRatio + "," + heightRatio + "]");
r.resizeAndMoveSlide(xOffset, yOffset, widthRatio, heightRatio);
return;
}
log.warn("resizeAndMoveSlide on a non-existant room {}",room);
log.warn("resizeAndMoveSlide on a non-existant room " + room);
}
public void gotoSlide(String room, int slide){
PresentationRoom r = getRoom(room);
if (r != null) {
log.debug("Request to go to slide {} for room {}",slide,room);
log.debug("Request to go to slide " + slide + " for room " + room);
r.gotoSlide(slide);
return;
}
log.warn("Changing slide on a non-existing room {}",room);
log.warn("Changing slide on a non-existing room " + room);
}
public void sharePresentation(String room, String presentationName, Boolean share){
PresentationRoom r = getRoom(room);
if (r != null) {
log.debug("Request share presentation "+presentationName+" "+share+" for room "+room);
log.debug("Request share presentation " + presentationName + " " + share + " for room " + room);
r.sharePresentation(presentationName, share);
return;
}
log.warn("Sharing presentation on a non-existing room {}",room);
log.warn("Sharing presentation on a non-existing room " + room);
}
public int getCurrentSlide(String room){
@ -174,7 +174,7 @@ public class PresentationRoomsManager {
if (r != null) {
return r.getCurrentSlide();
}
log.warn("Getting slide on a non-existing room {}",room);
log.warn("Getting slide on a non-existing room " + room);
return -1;
}
@ -183,7 +183,7 @@ public class PresentationRoomsManager {
if (r != null) {
return r.getCurrentPresentation();
}
log.warn("Getting current presentation on a non-existing room {}",room);
log.warn("Getting current presentation on a non-existing room " + room);
return null;
}
@ -192,7 +192,7 @@ public class PresentationRoomsManager {
if (r != null) {
return r.getPresentationNames();
}
log.warn("Getting current presentation on a non-existing room {}",room);
log.warn("Getting current presentation on a non-existing room " + room);
return null;
}
@ -201,7 +201,7 @@ public class PresentationRoomsManager {
if (r != null) {
r.removePresentation(name);
} else {
log.warn("Removing presentation from a non-existing room {}",room);
log.warn("Removing presentation from a non-existing room " + room);
}
}
}

View File

@ -38,7 +38,7 @@ public class PresentationService {
@SuppressWarnings("unchecked")
public void assignPresenter(Long userid, String name, Long assignedBy) {
log.debug("assignPresenter "+userid+" "+name+" "+assignedBy);
log.debug("assignPresenter " + userid + " " + name + " " + assignedBy);
IScope scope = Red5.getConnectionLocal().getScope();
ArrayList presenter = new ArrayList();
presenter.add(userid);
@ -50,7 +50,7 @@ public class PresentationService {
if (curPresenter != null){
long curUserid=(Long) curPresenter.get(0);
if( curUserid!= userid){
log.debug("Changing presenter from {} to {}",curPresenter.get(0),userid);
log.debug("Changing presenter from " + curPresenter.get(0) + " to " + userid);
participantsApplication.setParticipantStatus(scope.getName(), (Long)curPresenter.get(0), "presenter", false);
}
}
@ -58,7 +58,7 @@ public class PresentationService {
}
public void removePresentation(String name) {
log.debug("removePresentation {}",name);
log.debug("removePresentation " + name);
IScope scope = Red5.getConnectionLocal().getScope();
presentationApplication.removePresentation(scope.getName(), name);
}
@ -80,7 +80,7 @@ public class PresentationService {
presenter.put("user", curPresenter.get(0));
presenter.put("name", curPresenter.get(1));
presenter.put("assignedBy",curPresenter.get(2));
log.debug("Presenter: "+curPresenter.get(0)+" "+curPresenter.get(1)+" "+curPresenter.get(2));
log.debug("Presenter: " + curPresenter.get(0) + " " + curPresenter.get(1) + " " + curPresenter.get(2));
} else {
presenter.put("hasPresenter", false);
}
@ -96,7 +96,7 @@ public class PresentationService {
presentation.put("widthRatio", presentersSettings.get("widthRatio"));
presentation.put("heightRatio", presentersSettings.get("heightRatio"));
}
log.debug("Presentation: presentation={} slide={}",currentPresentation,curSlide);
log.debug("Presentation: presentation=" + currentPresentation + " slide=" + curSlide);
} else {
presentation.put("sharing", false);
}
@ -111,19 +111,19 @@ public class PresentationService {
}
public void gotoSlide(int slideNum) {
log.debug("Request to go to slide {}",slideNum);
log.debug("Request to go to slide " + slideNum);
IScope scope = Red5.getConnectionLocal().getScope();
presentationApplication.gotoSlide(scope.getName(), slideNum);
}
public void sharePresentation(String presentationName, Boolean share) {
log.debug("Request to go to sharePresentation {} {}",presentationName,share);
log.debug("Request to go to sharePresentation " + presentationName + " " + share);
IScope scope = Red5.getConnectionLocal().getScope();
presentationApplication.sharePresentation(scope.getName(), presentationName, share);
}
public void resizeAndMoveSlide(Double xOffset,Double yOffset,Double widthRatio,Double heightRatio) {
log.debug("Request to resize and move slide["+xOffset+","+yOffset+","+widthRatio+","+heightRatio);
log.debug("Request to resize and move slide[" + xOffset + "," + yOffset + "," + widthRatio + "," + heightRatio);
IScope scope = Red5.getConnectionLocal().getScope();
presentationApplication.resizeAndMoveSlide(scope.getName(), xOffset, yOffset, widthRatio, heightRatio);
}

View File

@ -39,12 +39,12 @@ public class PresentationEventRecorder implements IPresentationRoomListener {
handleConversionCompletedEvent(message);
}
else{
log.error("NOT recording received message {}",messageKey);
log.error("NOT recording received message " + messageKey);
}
}
private void handleGeneratedSlideEvent(Map<String, Object> message) {
log.debug("Generated Slide Event [{}]", (String)message.get("presentationName"));
log.debug("Generated Slide Event [" + message.get("presentationName") + "]");
GenerateSlidePresentationRecordEvent event = new GenerateSlidePresentationRecordEvent();
event.setMeetingId(session);
@ -56,7 +56,7 @@ public class PresentationEventRecorder implements IPresentationRoomListener {
}
private void handleConversionCompletedEvent(Map<String, Object> message) {
log.debug("Conversion Completed Event [{}]", (String)message.get("presentationName"));
log.debug("Conversion Completed Event [" + message.get("presentationName") + "]");
ConversionCompletedPresentationRecordEvent event = new ConversionCompletedPresentationRecordEvent();
event.setMeetingId(session);

View File

@ -44,43 +44,43 @@ public class VoiceHandler extends ApplicationAdapter implements IApplication{
@Override
public boolean appConnect(IConnection conn, Object[] params) {
log.debug("${APP}:appConnect");
log.debug(APP + ":appConnect");
return true;
}
@Override
public void appDisconnect(IConnection conn) {
log.debug( "${APP}:appDisconnect");
log.debug(APP + ":appDisconnect");
}
@Override
public boolean appJoin(IClient client, IScope scope) {
log.debug( "${APP}:appJoin ${scope.name}");
log.debug(APP + ":appJoin " + scope.getName());
return true;
}
@Override
public void appLeave(IClient client, IScope scope) {
log.debug("${APP}:appLeave ${scope.name}");
log.debug(APP + ":appLeave " + scope.getName());
}
@Override
public boolean appStart(IScope scope) {
log.debug("${APP}:appStart ${scope.name}");
log.debug(APP + ":appStart " + scope.getName());
conferenceService.startup();
return true;
}
@Override
public void appStop(IScope scope) {
log.debug("${APP}:appStop ${scope.name}");
log.debug(APP + ":appStop " + scope.getName());
conferenceService.shutdown();
}
@Override
public boolean roomConnect(IConnection connection, Object[] params) {
log.debug("${APP}:roomConnect");
log.debug(APP + ":roomConnect");
log.debug("In live mode");
ISharedObject so = getSharedObject(connection.getScope(), VOICE_SO);
@ -88,7 +88,7 @@ public class VoiceHandler extends ApplicationAdapter implements IApplication{
String meetingid = getBbbSession().getConference();
Boolean record = getBbbSession().getRecord();
log.debug("Setting up voiceBridge {}", voiceBridge);
log.debug("Setting up voiceBridge " + voiceBridge);
clientManager.addSharedObject(connection.getScope().getName(), voiceBridge, so);
conferenceService.createConference(voiceBridge, meetingid, record);
return true;
@ -96,36 +96,36 @@ public class VoiceHandler extends ApplicationAdapter implements IApplication{
@Override
public void roomDisconnect(IConnection connection) {
log.debug("${APP}:roomDisconnect");
log.debug(APP + ":roomDisconnect");
}
@Override
public boolean roomJoin(IClient client, IScope scope) {
log.debug("${APP}:roomJoin ${scope.name} - ${scope.parent.name}");
log.debug(APP + ":roomJoin " + scope.getName() + " - " + scope.getParent().getName());
return true;
}
@Override
public void roomLeave(IClient client, IScope scope) {
log.debug("${APP}:roomLeave ${scope.name}");
log.debug(APP + ":roomLeave " + scope.getName());
}
@Override
public boolean roomStart(IScope scope) {
log.debug("${APP} - roomStart ${scope.name}");
log.debug(APP + " - roomStart " + scope.getName());
if (!hasSharedObject(scope, VOICE_SO)) {
if (createSharedObject(scope, VOICE_SO, false)) {
return true;
}
}
log.error("Failed to start room ${scope.name}");
log.error("Failed to start room " + scope.getName());
return false;
}
@Override
public void roomStop(IScope scope) {
log.debug("${APP}:roomStop ${scope.name}");
log.debug(APP + ":roomStop " + scope.getName());
/**
* Remove the voicebridge from the list of running
* voice conference.

View File

@ -36,7 +36,7 @@ public class VoiceService {
public Map<String, List> getMeetMeUsers() {
String voiceBridge = getBbbSession().getVoiceBridge();
log.debug("GetMeetmeUsers request for room[$voiceBridge]");
log.debug("GetMeetmeUsers request for room[" + voiceBridge + "]");
ArrayList<Participant> p = conferenceService.getParticipants(voiceBridge);
Map participants = new HashMap();
@ -63,7 +63,7 @@ public class VoiceService {
pmap.put("muted", p.isMuted());
pmap.put("talking", p.isTalking());
pmap.put("locked", p.isMuteLocked());
log.debug("[$p.id,$p.name,$p.muted,$p.talking]");
log.debug("[" + p.getId() + "," + p.getName() + "," + p.isMuted() + "," + p.isTalking() + "]");
result.put(p.getId(), pmap);
}
@ -72,7 +72,7 @@ public class VoiceService {
public void muteAllUsers(boolean mute) {
String conference = getBbbSession().getVoiceBridge();
log.debug("Mute all users in room[$conference]");
log.debug("Mute all users in room[" + conference + "]");
conferenceService.mute(conference, mute);
}
@ -83,19 +83,19 @@ public class VoiceService {
public void muteUnmuteUser(Integer userid,Boolean mute) {
String conference = getBbbSession().getVoiceBridge();
log.debug("MuteUnmute request for user [$userid] in room[$conference]");
log.debug("MuteUnmute request for user [" + userid + "] in room[" + conference + "]");
conferenceService.mute(userid, conference, mute);
}
public void lockMuteUser(Integer userid, Boolean lock) {
String conference = getBbbSession().getVoiceBridge();
log.debug("Lock request for user [$userid] in room[$conference]");
log.debug("Lock request for user [" + userid + "] in room[" + conference + "]");
conferenceService.lock(userid, conference, lock);
}
public void kickUSer(Integer userid) {
String conference = getBbbSession().getVoiceBridge();
log.debug("KickUser $userid from $conference");
log.debug("KickUser " + userid + " from " + conference);
conferenceService.eject(userid, conference);
}

View File

@ -91,7 +91,6 @@ public class Shape {
double y2 = shape[i+1];
newSlope = (y2 - y1)/(x2 - x1);
//System.out.println("Slope change: " + (Math.abs(stableSlope / newSlope - 1)));
if (slopeDifference(stableSlope, newSlope) < 5){
lastStableX = x2;
lastStableY = y2;
@ -117,14 +116,11 @@ public class Shape {
returnArray[j] = newShape.get(j);
}
//System.out.println("Original: " + shape.length);
//System.out.println("Optimized: " + returnArray.length);
return returnArray;
}
private double slopeDifference(double oldSlope, double newSlope){
double differenceInRad = Math.atan(oldSlope) - Math.atan(newSlope);
//System.out.println(Math.abs(Math.toDegrees(differenceInRad)));
return Math.abs(Math.toDegrees(differenceInRad));
}

View File

@ -53,7 +53,6 @@ public class WhiteboardApplication extends MultiThreadedApplicationAdapter imple
public boolean appStart(IScope app){
log.info("Starting Whiteboard Application");
this.scope = app;
//roomManager.addRoom(app);
return true;
}
@ -70,10 +69,8 @@ public class WhiteboardApplication extends MultiThreadedApplicationAdapter imple
WhiteboardRoom room = roomManager.getRoom(getLocalScope().getName());
if (room.presentationExists(name)) {
room.setActivePresentation(name);
//System.out.println("Presentation " + name + " exists");
} else {
room.addPresentation(name, numPages);
//System.out.println("Presentation " + name + " doesn't exists, setting it as active presentation");
}
}

View File

@ -127,7 +127,6 @@ public class WhiteboardRoom {
public void notifyAddShape(Presentation presentation, Shape shape){
for (Iterator iter = listeners.values().iterator(); iter.hasNext();) {
IWhiteboardRoomListener listener = (IWhiteboardRoomListener) iter.next();
//log.debug("calling newChatMessage on listener {}",listener.getName());
listener.addShape(shape, presentation);
}
}
@ -135,7 +134,6 @@ public class WhiteboardRoom {
public void notifyUndoShape(Presentation presentation){
for (Iterator iter = listeners.values().iterator(); iter.hasNext();) {
IWhiteboardRoomListener listener = (IWhiteboardRoomListener) iter.next();
//log.debug("calling newChatMessage on listener {}",listener.getName());
listener.undoShape(presentation);
}
}
@ -143,7 +141,6 @@ public class WhiteboardRoom {
public void notifyClearPage(Presentation presentation){
for (Iterator iter = listeners.values().iterator(); iter.hasNext();) {
IWhiteboardRoomListener listener = (IWhiteboardRoomListener) iter.next();
//log.debug("calling newChatMessage on listener {}",listener.getName());
listener.clearPage(presentation);
}
}

View File

@ -1,21 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<actionScriptProperties mainApplicationPath="BigBlueButton.mxml" projectUUID="2f78753b-2e4c-41b4-8cf4-eddb768eb4b3" version="6">
<compiler additionalCompilerArguments="-locale=" autoRSLOrdering="false" copyDependentFiles="true" flexSDK="Flex 3.5" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" sourceFolderPath="src" strict="true" targetPlayerVersion="10.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
<actionScriptProperties analytics="false" mainApplicationPath="BigBlueButton.mxml" projectUUID="2f78753b-2e4c-41b4-8cf4-eddb768eb4b3" version="6">
<compiler additionalCompilerArguments="-locale=" autoRSLOrdering="false" copyDependentFiles="true" flex3CompatMode="true" flexSDK="Flex 4.5 (build 20967)" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin" sourceFolderPath="src" strict="true" targetPlayerVersion="10.3.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
<compilerSourcePath/>
<libraryPath defaultLinkType="1">
<libraryPathEntry kind="4" path="">
<modifiedEntries>
<libraryPathEntry kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/framework.swc" useDefaultLinkType="true">
<libraryPathEntry index="10" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/advancedgrids.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="framework_3.1.0.2710.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="framework_3.1.0.2710.swf"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/advancedgrids_4.5.0.20967.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="advancedgrids_4.5.0.20967.swz"/>
</crossDomainRsls>
</libraryPathEntry>
<libraryPathEntry index="6" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/charts.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/charts_4.5.0.20967.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="charts_4.5.0.20967.swz"/>
</crossDomainRsls>
</libraryPathEntry>
<libraryPathEntry index="8" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/osmf.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/osmf_1.0.0.16316.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="osmf_1.0.0.16316.swz"/>
</crossDomainRsls>
</libraryPathEntry>
<libraryPathEntry index="5" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/rpc.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/rpc_4.5.0.20967.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="rpc_4.5.0.20967.swz"/>
</crossDomainRsls>
</libraryPathEntry>
<libraryPathEntry index="7" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/spark_dmv.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/spark_dmv_4.5.0.20967.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="spark_dmv_4.5.0.20967.swz"/>
</crossDomainRsls>
</libraryPathEntry>
<libraryPathEntry index="9" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/mx/mx.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/mx_4.5.0.20967.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="mx_4.5.0.20967.swz"/>
</crossDomainRsls>
</libraryPathEntry>
</modifiedEntries>
<excludedEntries>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/qtp.swc" useDefaultLinkType="false"/>
<libraryPathEntry index="4" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/sparkskins.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/sparkskins_4.5.0.20967.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="sparkskins_4.5.0.20967.swz"/>
</crossDomainRsls>
</libraryPathEntry>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation.swc" useDefaultLinkType="false"/>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_dmv.swc" useDefaultLinkType="false"/>
<libraryPathEntry index="3" kind="3" linkType="4" path="${PROJECT_FRAMEWORKS}/libs/spark.swc" useDefaultLinkType="true">
<crossDomainRsls>
<crossDomainRslEntry autoExtract="true" policyFileUrl="http://fpdownload.adobe.com/pub/swz/crossdomain.xml" rslUrl="http://fpdownload.adobe.com/pub/swz/flex/4.5.0.20967/spark_4.5.0.20967.swz"/>
<crossDomainRslEntry autoExtract="true" policyFileUrl="" rslUrl="spark_4.5.0.20967.swz"/>
</crossDomainRsls>
</libraryPathEntry>
<libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/automation_agent.swc" useDefaultLinkType="false"/>
</excludedEntries>
</libraryPathEntry>
@ -53,4 +95,3 @@
<buildCSSFileEntry destPath="bin" sourcePath="src/branding/css/theme.css"/>
</buildCSSFiles>
</actionScriptProperties>

View File

@ -33,13 +33,6 @@
<link rel="stylesheet" type="text/css" href="history/history.css" />
<script type="text/javascript" src="history/history.js"></script>
<!${useBrowserHistory} END Browser History required section -->
<script src="jquery-1.5.1.min.js" language="javascript"></script>
<script src="bigbluebutton.js" language="javascript"></script>
<script src="bbb_localization.js" language="javascript"></script>
<script src="deployJava.js" language="javascript"></script>
<script src="bbb_blinker.js" language="javascript"></script>
<script src="bbb_deskshare.js" language="javascript"></script>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">

View File

@ -88,6 +88,10 @@ bbb.chat.privateChatSelect = Select a person to chat with privately
bbb.chat.chatOptions = Chat Options
bbb.chat.fontSize = Font Size
bbb.listeners.title = Listeners{0} {1}
bbb.listeners.pushToTalk.toolTip = Click to talk
bbb.listeners.pushToMute.toolTip = Click to mute yourself
bbb.listeners.talk=Talk
bbb.listeners.mute=Mute
bbb.listeners.muteAllBtn.toolTip = Mute all
bbb.listeners.unmuteAllBtn.toolTip = Unmute all
bbb.listeners.ejectTooltip = Kick User

View File

@ -0,0 +1,144 @@
bbb.logout.usercommand = Du har logget ut av konferansen
bbb.settings.flash.command = Installer nyeste Flash
bbb.oldlocalewindow.reminder2 = Vennligst slett nettleserens mellomlager og prøv igjen
bbb.presentation.maxUploadFileExceededAlert = Feil: Fila er større enn tillatt
bbb.logout.invalidapp = Appen red5 finnes ikke
bbb.fileupload.title = Last opp presentasjon
bbb.chat.publicMsgAwaiting2 = * Melding til alle venter *
bbb.viewers.viewersGrid.roleItemRenderer = Rolle
bbb.oldlocalewindow.windowTitle = Advarsel: Gammel språkfil
bbb.presentation.converted = Konverterte {0} av{1} lysark.
bbb.viewers.presentBtn.toolTip = Velg deltaker som skal presentere.
bbb.viewers.viewersGrid.statusItemRenderer.streamIcon.toolTip = Klikk for å se på
bbb.highlighter.toolbar.undo = Gjenopprett figur
bbb.desktopPublish.minimizeBtn.toolTip = Minimer dette vinduet.
bbb.viewers.presentBtn.label = Velg ny presenterer
bbb.viewers.kickUserBtn.toolTip = Send ut bruker
bbb.listeners.ejectTooltip = Send ut bruker
bbb.presentation.uploadcomplete = Opplasting er fullført
bbb.viewers.viewersGrid.statusItemRenderer.raiseHand.toolTip = Håndsopprekking av {0}
bbb.mainToolbar.settingsBtn.toolTip = Åpne Settinger
bbb.desktopView.actualSize = Vis normal størrelse
bbb.desktopPublish.region.tooltip = Del ut et utsnitt av skjermen
bbb.presentation.error.convert.swf = Feil ved konvertering av opplastet dokument. Vennligst ta kontakt med administrator.
bbb.fileupload.progBarLbl = Framdrift:
bbb.presentation.error.security = Sikkerhetsfeil: Vennligst kontakt administrator.
bbb.desktopPublish.maximizeRestoreBtn.toolTip = Du kan ikke maksimere dette vinduet.
bbb.listenerItem.nameLbl.toolTip = Velg denne brukeren og klikk for knappen
bbb.desktopPublish.region.label = Område
bbb.chat.cmpColorPicker.toolTip = Tekstfarge
bbb.listenerItem.muteUnmute.toolTip = Slå lyd på eller av for lytteren
bbb.chat.chatOptions = Innstillinger for prat
bbb.presentation.uploadwindow.closeLabel = Klikk OK for å lukke vinduet
bbb.viewers.title = Users{0} {1}
bbb.settings.flash.label = Feil versjon av Flash
bbb.presentation.ok = OK
bbb.mainToolbar.helpBtn = Hjelp
bbb.fileupload.showBtn = Vis
bbb.fileupload.fileLbl = Fil:
bbb.listenerItem.talkImg.toolTip = Snakker
bbb.settings.warning.label = Advarsel
bbb.mainshell.copyrightLabel2 = (c) 2010, BigBlueButton build {0} - Mer informasjon finnes hos http://www.bigbluebutton.org/.
bbb.presentation.uploadwindow.powerpoint = POWERPOINT
bbb.toolbar.video.toolTip = Start kamera
bbb.chat.publicMsgAwaiting = Melding til alle venter
bbb.settings.instructions = Tillat at Flash vil bruke ditt kamera. Hvis du kan se og høre deg selv er din nettleser satt opp korrekt. Nedenfor er det vist noen feilsituasjoner som kan undersøkes.
bbb.chat.sendBtn = Send
bbb.publishVideo.title = Vis ditt webkamera
bbb.logout.appshutdown = Appen server er lukket
bbb.presentation.uploadPresBtn = Last opp dokument til presentasjon.
bbb.presentation.uploadPresBtn.toolTip = Last opp dokument til presentasjon.
bbb.highlighter.toolbar.ellipse = Sirkel
bbb.fileupload.deleteBtn.toolTip = Slett presentasjon
bbb.toolbar.deskshare.toolTip = Skrivebordsdeling
bbb.presentation.document.converted = Vellykket konvertering av dokument.
bbb.presentation.error.convert.maxnbpagereach = Feil: Dokumentet som ble lastet opp har for mange sider.
bbb.desktopView.title = Skrivebordsdeling
bbb.settings.java.label = Feil versjon av Java
bbb.presentation.forwardBtn.toolTip = Neste lysark
bbb.settings.java.text = Du har installert versjon {0} av Java, men trenger minst versjon {1}. Klikk nedenfor for å installere siste Java JRE versjon.
bbb.fileupload.genThumbText = Lager ikoner..
bbb.viewers.viewersGrid.statusItemRenderer = Status
bbb.desktopPublish.title = Skrivebordsdeling: Presenterers forh
bbb.mainToolbar.settingsBtn = Settinger
bbb.fileupload.uploadBtn = Last opp
bbb.fileupload.uploadBtn.toolTip = Last opp fil
bbb.fileupload.showBtn.toolTip = Vis presentasjon
bbb.listeners.muteAllBtn.toolTip = Slå lyd av for alle
bbb.video.publish.close.tooltip = Stopp visning av webkamera
bbb.presentation.error.convert.nbpage = Feil: Antall sider i dokumentet som ble lastet opp kan ikke bestemmes.
bbb.chat.title = Prat
bbb.presentation.uploaded = lastet opp.
bbb.mainshell.logBtn.toolTip = Åpne loggvindu
bbb.desktopPublish.stop.tooltip = Lukk skjermdeling
bbb.presentation.uploadwindow.excel = EXCEL
bbb.settings.voice.volume = Mikrofonaktivitet
bbb.logout.unknown = Din klient har mistet forbindelsen til serveren
bbb.presentation.slideNumLbl.toolTip = Klikk for å velge et lysark
bbb.settings.flash.text = Du har installert versjon {0} av Flash, men trenger minst versjon {1}. Klikk nedenfor for å installere siste Adobe Flash versjon.
bbb.highlighter.toolbar.rectangle = Rektangel
bbb.settings.voice.adjust = Juster volumet
bbb.presentation.uploadwindow.word = WORD
bbb.mainshell.statusProgress.loading = Laster {0} moduler
bbb.presentation.error.io = IO feil: Vennligst kontakt administrator.
bbb.chat.sendBtn.toolTip = Send melding
bbb.highlighter.button.toolTipHide = Skjul tavle
bbb.settings.java.command = Installer nyeste Java
bbb.mainToolbar.logoutBtn = Logg ut
bbb.chat.privateMsgAwaiting2 = * Privat melding venter *
bbb.presentation.document.supported = Godkjent dokumenttype. Starter konvertering...
bbb.listeners.title = Lyttere{0} {1}
bbb.fileupload.presentationNamesLbl = Presentasjoner som er lastet opp:
bbb.pageTitle = BigBlueButton
bbb.mainshell.resetLayoutBtn.toolTip = Nullstill oppsett
bbb.highlighter.toolbar.color = Velg farge
bbb.presentation.uploadwindow.pdf = PDF
bbb.publishVideo.startPublishBtn.toolTip = Start visning
bbb.logout.connectionfailed = Forbindelsen med serveren har feilet
bbb.settings.isight.text = Hvis du har problemer med iSight kamera kan det være at du kjører OS X 10.6.5 som har problemer med Flash kamerahåndtering.\r\nInstaller en nyere versjon av Flashplayer eller oppgrader din Mac til nyeste OS versjon.
bbb.highlighter.toolbar.clear = Slett siden
bbb.toolbar.phone.toolTip = Slå på mikrofon
bbb.chat.privateChatSelect = Velg person til privat prat
bbb.micSettings.cancel = Avbryt
bbb.fileupload.okCancelBtn = Avbryt
bbb.video.publish.close.label = Lukk
bbb.desktopPublish.stop.label = Lukk
bbb.logout.asyncerror = Det oppstod en Async feil
bbb.presentation.presenterNameLbl = {0} er nå presenterer
bbb.chat.privateMsgAwaiting = Privat melding venter
bbb.desktopView.fitToWindow = Tilpass vindu
bbb.highlighter.toolbar.pencil = mark
bbb.mainshell.statusProgress.connecting = Kobler opp til serveren
bbb.listenerItem.lockImg.toolTip = Velg mellom å slå av eller på
bbb.listeners.unmuteAllBtn.toolTip = Slå på lyd for alle
bbb.logout.rejected = Forbindelsen til serveren ble avvist
bbb.presentation.title = Presentasjon
bbb.settings.noissues = Ingen alvorlige feil er oppdaget.
bbb.desktopPublish.closeBtn.toolTip = Stopp deling og lukk dette vinduet.
bbb.fileupload.selectBtn.toolTip = Se etter fil
bbb.presentation.uploadwindow.image = BILDE
bbb.settings.warning.close = Lukk denne advarselen
bbb.presentation.clickToUpload = Last opp presentasjon
bbb.presentation.backBtn.toolTip = Forrige lysark.
bbb.desktopPublish.fullscreen.tooltip = Del ut hele skjermen
bbb.settings.isight.command = Installer Flash 10.2 RC2
bbb.presentation.error.document.convert.failed = Feil: Mislykket konvertering av dokument.
bbb.viewers.viewersGrid.nameItemRenderer = Navn
bbb.oldlocalewindow.reminder1 = Du har kanskje en gammel språkfil
bbb.highlighter.button.toolTipShow = Vis tavle
bbb.settings.deskshare.start = Sjekk skrivebordsdeling
bbb.viewers.viewersGrid.nameItemRenderer.nameLabel.toolTip = Du er logget inn som denne brukeren.
bbb.chat.fontSize = Fontstørrelse
bbb.presentation.resetZoomBtn.toolTip = Nullstill zoom
bbb.mainshell.statusProgress.cannotConnectServer = Beklager, vi kan ikke koble til serveren
bbb.logout.connectionclosed = Forbindelsen med serveren er slått av
bbb.chat.publicChatUsername = Alle
bbb.viewers.viewersGrid.statusItemRenderer.presIcon.toolTip = Presenterer
bbb.settings.isight.label = Feil med iSight kamera
bbb.mainToolbar.logoutBtn.toolTip = Logg ut
bbb.presentation.error.convert.notsupported = Feil: Filtypen som ble lastet opp er ikke støttet. Vennligst last opp en kompatibel type.
bbb.highlighter.toolbar.thickness = Velg tykkelse
bbb.presentation.uploadwindow.presentationfile = Presentasjonsfil
bbb.viewers.raiseHandBtn.toolTip = Klikk for håndsopprekking
bbb.presentation.error.convert.format = Feil: Vennligst sjekk at dokumenttypen er korrekt.
bbb.desktopPublish.fullscreen.label = Hele skjermen

View File

@ -7,16 +7,17 @@
<application uri="rtmp://HOST/bigbluebutton" host="http://HOST/bigbluebutton/api/enter" />
<language userSelectionEnabled="true" />
<skinning enabled="false" url="branding/css/theme.css.swf" />
<layout showDebugWindow="false" showVideoLayout="false" showResetLayout="true" showToolbar="true" showHelpButton="true" showLogoutWindow="true"/>
<layout showLogButton="false" showVideoLayout="false" showResetLayout="true" showToolbar="true" showHelpButton="true" showLogoutWindow="true"/>
<modules>
<module name="ChatModule" url="ChatModule.swf?v=VERSION"
uri="rtmp://HOST/bigbluebutton"
dependsOn="ViewersModule"
translationOn="true"
translationEnabled="true"
translationOn="false"
translationEnabled="false"
privateEnabled="true"
position="top-right"
/>
<module name="ViewersModule" url="ViewersModule.swf?v=VERSION"
@ -61,7 +62,8 @@
camModeFps="15"
camQualityBandwidth="0"
camQualityPicture="50"
h264Level="4.1"
enableH264="false"
h264Level="2.1"
h264Profile="main"
/>
@ -82,6 +84,10 @@
dependsOn="VideoconfModule, ViewersModule"
autoDock="true"
maximizeWindow="false"
position="bottom-right"
width="172"
height="179"
layout="smart"
/>
<!-- new module in development:

View File

@ -1,29 +1,46 @@
<?xml version="1.0" ?>
<locales>
<locale code="ar_SY" name="Arabic (Syria)"/>
<locale code="az_AZ" name="Azerbaijani"/>
<locale code="eu_EU" name="Basque" />
<locale code="bn_BN" name="Bengali" />
<locale code="bg_BG" name="Bulgarian" />
<locale code="zh_CN" name="Chinese (Simplified)"/>
<locale code="zh_TW" name="Chinese (Traditional)"/>
<locale code="hr_HR" name="Croatian" />
<locale code="cs_CZ" name="Czech" />
<locale code="da_DK" name="Danish" />
<locale code="nl_NL" name="Dutch" />
<locale code="en_US" name="English"/>
<locale code="fa_IR" name="Farsi" />
<locale code="fi_FI" name="Finnish"/>
<locale code="fr_FR" name="French"/>
<locale code="fr_CA" name="French (Canadian)"/>
<locale code="de_DE" name="German"/>
<locale code="el_GR" name="Greek"/>
<locale code="en_US" name="English"/>
<locale code="es_ES" name="Spanish"/>
<locale code="es_LA" name="Spanish (Latin American)"/>
<locale code="fr_FR" name="French"/>
<locale code="fr_CA" name="French Canadian"/>
<locale code="hu_HU" name="Hungarian"/>
<locale code="id_ID" name="Indonesian"/>
<locale code="it_IT" name="Italian"/>
<locale code="ko_KR" name="Korean"/>
<locale code="hu_HU" name="Hungarian"/>
<locale code="id_ID" name="Indonesian"/>
<locale code="it_IT" name="Italian"/>
<locale code="ja_JP" name="Japanese"/>
<locale code="ko_KR" name="Korean"/>
<locale code="lv_LV" name="Latvian"/>
<locale code="lt_LT" name="Lithuania"/>
<locale code="nb_NO" name="Norwegian"/>
<locale code="nl_NL" name="Netherland"/>
<locale code="mn_MN" name="Mongolian"/>
<locale code="ne_NE" name="Nepali"/>
<locale code="no_NO" name="Norwegian"/>
<locale code="pl_PL" name="Polish"/>
<locale code="pt_BR" name="Portuguese (Brazilian)"/>
<locale code="pt_PT" name="Portuguese"/>
<locale code="ro_RO" name="Romanian"/>
<locale code="ru_RU" name="Russian"/>
<locale code="sr_SR" name="Serbian (Cyrillic)"/>
<locale code="sr_RS" name="Serbian (Latin)"/>
<locale code="sl_SL" name="Slovenian"/>
<locale code="es_ES" name="Spanish"/>
<locale code="es_LA" name="Spanish (Latin American)"/>
<locale code="sv_SE" name="Swedish"/>
<locale code="th_TH" name="Thai"/>
<locale code="tr_TR" name="Turkish"/>
<locale code="uk_UA" name="Ukrainian"/>
<locale code="vi_VN" name="Vietnamese"/>
<locale code="zh_CN" name="Chinese (Simplified)"/>
<locale code="zh_TW" name="Chinese (Traditional)"/>
</locales>

View File

@ -31,8 +31,7 @@
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import com.asfusion.mate.events.Dispatcher;
import mx.managers.HistoryManager;
import org.bigbluebutton.core.EventBroadcaster;
import org.bigbluebutton.core.managers.ConfigManager2;
@ -89,8 +88,6 @@
// Video test
private static var didVideoStart:Boolean = false;
private var configMgr:ConfigManager2 = BBB.initConfigManager();
public function handleLoginEvent(event:BBBEvent):void {
LogUtil.debug("******************* Received loggedin event");
@ -204,11 +201,12 @@
protected function init():void {
EventBroadcaster.getInstance().addEventListener("configLoadedEvent", configLoadedEventHandler);
configMgr.loadConfig();
BBB.initConfigManager();
}
private function configLoadedEventHandler(e:Event):void {
LogUtil.debug("***** Config Loaded ****");
mainShell.initOptions(null);
}
]]>
@ -217,7 +215,6 @@
<m:Melomel/>
<maps:ApplicationEventMap />
<views:MainApplicationShell id="mainShell"/>
<mate:Listener type="{BBBEvent.LOGIN_EVENT}" method="handleLoginEvent"/>

View File

@ -28,16 +28,13 @@ $Id: $
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import mx.core.FlexGlobals;
import mx.managers.PopUpManager;
import mx.managers.PopUpManager;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.main.events.SettingsEvent;
import org.bigbluebutton.modules.settings.SettingsPanel;
import org.bigbluebutton.modules.settings.util.PersistUserPreferences;
import org.bigbluebutton.modules.settings.util.Requirements;
import spark.components.Application;
private var _moduleName:String = "Settings Module";
private var _attributes:Object;

View File

@ -6,7 +6,6 @@
import org.bigbluebutton.common.LogUtil;
private var _moduleName:String = "Videodock Module";
private var _attributes:Object;
private function onCreationComplete():void {
LogUtil.debug("VideodockModule initialized");
@ -16,19 +15,9 @@
return _moduleName;
}
public function get autoDock():Boolean {
return (_attributes.autoDock == "true");
}
public function get maximizeWindow():Boolean {
return (_attributes.maximizeWindow == "true");
}
public function start(attributes:Object):void {
LogUtil.debug("Videodock attr: " + attributes.username);
_attributes = attributes;
eventMap.module = this;
eventMap.startModule();
}

View File

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
BigBlueButton open source conferencing system - http://www.bigbluebutton.org
Copyright (c) 2010 BigBlueButton Inc. and by respective authors (see below).
BigBlueButton 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 2.1 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/>.
$Id: $
-->
<EventMap xmlns="http://mate.asfusion.com/" xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
import org.bigbluebutton.main.events.ParticipantJoinEvent;
import org.bigbluebutton.main.events.PresenterStatusEvent;
import org.bigbluebutton.main.model.users.events.ConferenceCreatedEvent;
private var userManager:UserManager = UserManager.getInstance();
private function participantEvent(event:ParticipantJoinEvent):void{
if (event.join) userManager.participantJoined(event.participant);
else if (!event.join) userManager.participantLeft(event.participant);
}
private function presenterChanged(event:PresenterStatusEvent):void{
userManager.presenterChanged(event.userid);
}
private function conferenceCreated(e:ConferenceCreatedEvent):void{
userManager.conferenceCreated(e.conference);
}
]]>
</mx:Script>
<EventHandlers type="{ParticipantJoinEvent.PARTICIPANT_JOINED_EVENT}" >
<InlineInvoker method="participantEvent" arguments="{event}" />
</EventHandlers>
<EventHandlers type="{PresenterStatusEvent.PRESENTER_NAME_CHANGE}" >
<InlineInvoker method="presenterChanged" arguments="{event}" />
</EventHandlers>
<EventHandlers type="{ConferenceCreatedEvent.CONFERENCE_CREATED_EVENT}" >
<InlineInvoker method="conferenceCreated" arguments="{event}" />
</EventHandlers>
</EventMap>

View File

@ -21,6 +21,14 @@ package org.bigbluebutton.common
[Bindable]
public class Images
{
[Embed(source="assets/images/green-circle.png")]
public var greenCircle:Class;
[Embed(source="assets/images/blank-circle.png")]
public var blankCircle:Class;
[Embed(source="assets/images/red-circle.png")]
public var redCircle:Class;
[Embed(source="assets/images/user_gray.png")]
public var user_gray:Class;

View File

@ -1,134 +0,0 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.common
{
import mx.collections.ArrayCollection;
import org.bigbluebutton.main.model.User;
import org.bigbluebutton.main.model.users.Conference;
/**
* The UserManager allows you to interact with the user data of those currently logged in to the conference.
*
*/
public class UserManager
{
private static var instance:UserManager = null;
private var listeners:ArrayCollection;
private var users:ArrayCollection;
private var conference:Conference;
/**
* This class is a singleton. Please initialize it using the getInstance() method.
*
*/
public function UserManager(enforcer:SingletonEnforcer)
{
if (enforcer == null){
throw new Error("There can only be 1 UserManager instance");
}
initialize();
}
private function initialize():void{
listeners = new ArrayCollection();
users = new ArrayCollection();
}
/**
* Return the single instance of the UserManager class
*/
public static function getInstance():UserManager{
if (instance == null){
instance = new UserManager(new SingletonEnforcer());
}
return instance;
}
/**
* Register a class to listen to updates from the UserManager
*/
public function registerListener(listener:IUserListener):void{
listeners.addItem(listener);
}
/**
* Returns an ArrayCollection of User objects, containing all users currently in the room.
*/
public function getUserList():ArrayCollection{
return users;
}
/**
* Returns the current Presenter. Returns NULL if there is currently no presenter assigned in the room
*/
public function getPresenter():User{
var j:int = 0;
var u:User = null;
for (var i:int = 0; i<users.length; i++){
if ((users.getItemAt(i) as User).isPresenter) u = users.getItemAt(i) as User;
}
return u;
}
public function getConference():Conference{
return this.conference;
}
internal function conferenceCreated(conference:Conference):void{
this.conference = conference;
}
internal function participantJoined(participant:User):void{
users.addItem(participant);
for (var i:int = 0; i<listeners.length; i++){
(listeners.getItemAt(i) as IUserListener).userJoined(participant);
}
}
internal function participantLeft(participant:User):void{
var j:int = -1;
for (var i:int = 0; i<users.length; i++){
if ((users.getItemAt(i) as User).userid == participant.userid) j = i;
}
if (j >= 0) users.removeItemAt(j);
for (var k:int = 0; k<listeners.length; k++){
(listeners.getItemAt(k) as IUserListener).userLeft(participant);
}
}
internal function presenterChanged(userId:int):void{
var user:User = null;
for (var i:int = 0; i<users.length; i++){
if ((users.getItemAt(i) as User).userid == userId.toString()) user = users.getItemAt(i) as User;
}
for (var k:int = 0; k<listeners.length; k++){
(listeners.getItemAt(k) as IUserListener).presenterChanged(user);
}
}
}
}
class SingletonEnforcer{}

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

View File

@ -9,20 +9,12 @@ package org.bigbluebutton.core
import flash.system.Capabilities;
public class BBB {
private static var userManager:UserManager = null;
private static var configManager:ConfigManager2 = null;
private static var streamManager:StreamManager = null;
private static var connectionManager:ConnectionManager = null;
private static var session:Session = null;
private static var userConfigManager:UserConfigManager = null;
public static function initUserManager():UserManager {
if (userManager == null) {
userManager = new UserManager();
}
return userManager;
}
public static function initUserConfigManager():UserConfigManager {
if (userConfigManager == null) {
userConfigManager = new UserConfigManager();

View File

@ -24,9 +24,9 @@ package org.bigbluebutton.core.managers
private function handleComplete(e:Event):void{
_config = new Config(new XML(e.target.data));
EventBroadcaster.getInstance().dispatchEvent(new Event("configLoadedEvent", true));
var dispatcher:Dispatcher = new Dispatcher();
LogUtil.debug("*** Sending config loaded event.");
dispatcher.dispatchEvent(new Event("configLoadedEvent", true));
// var dispatcher:Dispatcher = new Dispatcher();
// LogUtil.debug("*** Sending config loaded event.");
// dispatcher.dispatchEvent(new Event("configLoadedEvent", true));
}
public function get config():Config {

View File

@ -1,10 +1,106 @@
package org.bigbluebutton.core.managers
{
public class UserManager
{
public function UserManager()
{
}
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
* Copyright (c) 2010 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 2.1 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.core.managers {
import mx.collections.ArrayCollection;
import org.bigbluebutton.common.IUserListener;
import org.bigbluebutton.main.model.User;
import org.bigbluebutton.main.model.users.Conference;
/**
* The UserManager allows you to interact with the user data of those currently logged in to the conference.
*
*/
public class UserManager {
private static var instance:UserManager = null;
private var listeners:ArrayCollection;
private var users:ArrayCollection;
private var conference:Conference = new Conference();
/**
* This class is a singleton. Please initialize it using the getInstance() method.
*
*/
public function UserManager(enforcer:SingletonEnforcer) {
if (enforcer == null){
throw new Error("There can only be 1 UserManager instance");
}
initialize();
}
private function initialize():void{
listeners = new ArrayCollection();
users = new ArrayCollection();
}
/**
* Return the single instance of the UserManager class
*/
public static function getInstance():UserManager{
if (instance == null){
instance = new UserManager(new SingletonEnforcer());
}
return instance;
}
/**
* Register a class to listen to updates from the UserManager
*/
public function registerListener(listener:IUserListener):void{
listeners.addItem(listener);
}
public function getConference():Conference{
return this.conference;
}
public function participantJoined(participant:User):void{
users.addItem(participant);
for (var i:int = 0; i < listeners.length; i++){
(listeners.getItemAt(i) as IUserListener).userJoined(participant);
}
}
public function participantLeft(participant:User):void{
var j:int = -1;
for (var i:int = 0; i<users.length; i++){
if ((users.getItemAt(i) as User).userid == participant.userid) j = i;
}
if (j >= 0) users.removeItemAt(j);
for (var k:int = 0; k<listeners.length; k++){
(listeners.getItemAt(k) as IUserListener).userLeft(participant);
}
}
public function presenterChanged(userId:int):void{
var user:User = null;
for (var i:int = 0; i<users.length; i++){
if ((users.getItemAt(i) as User).userid == userId.toString()) user = users.getItemAt(i) as User;
}
for (var k:int = 0; k<listeners.length; k++){
(listeners.getItemAt(k) as IUserListener).presenterChanged(user);
}
}
}
}
}
class SingletonEnforcer{}

View File

@ -54,15 +54,8 @@ package org.bigbluebutton.core.model
return a
}
public function get layout():Object {
var a:Object = new Object();
a.showDebugWindow = ((config.layout.@showDebugWindow).toUpperCase() == "TRUE") ? true : false;
a.showVideoLayout = ((config.layout.@showVideoLayout).toUpperCase() == "TRUE") ? true : false;
a.showResetLayout = ((config.layout.@showResetLayout).toUpperCase() == "TRUE") ? true : false;
a.showToolbar = ((config.layout.@showToolbar).toUpperCase() == "TRUE") ? true : false;
a.showLogoutWindow = ((config.layout.@showLogoutWindow).toUpperCase() == "TRUE") ? true : false;
a.showHelpButton = ((config.layout.@showHelpButton).toUpperCase() == "TRUE") ? true : false;
return a
public function get layout():XML {
return new XML(config.layout.toXMLString());
}
public function isModulePresent(name:String):Boolean {

View File

@ -28,8 +28,7 @@ package org.bigbluebutton.main.model
import org.bigbluebutton.main.events.AppVersionEvent;
import org.bigbluebutton.main.model.modules.ModuleDescriptor;
public class ConfigParameters
{
public class ConfigParameters {
public static const FILE_PATH:String = "conf/config.xml";
private var _urlLoader:URLLoader;

View File

@ -1,24 +1,49 @@
package org.bigbluebutton.main.model
{
import org.bigbluebutton.core.BBB;
public class LayoutOptions
{
[Bindable]
public var showLogButton:Boolean = true;
[Bindable] public var showDebugWindow:Boolean = true;
[Bindable] public var showLogButton:Boolean = true;
[Bindable] public var showVideoLayout:Boolean = true;
[Bindable] public var showResetLayout:Boolean = true;
[Bindable] public var showToolbar:Boolean = true;
[Bindable] public var showHelpButton:Boolean = true;
[Bindable] public var showLogoutWindow:Boolean = true;
[Bindable]
public var showVideoLayout:Boolean = true;
[Bindable]
public var showResetLayout:Boolean = true;
public function parseOptions():void {
var vxml:XML = BBB.initConfigManager().config.layout;
if (vxml != null) {
if (vxml.@showDebugWindow != undefined) {
showDebugWindow = (vxml.@showDebugWindow.toString().toUpperCase() == "TRUE") ? true : false;
}
[Bindable]
public var showToolbar:Boolean = true;
[Bindable]
public var showHelpButton:Boolean = true;
[Bindable]
public var showLogoutWindow:Boolean = true;
if (vxml.@showLogButton != undefined) {
showLogButton = (vxml.@showLogButton.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showVideoLayout != undefined) {
showVideoLayout = (vxml.@showVideoLayout.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showResetLayout != undefined) {
showResetLayout = (vxml.@showResetLayout.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showToolbar != undefined) {
showToolbar = (vxml.@showToolbar.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showHelpButton != undefined) {
showHelpButton = (vxml.@showHelpButton.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showLogoutWindow != undefined) {
showLogoutWindow = (vxml.@showLogoutWindow.toString().toUpperCase() == "TRUE") ? true : false;
}
}
}
}
}

View File

@ -16,20 +16,15 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.main.model
{
package org.bigbluebutton.main.model {
import com.asfusion.mate.events.Dispatcher;
import flash.events.NetStatusEvent;
import flash.net.NetConnection;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.main.events.PortTestEvent;
import org.bigbluebutton.main.model.modules.ModulesDispatcher;
public class PortTestProxy
{
public class PortTestProxy {
private var nc:NetConnection;
private var protocol:String;
private var port:String;
@ -38,16 +33,11 @@ package org.bigbluebutton.main.model
private var uri:String;
private var modulesDispatcher:ModulesDispatcher;
public function PortTestProxy()
{
public function PortTestProxy() {
modulesDispatcher = new ModulesDispatcher();
}
public function connect(protocol:String = "",
hostname:String = "",
port:String = "",
application:String = ""):void
{
public function connect(protocol:String = "", hostname:String = "", port:String = "", application:String = ""):void {
var portTest:PortTest = new PortTest(protocol,hostname,port,application);
portTest.addConnectionSuccessListener(connectionListener);
portTest.connect();
@ -65,59 +55,24 @@ package org.bigbluebutton.main.model
modulesDispatcher.sendPortTestFailedEvent(port, hostname, protocol, application);
}
}
public function connect1(protocol:String = "",
hostname:String = "",
port:String = "",
application:String = ""):void
{
this.protocol = protocol;
this.hostname = hostname;
this.port = port;
this.application = application;
nc = new NetConnection();
nc.client = this;
nc.addEventListener( NetStatusEvent.NET_STATUS, netStatusEventHandler );
uri = protocol + "://" + hostname + "/" + application;
LogUtil.debug("Testing connection to " + uri);
try
{
nc.connect( uri );
}
catch(e:ArgumentError)
{
LogUtil.error("Incorrect arguments on connecting wiht port testing");
//facade.sendNotification(MainApplicationConstants.PORT_TEST_FAILED,
// {protocol:protocol, hostname:hostname, port:port, application:application});
}
}
public function close() : void
{
public function close():void {
nc.removeEventListener(NetStatusEvent.NET_STATUS, netStatusEventHandler);
nc.close();
}
protected function netStatusEventHandler(event:NetStatusEvent):void
{
protected function netStatusEventHandler(event:NetStatusEvent):void {
var info:Object = event.info;
var statusCode : String = info.code;
if ( statusCode == "NetConnection.Connect.Success" )
{
if (statusCode == "NetConnection.Connect.Success") {
LogUtil.debug("Successfully connected to " + uri);
modulesDispatcher.sendPortTestSuccessEvent(port, hostname, protocol, application);
}
else if ( statusCode == "NetConnection.Connect.Rejected" ||
} else if (statusCode == "NetConnection.Connect.Rejected" ||
statusCode == "NetConnection.Connect.Failed" ||
statusCode == "NetConnection.Connect.Closed" )
{
statusCode == "NetConnection.Connect.Closed" ) {
LogUtil.error("Failed to connect to " + uri);
modulesDispatcher.sendPortTestFailedEvent(port, hostname, protocol, application);
} else {
LogUtil.error("Failed to connect to " + uri + " due to " + statusCode);
}
@ -129,7 +84,5 @@ package org.bigbluebutton.main.model
* The Red5 oflaDemo returns bandwidth stats.
*/
public function onBWDone() : void { }
}
}

View File

@ -26,8 +26,7 @@ package org.bigbluebutton.main.model.users
import org.bigbluebutton.common.Role;
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
public class BBBUser
{
public class BBBUser {
public static const MODERATOR:String = "MODERATOR";
public static const VIEWER:String = "VIEWER";
public static const PRESENTER:String = "PRESENTER";
@ -43,6 +42,10 @@ package org.bigbluebutton.main.model.users
[Bindable] public var room:String = "";
[Bindable] public var authToken:String = "";
[Bindable] public var selected:Boolean = false;
[Bindable] public var voiceUserid:Number;
[Bindable] public var voiceMuted:Boolean = false;
[Bindable] public var voiceJoined:Boolean = false;
[Bindable] public var voiceLocked:Boolean = false;
private var _status:StatusCollection = new StatusCollection();

View File

@ -16,17 +16,16 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.main.model.users
{
package org.bigbluebutton.main.model.users {
import mx.collections.ArrayCollection;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.core.BBB;
public class Conference {
private var _myUserid : Number;
[Bindable] public var me:BBBUser = null;
private var _myUserid:Number;
[Bindable] private var me:BBBUser = null;
[Bindable] public var users:ArrayCollection = null;
public function Conference():void {
@ -34,14 +33,8 @@ package org.bigbluebutton.main.model.users
users = new ArrayCollection();
}
/**
* Adds a user to this conference
* @param newuser
*
*/
public function addUser(newuser:BBBUser):void {
if (! hasParticipant(newuser.userid)) {
if (! hasParticipant(newuser.userid)) {
if (newuser.userid == me.userid) {
newuser.me = true;
}
@ -51,14 +44,7 @@ package org.bigbluebutton.main.model.users
}
}
/**
* Check if the user with the specified id exists
* @param id
* @return
*
*/
public function hasParticipant(userid:Number) : Boolean
{
public function hasParticipant(userid:Number):Boolean {
var p:Object = getParticipantIndex(userid);
if (p != null) {
return true;
@ -71,8 +57,7 @@ package org.bigbluebutton.main.model.users
var p:BBBUser;
var moderatorCount:int = 0;
for (var i:int = 0; i < users.length; i++)
{
for (var i:int = 0; i < users.length; i++) {
p = users.getItemAt(i) as BBBUser;
if (p.role == Role.MODERATOR) {
moderatorCount++;
@ -85,8 +70,7 @@ package org.bigbluebutton.main.model.users
public function getTheOnlyModerator():BBBUser {
var p:BBBUser;
for (var i:int = 0; i < users.length; i++)
{
for (var i:int = 0; i < users.length; i++) {
p = users.getItemAt(i) as BBBUser;
if (p.role == Role.MODERATOR) {
return BBBUser.copy(p);
@ -95,15 +79,8 @@ package org.bigbluebutton.main.model.users
return null;
}
/**
* Get the user with the specific id
* @param id
* @return
*
*/
public function getParticipant(userid:Number) : BBBUser
{
public function getParticipant(userid:Number):BBBUser {
var p:Object = getParticipantIndex(userid);
if (p != null) {
return p.participant as BBBUser;
@ -121,14 +98,8 @@ package org.bigbluebutton.main.model.users
var a:BBBUser = user.participant as BBBUser;
return a.presenter;
}
/**
* Remove participant with the specified id number
* @param userid
*
*/
public function removeParticipant(userid:Number) : void
{
public function removeParticipant(userid:Number):void {
var p:Object = getParticipantIndex(userid);
if (p != null) {
LogUtil.debug("removing user[" + p.participant.name + "," + p.participant.userid + "]");
@ -143,12 +114,10 @@ package org.bigbluebutton.main.model.users
* @return -1 if participant not found
*
*/
private function getParticipantIndex(userid:Number):Object
{
private function getParticipantIndex(userid:Number):Object {
var aUser : BBBUser;
for (var i:int = 0; i < users.length; i++)
{
for (var i:int = 0; i < users.length; i++) {
aUser = users.getItemAt(i) as BBBUser;
if (aUser.userid == userid) {
@ -159,20 +128,108 @@ package org.bigbluebutton.main.model.users
// Participant not found.
return null;
}
public function amIPresenter():Boolean {
return me.presenter;
}
public function setMePresenter(presenter:Boolean):void {
me.presenter = presenter;
}
public function amIThisUser(userid:int):Boolean {
return me.userid == userid;
}
public function amIModerator():Boolean {
return me.role == Role.MODERATOR;
}
/**
* Removes all the participants from the conference
*
*/
public function removeAllParticipants() : void
{
public function muteMyVoice(mute:Boolean):void {
voiceMuted = mute;
}
public function isMyVoiceMuted():Boolean {
return me.voiceMuted;
}
[Bindable]
public function set voiceMuted(m:Boolean):void {
me.voiceMuted = m;
}
public function get voiceMuted():Boolean {
return me.voiceMuted;
}
public function setMyVoiceUserId(userid:int):void {
me.voiceUserid = userid;
}
public function getMyVoiceUserId():Number {
return me.voiceUserid;
}
public function amIThisVoiceUser(userid:int):Boolean {
return me.voiceUserid == userid;
}
public function setMyVoiceJoined(joined:Boolean):void {
voiceJoined = joined;
}
public function amIVoiceJoined():Boolean {
return me.voiceJoined;
}
/** Hook to make the property Bindable **/
[Bindable]
public function set voiceJoined(j:Boolean):void {
me.voiceJoined = j;
}
public function get voiceJoined():Boolean {
return me.voiceJoined;
}
[Bindable]
public function set voiceLocked(locked:Boolean):void {
me.voiceLocked = locked;
}
public function get voiceLocked():Boolean {
return me.voiceLocked;
}
public function getMyUserId():Number {
return me.userid;
}
public function setMyUserid(userid:int):void {
me.userid = userid;
}
public function setMyName(name:String):void {
me.name = name;
}
public function setMyRole(role:String):void {
me.role = role;
}
public function setMyRoom(room:String):void {
me.room = room;
}
public function setMyAuthToken(token:String):void {
me.authToken = token;
}
public function removeAllParticipants():void {
users.removeAll();
}
public function newUserStatus(id:Number, status:String, value:Object):void
{
var aUser:BBBUser = getParticipant(id);
public function newUserStatus(id:Number, status:String, value:Object):void {
var aUser:BBBUser = getParticipant(id);
if (aUser != null) {
var s:Status = new Status(status, value);
aUser.changeStatus(s);
@ -185,8 +242,7 @@ package org.bigbluebutton.main.model.users
* Sorts the users by name
*
*/
private function sort():void
{
private function sort():void {
users.source.sortOn("name", Array.CASEINSENSITIVE);
users.refresh();
}

View File

@ -26,6 +26,7 @@ package org.bigbluebutton.main.model.users
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.managers.UserConfigManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.SuccessfulLoginEvent;
import org.bigbluebutton.main.events.UserServicesEvent;
import org.bigbluebutton.main.model.ConferenceParameters;
@ -39,16 +40,11 @@ package org.bigbluebutton.main.model.users
public class UserService {
private var joinService:JoinService;
private var _conference:Conference;
private var _userSOService:UsersSOService;
private var _conferenceParameters:ConferenceParameters;
private var _conferenceParameters:ConferenceParameters;
private var applicationURI:String;
private var hostURI:String;
private var hostURI:String;
private var connection:NetConnection;
private var userId:Number;
private var dispatcher:Dispatcher;
public function UserService() {
@ -66,17 +62,16 @@ package org.bigbluebutton.main.model.users
private function joinListener(success:Boolean, result:Object):void{
if (success) {
_conference = new Conference();
_conference.me.name = result.username;
_conference.me.role = result.role;
_conference.me.room = result.room;
_conference.me.authToken = result.authToken;
UserManager.getInstance().getConference().setMyName(result.username);
UserManager.getInstance().getConference().setMyRole(result.role);
UserManager.getInstance().getConference().setMyRoom(result.room);
UserManager.getInstance().getConference().setMyAuthToken(result.authToken);
_conferenceParameters = new ConferenceParameters();
_conferenceParameters.conference = result.conference;
_conferenceParameters.username = _conference.me.name;
_conferenceParameters.role = _conference.me.role;
_conferenceParameters.room = _conference.me.room;
_conferenceParameters.username = result.username;
_conferenceParameters.role = result.role;
_conferenceParameters.room = result.room;
_conferenceParameters.webvoiceconf = result.webvoiceconf;
_conferenceParameters.voicebridge = result.voicebridge;
_conferenceParameters.welcome = result.welcome;
@ -94,9 +89,8 @@ package org.bigbluebutton.main.model.users
*/
var ucm:UserConfigManager = BBB.initUserConfigManager();
ucm.setConferenceParameters(_conferenceParameters);
var e:ConferenceCreatedEvent = new ConferenceCreatedEvent(ConferenceCreatedEvent.CONFERENCE_CREATED_EVENT);
e.conference = _conference;
e.conference = UserManager.getInstance().getConference();
dispatcher.dispatchEvent(e);
connect();
@ -104,12 +98,12 @@ package org.bigbluebutton.main.model.users
}
private function connect():void{
_userSOService = new UsersSOService(applicationURI, _conference);
_userSOService = new UsersSOService(applicationURI);
_userSOService.connect(_conferenceParameters);
}
public function userLoggedIn(e:UsersConnectionEvent):void{
_conference.me.userid = e.userid;
UserManager.getInstance().getConference().setMyUserid(e.userid);
_conferenceParameters.connection = e.connection;
_conferenceParameters.userid = e.userid;
@ -127,25 +121,17 @@ package org.bigbluebutton.main.model.users
public function disconnectTest():void{
_userSOService.disconnect(false);
}
public function get me():BBBUser {
return _conference.me;
}
public function isModerator():Boolean {
if (me.role == "MODERATOR") {
return true;
}
return false;
return UserManager.getInstance().getConference().amIModerator();
}
public function get participants():ArrayCollection {
return _conference.users;
return UserManager.getInstance().getConference().users;
}
public function assignPresenter(assignTo:Number):void {
_userSOService.assignPresenter(assignTo, me.userid);
_userSOService.assignPresenter(assignTo, UserManager.getInstance().getConference().getMyUserId());
}
public function addStream(e:BroadcastStartedEvent):void {
@ -157,8 +143,7 @@ package org.bigbluebutton.main.model.users
}
public function raiseHand(e:RaiseHandEvent):void {
var userid:Number = _conference.me.userid;
_userSOService.raiseHand(userid, e.raised);
_userSOService.raiseHand(UserManager.getInstance().getConference().getMyUserId(), e.raised);
}
public function lowerHand(e:LowerHandEvent):void {

View File

@ -16,8 +16,7 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.main.model.users
{
package org.bigbluebutton.main.model.users {
import com.asfusion.mate.events.Dispatcher;
import flash.events.AsyncErrorEvent;
@ -26,9 +25,8 @@ package org.bigbluebutton.main.model.users
import flash.net.Responder;
import flash.net.SharedObject;
import mx.controls.Alert;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.LogoutEvent;
import org.bigbluebutton.main.events.ParticipantJoinEvent;
@ -37,8 +35,7 @@ package org.bigbluebutton.main.model.users
import org.bigbluebutton.main.model.User;
import org.bigbluebutton.main.model.users.events.ConnectionFailedEvent;
public class UsersSOService
{
public class UsersSOService {
public static const NAME:String = "ViewersSOService";
public static const LOGNAME:String = "[ViewersSOService]";
@ -46,18 +43,14 @@ package org.bigbluebutton.main.model.users
private static const SO_NAME : String = "participantsSO";
private static const STATUS:String = "_STATUS";
private var netConnectionDelegate: NetConnectionDelegate;
private var _participants:Conference;
private var netConnectionDelegate: NetConnectionDelegate;
private var _room:String;
private var _applicationURI:String;
private var dispatcher:Dispatcher;
public function UsersSOService(uri:String, participants:Conference)
{
public function UsersSOService(uri:String) {
_applicationURI = uri;
_participants = participants;
netConnectionDelegate = new NetConnectionDelegate(uri);
dispatcher = new Dispatcher();
}
@ -72,17 +65,14 @@ package org.bigbluebutton.main.model.users
netConnectionDelegate.disconnect(onUserAction);
}
public function join(userid:Number, room:String) : void
{
public function join(userid:Number, room:String):void {
_participantsSO = SharedObject.getRemote(SO_NAME, _applicationURI + "/" + room, false);
_participantsSO.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
_participantsSO.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
_participantsSO.client = this;
_participantsSO.connect(netConnectionDelegate.connection);
queryForParticipants();
_participants.me.userid = userid;
queryForParticipants();
UserManager.getInstance().getConference().setMyUserid(userid);
}
private function queryForParticipants():void {
@ -94,19 +84,17 @@ package org.bigbluebutton.main.model.users
function(result:Object):void {
LogUtil.debug("Successfully queried participants: " + result.count);
if (result.count > 0) {
for(var p:Object in result.participants)
{
for(var p:Object in result.participants) {
participantJoined(result.participants[p]);
}
}
}
},
// status - On error occurred
function(status:Object):void {
LogUtil.error("Error occurred:");
for (var x:Object in status) {
LogUtil.error(x + " : " + status[x]);
}
}
sendConnectionFailedEvent(ConnectionFailedEvent.UNKNOWN_REASON);
}
)//new Responder
@ -118,25 +106,28 @@ package org.bigbluebutton.main.model.users
}
public function kickUserCallback(userid:Number):void{
if (userid == _participants.me.userid){
if (UserManager.getInstance().getConference().amIThisUser(userid)){
dispatcher.dispatchEvent(new LogoutEvent(LogoutEvent.USER_LOGGED_OUT));
}
}
public function participantLeft(user:Object):void {
var participant:BBBUser = _participants.getParticipant(Number(user));
var participant:BBBUser = UserManager.getInstance().getConference().getParticipant(Number(user));
var p:User = new User();
p.userid = String(participant.userid);
p.name = participant.name;
UserManager.getInstance().participantLeft(p);
UserManager.getInstance().getConference().removeParticipant(Number(user));
var dispatcher:Dispatcher = new Dispatcher();
var joinEvent:ParticipantJoinEvent = new ParticipantJoinEvent(ParticipantJoinEvent.PARTICIPANT_JOINED_EVENT);
joinEvent.participant = p;
joinEvent.join = false;
dispatcher.dispatchEvent(joinEvent);
_participants.removeParticipant(Number(user));
}
public function participantJoined(joinedUser:Object):void {
@ -148,7 +139,7 @@ package org.bigbluebutton.main.model.users
LogUtil.debug("User status: " + joinedUser.status.hasStream);
LogUtil.info("Joined as [" + user.userid + "," + user.name + "," + user.role + "]");
_participants.addUser(user);
UserManager.getInstance().getConference().addUser(user);
participantStatusChange(user.userid, "hasStream", joinedUser.status.hasStream);
participantStatusChange(user.userid, "presenter", joinedUser.status.presenter);
participantStatusChange(user.userid, "raiseHand", joinedUser.status.raiseHand);
@ -158,12 +149,14 @@ package org.bigbluebutton.main.model.users
participant.name = user.name;
participant.isPresenter = joinedUser.status.presenter;
participant.role = user.role;
UserManager.getInstance().participantJoined(participant);
var dispatcher:Dispatcher = new Dispatcher();
var joinEvent:ParticipantJoinEvent = new ParticipantJoinEvent(ParticipantJoinEvent.PARTICIPANT_JOINED_EVENT);
joinEvent.participant = participant;
joinEvent.join = true;
dispatcher.dispatchEvent(joinEvent);
dispatcher.dispatchEvent(joinEvent);
}
/**
@ -180,21 +173,18 @@ package org.bigbluebutton.main.model.users
* Callback from the server from many of the bellow nc.call methods
*/
public function participantStatusChange(userid:Number, status:String, value:Object):void {
LogUtil.debug("Received status change [" + userid + "," + status + "," + value + "]")
_participants.newUserStatus(userid, status, value);
LogUtil.debug("Received status change [" + userid + "," + status + "," + value + "]")
UserManager.getInstance().getConference().newUserStatus(userid, status, value);
if (status == "presenter"){
var e:PresenterStatusEvent = new PresenterStatusEvent(PresenterStatusEvent.PRESENTER_NAME_CHANGE);
e.userid = userid;
var dispatcher:Dispatcher = new Dispatcher();
dispatcher.dispatchEvent(e);
}
}
}
public function assignPresenter(userid:Number, assignedBy:Number):void {
public function assignPresenter(userid:Number, assignedBy:Number):void {
var nc:NetConnection = netConnectionDelegate.connection;
nc.call(
"participants.assignPresenter",// Remote function name
@ -237,12 +227,10 @@ package org.bigbluebutton.main.model.users
); //_netConnection.call
}
private function netStatusHandler ( event : NetStatusEvent ) : void
{
private function netStatusHandler ( event : NetStatusEvent ):void {
var statusCode : String = event.info.code;
switch ( statusCode )
{
switch (statusCode) {
case "NetConnection.Connect.Success" :
LogUtil.debug(LOGNAME + ":Connection Success");
sendConnectionSuccessEvent();

View File

@ -20,98 +20,15 @@
$Id: $
-->
<mx:ComboBox xmlns:mx="http://www.adobe.com/2006/mxml" dataProvider="{this.langNames}"
selectedIndex="10" change="changeLanguage()" rowCount="15" width="120">
<mx:ComboBox xmlns:mx="http://www.adobe.com/2006/mxml" dataProvider="{ResourceUtil.getInstance().localeNames}"
selectedIndex="{ResourceUtil.getInstance().localeIndex}"
change="changeLanguage()" rowCount="15" width="120">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import org.bigbluebutton.util.i18n.ResourceUtil;
[Bindable] private var langNames:Array=[
'Azeri' ,
'Basque' ,
'Bengali' ,
'Bulgarian',
'Czech',
'Chinese Simplified',
'Chinese Traditional' ,
'Croatian',
'Danish' ,
'Dutch',
'English' ,
'Farsi',
'French',
'French Canadian',
'German',
'Greek',
'Indonesian',
'Italian',
'Japanese',
'Korean',
'Latvian',
'Lithuanian',
'Mongolian',
'Nepali',
'Norwegian',
'Portugese',
'Portugese (Brazil)',
'Polish',
'Romanian',
'Russian',
'Spanish',
'Spanish (Latin)',
'Swedish',
'Serbian (Cyrillic)',
'Serbian (Latin)',
'Thai',
'Turkish',
'Ukrainian',
'Vietnamese',] ;
private var langCodes:Array=[
'az_AZ',
'eu_EU',
'bn_BN',
'bg_BG',
'cs_CZ',
'zh_CN',
'zh_TW',
'hr_HR',
'da_DK',
'nl_NL',
'en_US',
'fa_IR',
'fr_FR',
'fr_CA',
'de_DE',
'el_GR',
'id_ID',
'it_IT',
'ja_JP',
'ko_KR',
'lv_LV',
'lt_LT',
'mn_MN',
'nl_NL',
'nb_NO',
'pt_PT',
'pt_BR',
'pl_PL',
'ro_RO',
'ru_RU',
'es_ES',
'es_LA',
'sv_SE',
'sr_SR',
'sr_RS',
'th_TH',
'tr_TR',
'uk_UA',
'vi_VN'] ;
private function changeLanguage():void{
var lang:String = this.langCodes[this.selectedIndex];
ResourceUtil.getInstance().changeLocale(lang);
private function changeLanguage():void {
ResourceUtil.getInstance().setPreferredLocale(ResourceUtil.getInstance().getLocaleCodeForIndex(selectedIndex));
}
]]>
</mx:Script>

View File

@ -42,24 +42,19 @@
<mate:Listener type="{ConnectionFailedEvent.CONNECTION_REJECTED}" method="attemptReconnect" />
<mate:Listener type="configLoadedEvent" method="initOptions" />
<mate:Listener type="SHOW_MIC_SETTINGS" method="showMicSettings" />
<common:APIEventMap />
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import flash.events.MouseEvent;
import com.asfusion.mate.events.Dispatcher;
import flash.events.MouseEvent;
import flexlib.mdi.containers.MDIWindow;
import flexlib.mdi.effects.effectsLib.MDIVistaEffects;
import flexlib.mdi.effects.effectsLib.MDIVistaEffects;
import mx.collections.ArrayCollection;
import mx.containers.TitleWindow;
import mx.controls.Alert;
import mx.core.FlexGlobals;
import mx.events.CloseEvent;
import mx.managers.PopUpManager;
import org.bigbluebutton.common.IBbbModuleWindow;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.LogUtil;
@ -79,15 +74,12 @@
import org.bigbluebutton.util.i18n.ResourceUtil;
import org.bigbluebutton.util.logging.Logger;
private var globalDispatcher:Dispatcher;
private var globalDispatcher:Dispatcher;
private var dispState:String; //full-screen?
private var images:Images = new Images();
private var stoppedModules:ArrayCollection;
private var stoppedModules:ArrayCollection;
private var logs:Logger = new Logger();
private var logWindow:LogWindow;
private var logWindow:LogWindow;
private var logoutWindow:LoggedOutWindow;
private var connectionLostWindow:ConnectionLostWindow;
@ -105,16 +97,13 @@
return _mode;
}
[Bindable]
private var layoutOptions:LayoutOptions = new LayoutOptions();
[Bindable] private var layoutOptions:LayoutOptions;
private function initOptions(e:Event):void {
layoutOptions.showLogButton = BBB.initConfigManager().config.layout.showDebugWindow;
layoutOptions.showResetLayout = BBB.initConfigManager().config.layout.showResetLayout;
layoutOptions.showVideoLayout = BBB.initConfigManager().config.layout.showVideoLayout;
layoutOptions.showToolbar = BBB.initConfigManager().config.layout.showToolbar;
layoutOptions.showLogoutWindow = BBB.initConfigManager().config.layout.showLogoutWindow;
layoutOptions.showHelpButton = BBB.initConfigManager().config.layout.showHelpButton;
public function initOptions(e:Event):void {
LogUtil.debug("**** Init layout options ***");
layoutOptions = new LayoutOptions();
layoutOptions.parseOptions();
LogUtil.debug("*** show toolbar = " + layoutOptions.showToolbar);
}
protected function initializeShell():void {
@ -248,17 +237,20 @@
mdiCanvas.removeAllWindows();
} else {
mdiCanvas.removeAllWindows();
redirect();
var pageHost:String = FlexGlobals.topLevelApplication.url.split("/")[0];
var pageURL:String = FlexGlobals.topLevelApplication.url.split("/")[2];
var request:URLRequest = new URLRequest(pageHost + "//" + pageURL + "/bigbluebutton/api/signOut");
var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, handleLogoutComplete);
urlLoader.load(request);
}
}
private function redirect():void {
var pageHost:String = FlexGlobals.topLevelApplication.url.split("/")[0];
var pageURL:String = FlexGlobals.topLevelApplication.url.split("/")[2];
var url:URLRequest = new URLRequest(pageHost + "//" + pageURL + "/bigbluebutton/api/signOut");
LogUtil.debug("Log out url: " + pageURL);
navigateToURL(url, '_self');
}
private function handleLogoutComplete(e:Event):void {
var request:URLRequest = new URLRequest(BBB.initUserConfigManager().getLogoutUrl());
LogUtil.debug("Logging out to: " + BBB.initUserConfigManager().getLogoutUrl());
navigateToURL(request, '_self');
}
private function attemptReconnect(e:ConnectionFailedEvent):void{
/*if (connectionLostWindow != null) return;
@ -297,7 +289,7 @@
]]>
</mx:Script>
<views:MainToolbar id="toolbar" dock="true" width="100%" height="30" visible="true" verticalAlign="middle" layoutOptions="{layoutOptions}"/>
<views:MainToolbar id="toolbar" dock="true" width="100%" height="30" visible="{layoutOptions.showToolbar}" verticalAlign="middle" toolbarOptions="{layoutOptions}"/>
<views:MainCanvas id="mdiCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off" effectsLib="{flexlib.mdi.effects.effectsLib.MDIVistaEffects}" width="100%" height="100%">
<views:LoadingBar id="progressBar" x="{this.width/2 - progressBar.width/2}" y="{this.height/2 - progressBar.height/2}" width="{this.width/2}" />
<views:BrandingLogo x="{this.width - 300}" y="{this.height - 300}" />

View File

@ -31,14 +31,16 @@
import org.bigbluebutton.common.IBbbModuleWindow;
import org.bigbluebutton.common.LogUtil;
public static const TOP_LEFT:String = "TOP_LEFT_WINDOW";
public static const BOTTOM_LEFT:String = "BOTTOM_LEFT_WINDOW";
public static const MIDDLE:String = "MIDDLE_WINDOW";
public static const BOTTOM:String = "BOTTOM_WINDOW";
public static const TOP_RIGHT:String = "TOP_RIGHT_WINDOW";
public static const BOTTOM_RIGHT:String = "BOTTOM_RIGHT_WINDOW";
public static const POPUP:String = "POP_UP_WINDOW";
public static const UNTOUCHED:String = "UNTOUCHED_WINDOW";
public static const TOP_2_3:String = "top-two-thirds";
public static const BOTTOM_1_3:String = "bottom-one-third";
public static const TOP_LEFT:String = "top-left";
public static const BOTTOM_LEFT:String = "bottom-left";
public static const MIDDLE:String = "middle";
public static const BOTTOM:String = "bottom";
public static const TOP_RIGHT:String = "top-right";
public static const BOTTOM_RIGHT:String = "bottom-right";
public static const POPUP:String = "popup";
public static const ABSOLUTE:String = "absolute";
public static const DESKTOP_SHARING_VIEW:String = "POP_UP_DESKSHARE_VIEW";
public static const DESKTOP_SHARING_PUBLISH:String = "POP_UP_DESKSHARE_PUBLISH";
@ -98,6 +100,18 @@
var x:Number;
var y:Number;
switch(position){
case TOP_2_3:
x = 1;
y = 1;
win.width = this.width;
win.height = ((this.height/3) * 2) - 2;
break;
case BOTTOM_1_3:
x = 1;
y = (this.height/3) * 2 + 2;
win.width = this.width;
win.height = (this.height/3) - 2;
break
case TOP_LEFT:
x = 1;
y = 1;
@ -148,7 +162,7 @@
x = 1;
y = 1;
break;
case UNTOUCHED:
case ABSOLUTE:
// don't reposition the window
x = win.x;
y = win.y;

View File

@ -36,10 +36,7 @@
<![CDATA[
import org.bigbluebutton.main.model.LayoutOptions;
import com.asfusion.mate.events.Dispatcher;
import mx.controls.Alert;
import mx.core.UIComponent;
import mx.core.UIComponent;
import org.bigbluebutton.common.IBbbToolbarComponent;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.events.CloseWindowEvent;
@ -58,16 +55,16 @@
public static const ALIGN_LEFT:String = "ALIGN_LEFT";
[Bindable]
public var layoutOptions:LayoutOptions = new LayoutOptions();
public var toolbarOptions:LayoutOptions = new LayoutOptions();
public function loggedIn(name:String, room:String, role:String):void{
if (layoutOptions.showToolbar) {
this.visible = false;
} else {
if (toolbarOptions.showToolbar) {
this.visible = true;
} else {
this.visible = false;
}
if (layoutOptions.showHelpButton) {
if (toolbarOptions.showHelpButton) {
helpBtn.visible = true;
} else {
helpBtn.visible = false;
@ -99,7 +96,7 @@
}
private function hideToolbar(e:ConnectionFailedEvent):void{
if (layoutOptions.showToolbar) {
if (toolbarOptions.showToolbar) {
this.visible = false;
} else {
this.visible = true;
@ -125,7 +122,7 @@
private function loginSuccess(e:SuccessfulLoginEvent):void{
loggedIn(e.conferenceParameters.username, e.conferenceParameters.room, e.conferenceParameters.role);
if (layoutOptions.showToolbar)
if (toolbarOptions.showToolbar)
visible = true;
}

View File

@ -30,7 +30,9 @@
import mx.managers.PopUpManager;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.util.i18n.ResourceUtil;
private const windowTitleDefault:String = "Warning: Old Language Version";
private const reminder1Default:String = "You have an old language translation of BigBlueButton.";
private const reminder2Default:String = "Please clear your browser cache and try again.";
@ -57,12 +59,21 @@
private function redirect():void {
var pageHost:String = FlexGlobals.topLevelApplication.url.split("/")[0];
var pageURL:String = FlexGlobals.topLevelApplication.url.split("/")[2];
var url:URLRequest = new URLRequest(pageHost + "//" + pageURL + "/bigbluebutton/api/signOut");
LogUtil.debug("Log out url: " + pageURL);
navigateToURL(url, '_self');
PopUpManager.removePopUp(this);
var request:URLRequest = new URLRequest(pageHost + "//" + pageURL + "/bigbluebutton/api/signOut");
LogUtil.debug("Log out url: " + pageHost + "//" + pageURL + "/bigbluebutton/api/signOut");
request.method = URLRequestMethod.GET;
var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, handleComplete);
urlLoader.load(request);
}
private function handleComplete(e:Event):void {
var request:URLRequest = new URLRequest(BBB.initUserConfigManager().getLogoutUrl());
LogUtil.debug("Logging out to: " + BBB.initUserConfigManager().getLogoutUrl());
navigateToURL(request, '_self');
PopUpManager.removePopUp(this);
}
private function onUserLoggedOutWindowClose(e:Event):void {
PopUpManager.removePopUp(this);
}

View File

@ -34,7 +34,7 @@ package org.bigbluebutton.modules.breakout.business
import mx.controls.Alert;
import mx.events.CloseEvent;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.Conference;

View File

@ -32,7 +32,7 @@
import mx.controls.Alert;
import mx.events.CloseEvent;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.modules.breakout.events.CreateRoomEvent;

View File

@ -40,7 +40,7 @@ package org.bigbluebutton.modules.chat.maps {
private var translationEnabled:Boolean;
private var translationOn:Boolean;
private var chatOptions:ChatOptions = new ChatOptions();
private var chatOptions:ChatOptions;
public function ChatEventMapDelegate() {
this.dispatcher = dispatcher;
@ -49,10 +49,7 @@ package org.bigbluebutton.modules.chat.maps {
}
private function getChatOptions():void {
var cxml:XML = BBB.getConfigForModule("ChatModule");
if (cxml != null) {
chatOptions.privateEnabled = (cxml.@privateEnabled.toString().toUpperCase() == "TRUE") ? true : false;
}
chatOptions = new ChatOptions();
}
public function openChatWindow():void {

View File

@ -1,5 +1,7 @@
package org.bigbluebutton.modules.chat.model
{
import org.bigbluebutton.core.BBB;
public class ChatOptions
{
[Bindable]
@ -10,5 +12,20 @@ package org.bigbluebutton.modules.chat.model
[Bindable]
public var privateEnabled:Boolean = true;
[Bindable]
public var position:String = "top-right";
public function ChatOptions() {
var cxml:XML = BBB.getConfigForModule("ChatModule");
if (cxml != null) {
if (cxml.@privateEnabled != undefined) {
privateEnabled = (cxml.@privateEnabled.toString().toUpperCase() == "TRUE") ? true : false;
}
if (cxml.@position != undefined) {
position = cxml.@position.toString();
}
}
}
}
}

View File

@ -26,11 +26,12 @@ package org.bigbluebutton.modules.chat.services
import flash.net.Responder;
import flash.net.SharedObject;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.ParticipantJoinEvent;
import org.bigbluebutton.main.model.User;
import org.bigbluebutton.modules.chat.events.PrivateChatMessageEvent;
import org.bigbluebutton.modules.chat.model.MessageVO;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.modules.chat.model.MessageVO;
public class PrivateChatSharedObjectService
{
@ -65,8 +66,7 @@ package org.bigbluebutton.modules.chat.services
function(result:Object):void {
trace("Successfully queried participants: " + result.count);
if (result.count > 0) {
for(var p:Object in result.participants)
{
for(var p:Object in result.participants) {
participantJoined(result.participants[p]);
}
}
@ -82,18 +82,15 @@ package org.bigbluebutton.modules.chat.services
);
}
public function join(userid:String, uri:String):void
{
public function join(userid:String, uri:String):void {
this.userid = userid;
chatSO = SharedObject.getRemote(userid, uri, false);
chatSO.addEventListener(SyncEvent.SYNC, sharedObjectSyncHandler);
chatSO.client = this;
chatSO.connect(connection);
chatSO.connect(connection);
}
public function leave():void
{
public function leave():void {
if (chatSO != null) {
chatSO.close();
}
@ -126,10 +123,14 @@ package org.bigbluebutton.modules.chat.services
var participant:User = new User();
participant.userid = joinedUser.userid;
participant.name = joinedUser.name;
participant.role = joinedUser.role;
trace("ParticipantJoined " + joinedUser.name + "[" + joinedUser.userid + "]");
if (joinedUser.userid == userid) return;
UserManager.getInstance().participantJoined(participant);
var globalDispatcher:Dispatcher = new Dispatcher();
var joinEvent:ParticipantJoinEvent = new ParticipantJoinEvent(ParticipantJoinEvent.PARTICIPANT_JOINED_EVENT);
joinEvent.participant = participant;

View File

@ -157,13 +157,11 @@ package org.bigbluebutton.modules.chat.services
sendTranscriptLoadedEvent();
}
private function asyncErrorHandler(event:AsyncErrorEvent):void
{
private function asyncErrorHandler(event:AsyncErrorEvent):void {
trace("PresentSO asynchronous error.");
}
private function sharedObjectSyncHandler(event:SyncEvent) : void
{
private function sharedObjectSyncHandler(event:SyncEvent):void {
var connEvent:ConnectionEvent = new ConnectionEvent(ConnectionEvent.CONNECT_EVENT);
connEvent.success = true;
trace("Dispatching NET CONNECTION SUCCESS");

View File

@ -27,13 +27,10 @@
<mx:Script>
<![CDATA[
import org.bigbluebutton.modules.chat.model.ChatOptions;
import com.adobe.utils.StringUtil;
import com.adobe.utils.StringUtil;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.events.ListEvent;
import mx.utils.StringUtil;
import mx.utils.StringUtil;
import org.bigbluebutton.modules.chat.events.ChatOptionsEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
@ -41,130 +38,14 @@
[Bindable] public var chatView:ChatView;
[Bindable] private var fontSizes:Array = ['8', '10', '12', '14', '16', '18'];
[Bindable] public var chatOptions:ChatOptions = new ChatOptions();
[Bindable] private var langNames:Array=[
'AFRIKAANS' ,
'ALBANIAN' ,
'ARABIC' ,
'BELARUSIAN' ,
'BULGARIAN' ,
'CATALAN' ,
'CHINESE' ,
'CHINESE_SIMPLIFIED' ,
'CHINESE_TRADITIONAL' ,
'CZECH' ,
'DANISH' ,
'DUTCH',
'ENGLISH' ,
'ESTONIAN' ,
'FILIPINO' ,
'FINNISH' ,
'FRENCH' ,
'GALICIAN' ,
'GERMAN' ,
'GREEK' ,
'HEBREW' ,
'HINDI' ,
'HUNGARIAN' ,
'ICELANDIC' ,
'INDONESIAN' ,
'IRISH' ,
'ITALIAN' ,
'JAPANESE' ,
'KOREAN' ,
'LATVIAN' ,
'LITHUANIAN' ,
'MACEDONIAN' ,
'MALAY' ,
'MALTESE' ,
'NORWEGIAN' ,
'PERSIAN' ,
'POLISH' ,
'PORTUGUESE' ,
'ROMANIAN' ,
'RUSSIAN' ,
'SERBIAN' ,
'SLOVAK' ,
'SLOVENIAN' ,
'SPANISH' ,
'SWAHILI' ,
'SWEDISH' ,
'THAI' ,
'TURKISH' ,
'UKRAINIAN' ,
'VIETNAMESE' ,
'WELSH' ,
'YIDDISH' ] ;
private var langCodes:Array=[
'af',
'sq',
'ar',
'be',
'bg',
'ca',
'zh',
'zh-CN',
'zh-TW',
'cs',
'da',
'nl',
'en',
'et',
'tl',
'fi',
'fr',
'gl',
'de',
'el',
'iw',
'hi',
'hu',
'is',
'id',
'ga',
'it',
'ja',
'ko',
'lv',
'lt',
'mk',
'ms',
'mt',
'no',
'fa',
'pl',
'pt',
'ro',
'ru',
'sr',
'sk',
'sl',
'es',
'sw',
'sv',
'th',
'tr',
'uk',
'vi',
'cy',
'yi'] ;
[Bindable] public var chatOptions:ChatOptions = new ChatOptions();
[Bindable] private var langNames:Array = ResourceUtil.getInstance().localeNames;
[Bindable] private var langCodes:Array = ResourceUtil.getInstance().localeCodes;
private function init():void{
participants = new ArrayCollection();
var langCode:String = (ExternalInterface.call('getLanguage') as String);
if (langCode == null) return;
var language:String = langCode.split("_")[0];
if (langCodes.indexOf(language) != -1){
langComboBox.selectedIndex = langCodes.indexOf(language);
changeLanguage();
}
}
protected function openPrivateChat(event:ListEvent):void{
if (participantsList.selectedIndex == -1) return;
var id:String = participantsList.selectedItem.userid;
@ -172,23 +53,18 @@
chatView.openChatBoxFor(id);
}
private function changeFontSize():void{
private function changeFontSize():void {
var e:ChatOptionsEvent = new ChatOptionsEvent(ChatOptionsEvent.CHANGE_FONT_SIZE);
e.fontSize = int(cmbFontSize.selectedItem);
dispatchEvent(e);
}
private function changeLanguage():void
{
var lang:String = this.langCodes[this.langComboBox.selectedIndex];
var e:ChatOptionsEvent = new ChatOptionsEvent(ChatOptionsEvent.CHANGE_LANGUAGE);
e.language= lang;
dispatchEvent(e);
private function changeLanguage():void {
ResourceUtil.getInstance().setPreferredLocale(ResourceUtil.getInstance().getLocaleCodeForIndex(this.langComboBox.selectedIndex));
}
private function toggleTranslation():void
{
var e:ChatOptionsEvent=new ChatOptionsEvent(ChatOptionsEvent.TOGGLE_TRANSLATE);
private function toggleTranslation():void {
var e:ChatOptionsEvent = new ChatOptionsEvent(ChatOptionsEvent.TOGGLE_TRANSLATE);
e.translateOn = autoTransCheckBox.selected;
dispatchEvent(e);
}
@ -204,23 +80,7 @@
autoTransCheckBox.selected = e.translateOn;
toggleTranslation();
}
override protected function resourcesChanged():void{
super.resourcesChanged();
var language:String = overrideNorwegian(ResourceUtil.getInstance().getCurrentLanguageCode().split("_")[0]);
if ((langCodes.indexOf(language) != -1) && (langComboBox != null)){
langComboBox.selectedIndex = langCodes.indexOf(language);
changeLanguage();
}
}
private function overrideNorwegian(lang:String):String{
var code:String = lang;
if (lang == "nb") code = "no"; //Code for norwegian in the google api is different than in bbb localization (ours is nb, google is no)
return code;
}
]]>
</mx:Script>
@ -236,7 +96,7 @@
<mx:Label text="{ResourceUtil.getInstance().getString('bbb.chat.fontSize')}" />
<mx:ComboBox width="60" id="cmbFontSize" dataProvider="{fontSizes}" close="changeFontSize()" selectedIndex="1" />
</mx:HBox>
<mx:ComboBox id="langComboBox" dataProvider="{this.langNames}" selectedIndex="12" change="changeLanguage()" rowCount="15" />
<mx:ComboBox id="langComboBox" dataProvider="{this.langNames}" selectedIndex="{ResourceUtil.getInstance().localeIndex}" change="changeLanguage()" rowCount="15" />
<mx:CheckBox id="autoTransCheckBox" selected="false" label="AutoTranslate" toolTip="Auto detect language and translate" change="toggleTranslation()"/>
</mx:VBox>
</mx:HBox>

View File

@ -32,8 +32,7 @@
import org.bigbluebutton.modules.chat.model.ChatMessage;
import mx.collections.ArrayCollection;
import mx.controls.Button;
import mx.core.ScrollPolicy;
import mx.core.ScrollPolicy;
import org.bigbluebutton.modules.chat.events.ChatOptionsEvent;
import org.bigbluebutton.modules.chat.views.ChatMessageRenderer;
@ -48,10 +47,8 @@
private var lastTime:String = "";
[Bindable] private var messages:ArrayCollection = new ArrayCollection();
private var lastCount:Number = 0;
private var scrollTimer:Timer;
private var lastCount:Number = 0;
private var scrollTimer:Timer;
private var scrollBarWorkaround:Boolean = false;
private function onCreationComplete():void {

View File

@ -32,7 +32,6 @@
<mate:Listener type="{PublicChatMessageEvent.PUBLIC_CHAT_MESSAGE_EVENT}" method="handlePublicChatMessageEvent"/>
<mate:Listener type="{BBBEvent.SEND_PUBLIC_CHAT_MESSAGE_EVENT}" method="sendMessageReceivedFromBBBEvent"/>
<mate:Listener type="{ChatOptionsEvent.CHANGE_FONT_SIZE}" method="changeFontSize" />
<mate:Listener type="{ChatOptionsEvent.CHANGE_LANGUAGE}" method="changeLanguage" />
<mate:Listener type="{ChatOptionsEvent.TOGGLE_TRANSLATE}" method="toggleTranslation" />
<mx:Style>
@ -58,23 +57,18 @@
<![CDATA[
import org.bigbluebutton.modules.chat.model.ChatOptions;
import be.boulevart.google.ajaxapi.translation.GoogleTranslation;
import be.boulevart.google.events.GoogleApiEvent;
import com.asfusion.mate.events.Dispatcher;
import flash.external.ExternalInterface;
import be.boulevart.google.events.GoogleApiEvent;
import com.asfusion.mate.events.Dispatcher;
import flash.external.ExternalInterface;
import flexlib.controls.tabBarClasses.SuperTab;
import flexlib.events.SuperTabEvent;
import flexlib.events.SuperTabEvent;
import mx.collections.ArrayCollection;
import mx.core.Container;
import mx.core.UIComponent;
import mx.events.IndexChangedEvent;
import mx.events.IndexChangedEvent;
import org.bigbluebutton.common.IUserListener;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.ParticipantJoinEvent;
import org.bigbluebutton.main.model.User;
@ -93,17 +87,12 @@
'0x0088FF', '0x0000FF', '0x8800FF', '0xFF00FF'];
private static const PUBLIC_CHAT_USERID:String = '0';
private static const PUBLIC_CHAT_USERNAME:String = ResourceUtil.getInstance().getString("bbb.chat.publicChatUsername");
private static const PUBLIC_CHAT_USERNAME:String = ResourceUtil.getInstance().getString("bbb.chat.publicChatUsername");
private static const TAB_BOX_ID:String = '+';
private var tabBox:AddChatTabBox;
private var focus:Boolean = true;
private var globalDispatcher:Dispatcher = new Dispatcher();
private var tabBox:AddChatTabBox;
private var focus:Boolean = true;
private var globalDispatcher:Dispatcher = new Dispatcher();
private var autoTranslation:Boolean=false;
private var currentLangCode:String="en";
[Bindable] public var chatOptions:ChatOptions;
[Bindable]
@ -235,7 +224,7 @@
publicEvent.message = parseURLs(cleanup(message));
publicEvent.color = cmpColorPicker.selectedColor.toString();
publicEvent.time = currentTime();
publicEvent.language = currentLangCode;
publicEvent.language = ResourceUtil.getInstance().getCurrentLanguageCode().split("_")[0];
globalDispatcher.dispatchEvent(publicEvent);
}
@ -250,7 +239,7 @@
privateEvent.toUser = chatTabs.selectedChild.name;
privateEvent.color = cmpColorPicker.selectedColor.toString();
privateEvent.time = currentTime();
privateEvent.language = currentLangCode;
privateEvent.language = ResourceUtil.getInstance().getCurrentLanguageCode().split("_")[0];
globalDispatcher.dispatchEvent(privateEvent);
}
@ -338,8 +327,7 @@
chatBox = getChatBoxForParticipant(userid);
} else {
chatBox = createChatBoxFor(userid);
}
}
}
private function createChatBoxFor(userid:String):ChatBox {
@ -397,7 +385,7 @@
}
chatBox = getChatBoxForParticipant(sender);
chatBox.showNewMessage(message, translate, currentLangCode);
chatBox.showNewMessage(message, translate, ResourceUtil.getInstance().getCurrentLanguageCode().split("_")[0]);
if (! isChatBoxCurrentlySelected(sender)) {
notifyParticipantOfUnreadMessageFrom(sender);
@ -435,7 +423,6 @@
public function userLeft(user:User):void{
removeParticipantFromList(user.userid);
//showMessage(PUBLIC_CHAT_USERID, "<b>" + event.participant.name + " has left the conference </b>");
}
/** end IUserListener methods */
@ -443,12 +430,7 @@
{
this.autoTranslation = e.translateOn;
}
private function changeLanguage(e:ChatOptionsEvent):void
{
this.currentLangCode= e.language;
}
]]>
</mx:Script>
<containers:SuperTabNavigator id="chatTabs" width="100%" height="100%" change="onTabNavChange()" tabClose="onTabClose(event)" minTabWidth="20"

View File

@ -26,21 +26,20 @@
showCloseButton="false"
implements="org.bigbluebutton.common.IBbbModuleWindow"
creationComplete="onCreationComplete()"
xmlns:components="org.bigbluebutton.modules.chat.view.components.*" xmlns:mate="http://mate.asfusion.com/" xmlns:views="org.bigbluebutton.modules.chat.views.*">
xmlns:components="org.bigbluebutton.modules.chat.view.components.*"
xmlns:mate="http://mate.asfusion.com/"
xmlns:views="org.bigbluebutton.modules.chat.views.*">
<mx:Script>
<![CDATA[
import org.bigbluebutton.modules.chat.model.ChatOptions;
import com.asfusion.mate.events.Dispatcher;
import flexlib.mdi.events.MDIWindowEvent;
import com.asfusion.mate.events.Dispatcher;
import flexlib.mdi.events.MDIWindowEvent;
import mx.controls.Alert;
import mx.core.Application;
import mx.core.FlexGlobals;
import mx.resources.ResourceBundle;
import mx.resources.ResourceManager;
import mx.resources.ResourceManager;
import org.bigbluebutton.common.events.LocaleChangeEvent;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.chat.events.TranscriptEvent;
@ -53,7 +52,8 @@
[Bindable] public var chatOptions:ChatOptions;
public function getPrefferedPosition():String{
return MainCanvas.TOP_RIGHT;
//return MainCanvas.TOP_RIGHT;
return chatOptions.position;
}
private function onCreationComplete():void {

View File

@ -7,7 +7,7 @@ package org.bigbluebutton.modules.classyaudio.managers
import flash.utils.Timer;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.common.events.ToolbarButtonEvent;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.model.User;
@ -108,13 +108,10 @@ package org.bigbluebutton.modules.classyaudio.managers
}
private function muteIfNotPresenter(e:Event = null):void{
var presenter:User = UserManager.getInstance().getPresenter();
if (presenter != null){
if (presenter.userid != attributes.userid){
streamManager.mute();
} else if (presenter.userid == attributes.userid){
streamManager.unmute();
}
if (UserManager.getInstance().getConference().amIPresenter()){
streamManager.unmute();
} else {
streamManager.mute();
}
}
}

View File

@ -35,7 +35,7 @@ package org.bigbluebutton.modules.classyaudio.managers
import mx.controls.Alert;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.model.User;
import org.bigbluebutton.modules.classyaudio.events.MicMutedEvent;
import org.bigbluebutton.modules.classyaudio.events.PlayStreamStatusEvent;

View File

@ -48,7 +48,7 @@
import org.bigbluebutton.common.IUserListener;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.common.events.LocaleChangeEvent;
import org.bigbluebutton.main.model.User;
import org.bigbluebutton.main.views.MainCanvas;

View File

@ -26,11 +26,12 @@ package org.bigbluebutton.modules.listeners.business
import flash.net.Responder;
import flash.net.SharedObject;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.modules.listeners.business.vo.Listener;
import org.bigbluebutton.modules.listeners.business.vo.Listeners;
import org.bigbluebutton.modules.listeners.events.ListenersEvent;
import org.bigbluebutton.common.LogUtil;
public class ListenersSOService
{
@ -106,32 +107,37 @@ package org.bigbluebutton.modules.listeners.business
public function addConnectionStatusListener(connectionListener:Function):void {
_connectionListener = connectionListener;
}
public function userJoin(userId:Number, cidName:String, cidNum:String,
muted:Boolean, talking:Boolean, locked:Boolean):void
{
public function userJoin(userId:Number, cidName:String, cidNum:String, muted:Boolean, talking:Boolean, locked:Boolean):void {
if (! _listeners.hasListener(userId)) {
var n:Listener = new Listener();
n.callerName = (cidName != null) ? cidName : "<Unknown Caller>";
n.callerName = cidName != null ? cidName : "<Unknown Caller>";
n.callerNumber = cidNum;
n.muted = muted;
n.userid = userId;
n.talking = talking;
n.locked = locked;
n.moderator = _module.isModerator();
/**
* Let's store the voice userid so we can do push to talk.
*/
var pattern:RegExp = /(\d*)-(.*)$/;
var result:Object = pattern.exec(n.callerName);
if (result != null) {
/**
* The first item is the userid and the second is the username.
*/
if (UserManager.getInstance().getConference().amIThisUser(result[1])) {
UserManager.getInstance().getConference().setMyVoiceUserId(n.userid);
UserManager.getInstance().getConference().muteMyVoice(n.muted);
UserManager.getInstance().getConference().setMyVoiceJoined(true);
}
n.callerName = result[2]; /* Store the username */
}
LogUtil.info(LOGNAME + "Adding listener [" + n.callerName + "," + userId + "]");
_listeners.addListener(n);
/**
* Let's send an event that the first user has joined the voice conference.
* We use this as a trigger to playback the recorded audio.
* NOTE: THis is just a hack...need to do this properly. (ralam - march 26, 2009)
*/
if (_module.mode == 'PLAYBACK') {
if (_listeners.listeners.length == 1) {
dispatcher.dispatchEvent(new ListenersEvent(ListenersEvent.FIRST_LISTENER_JOINED_EVENT));
}
}
globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.ADDED_LISTENER, n.callerName));
} else {
@ -139,21 +145,30 @@ package org.bigbluebutton.modules.listeners.business
}
}
public function userMute(userId:Number, mute:Boolean):void
{
public function userMute(userId:Number, mute:Boolean):void {
var l:Listener = _listeners.getListener(userId);
if (l != null) {
l.muted = mute;
// LogUtil.debug(LOGNAME + 'Un/Muting user ' + userId + " mute=" + mute);
/**
* Let's store the voice userid so we can do push to talk.
*/
if (UserManager.getInstance().getConference().amIThisVoiceUser(userId)) {
UserManager.getInstance().getConference().muteMyVoice(l.muted);
}
}
}
public function userLockedMute(userId:Number, locked:Boolean):void
{
public function userLockedMute(userId:Number, locked:Boolean):void {
var l:Listener = _listeners.getListener(userId);
if (l != null) {
l.locked = locked;
LogUtil.debug(LOGNAME + 'Lock Un/Muting user ' + userId + " locked=" + locked);
/**
* Let's store the voice userid so we can do push to talk.
*/
if (UserManager.getInstance().getConference().amIThisVoiceUser(userId)) {
UserManager.getInstance().getConference().voiceLocked = l.locked;
}
}
}
@ -168,6 +183,14 @@ package org.bigbluebutton.modules.listeners.business
public function userLeft(userId:Number):void
{
_listeners.removeListener(userId);
/**
* Let's store the voice userid so we can do push to talk.
*/
if (UserManager.getInstance().getConference().amIThisVoiceUser(userId)) {
UserManager.getInstance().getConference().setMyVoiceJoined(false);
UserManager.getInstance().getConference().setMyVoiceUserId(0);
UserManager.getInstance().getConference().setMyVoiceJoined(false);
}
}
public function ping(message:String):void {
@ -181,8 +204,7 @@ package org.bigbluebutton.modules.listeners.business
}
}
public function lockMuteUser(userid:Number, lock:Boolean):void
{
public function lockMuteUser(userid:Number, lock:Boolean):void {
var nc:NetConnection = _module.connection;
nc.call(
"voice.lockMuteUser",// Remote function name
@ -219,7 +241,7 @@ package org.bigbluebutton.modules.listeners.business
LogUtil.error("Error occurred:");
for (var x:Object in status) {
LogUtil.error(x + " : " + status[x]);
}
}
}
),//new Responder
userid,

View File

@ -26,13 +26,10 @@
<mx:Script>
<![CDATA[
import flash.events.MouseEvent;
import mx.collections.ArrayCollection;
import flash.events.MouseEvent;
import mx.controls.Image;
import mx.controls.Label;
import mx.controls.TileList;
import mx.controls.TileList;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.modules.listeners.events.ListenersCommand;
import org.bigbluebutton.util.i18n.ResourceUtil;
@ -47,7 +44,6 @@
[Bindable] private var ejectIcon:Class = images.delete_icon;
[Bindable] private var statusTooltip : String = "";
[Bindable] private var ejectTooltip : String = ResourceUtil.getInstance().getString('bbb.listeners.ejectTooltip');
[Bindable] private var moderator:Boolean = false;
public function onRollOver():void{
@ -103,17 +99,7 @@
}
]]>
</mx:Script>
<!--<mx:states>
<mx:State name="dispMuteCheckBox">
<mx:AddChild relativeTo="{talkImg}" position="before">
<mx:Button id="muteCB" width="20" height="20" visible="true" enabled="{data.moderator}"
toolTip="{ResourceUtil.getInstance().getString('bbb.listenerItem.lockImg.toolTip')}"
icon="{data.locked ? lockedIcon : unlockedIcon}" click="lockMuteUser()"/>
</mx:AddChild>
</mx:State>
</mx:states>-->
<mx:Button id="muteBtn" width="20" height="20" visible="true" enabled="{data.moderator}"
toolTip="{data.moderator ? ResourceUtil.getInstance().getString('bbb.listenerItem.muteUnmute.toolTip') : ''}"
icon="{data.muted ? muteIcon : unmuteIcon}" click="muteUser()"/>

View File

@ -22,9 +22,10 @@
<MDIWindow xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns="flexlib.mdi.containers.*"
xmlns:flc="flexlib.controls.*"
implements="org.bigbluebutton.common.IBbbModuleWindow"
title="{windowTitle}"
creationComplete="onCreationComplete()" xmlns:mate="http://mate.asfusion.com/">
creationComplete="onCreationComplete()" xmlns:mate="http://mate.asfusion.com/" xmlns:controls="flexlib.controls.*">
<mate:Listener type="{ListenersEvent.ROOM_MUTE_STATE}" method="roomMuteStateChange" />
<mate:Listener type="{ListenersEvent.REGISTER_LISTENERS}" method="registerListeners" />
@ -33,8 +34,8 @@
<mx:Script>
<![CDATA[
import org.bigbluebutton.modules.listeners.model.ListenerOptions;
import flash.events.MouseEvent;
import flash.sampler.getInvocationCount;
import flexlib.mdi.events.MDIWindowEvent;
@ -44,34 +45,44 @@
import mx.controls.Image;
import mx.controls.Label;
import mx.events.ListEvent;
import mx.messaging.channels.AMFChannel;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.events.LocaleChangeEvent;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.listeners.events.ListenersCommand;
import org.bigbluebutton.modules.listeners.events.ListenersEvent;
import org.bigbluebutton.modules.listeners.model.ListenerOptions;
import org.bigbluebutton.util.i18n.ResourceUtil;
private var images:Images= new Images();
private var images:Images= new Images();
private var _xPosition:int;
private var _yPosition:int;
[Bindable] private var muteAllIcon:Class = images.sound_mute;
[Bindable] private var unmuteAllIcon:Class = images.sound_none;
[Bindable] private var kickIcon:Class = images.eject_user;
[Bindable] public var listeners:ArrayCollection = new ArrayCollection();
[Bindable] public var moderator:Boolean;
[Bindable] private var windowTitle:String = ResourceUtil.getInstance().getString('bbb.listeners.title', ["",""]);
[Bindable] private var windowTitle:String = ResourceUtil.getInstance().getString('bbb.listeners.title', ["",""]);
[Bindable] public var listenerOptions:ListenerOptions;
[Bindable] private var showPushToTalkBtn:Boolean = UserManager.getInstance().getConference().voiceLocked &&
UserManager.getInstance().getConference().voiceJoined;
private function onCreationComplete():void {
BindingUtils.bindSetter(updateNumberOfListeners, listeners, "length");
BindingUtils.bindSetter(updateShowPushToTalkBtn, UserManager.getInstance().getConference(), "voiceLocked");
BindingUtils.bindSetter(updateShowPushToTalkBtn, UserManager.getInstance().getConference(), "voiceJoined");
this.visible = listenerOptions.windowVisible;
}
private function updateShowPushToTalkBtn(show:Boolean):void {
showPushToTalkBtn = UserManager.getInstance().getConference().voiceJoined &&
(UserManager.getInstance().getConference().amIModerator() ||
!UserManager.getInstance().getConference().voiceLocked);
}
private function updateNumberOfListeners(numListeners:int):void {
if (numListeners > 4)
windowTitle = ResourceUtil.getInstance().getString('bbb.listeners.title', [":", numListeners]) ;
@ -123,6 +134,15 @@
setMuteState(muteAllBtn.selected);
}
private function toggleMuteMeState():void{
if (UserManager.getInstance().getConference().voiceLocked && ! UserManager.getInstance().getConference().amIModerator()) return;
var e:ListenersCommand = new ListenersCommand(ListenersCommand.MUTE_USER);
e.userid = UserManager.getInstance().getConference().getMyVoiceUserId();
e.mute = !UserManager.getInstance().getConference().isMyVoiceMuted();
dispatchEvent(e);
}
private function muteAllListeners():void{
var muteCommand:ListenersCommand = new ListenersCommand(ListenersCommand.MUTE_ALL);
dispatchEvent(muteCommand);
@ -182,10 +202,18 @@
</mx:List>
<mx:ControlBar width="100%">
<mx:Button id="muteAllBtn" icon="{muteAllIcon}" visible="{moderator}" toggle="true" selected="false"
toolTip="{ResourceUtil.getInstance().getString('bbb.listeners.muteAllBtn.toolTip')}"
click="toggleMuteState()" width="18" height="18"/>
<mx:Spacer width="100%"/>
<flc:CanvasButton id="pushToTalkBtn" visible="{showPushToTalkBtn}"
toolTip="{UserManager.getInstance().getConference().voiceMuted ? ResourceUtil.getInstance().getString('bbb.listeners.pushToTalk.toolTip') : ResourceUtil.getInstance().getString('bbb.listeners.pushToMute.toolTip')}"
click="toggleMuteMeState()" width="60" height="30">
<mx:HBox verticalAlign="middle" horizontalGap="0" paddingLeft="5" paddingTop="5" paddingRight="5" paddingBottom="5">
<mx:Image source="{UserManager.getInstance().getConference().voiceMuted ? images.sound_mute : images.sound_none}" />
<mx:Label text="{UserManager.getInstance().getConference().voiceMuted ? ResourceUtil.getInstance().getString('bbb.listeners.talk') : ResourceUtil.getInstance().getString('bbb.listeners.mute')}" />
</mx:HBox>
</flc:CanvasButton>
<mx:Spacer width="100%"/>
<mx:Button id="muteAllBtn" icon="{muteAllIcon}" visible="{moderator}" toggle="true" selected="false"
toolTip="{ResourceUtil.getInstance().getString('bbb.listeners.muteAllBtn.toolTip')}"
click="toggleMuteState()" width="18" height="18"/>
</mx:ControlBar>
</MDIWindow>

View File

@ -21,6 +21,7 @@ package org.bigbluebutton.modules.phone.managers {
import com.asfusion.mate.events.Dispatcher;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.modules.phone.PhoneOptions;
@ -72,7 +73,7 @@ package org.bigbluebutton.modules.phone.managers {
public function joinVoice(autoJoin:Boolean):void {
setupMic(autoJoin);
var uid:String = String(Math.floor(new Date().getTime()));
connectionManager.connect(uid, attributes.externUserID, attributes.username, attributes.room, attributes.uri);
connectionManager.connect(uid, attributes.externUserID, UserManager.getInstance().getConference().getMyUserId() + "-" + attributes.username, attributes.room, attributes.uri);
}
public function dialConference():void {

View File

@ -28,7 +28,7 @@ package org.bigbluebutton.modules.present.business {
import mx.controls.Alert;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.events.MadePresenterEvent;
import org.bigbluebutton.main.model.users.Conference;
@ -383,18 +383,16 @@ package org.bigbluebutton.modules.present.business {
LogUtil.debug("assignPresenterCallback " + userid + "," + name + "," + assignedBy);
var meeting:Conference = UserManager.getInstance().getConference();
if (this.userid == userid) {
meeting.me.presenter = true;
meeting.setMePresenter(true);
var e:MadePresenterEvent = new MadePresenterEvent(MadePresenterEvent.SWITCH_TO_PRESENTER_MODE);
e.userid = userid;
e.presenterName = name;
e.assignerBy = assignedBy;
dispatcher.dispatchEvent(e);
dispatcher.dispatchEvent(e);
setPresenterName(name);
} else {
meeting.me.presenter = false;
meeting.setMePresenter(false);
var viewerEvent:MadePresenterEvent = new MadePresenterEvent(MadePresenterEvent.SWITCH_TO_VIEWER_MODE);
viewerEvent.userid = userid;
viewerEvent.presenterName = name;

View File

@ -24,7 +24,7 @@ package org.bigbluebutton.modules.present.managers
import org.bigbluebutton.common.IBbbModuleWindow;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.common.events.OpenWindowEvent;
import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.Conference;

View File

@ -31,7 +31,7 @@ package org.bigbluebutton.modules.videoconf.business
import mx.collections.ArrayCollection;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
import org.bigbluebutton.modules.videoconf.events.StartBroadcastEvent;

View File

@ -182,7 +182,7 @@ package org.bigbluebutton.modules.videoconf.business
return MainCanvas.POPUP;
else
// the window is docked, so it should not be moved on reset layout
return MainCanvas.UNTOUCHED;
return MainCanvas.ABSOLUTE;
}
public function onDrag(event:MDIWindowEvent = null):void {

View File

@ -24,10 +24,7 @@
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.common.events.OpenWindowEvent;
import org.bigbluebutton.common.events.ToolbarButtonEvent;
import org.bigbluebutton.main.events.BBBEvent;

View File

@ -29,15 +29,11 @@ $Id: $
import org.bigbluebutton.modules.videodock.views.VideoDock;
public var module:VideodockModule;
private var videoDock:VideoDock;
public function startModule():void{
videoDock = new VideoDock();
videoDock.autoDock = module.autoDock;
videoDock.maximizeWindow = module.maximizeWindow;
videoDock = new VideoDock();
var windowEvent:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
windowEvent.window = videoDock;
globalDispatcher.dispatchEvent(windowEvent);

View File

@ -0,0 +1,55 @@
package org.bigbluebutton.modules.videodock.views
{
import org.bigbluebutton.core.BBB;
public class DockOptions
{
[Bindable]
public var autoDock:Boolean = true;
[Bindable]
public var maximize:Boolean = false;
[Bindable]
public var position:String = "bottom-right";
[Bindable]
public var width:int = 172;
[Bindable]
public var height:int = 179;
[Bindable]
public var layout:String = LAYOUT_SMART;
static public const LAYOUT_NONE:String = "NONE";
static public const LAYOUT_HANGOUT:String = "HANGOUT";
static public const LAYOUT_SMART:String = "SMART";
public function DockOptions()
{
var vxml:XML = BBB.getConfigForModule("VideodockModule");
if (vxml != null) {
if (vxml.@autoDock != undefined) {
autoDock = (vxml.@autoDock.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@maximizeWindow != undefined) {
maximize = (vxml.@maximizeWindow.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@position != undefined) {
position = vxml.@position.toString();
}
if (vxml.@width != undefined) {
width = Number(vxml.@width);
}
if (vxml.@height != undefined) {
height = Number(vxml.@height);
}
if (vxml.@layout != undefined) {
layout = vxml.@layout.toString().toUpperCase();
if (layout != LAYOUT_NONE && layout != LAYOUT_HANGOUT && layout != LAYOUT_SMART)
layout = LAYOUT_NONE;
}
}
}
}
}

View File

@ -33,22 +33,18 @@ $Id: $
<mx:Script>
<![CDATA[
import mx.events.ChildExistenceChangedEvent;
import mx.events.ChildExistenceChangedEvent;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.common.events.CloseWindowEvent;
import org.bigbluebutton.common.events.DragWindowEvent;
import org.bigbluebutton.common.events.OpenWindowEvent;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.videoconf.business.VideoWindowItf;
import org.bigbluebutton.modules.videoconf.events.OpenVideoWindowEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
public var autoDock:Boolean = false;
public var maximizeWindow:Boolean = true
private var childrenDimension:Dictionary = new Dictionary();
private var borderColor:String;
private var minChildAspectRatio:Number;
@ -61,12 +57,15 @@ $Id: $
// bigger the weight, bigger will be the window and less space the other windows will have
private var priorityWindowWeight:Number = 2/3;
private var options:DockOptions;
private function init():void{
this.showCloseButton = false;
private function init():void {
options = new DockOptions();
this.minWidth = 172;
this.minHeight = 179;
this.showCloseButton = false;
this.minWidth = options.width;
this.minHeight = options.height;
this.maxWidth = this.parent.width;
this.maxHeight = this.parent.height;
@ -76,7 +75,7 @@ $Id: $
addEventListener(ChildExistenceChangedEvent.CHILD_ADD, onChildAdd);
addEventListener(ChildExistenceChangedEvent.CHILD_REMOVE, onChildRemove);
if (maximizeWindow) this.maximize();
if (options.maximize) this.maximize();
}
/**
@ -118,7 +117,8 @@ $Id: $
}
public function getPrefferedPosition():String {
return MainCanvas.BOTTOM_RIGHT;
//return MainCanvas.BOTTOM_RIGHT;
return options.position;
}
private function onDragVideoWindow(e:DragWindowEvent):void{
@ -174,7 +174,7 @@ $Id: $
}
private function onOpenWindow(e:OpenVideoWindowEvent):void {
if (isVideoWindow(e.window) && autoDock)
if (isVideoWindow(e.window) && options.autoDock)
addVideoChild(e.window as VideoWindowItf);
}
@ -232,11 +232,11 @@ $Id: $
private function updateChildrenDimensions(children:Array):void {
if (children.length == 0) return;
var horizontalGap:Number = getStyle("horizontalGap");
var verticalGap:Number = getStyle("verticalGap");
const horizontalGap:int = getStyle("horizontalGap");
const verticalGap:int = getStyle("verticalGap");
var availableWidth:Number = this.width - this.borderMetrics.left - this.borderMetrics.right;
var availableHeight:Number = this.height - this.borderMetrics.top - this.borderMetrics.bottom;
var availableWidth:int = this.width - this.borderMetrics.left - this.borderMetrics.right;
var availableHeight:int = this.height - this.borderMetrics.top - this.borderMetrics.bottom;
var borderTop:int = 0;
var borderLeft:int = 0;
@ -247,7 +247,8 @@ $Id: $
// if the aspect ratio of the dock is smaller than the window (like 1:1 against 16:9)
// the window will be on top of the dock
if (availableWidth / availableHeight < priorityWindow.width / priorityWindow.height) {
if (availableWidth / availableHeight < priorityWindow.width / priorityWindow.height
|| options.layout == DockOptions.LAYOUT_HANGOUT) {
priorityWindow.width = availableWidth;
priorityWindow.updateHeight();
if (priorityWindow.height > availableHeight * priorityWindowWeight) {
@ -273,23 +274,23 @@ $Id: $
}
}
var childWidth:Number = 0;
var childHeight:Number = 0;
var childWidth:int = 0;
var childHeight:int = 0;
var nRows:Number = 0;
var nColumns:Number = 0;
// we would like to maximize the window size
for (var rows:Number = 1; rows <= children.length - (prioritizeWindow? 1: 0); ++rows) {
var columns:Number = Math.ceil((children.length - (prioritizeWindow? 1: 0))/ rows);
var maxWidth:Number = Math.floor((availableWidth - horizontalGap * (columns - 1)) / columns) - VideoWindowItf.PADDING_HORIZONTAL;
var maxHeight:Number = Math.floor((availableHeight - verticalGap * (rows - 1)) / rows) - VideoWindowItf.PADDING_VERTICAL;
var maxWidth:int = Math.floor((availableWidth - horizontalGap * (columns - 1)) / columns) - VideoWindowItf.PADDING_HORIZONTAL;
var maxHeight:int = Math.floor((availableHeight - verticalGap * (rows - 1)) / rows) - VideoWindowItf.PADDING_VERTICAL;
// the possible dimensions shouldn't be less or equal 0 (it could happen with many videos)
if (maxWidth <= 0 || maxHeight <=0)
continue;
var width:Number = maxWidth;
var height:Number = maxHeight;
var width:int = maxWidth;
var height:int = maxHeight;
if (maxWidth / maxHeight > minChildAspectRatio)
width = Math.floor(maxHeight * minChildAspectRatio);
@ -352,7 +353,8 @@ $Id: $
}
protected function onWindowClick(event:MouseEvent = null):void {
if (mutableChildrenArray.length <= 1)
if (mutableChildrenArray.length <= 1
|| options.layout == DockOptions.LAYOUT_NONE)
return;
if (event.currentTarget == priorityWindow) {

View File

@ -39,7 +39,7 @@
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.main.model.users.events.KickUserEvent;
@ -55,8 +55,7 @@
[Bindable] private var kickButtonEnabled:Boolean = false;
private function onCreationComplete():void{
var conf:Conference = UserManager.getInstance().getConference();
this.isModerator = (conf.me.role == Role.MODERATOR);
this.isModerator = UserManager.getInstance().getConference().amIModerator();
allowKickUser = ViewersModule.allowKickUser;
kickButtonEnabled = this.isModerator && allowKickUser;

View File

@ -47,7 +47,7 @@
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.common.events.LocaleChangeEvent;
import org.bigbluebutton.main.events.ParticipantJoinEvent;
import org.bigbluebutton.main.model.users.BBBUser;
@ -78,7 +78,7 @@
private function onCreationComplete():void {
conference = UserManager.getInstance().getConference();
participants = conference.users;
this.isModerator = (conference.me.role == Role.MODERATOR);
this.isModerator = UserManager.getInstance().getConference().amIModerator();
BindingUtils.bindSetter(updateNumberOfViewers, participants, "length");
dispatcher = new Dispatcher();
@ -131,7 +131,7 @@
private function conferenceStarted(e:ConferenceCreatedEvent):void{
this.participants = e.conference.users;
this.isModerator = (e.conference.me.role == Role.MODERATOR);
this.isModerator = UserManager.getInstance().getConference().amIModerator();
}
override protected function resourcesChanged():void{

View File

@ -21,7 +21,7 @@ package org.bigbluebutton.modules.whiteboard.managers
import com.asfusion.mate.events.Dispatcher;
import flash.events.TimerEvent;
import flash.utils.Timer;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.common.events.AddUIComponentToMainCanvas;
import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.modules.present.api.PresentationAPI;
@ -65,8 +65,7 @@ package org.bigbluebutton.modules.whiteboard.managers
}
private function addHighlighterToolbar(e:TimerEvent):void{
var meeting:Conference = UserManager.getInstance().getConference();
if (meeting.me.presenter) {
if (UserManager.getInstance().getConference().amIPresenter()) {
whiteboardButton.setVisible(true);
}
PresentationAPI.getInstance().addButtonToToolbar(whiteboardButton);

View File

@ -19,6 +19,7 @@
package org.bigbluebutton.util.i18n
{
import com.adobe.utils.StringUtil;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
@ -44,13 +45,16 @@ package org.bigbluebutton.util.i18n
private var inited:Boolean = false;
private static var BBB_RESOURCE_BUNDLE:String = 'bbbResources';
public static var DEFAULT_LANGUAGE:String = "en_US";
private static var currentLanguage:String = DEFAULT_LANGUAGE;
private var eventDispatcher:IEventDispatcher;
private static var MASTER_LOCALE:String = "en_US";
private var localeChain:Array = new Array();
[Bindable] public var localeCodes:Array = new Array();
[Bindable] public var localeNames:Array = new Array();
[Bindable] public var localeIndex:Number;
private var eventDispatcher:IEventDispatcher;
private var resourceManager:IResourceManager;
private var currentLocalization:Dictionary = new Dictionary();
private var preferredLocale:String
public function ResourceUtil(enforcer:SingletonEnforcer) {
if (enforcer == null) {
@ -64,6 +68,7 @@ package org.bigbluebutton.util.i18n
}
public function initialize():void {
resourceManager = ResourceManager.getInstance();
// Add a random string on the query so that we always get an up-to-date config.xml
var date:Date = new Date();
LogUtil.debug("Loading " + LOCALES_FILE);
@ -73,39 +78,67 @@ package org.bigbluebutton.util.i18n
}
private function handleComplete(e:Event):void{
parse(new XML(e.target.data));
parse(new XML(e.target.data));
loadMasterLocale(MASTER_LOCALE);
preferredLocale = getDefaultLocale();
setPreferredLocale(preferredLocale);
}
public function parse(xml:XML):void{
private function parse(xml:XML):void{
var list:XMLList = xml.locale;
LogUtil.debug("--- Supported locales --- \n" + xml.toString() + "\n --- \n");
var locale:XML;
for each(locale in list){
localeChain.push(locale.@code);
localeCodes.push(locale.@code);
localeNames.push(locale.@name);
}
resourceManager = ResourceManager.getInstance();
resourceManager.localeChain = [ExternalInterface.call("getLanguage")];
var localeAvailable:Boolean = false;
for (var i:Number = 0; i < localeChain.length; i++){
if (resourceManager.localeChain[0] == localeChain[i]) localeAvailable = true;
}
private function getDefaultLocale():String {
return ExternalInterface.call("getLanguage");
}
private function isPreferredLocaleAvailable(prefLocale:String):Boolean {
for (var i:Number = 0; i < localeCodes.length; i++){
if (prefLocale == localeCodes[i])
return true;
}
return false;
}
private function getIndexForLocale(prefLocale:String):int {
for (var i:Number = 0; i < localeCodes.length; i++){
if (prefLocale == localeCodes[i])
return i;
}
return -1;
}
public function setPreferredLocale(locale:String):void {
LogUtil.debug("Setting up preferred locale " + locale);
if (isPreferredLocaleAvailable(preferredLocale)) {
preferredLocale = locale;
localeIndex = getIndexForLocale(preferredLocale);
LogUtil.debug("Setting up preferred locale index " + localeIndex);
changeLocale(preferredLocale);
}
}
private function loadMasterLocale(locale:String):void {
/**
* http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/resources/IResourceManager.html#localeChain
* Always load the default language, so if the chosen language
* doesn't provide a resource, the default language resource is used
*/
load(DEFAULT_LANGUAGE);
if (!localeAvailable)
resourceManager.localeChain = [DEFAULT_LANGUAGE];
changeLocale(resourceManager.localeChain[0]);
loadResource(locale);
}
private function load(language:String):IEventDispatcher {
var localeURI:String = 'locale/' + language + '_resources.swf';
private function loadResource(language:String):IEventDispatcher {
// Add a random string on the query so that we don't get a cached version.
var date:Date = new Date();
var localeURI:String = 'locale/' + language + '_resources.swf?a=' + date.time;
return resourceManager.loadResourceModule(localeURI, false);
}
@ -117,22 +150,23 @@ package org.bigbluebutton.util.i18n
return instance;
}
public function changeLocale(... chain):void{
if(chain != null && chain.length > 0)
{
eventDispatcher = load(chain[0]);
localeChain = [chain[0]];
eventDispatcher.addEventListener(ResourceEvent.COMPLETE, localeChangeComplete);
eventDispatcher.addEventListener(ResourceEvent.ERROR, handleResourceNotLoaded);
currentLanguage = chain[0];
}
public function changeLocale(locale:String):void{
eventDispatcher = loadResource(locale);
eventDispatcher.addEventListener(ResourceEvent.COMPLETE, localeChangeComplete);
eventDispatcher.addEventListener(ResourceEvent.ERROR, handleResourceNotLoaded);
}
private function localeChangeComplete(event:ResourceEvent):void{
if (localeChain[0] != DEFAULT_LANGUAGE)
localeChain.push(DEFAULT_LANGUAGE);
resourceManager.localeChain = localeChain;
private function localeChangeComplete(event:ResourceEvent):void {
// Set the preferred locale and master as backup.
if (preferredLocale != MASTER_LOCALE) {
resourceManager.localeChain = [preferredLocale, MASTER_LOCALE];
localeIndex = getIndexForLocale(preferredLocale);
} else {
resourceManager.localeChain = [MASTER_LOCALE];
preferredLocale = MASTER_LOCALE;
localeIndex = getIndexForLocale(preferredLocale);
}
update();
}
@ -141,7 +175,9 @@ package org.bigbluebutton.util.i18n
* @param event
*/
private function handleResourceNotLoaded(event:ResourceEvent):void{
resourceManager.localeChain = [DEFAULT_LANGUAGE];
resourceManager.localeChain = [MASTER_LOCALE];
preferredLocale = MASTER_LOCALE;
localeIndex = getIndexForLocale(preferredLocale);
update();
}
@ -155,7 +191,11 @@ package org.bigbluebutton.util.i18n
}
public function getCurrentLanguageCode():String{
return currentLanguage;
return preferredLocale;
}
public function getLocaleCodeForIndex(index:int):String {
return localeCodes[index];
}
}
}

View File

@ -27,7 +27,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
public class Meeting {
private static final int MILLIS_IN_A_SECOND = 60000;
private static final int MILLIS_IN_A_MINUTE = 60000;
private String name;
private String extMeetingId;
@ -198,10 +198,11 @@ public class Meeting {
}
private boolean nobodyJoined(int expiry) {
return (System.currentTimeMillis() - createdTime) > (expiry * MILLIS_IN_A_SECOND);
return (System.currentTimeMillis() - createdTime) > (expiry * MILLIS_IN_A_MINUTE);
}
public boolean hasExpired(int expiry) {
System.out.println("meeting-id=" + intMeetingId + " started=" + hasStarted() + " ended=" + hasEnded() + " notRunning=" + !isRunning() + " expired=" + didExpire(expiry));
return (hasStarted() && hasEnded() && !isRunning() && didExpire(expiry));
}
@ -211,7 +212,7 @@ public class Meeting {
private boolean pastDuration() {
if (duration == 0) return false; /* Meeting runs infinitely */
return (System.currentTimeMillis() - startTime > (duration * MILLIS_IN_A_SECOND));
return (System.currentTimeMillis() - startTime > (duration * MILLIS_IN_A_MINUTE));
}
private boolean hasStarted() {
@ -223,7 +224,9 @@ public class Meeting {
}
private boolean didExpire(int expiry) {
return (System.currentTimeMillis() - endTime > (expiry * MILLIS_IN_A_SECOND));
long now = System.currentTimeMillis();
System.out.println("Expiry " + now + " endTime=" + endTime + "expiry=" + (expiry * MILLIS_IN_A_MINUTE));
return (System.currentTimeMillis() - endTime > (expiry * MILLIS_IN_A_MINUTE));
}
/***

View File

@ -42,7 +42,7 @@ public class RtmpClientAdapter implements DeskshareClient, RecordStatusListener
@Override
public void notify(RecordEvent event) {
// TODO Auto-generated method stub
System.out.println("RtmpClientAdapter: TODO Notify client of recording status");
// System.out.println("RtmpClientAdapter: TODO Notify client of recording status");
ArrayList<Object> msg = new ArrayList<Object>();
if (event instanceof RecordStoppedEvent) {
msg.add(new String("DESKSHARE_RECORD_STOPPED_EVENT"));
@ -59,7 +59,7 @@ public class RtmpClientAdapter implements DeskshareClient, RecordStatusListener
msg.add(new String("DESKSHARE_RECORD_ERROR_EVENT"));
}
so.sendMessage("recordingStatusCallback", msg);
// so.sendMessage("recordingStatusCallback", msg);
}
}

View File

@ -116,6 +116,7 @@ public class FileRecorder implements Recorder {
try {
log.info("Closing stream");
fo.close();
svf = null;
} catch (IOException e) {
log.error(StackTraceUtil.getStackTrace(e));
RecordErrorEvent event = new RecordErrorEvent(session);

View File

@ -31,9 +31,8 @@ public final class ScreenVideoFlvEncoder {
private long startTimestamp = 0;
private boolean firstTag = true;
private static byte FLV_TAG_HEADER_SIZE = 11;
ByteArrayOutputStream flvDataStream = new ByteArrayOutputStream();
private static byte FLV_TAG_HEADER_SIZE = 11;
private ByteArrayOutputStream flvDataStream = new ByteArrayOutputStream();
public byte[] encodeHeader() {
byte[] prevTagSize = encodePreviousTagSize(0);
@ -54,7 +53,6 @@ public final class ScreenVideoFlvEncoder {
}
public byte[] encodeFlvData (byte[] screenVideoData) throws FlvEncodeException {
byte[] flvData;
try {
flvData = encodeFlvTag(screenVideoData);
@ -65,9 +63,7 @@ public final class ScreenVideoFlvEncoder {
}
private byte[] encodeFlvTag(byte[] videoData) throws IOException {
flvDataStream.reset();
flvDataStream.reset();
flvDataStream.write(videoTagType);
flvDataStream.write(encodeDataSize(videoData.length));
flvDataStream.write(encodeTimestamp());

View File

@ -41,7 +41,7 @@ class SessionSVC(sessionManager:SessionManagerSVC, room: String, screenDim: Dime
blockDim: Dimension, streamManager: StreamManager) extends Actor {
private val log = Logger.get
private val blockManager: BlockManager = new BlockManager(room, screenDim, blockDim)
private var blockManager: BlockManager = new BlockManager(room, screenDim, blockDim)
private var stream:Stream = null
private var lastUpdate:Long = System.currentTimeMillis()
private var stop = true
@ -121,6 +121,7 @@ class SessionSVC(sessionManager:SessionManagerSVC, room: String, screenDim: Dime
stream ! StopStream
stop = true
streamManager.destroyStream(room)
blockManager = null
}
private def updateBlock(position: Int, videoData: Array[Byte], keyFrame: Boolean, seqNum: Int): Unit = {
@ -133,8 +134,10 @@ class SessionSVC(sessionManager:SessionManagerSVC, room: String, screenDim: Dime
log.warning("Session: Did not received updates for more than 1 minute. Removing session %s", room)
sessionManager ! new RemoveSession(room)
} else {
stream ! new UpdateStream(room, blockManager.generateFrame(keyframe))
stream ! new UpdateStreamMouseLocation(room, mouseLoc)
if (blockManager != null) {
stream ! new UpdateStream(room, blockManager.generateFrame(keyframe))
stream ! new UpdateStreamMouseLocation(room, mouseLoc)
}
}
}

View File

@ -29,7 +29,7 @@ import org.bigbluebutton.deskshare.server.session.ScreenVideoFrame
class BlockManager(room: String, screenDim: Dimension, blockDim: Dimension) extends BlockFactory {
private val blocksMap = new ConcurrentHashMap[Integer, Block]
private var blocksMap = new ConcurrentHashMap[Integer, Block]
private var numberOfRows = getNumberOfRows(screenDim, blockDim)
private var numberOfColumns = getNumberOfColumns(screenDim, blockDim)
@ -37,8 +37,6 @@ class BlockManager(room: String, screenDim: Dimension, blockDim: Dimension) exte
private var lastKeyFrameTime = 0L
private val KEYFRAME_INTERVAL = 20000
private var screenVideoFrame: ByteArrayOutputStream = new ByteArrayOutputStream()
def initialize(): Unit = {
println("Initialize BlockManager")
val numberOfBlocks: Int = numberOfRows * numberOfColumns
@ -61,7 +59,8 @@ class BlockManager(room: String, screenDim: Dimension, blockDim: Dimension) exte
}
def generateFrame(genKeyFrame: Boolean): Array[Byte] = {
screenVideoFrame.reset();
var screenVideoFrame: ByteArrayOutputStream = new ByteArrayOutputStream()
val encodedDim: Array[Byte] = ScreenVideoEncoder.encodeBlockAndScreenDimensions(blockDim.width, screenDim.width, blockDim.height, screenDim.height)
val numberOfBlocks = numberOfRows * numberOfColumns