openmeetings-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solo...@apache.org
Subject openmeetings git commit: [OPENMEETINGS-1687] switch video seems to work as expected
Date Fri, 01 Sep 2017 05:38:17 GMT
Repository: openmeetings
Updated Branches:
  refs/heads/3.3.x f92012f48 -> 9c53bde40


[OPENMEETINGS-1687] switch video seems to work as expected


Project: http://git-wip-us.apache.org/repos/asf/openmeetings/repo
Commit: http://git-wip-us.apache.org/repos/asf/openmeetings/commit/9c53bde4
Tree: http://git-wip-us.apache.org/repos/asf/openmeetings/tree/9c53bde4
Diff: http://git-wip-us.apache.org/repos/asf/openmeetings/diff/9c53bde4

Branch: refs/heads/3.3.x
Commit: 9c53bde4043e7f8bcd377e61882224fd1905a779
Parents: f92012f
Author: Maxim Solodovnik <solomax666@gmail.com>
Authored: Fri Sep 1 12:38:10 2017 +0700
Committer: Maxim Solodovnik <solomax666@gmail.com>
Committed: Fri Sep 1 12:38:10 2017 +0700

----------------------------------------------------------------------
 .../org/apache/openmeetings/web/room/RoomBroadcaster.java   | 9 +++++----
 .../java/org/apache/openmeetings/web/room/RoomPanel.java    | 2 +-
 .../apache/openmeetings/web/room/sidebar/RoomSidebar.java   | 9 +--------
 3 files changed, 7 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/openmeetings/blob/9c53bde4/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomBroadcaster.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomBroadcaster.java
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomBroadcaster.java
index 46dcecb..3896674 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomBroadcaster.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomBroadcaster.java
@@ -51,8 +51,12 @@ public class RoomBroadcaster {
 	}
 
 	public static void sendUpdatedClient(Client client) {
-		StreamClient rcl = Application.get().updateClient(getClient(client.getUid()), true);
+		String uid = client.getUid();
 		log.debug("-----------  sendUpdatedClient ");
+		// Notify all clients of the same scope (room)
+		update(client);
+		StreamClient rcl = Application.get().updateClient(getClient(uid), true);
+		broadcast(client.getRoomId(), "clientUpdated", rcl);
 
 		if (rcl == null) {
 			return;
@@ -60,8 +64,5 @@ public class RoomBroadcaster {
 
 		// Put the mod-flag to true for this client
 		getBean(ISessionManager.class).update(rcl);
-		// Notify all clients of the same scope (room)
-		broadcast(client.getRoomId(), "clientUpdated", rcl);
-		update(client);
 	}
 }

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/9c53bde4/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
index 6d6c293..83bb862 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
@@ -602,8 +602,8 @@ public class RoomPanel extends BasePanel {
 	}
 
 	public void broadcast(Client client) {
-		WebSocketHelper.sendRoom(new RoomMessage(getRoom().getId(), getUserId(), RoomMessage.Type.rightUpdated));
 		RoomBroadcaster.sendUpdatedClient(client);
+		WebSocketHelper.sendRoom(new RoomMessage(getRoom().getId(), getUserId(), RoomMessage.Type.rightUpdated));
 	}
 
 	public Room getRoom() {

http://git-wip-us.apache.org/repos/asf/openmeetings/blob/9c53bde4/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
index cad12c5..025660b 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
@@ -394,14 +394,11 @@ public class RoomSidebar extends Panel {
 		if (c == null) {
 			return;
 		}
-		boolean updated = false;
 		if (!activityAllowed(c, a, room.getRoom()) && room.getClient().hasRight(Right.moderator))
{
 			if (a == Activity.broadcastA || a == Activity.broadcastAV) {
-				updated = true;
 				c.allow(Room.Right.audio);
 			}
 			if (!room.getRoom().isAudioOnly() && (a == Activity.broadcastV || a == Activity.broadcastAV))
{
-				updated = true;
 				c.allow(Room.Right.video);
 			}
 		}
@@ -416,7 +413,6 @@ public class RoomSidebar extends Panel {
 				return;
 			}
 			Pod pod = c.getPod();
-			updated = true;
 			c.setPod(getRequest().getRequestParameters().getParameterValue(PARAM_POD).toOptionalInteger());
 			if (pod != Pod.none && pod != c.getPod()) {
 				//pod has changed, no need to toggle
@@ -424,10 +420,7 @@ public class RoomSidebar extends Panel {
 			} else {
 				c.toggle(a);
 			}
-			room.broadcast(c);
-		}
-		if (updated) {
-			Application.update(c);
+			room.broadcast(c); //will update client
 		}
 	}
 


Mime
View raw message