Author: solomax
Date: Tue Mar 14 03:57:55 2017
New Revision: 1786839

URL: http://svn.apache.org/viewvc?rev=1786839&view=rev
Log:
[OPENMEETINGS-1600] clear WB on upload should work

Modified:
    
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
    
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1786839&r1=1786838&r2=1786839&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
 Tue Mar 14 03:57:55 2017
@@ -636,12 +636,15 @@ public class ScopeApplicationAdapter ext
                                @Override
                                public boolean filter(IConnection conn) {
                                        Client rcl = 
sessionManager.getClientByStreamId(conn.getClient().getId(), null);
+                                       if (rcl == null) {
+                                               return true;
+                                       }
                                        boolean isScreen = rcl.isScreenClient();
                                        if (isScreen && 
client.getPublicSID().equals(rcl.getStreamPublishName())) {
                                                //going to terminate screen 
sharing started by this client
                                                ((IServiceCapableConnection) 
conn).invoke("stopStream", new Object[] { }, callback);
-                                       }                                       
// TODO Auto-generated method stub
-                                       return rcl == null || isScreen;
+                                       }
+                                       return isScreen;
                                }
                        }.start();
 
@@ -1149,9 +1152,9 @@ public class ScopeApplicationAdapter ext
 
        private static Point getSize(FileItem fi) {
                Point result = new Point(0, 0);
-               if (fi.getFlvWidth() != null && fi.getFlvHeight() != null) {
-                       result.x = fi.getFlvWidth();
-                       result.y = fi.getFlvHeight();
+               if (fi.getWidth() != null && fi.getHeight() != null) {
+                       result.x = fi.getWidth();
+                       result.y = fi.getHeight();
                }
                return result;
        }
@@ -1244,11 +1247,11 @@ public class ScopeApplicationAdapter ext
                        default:
                }
                if (clean) {
-                       Map<Integer, Object> wbClear = new HashMap<>();
-                       wbClear.put(2, "clear");
-                       wbClear.put(3, null);
+                       Map<String, Object> wbClear = new HashMap<>();
+                       wbClear.put("id", wbId);
+                       wbClear.put("param", Arrays.asList("whiteboard", new 
Date(), "clear", null));
 
-                       sendToScope(client.getRoomId(), 
"sendVarsToWhiteboardById", new Object[] { wbClear });
+                       sendToScope(client.getRoomId(), 
"sendVarsToWhiteboardById", Arrays.asList(null, wbClear));
                }
                sendToWhiteboard(client, Arrays.asList("whiteboard", new 
Date(), "draw", wbObject), wbId);
        }

Modified: 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1786839&r1=1786838&r2=1786839&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
 Tue Mar 14 03:57:55 2017
@@ -636,12 +636,15 @@ public class ScopeApplicationAdapter ext
                                @Override
                                public boolean filter(IConnection conn) {
                                        Client rcl = 
sessionManager.getClientByStreamId(conn.getClient().getId(), null);
+                                       if (rcl == null) {
+                                               return true;
+                                       }
                                        boolean isScreen = rcl.isScreenClient();
                                        if (isScreen && 
client.getPublicSID().equals(rcl.getStreamPublishName())) {
                                                //going to terminate screen 
sharing started by this client
                                                ((IServiceCapableConnection) 
conn).invoke("stopStream", new Object[] { }, callback);
-                                       }                                       
// TODO Auto-generated method stub
-                                       return rcl == null || isScreen;
+                                       }
+                                       return isScreen;
                                }
                        }.start();
 
@@ -1149,9 +1152,9 @@ public class ScopeApplicationAdapter ext
 
        private static Point getSize(FileItem fi) {
                Point result = new Point(0, 0);
-               if (fi.getFlvWidth() != null && fi.getFlvHeight() != null) {
-                       result.x = fi.getFlvWidth();
-                       result.y = fi.getFlvHeight();
+               if (fi.getWidth() != null && fi.getHeight() != null) {
+                       result.x = fi.getWidth();
+                       result.y = fi.getHeight();
                }
                return result;
        }
@@ -1244,11 +1247,11 @@ public class ScopeApplicationAdapter ext
                        default:
                }
                if (clean) {
-                       Map<Integer, Object> wbClear = new HashMap<>();
-                       wbClear.put(2, "clear");
-                       wbClear.put(3, null);
+                       Map<String, Object> wbClear = new HashMap<>();
+                       wbClear.put("id", wbId);
+                       wbClear.put("param", Arrays.asList("whiteboard", new 
Date(), "clear", null));
 
-                       sendToScope(client.getRoomId(), 
"sendVarsToWhiteboardById", new Object[] { wbClear });
+                       sendToScope(client.getRoomId(), 
"sendVarsToWhiteboardById", Arrays.asList(null, wbClear));
                }
                sendToWhiteboard(client, Arrays.asList("whiteboard", new 
Date(), "draw", wbObject), wbId);
        }


Reply via email to