Revision: 2836
Author: seba.wagner
Date: Tue Jan 26 08:47:40 2010
Log: Fixes Issue 1089

Fixes: Check for Recording Message when you enter a Room
http://code.google.com/p/openmeetings/source/detail?r=2836

Modified:
/trunk/singlewebapp/WebContent/openmeetings/base/hibernate/hibRtmpConnection.lzx /trunk/singlewebapp/WebContent/openmeetings/modules/conference/moderation/moderationPanel.lzx /trunk/singlewebapp/WebContent/openmeetings/modules/conference/participents/participents.lzx /trunk/singlewebapp/WebContent/openmeetings/modules/conference/popups/errorPopup.lzx /trunk/singlewebapp/src/app/org/openmeetings/app/remote/FLVRecorderService.java /trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ClientListManager.java /trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java

=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/base/hibernate/hibRtmpConnection.lzx Sat Jan 9 11:15:10 2010 +++ /trunk/singlewebapp/WebContent/openmeetings/base/hibernate/hibRtmpConnection.lzx Tue Jan 26 08:47:40 2010
@@ -961,18 +961,50 @@
<netparam><method name="getValue">return null;</method></netparam>
             <handler name="ondata" args="value">
                 <![CDATA[
+
//The onResult-Handler will be called be the rtmpconnection - if ($debug) Debug.write(" onResult newRed5ScreenSharing : ",value);
-                    if (canvas.screenSharingDialogContainer == null) {
- canvas.screenSharingDialogContainer = new lz.screenSharingDialogContainer(canvas);
-                    }
- new lz.screenSharingDialog(canvas.screenSharingDialogContainer,{
-                                       initObject:value
-                                   });
+ //if ($debug) Debug.write(" onResult newRed5ScreenSharing 1 : ",value); + //if ($debug) Debug.write(" onResult newRed5ScreenSharing 2 : ",value.streamid); + //if ($debug) Debug.write(" onResult newRed5ScreenSharing 3 : ",canvas.streamid);
+
+ if ($debug) Debug.write(" onResult newRed5ScreenSharing 4 : ",value.streamPublishName); + if ($debug) Debug.write(" onResult newRed5ScreenSharing 5 : ",canvas.publicSID);
+
+                    if (value.streamPublishName != canvas.publicSID) {
+                        if (canvas.screenSharingDialogContainer == null) {
+ canvas.screenSharingDialogContainer = new lz.screenSharingDialogContainer(canvas);
+                        }
+ new lz.screenSharingDialog(canvas.screenSharingDialogContainer,{
+                                       initObject:value
+                                   });
+                    } else {
+                       if ($debug) Debug.warn("Self Screen Sharing");
+                    }
                 ]]>
             </handler>
         </netRemoteCallHib>

+ <netRemoteCallHib name="checkRed5ScreenSharing" funcname="checkRed5ScreenSharing">
+            <handler name="ondata" args="value">
+                <![CDATA[
+ //The onResult-Handler will be called be the rtmpconnection + if ($debug) Debug.write(" onResult checkRed5ScreenSharing : ",value);
+
+                    if (value != null) {
+
+                        for (var eg in value) {
+ parent.newRed5ScreenSharing.ondata.sendEvent(value[eg]);
+                        }
+
+                    } else {
+                        if ($debug) Debug.warn("Self Screen Sharing");
+                    }
+
+                ]]>
+            </handler>
+        </netRemoteCallHib>
+
+
         <!--
         public synchronized Long applyForModeration(String publicSID)
          -->
@@ -1301,14 +1333,14 @@
        <netRemoteCallHib name="removeClientFromChatNotification"
                funcname="chatservice.removeClientFromChatNotification" >
        <handler name="ondata" args="value">
-               Debug.write("removeClientFromChatNotification: ",value);
+               if ($debug) Debug.write("removeClientFromChatNotification: 
",value);
        </handler>
     </netRemoteCallHib>

    <!-- recordContentings Notifications -->
        <netRemoteCallHib name="stopedRecording" funcname="stopedRecording" >
        <handler name="ondata" args="value">
-               Debug.write("stopedRecording: ",value);
+               if ($debug) Debug.write("stopedRecording: ",value);
                canvas._mymod.recordingUser = null;
                canvas._mymod.setMessage();
        </handler>
@@ -1316,16 +1348,27 @@

        <netRemoteCallHib name="startedRecording" funcname="startedRecording" >
        <handler name="ondata" args="value">
-               Debug.write("startedRecording: ",value);
+               if ($debug) Debug.write("startedRecording: ",value);
                canvas._mymod.recordingUser = value;
                canvas._mymod.setMessage();
        </handler>
     </netRemoteCallHib>

+ <netRemoteCallHib name="checkLzRecording" funcname="flvrecorderservice.checkLzRecording" >
+        <handler name="ondata" args="value">
+            if ($debug) Debug.write("checkLzRecording: ",value);
+            if (value != null) {
+                canvas._mymod.recordingUser = value;
+                canvas._mymod.setMessage();
+            }
+            parent.checkRed5ScreenSharing.doCall();
+        </handler>
+    </netRemoteCallHib>
+
     <!-- notifications for Overall-Chat -->
<netRemoteCallHib name="sendVarsToOverallChat" funcname="sendVarsToOverallChat" >
        <handler name="ondata" args="value">
-               Debug.write("sendVarsToOverallChat: ",value);
+               if ($debug) Debug.write("sendVarsToOverallChat: ",value);
                if (canvas._overallchatcontent!=null){
canvas._overallchatcontent.addChatHistory(value.message,value.client);
                }
@@ -1334,7 +1377,7 @@

        <netRemoteCallHib name="roomConnect" funcname="roomConnect" >
        <handler name="ondata" args="value">
-               Debug.write("roomConnect: ",value);
+               if ($debug) Debug.write("roomConnect: ",value);
                if (canvas._overallchatcontent!=null){
var parentObj = canvas._overallchatcontent.parent.parent.parent._chatparticipants._list; new lz.chatParticipants(parentObj,{user_id:value.user_id,username:value.firstname+", "+value.lastname});
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/conference/moderation/moderationPanel.lzx Tue Jan 26 07:18:13 2010 +++ /trunk/singlewebapp/WebContent/openmeetings/modules/conference/moderation/moderationPanel.lzx Tue Jan 26 08:47:40 2010
@@ -46,7 +46,7 @@

     <method name="setMessage">
         <![CDATA[
-            Debug.write("setMessage: ",this.recordingUser);
+            if ($debug) Debug.write("setMessage: ",this.recordingUser);
             if (this.recordingUser!=null){
                 var tString = canvas.getLabelName(419) + " "
                         + this.recordingUser.username+" "
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/conference/participents/participents.lzx Thu Jan 14 09:15:56 2010 +++ /trunk/singlewebapp/WebContent/openmeetings/modules/conference/participents/participents.lzx Tue Jan 26 08:47:40 2010
@@ -530,7 +530,7 @@
             }
//this content must be inited _after_ setting the default values
             canvas.thishib.getCurrentModeratorList.doCall();
-            canvas._mymod.checkForRecording.doCall();
+            canvas.thishib.checkLzRecording.doCall();
             canvas._chatcontent.doInit();
         </handler>
     </netRemoteCallHib>
=======================================
--- /trunk/singlewebapp/WebContent/openmeetings/modules/conference/popups/errorPopup.lzx Thu Nov 12 11:22:28 2009 +++ /trunk/singlewebapp/WebContent/openmeetings/modules/conference/popups/errorPopup.lzx Tue Jan 26 08:47:40 2010
@@ -25,7 +25,7 @@

<view y="24" width="$once{ parent.width - 40 }" height="130" x="30" clip="true">
                <text fontsize="10" fontstyle="bold" text="${ parent.parent.error 
}"
-                       multiline="true" width="312" selectable="true" />
+                       multiline="true" width="$once{ parent.width - 16 }" 
selectable="true" />
        </view>

<simpleLabelButton labelid="642" width="100" x="$once{ parent.width-105 }"
=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/remote/FLVRecorderService.java Tue Jan 26 05:46:46 2010 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/remote/FLVRecorderService.java Tue Jan 26 08:47:40 2010
@@ -437,6 +437,7 @@

                        //Reset values
                        currentClient.setFlvRecordingId(null);
+                       currentClient.setIsRecording(false);

this.clientListManager.updateClientByStreamId(currentClient.getStreamid(), currentClient);

@@ -450,6 +451,33 @@
                return new Long(-1);
        }

+       public RoomClient checkLzRecording() {
+               try {
+                       IConnection current = Red5.getConnectionLocal();
+                       String streamid = current.getClient().getId();
+
+                       log.debug("getCurrentRoomClient -2- "+streamid);
+
+ RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
+
+ HashMap<String,RoomClient> roomList = this.clientListManager.getClientListByRoomAll(currentClient.getRoom_id());
+
+ for (Iterator<String> iter = roomList.keySet().iterator();iter.hasNext();) {
+
+                               RoomClient rcl = roomList.get(iter.next());
+
+                               if (rcl.getIsRecording()) {
+                                       return rcl;
+                               }
+
+                       }
+
+
+               } catch (Exception err) {
+                       log.error("[checkLzRecording]",err);
+               }
+               return null;
+       }

        public void stopRecordingShowForClient(IConnection conn, RoomClient 
rcl) {
                try {
=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ClientListManager.java Tue Jan 19 11:54:27 2010 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ClientListManager.java Tue Jan 26 08:47:40 2010
@@ -151,6 +151,22 @@
                                        }
                                }
                        }
+               } catch (Exception err) {
+                       log.error("[getClientListByRoom]",err);
+               }
+               return roomClientList;
+       }
+
+ public synchronized HashMap<String,RoomClient> getClientListByRoomAll(Long room_id){ + HashMap <String,RoomClient> roomClientList = new HashMap<String,RoomClient>();
+               try {
+ for (Iterator<String> iter=clientList.keySet().iterator();iter.hasNext();) {
+                               String key = (String) iter.next();
+                               //log.debug("getClientList key: "+key);
+                               RoomClient rcl = clientList.get(key);
+                               //same room, same domain
+                               roomClientList.put(key, rcl);
+                       }
                } catch (Exception err) {
                        log.error("[getClientListByRoom]",err);
                }
=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java Fri Jan 22 09:45:44 2010 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java Tue Jan 26 08:47:40 2010
@@ -323,6 +323,37 @@
                }
                return null;
        }
+
+       public List<RoomClient> checkRed5ScreenSharing() {
+               try {
+                       IConnection current = Red5.getConnectionLocal();
+                       String streamid = current.getClient().getId();
+
+                       log.debug("checkScreenSharing -2- "+streamid);
+
+                       List<RoomClient> screenSharerList = new 
LinkedList<RoomClient>();
+
+ RoomClient currentClient = this.clientListManager.getClientByStreamId(streamid);
+
+ HashMap<String,RoomClient> roomList = this.clientListManager.getClientListByRoomAll(currentClient.getRoom_id());
+
+ for (Iterator<String> iter = roomList.keySet().iterator();iter.hasNext();) {
+
+                               RoomClient rcl = roomList.get(iter.next());
+
+                               if (rcl.getIsScreenClient()) {
+                                       screenSharerList.add(rcl);
+                               }
+
+                       }
+
+                       return screenSharerList;
+
+               } catch (Exception err) {
+                       log.error("[checkScreenSharing]",err);
+               }
+               return null;
+       }

        public synchronized Map setConnectionAsSharingClient(Map map) {
                try {

--
You received this message because you are subscribed to the Google Groups 
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/openmeetings-dev?hl=en.

Reply via email to