Revision: 4647
Author:   [email protected]
Date:     Thu Dec  1 04:45:29 2011
Log:      "Give exclusive audio" functionality
http://code.google.com/p/openmeetings/source/detail?r=4647

Modified:
 /trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
/trunk/singlewebapp/WebContent/src/modules/conference/eventuserlist/resources/mic.png /trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/baseConferenceRoom.lzx /trunk/singlewebapp/WebContent/src/modules/conference/video/baseVideoObject.lzx /trunk/singlewebapp/src/app/org/openmeetings/app/installation/ImportInitvalues.java /trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java

=======================================
--- /trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx Thu Dec 1 01:00:04 2011 +++ /trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx Thu Dec 1 04:45:29 2011
@@ -1318,25 +1318,13 @@
//The onResult-Handler will be called be the rtmpconnection var obj = canvas._videocontainer.getVideoObjectByPublicSID(value.publicSID);

-                    var iHaveAudio = (canvas.publicSID == value.publicSID);
                     for (var i=0; i<obj.parent.subviews.length; i++) {
- var itIsMyVideo = (canvas.publicSID == obj.parent.subviews[i].publicSID); - var heHasAudio = (value.publicSID == obj.parent.subviews[i].publicSID);
-                        if (iHaveAudio) {
-                            if (itIsMyVideo) {
- obj.parent.subviews[i].simpleMuteMicrophone(false);
-                            } else {
-                                obj.parent.subviews[i].setMicMuted(true);
-                            }
-                        } else {
-                            if (itIsMyVideo) {
- obj.parent.subviews[i].simpleMuteMicrophone(true);
-                            } else if (heHasAudio){
-                                obj.parent.subviews[i].setMicMuted(false);
-                            } else {
-                                obj.parent.subviews[i].setMicMuted(true);
-                            }
-                        }
+                        var videoObj = obj.parent.subviews[i];
+                        var rcl = new Object();
+
+                        rcl.publicSID = videoObj.publicSID;
+ rcl.micMuted = !(value.publicSID == videoObj.publicSID);
+                        canvas.setMuteStatus(rcl);
                     }
                 ]]>
             </handler>
=======================================
--- /trunk/singlewebapp/WebContent/src/modules/conference/eventuserlist/resources/mic.png Thu Sep 15 21:42:15 2011 +++ /trunk/singlewebapp/WebContent/src/modules/conference/eventuserlist/resources/mic.png Thu Dec 1 04:45:29 2011
Binary file, no diff available.
=======================================
--- /trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/baseConferenceRoom.lzx Fri Nov 25 00:03:59 2011 +++ /trunk/singlewebapp/WebContent/src/modules/conference/flexibleConferenceRoom/baseConferenceRoom.lzx Thu Dec 1 04:45:29 2011
@@ -47,6 +47,7 @@

     <handler name="oninit">
         <![CDATA[
+            this.getExclusiveAudioKeyCode.doCall();
             _mainScrollBar.setAttribute("visibility","hidden");

             if ($debug) Debug.write("roomobj: ",this.roomobj);
@@ -134,10 +135,18 @@
        if ($debug) Debug.write("ringring - ringring - ringring");
     </method>

-    <handler name="onkeydown" reference="lz.Keys" args="keyCode">
-        var GIVE_EXCLUSIVE_AUDIO_KEY = 123; // F12
-
-        if (GIVE_EXCLUSIVE_AUDIO_KEY == keyCode) {
+    <attribute name="GIVE_EXCLUSIVE_AUDIO_KEY" value="123"/> <!--F12-->
+ <netRemoteCallHib name="getExclusiveAudioKeyCode" funcname="getExclusiveAudioKeyCode" remotecontext="$once{ canvas.thishib }">
+        <handler name="ondata" args="value">
+            if (null != value) {
+ if ($debug) Debug.write("Give exclusive audio keycode is changed to: ", value);
+                parent.setAttribute('GIVE_EXCLUSIVE_AUDIO_KEY', value);
+            }
+        </handler>
+    </netRemoteCallHib>
+
+    <handler name="onkeydown" reference="lz.Keys" args="keyCode">
+        if (this.GIVE_EXCLUSIVE_AUDIO_KEY == keyCode) {
var obj = canvas._videocontainer.getVideoObjectByPublicSID(canvas.publicSID);
             if (null != obj) {
                 obj._giveExclusiveAudioView._micButton.onclick.sendEvent();
=======================================
--- /trunk/singlewebapp/WebContent/src/modules/conference/video/baseVideoObject.lzx Fri Nov 25 00:03:59 2011 +++ /trunk/singlewebapp/WebContent/src/modules/conference/video/baseVideoObject.lzx Thu Dec 1 04:45:29 2011
@@ -450,8 +450,7 @@

     </view>

- <view name="_giveExclusiveAudioView" x="${(parent.width)*0.5 - 20}" y="${(parent.height)*0.5 - 20}"
-            visible="false">
+ <view name="_giveExclusiveAudioView" valign="middle" align="center" visible="false"> <miniIcons name="_micButton" width="40" height="40" resource="mic_rsc" showhandcursor="true">
             <handler name="onclick">
                 <![CDATA[
@@ -471,8 +470,8 @@
         if (this.minimized) {
             return;
         }
-        var itIsMyVideo = (canvas.publicSID == this.publicSID);
-        if (canvas.ismoderator || itIsMyVideo) {
+
+        if (canvas.ismoderator || !this.isremote) {
             this._giveExclusiveAudioView.setAttribute("visible", true);
         }
         ]]>
@@ -486,9 +485,7 @@
         if (this.minimized) {
             return;
         }
-        if (canvas.ismoderator) {
-            this._giveExclusiveAudioView.setAttribute("visible", false);
-        }
+        this._giveExclusiveAudioView.setAttribute("visible", false);
         ]]>
     </handler>

@@ -546,17 +543,6 @@
         ]]>
     </method>

-    <method name="simpleMuteMicrophone" args="micMuted">
-        if (micMuted) {
-            if ($debug) Debug.write("############ SET GAIN 0");
-            this._chatvideoinner._videostream.micro.setGain(0);
-        } else {
-            if ($debug) Debug.write("############ SET GAIN 50");
-            this._chatvideoinner._videostream.micro.setGain(50);
-        }
-        this.setMicMuted(micMuted);
-    </method>
-
     <!--
         This will mute it only locally, that means on other screens
         the user might be still online and loud
=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/installation/ImportInitvalues.java Mon Nov 21 04:31:36 2011 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/installation/ImportInitvalues.java Thu Dec 1 04:45:29 2011
@@ -486,6 +486,10 @@

cfgManagement.addConfByKey(3, "use.old.style.ffmpeg.map.option", "0", null, "specify a 1 if you would like to use old FFMPEG -map option with 0.0 instead of 0:0");
+
+        // give exclusive audio key code
+ cfgManagement.addConfByKey(3, "exclusive.audio.keycode", "123", null, + "A hot key code for the 'give exclusive audio' functionality. 123 if F12");
        }


=======================================
--- /trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java Sun Nov 20 09:05:19 2011 +++ /trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java Thu Dec 1 04:45:29 2011
@@ -3916,5 +3916,14 @@
                }
                return null;
        }
+
+    public String getExclusiveAudioKeyCode() {
+ Configuration conf = cfgManagement.getConfKey(3, "exclusive.audio.keycode");
+        if (null != conf) {
+            return conf.getConf_value();
+        } else {
+            return null;
+        }
+    }

 }

--
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