Author: timur
Date: Tue Mar  6 07:42:35 2012
New Revision: 1297369

URL: http://svn.apache.org/viewvc?rev=1297369&view=rev
Log:
OPENMEETINGS-73: partially fixed mute and give exclusive audio functionality

Added:
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/
    
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/
    
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/
    
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/confirmationSingle.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/errorPopup.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/library.lzx
Modified:
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participantListItem.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserList.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/commonVideoViewContentSWF10.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/main.as3.lzx
    
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
 Tue Mar  6 07:42:35 2012
@@ -1285,6 +1285,10 @@
         <netRemoteCallHib name="giveExclusiveAudio" 
funcname="giveExclusiveAudio">
             <attribute name="publicSID" value="0" type="string" />
             <netparam><method name="getValue">return 
parent.publicSID;</method></netparam>
+            <method name="setExclusiveAudio" args="tPublicSID">
+                this.publicSID = tPublicSID;
+                this.doCall();
+            </method>
         </netRemoteCallHib>
 
         <netRemoteCallHib name="receiveExclusiveAudioFlag" 
funcname="receiveExclusiveAudioFlag">
@@ -1292,16 +1296,7 @@
             <handler name="ondata" args="value">
                 <![CDATA[
                     //The onResult-Handler will be called be the rtmpconnection
-                    var obj = 
canvas._videocontainer.getVideoObjectByPublicSID(value.publicSID);
-
-                    for (var i=0; i<obj.parent.subviews.length; i++) {
-                        var videoObj = obj.parent.subviews[i];
-                        var rcl = new Object();
-
-                        rcl.publicSID = videoObj.publicSID;
-                        rcl.micMuted = !(value.publicSID == 
videoObj.publicSID);
-                        canvas.setMuteStatus(rcl);
-                    }
+                    
canvas._videocontainer.receiveExclusiveAudioFlag(value.publicSID)
                 ]]>
             </handler>
         </netRemoteCallHib>
@@ -1309,9 +1304,14 @@
         <netRemoteCallHib name="switchMicMuted" funcname="switchMicMuted">
             <attribute name="publicSID" value="" type="string" />
             <attribute name="mute" value="false" type="boolean" />
+            <event name="onMute" args="event"/>
             <method name="setMute" args="tPublicSID,tMute">
                 this.publicSID = tPublicSID;
                 this.mute = tMute;
+                var obj = new Array();
+                obj["mute"] = tMute;
+                obj["publicSID"] = tPublicSID;
+                this.onMute.sendEvent(obj);
                 this.doCall();
             </method>
             <netparam><method name="getValue">return 
parent.publicSID;</method></netparam>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx
 Tue Mar  6 07:42:35 2012
@@ -10,6 +10,10 @@
             if ($debug) Debug.write("lc_switchMicMuted", publicSID, tMute);
             canvas.thishib.switchMicMuted.setMute(publicSID, tMute);
         };
+        canvas.videoComp_lc.lc_giveExclusiveAudio = function(publicSID) {
+            if ($debug) Debug.write("lc_giveExclusiveAudio", publicSID);
+            canvas.thishib.giveExclusiveAudio.setExclusiveAudio(publicSID);
+        };
         canvas.videoComp_lc.as3ConnectionSuccess = function() {
                //FIXME: Throws a Null Pointer Exception if the parent view was 
already destroyed
                t.parent.as3ConnectionSuccess();
@@ -120,8 +124,12 @@
         Mutes/unmutes a sound of user's video
         with the publicSID
     -->
-    <method name="muteSound" args="publicSID">
-        canvas.lc.send(canvas.vid_lc_name, "muteSound", publicSID);
+    <method name="muteSound" args="publicSID, bool">
+        canvas.lc.send(canvas.vid_lc_name, "muteSound", publicSID, bool);
+    </method>
+
+    <method name="giveExclusiveAudio" args="publicSID">
+        canvas.lc.send(canvas.vid_lc_name, "giveExclusiveAudio", publicSID);
     </method>
 
     <!---

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participantListItem.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participantListItem.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participantListItem.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participantListItem.lzx
 Tue Mar  6 07:42:35 2012
@@ -134,6 +134,16 @@
             }
         ]]>
     </handler>
+
+    <handler name="onMute" reference="canvas.thishib.switchMicMuted" 
args="event">
+        <![CDATA[
+            if ($debug) Debug.write("onMute ", event.publicSID, event.mute);
+            if(this.refObj.publicSID == event.publicSID) {
+                this.refObj.micMuted = event.mute;
+                this.updateIcons();
+            }
+        ]]>
+    </handler>
     
     <!--
         Set actions to update the User-Rights and Information what he can do
@@ -397,12 +407,7 @@
            <miniIcons name="_mute" x="82" width="16" height="16" 
resource="mute_micro_btn_rsc" showhandcursor="true" >
             <handler name="onclick">
                 <![CDATA[
-                    if (canvas.ismoderator) {
-                        
canvas.thishib.switchMicMuted.setMute(parent.parent.refObj.publicSID,!parent.parent.refObj.micMuted);
-                    } else {
-                        new lz.labelerrorPopup(canvas,{errorlabelid:1409});
-                    }
-                    // TODO: 
canvas._videocontainer._videoviewcontent.muteSound(parent.parent.refObj.publicSID);
+                    
canvas._videocontainer._videoviewcontent.muteSound(parent.parent.refObj.publicSID,
 !parent.parent.refObj.micMuted);
                 ]]>
             </handler>
             <labelTooltip name="_text" text="" labelid="1407" />

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/participants/participants.lzx
 Tue Mar  6 07:42:35 2012
@@ -54,16 +54,16 @@
     <method name="initList">
        //
     </method>
-    
+
     <commonVideoComponentAdapter name="_videoviewcontent" />
-                  
+
     <method name="reconnectSuccess">
         if ($debug) Debug.write("User Reloged In");
-        //Send to SWF10 video-container to connect on the conference room url 
+        //Send to SWF10 video-container to connect on the conference room url
         //and wait for the as3ConnectionSuccess-Event
         this._videoviewcontent.reconnectSuccess(false);
     </method>
-    
+
     <!---
         We need to wait till the video-container / as3 app has the connection 
established
         otherwise it can happen that the video tries to start playing before 
the rtmp-connection
@@ -72,15 +72,15 @@
     <method name="as3ConnectionSuccess">
        if ($debug) Debug.write("as3ConnectionSuccess continue loading");
        //set default values and get already availible streams
-       //it can happen that if you click to exit the room the views are not 
+       //it can happen that if you click to exit the room the views are not
        //not cleaned up yet and you receive this event from the LocalConnection
        if (this["getRoomModeratorsByRoomId"]) {
             this.getRoomModeratorsByRoomId.doCall();
        }
     </method>
-    
-    
-    
+
+
+
     <!---
         Returns a list of all moderators of the current room and parses 
         if the current user should receive the supermoderator flag or not
@@ -186,7 +186,22 @@
      -->     
     <method name="setAVSettingsToClient" args="rcl">
         this._videoviewcontent.setAVSettingsToClient(rcl);
-    </method> 
+    </method>
+
+    <method name="receiveExclusiveAudioFlag" args="publicSID">
+    <![CDATA[
+        var obj = this._participants.getVideoObjectByPublicSID(publicSID);
+
+        for (var i=0; i<obj.parent.subviews.length; i++) {
+            var item = obj.parent.subviews[i];
+            var rcl = new Object();
+
+            rcl.publicSID = item.refObj.publicSID;
+            rcl.micMuted = !(publicSID == item.refObj.publicSID);
+            canvas.setMuteStatus(rcl);
+        }
+    ]]>
+    </method>
     
     <method name="addItem" 
args="connectedSince,isMod,streamid,username,userroom,formatedDate,position,color,object">
         <![CDATA[

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserList.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserList.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserList.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserList.lzx
 Tue Mar  6 07:42:35 2012
@@ -68,15 +68,30 @@
     </handler>
 
     <commonVideoComponentAdapter name="_videoviewcontent"/>
-                  
+
     <method name="reconnectSuccess">
-        if ($debug) Debug.warn("User Reloged In ",canvas.becomemoderator);
-        canvas.lc.send(canvas.rtmp_lc_name, "reconnectSuccess", 
canvas.thishib.src);
-        //set default values and get already availible streams
-        this.getRoomModeratorsByRoomId.doCall();
+        if ($debug) Debug.write("User Reloged In");
+        //Send to SWF10 video-container to connect on the conference room url
+        //and wait for the as3ConnectionSuccess-Event
+        this._videoviewcontent.reconnectSuccess(false);
     </method>
-    
-    <netRemoteCallHib name="getRoomModeratorsByRoomId" 
funcname="conferenceservice.getRoomModeratorsByRoomId" 
+
+    <!---
+        We need to wait till the video-container / as3 app has the connection 
established
+        otherwise it can happen that the video tries to start playing before 
the rtmp-connection
+        was established
+     -->
+    <method name="as3ConnectionSuccess">
+       if ($debug) Debug.write("as3ConnectionSuccess continue loading");
+       //set default values and get already availible streams
+       //it can happen that if you click to exit the room the views are not
+       //not cleaned up yet and you receive this event from the LocalConnection
+       if (this["getRoomModeratorsByRoomId"]) {
+            this.getRoomModeratorsByRoomId.doCall();
+       }
+    </method>
+
+    <netRemoteCallHib name="getRoomModeratorsByRoomId" 
funcname="conferenceservice.getRoomModeratorsByRoomId"
                       remotecontext="$once{ canvas.thishib }" >  
         <netparam><method name="getValue">return 
canvas.sessionId;</method></netparam>    
         <netparam><method name="getValue">return 
hib.currentroomid;</method></netparam>
@@ -199,9 +214,9 @@
                 //if ($debug) Debug.write("???????? object.isBroadcasting :: 
",object.isBroadcasting);
                 
                 if (object.isBroadcasting) {
-                    this._videoviewcontent.createVideo(object.publicSID, 
object.firstname+' '+object.lastname, object.broadCastID, object.avsettings, 
-1);
+                    this._videoviewcontent.createVideo(object.publicSID, 
object.firstname+' '+object.lastname, object.broadCastID, object.avsettings, 
-1, object);
                 } else {
-                    this._videoviewcontent.createVideoObject(object.publicSID, 
false, -1);
+                    this._videoviewcontent.createVideoObject(object.publicSID, 
false, -1, object);
                 }
                 
             } else {
@@ -210,7 +225,22 @@
             }
            
         ]]>
-    </method>       
+    </method>
+
+    <method name="receiveExclusiveAudioFlag" args="publicSID">
+    <![CDATA[
+        var vList = this._participents._table.renderList;
+        for (var i=0;i<vList.length;i++) {
+            var item = vList[i];
+            var rcl = new Object();
+
+            rcl.publicSID = item.publicSID;
+            rcl.micMuted = !(publicSID == item.publicSID);
+            canvas.setMuteStatus(rcl);
+        }
+    ]]>
+    </method>
+
 
     <method name="addItem" 
args="connectedSince,isMod,streamid,username,userroom,formatedDate,position,color,object">
         <![CDATA[
@@ -220,7 +250,7 @@
             if (streamid!=canvas.streamid){
                 //if ($debug) Debug.write("???????? object.isBroadcasting :: 
",object.isBroadcasting);
 
-                this._videoviewcontent.createVideo(object.publicSID, 
object.firstname+' '+object.lastname, object.broadCastID, object.avsettings, 
-1);
+                this._videoviewcontent.createVideo(object.publicSID, 
object.firstname+' '+object.lastname, object.broadCastID, object.avsettings, 
-1, object);
 
                 //do add others
                 this._participents.addItem(object);
@@ -239,7 +269,7 @@
         if ($debug) Debug.write("### initializeStreams addClientItem: 
",connectedSince,isMod,streamid,username,room_id,formatedDate);
 
         if (canvas.publicSID != object.publicSID){
-            this._videoviewcontent.createVideoObject(object.publicSID, false, 
-1);
+            this._videoviewcontent.createVideoObject(object.publicSID, false, 
-1, object);
         }
 
         //Do Add it anyway
@@ -251,8 +281,8 @@
         invoked whenever a User starts to Stream Video in this Room, 
         interviewPodId has only a meaning in the Room Type Interview
      -->        
-    <method name="startStream" 
args="publicSID,broadcastId,firstname,lastname,interviewPodId">
-        
this._videoviewcontent.startStream(publicSID,broadcastId,firstname,lastname,interviewPodId);
+    <method name="startStream" 
args="publicSID,broadcastId,firstname,lastname,interviewPodId,VWidth,VHeight">
+        
this._videoviewcontent.startStream(publicSID,broadcastId,firstname,lastname,interviewPodId,VWidth,VHeight);
     </method>
 
     <method name="setSpeakingByPos" args="publicSID,bool">

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListInner.lzx
 Tue Mar  6 07:42:35 2012
@@ -182,8 +182,23 @@
         </view>
     </view>
     
-    <moderationMiniIconsEventUserList name="_applyAndStatusIcons" 
-                          x="$once{ parent.width-this.width-20 }" y="2" />
+    <moderationMiniIconsEventUserList name="_applyAndStatusIcons" x="$once{ 
parent.width-this.width-20 }" y="2" >
+        <handler name="onismoderator" reference="canvas" args="m">
+            this.updateIcons();
+        </handler>
+        <handler name="ondrawAllowStatus" reference="canvas" args="drawObject">
+            this.updateIcons();
+        </handler>
+        <handler name="onexclusiveAudioAllowStatus" reference="canvas" 
args="rclObject">
+            this.updateIcons();
+        </handler>
+        <handler name="onlastBroadCastingUser" reference="canvas" 
args="userObject">
+            this.updateIcons();
+        </handler>
+        <handler name="onmicMutedStatusChangedItem" reference="canvas" 
args="userObject">
+            this.updateIcons();
+        </handler>
+    </moderationMiniIconsEventUserList>
     
     
     <turnOverListOrderedPaged name="_table" showTopBar="false" x="1"

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/restricted/restrictedUserListItem.lzx
 Tue Mar  6 07:42:35 2012
@@ -26,12 +26,12 @@
        <attribute name="connectedSince" value="" type="string" />
        
     <attribute name="isMod" value="false" type="boolean" />
-    <attribute name="canDraw" value="false" type="boolean" />
-    <attribute name="canShare" value="false" type="boolean" />
-    <attribute name="canRemote" value="false" type="boolean" />
-    <attribute name="canGiveAudio" value="false" type="boolean" />
-    <attribute name="isBroadcasting" value="false" type="boolean" />
-    <attribute name="micMuted" value="false" type="boolean" />
+    <!--<attribute name="canDraw" value="false" type="boolean" />-->
+    <!--<attribute name="canShare" value="false" type="boolean" />-->
+    <!--<attribute name="canRemote" value="false" type="boolean" />-->
+    <!--<attribute name="canGiveAudio" value="false" type="boolean" />-->
+    <!--<attribute name="isBroadcasting" value="false" type="boolean" />-->
+    <!--<attribute name="micMuted" value="false" type="boolean" />-->
     
     <attribute name="streamid" value="" type="string" />
     <attribute name="username" value="" type="string" />
@@ -60,8 +60,17 @@
             }
         ]]>
     </handler>
-    
-    
+
+    <handler name="onMute" reference="canvas.thishib.switchMicMuted" 
args="event">
+        <![CDATA[
+            if ($debug) Debug.write("onMute ", event.publicSID, event.mute);
+            if(this.refObj.publicSID == event.publicSID) {
+                this.refObj.micMuted = event.mute;
+                this.updateModeratorIcons();
+            }
+        ]]>
+    </handler>
+
        <method name="updateIconByMod">
                if (this.clickable) {
                this.isMod = 
canvas.getIsModeratorByPublicSID(this.refObj.publicSID);
@@ -108,7 +117,7 @@
             this._content._iconsModerator.setAttribute("visibility","hidden");
        }
     </method>
-    
+
        <view name="_content" width="254">
                
                <view name="_contentIsCurrent" visible="${ 
parent.parent.selfItem }"

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
 Tue Mar  6 07:42:35 2012
@@ -42,6 +42,9 @@
                @keywords final -->
        <attribute name="soundRefMC" value="null" />
 
+    <!--- Default mic gain -->
+    <attribute name="micGain" value="50" type="number"/>
+
        <event name="onMetaDataEvent" />
        <event name="onPlayStatusEvent" />
        <event name="onCuePointEvent" />
@@ -243,6 +246,17 @@
             this._ns.soundTransform = new SoundTransform(volume/100.0);
         }
     </method>
+
+    <method name="muteMicro" args="mute">
+        if(this.micro != null) {
+            if(mute) {
+                this.setAttribute('micGain', this.micro.gain);
+                this.micro.gain = 0;
+            } else {
+                this.micro.gain = this.micGain;
+            }
+        }
+    </method>
     
     <!---
         pause or resumes the NetStream

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/commonVideoViewContentSWF10.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/commonVideoViewContentSWF10.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/commonVideoViewContentSWF10.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/commonVideoViewContentSWF10.lzx
 Tue Mar  6 07:42:35 2012
@@ -263,11 +263,11 @@
         ]]>
     </method>
 
-    <method name="muteSound" args="publicSID">
+    <method name="muteSound" args="publicSID, bool">
         <![CDATA[
             var obj = this.getVideoObjectByPublicSID(publicSID);
             if (obj != null) {
-                obj._toolbar._mute.clickIt();
+                obj.silenceMicrophone(bool);
             }
         ]]>
     </method>
@@ -292,7 +292,9 @@
 
     <method name="removeVideoByUser" args="publicSID"><![CDATA[
         var obj = this.closeStreamclient(publicSID);
-        obj.destroy();
+        if(obj != null) {
+            obj.destroy();
+        }
     ]]></method>
 
     <method name="updateMuteStatusVideoView" args="roomClient">

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/main.as3.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/main.as3.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/main.as3.lzx 
(original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/main.as3.lzx Tue 
Mar  6 07:42:35 2012
@@ -9,7 +9,7 @@
             </passthrough>
         </when>
     </switch>
-    
+
     <include href="testVideoObject.lzx" />
 
     <silverstyle name="componentStyle" basecolor="0xFFFFFF" 
textcolor="0x000000" />
@@ -50,6 +50,8 @@
 
     <include href="dragHelper.lzx" />
 
+    <include href="modules/conference/popups/" />
+
     <view name="mainComponent" width="${canvas.width}" 
height="${canvas.height}">
         <text id="mainBaseText"> </text>
     </view>

Added: 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/confirmationSingle.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/confirmationSingle.lzx?rev=1297369&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/confirmationSingle.lzx
 (added)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/confirmationSingle.lzx
 Tue Mar  6 07:42:35 2012
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+
+-->
+<library>
+
+<class name="confirmationSingle" extends="labelExplorerBox" labelid="832"
+    docking="true" resizeable="false" closable="true" height="140" width="300">
+
+    <attribute name="refObj" value="null" />
+
+    <attribute name="refReturnMethod" value="null" />
+
+    <attribute name="showCheckBox" value="true" type="boolean" />
+
+    <attribute name="labeliderror" value="0" type="number" />
+
+       <view x="4" resource="warning_icon_rsc" y="24" />
+
+    <labelText labelid="$once{ parent.labeliderror }" y="24"
+                  width="$once{ parent.width - 40 }"
+       multiline="true" resize="false" x="30" />
+
+    <handler name="oninit">
+        <![CDATA[
+
+            //Set Position of Confirmation Box as Close as possible to the 
Mouse
+            var x = parent.getMouse("x");
+            var y = parent.getMouse("y");
+            var newx = x - (this.width/2);
+            var newy = y - (this.height/2);
+
+            if ($debug) Debug.write("1",x,y,newx,newy);
+
+            if (newx < 0) {
+                newx = 20;
+            }
+            if (newy < 0) {
+                newy = 20;
+            }
+
+            //if ($debug) Debug.write("1.1",(this.width + newx + 
20),parent.width,this.width);
+
+            var relativeWidth = parent.width;
+            if (relativeWidth > canvas.width) {
+               relativeWidth = canvas.width;
+            }
+
+            if (this.width + newx + 20 > relativeWidth) {
+               newx = relativeWidth-this.width-20;
+            }
+
+            if (this.height + newy + 20 > parent.height) {
+               newy = parent.height-this.height-20;
+            }
+
+            if ($debug) Debug.write("2",newx,newy);
+
+            this.setAttribute("x",newx);
+            this.setAttribute("y",newy);
+
+        ]]>
+    </handler>
+
+    <labelCheckbox name="holddatainSO" visibility="$once{ 
(parent.showCheckBox) ? 'visible' : 'hidden' }"
+                   labelid="64" x="10" y="$once{ parent.height - 46 }" />
+
+    <simpleLabelButton labelid="61" width="100" x="$once{ parent.width - 105 
}" y="$once{ parent.height - 26 }">
+       <handler name="onclick">
+               var t = parent.holddatainSO.getValue();
+               this.parent.close();
+               if (parent.refReturnMethod == null) {
+                   this.parent.refObj.sendNoConfirmation();
+               } else {
+                       this.parent.refObj[parent.refReturnMethod](false,t);
+               }
+       </handler>
+    </simpleLabelButton>
+    <simpleLabelButton labelid="60" width="100" x="$once{ parent.width - 210 
}" y="$once{ parent.height - 26 }">
+       <handler name="onclick">
+               var t = parent.holddatainSO.getValue();
+               this.parent.close();
+               if (parent.refReturnMethod == null) {
+                   this.parent.refObj.sendConfirmation(true,t);
+               } else {
+                this.parent.refObj[parent.refReturnMethod](true,t);
+            }
+       </handler>
+    </simpleLabelButton>
+</class>
+
+<class name="rememberMessage" extends="labelExplorerBox" labelid="832"
+          x="$once{ canvas.width/2 - this.width/2 }" y="100"
+          docking="true" resizeable="false" closable="true" height="140" 
width="300">
+
+    <attribute name="refObj" value="null" />
+
+    <attribute name="showCheckBox" value="true" type="boolean" />
+
+    <attribute name="labeliderror" value="0" type="number" />
+
+    <view x="4" resource="warning_icon_rsc" y="24" />
+
+    <labelText labelid="$once{ parent.labeliderror }" y="24"
+               width="$once{ parent.width - 40 }"
+        multiline="true" resize="false" x="30" />
+
+    <labelCheckbox name="holddatainSO" visibility="$once{ 
(parent.showCheckBox) ? 'visible' : 'hidden' }"
+                   labelid="64" x="10" y="$once{ parent.height - 46 }" />
+
+    <simpleLabelButton labelid="642" width="100" x="$once{ parent.width - 105 
}" y="$once{ parent.height - 26 }">
+        <handler name="onclick">
+               var t = parent.holddatainSO.getValue();
+            this.parent.close();
+            this.parent.refObj.sendConfirmation(t);
+        </handler>
+    </simpleLabelButton>
+
+</class>
+
+</library>

Added: 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/errorPopup.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/errorPopup.lzx?rev=1297369&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/errorPopup.lzx
 (added)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/errorPopup.lzx
 Tue Mar  6 07:42:35 2012
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+      http://www.apache.org/licenses/LICENSE-2.0
+         
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+  
+-->
+<library>
+
+<class name="errorPopup" extends="labelExplorerBox" labelid="204"
+       docking="true" resizeable="false" closable="true" y="100"
+    x="$once{ parent.width/2 - this.width/2 }" height="160" width="324">
+
+       <attribute name="error" value="" type="string" />
+       
+       <attribute name="makeModal" value="false" type="boolean" />
+       
+       <handler name="oninit">
+          if (this.makeModal) {
+              lz.ModeManager.makeModal(this);
+          }
+       </handler>
+       
+       <handler name="onclose">
+       if (this.makeModal) {
+           lz.ModeManager.releaseAll();
+       }
+    </handler>
+
+       <view x="4" resource="warning_icon_rsc" y="24" />
+
+       <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="$once{ parent.width - 16 }" 
selectable="true" />
+       </view>
+    
+    <simpleLabelButton labelid="642" width="100" x="$once{ parent.width-105 }" 
+           y="$once{ parent.height-24 }" 
+           onclick="this.parent.close();" />
+
+</class>
+
+<class name="labelerrorPopup" extends="errorPopup">
+
+    <attribute name="errorlabelid" type="number" 
setter="setErrorLabelId(errorlabelid)" />
+    <method name="setErrorLabelId" args="errorlabelid" >
+        this.errorlabelid = errorlabelid;
+        this.setAttribute("error",canvas.getLabelName(this.errorlabelid));
+        if ($debug) Debug.write("labelerrorPopup: 
",canvas.getLabelName(this.errorlabelid));
+    </method>
+    
+
+</class>
+
+<class name="singletonErrorPopup" extends="errorPopup">
+       <handler name="oninit">
+               lz.singletonErrorPopupHolder.dialogPresent = 1;
+               lz.singletonErrorPopupHolder.dialogObject = this;
+       </handler>
+       
+       <handler name="ondestroy">
+               lz.singletonErrorPopupHolder.dialogPresent = 0;
+               lz.singletonErrorPopupHolder.dialogObject = null;
+       </handler>
+</class>
+
+<class name="singletonErrorPopupHolder">
+       <attribute name="error" type="string" setter="setError(error)"/>
+       <attribute name="dialogPresent" allocation="class" value="0" />
+       <attribute name="dialogObject" allocation="class" />
+       
+       <method name="setError" args="error">
+       
+               if ( lz.singletonErrorPopupHolder.dialogPresent == 0 )
+               {
+                       lz.singletonErrorPopupHolder.dialogPresent = 1;
+                       lz.singletonErrorPopupHolder.dialogObject = new 
lz.singletonErrorPopup(canvas,{error:error});
+               }
+               else
+               {
+                       lz.singletonErrorPopupHolder.dialogObject.error = error;
+               }
+       </method>
+</class>
+
+</library>
\ No newline at end of file

Added: 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/library.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/library.lzx?rev=1297369&view=auto
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/library.lzx
 (added)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/modules/conference/popups/library.lzx
 Tue Mar  6 07:42:35 2012
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+
+    <include href="confirmationSingle.lzx" />
+    <include href="errorPopup.lzx" />
+    
+</library>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx?rev=1297369&r1=1297368&r2=1297369&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx
 Tue Mar  6 07:42:35 2012
@@ -449,14 +449,18 @@
                 if(!this.parent.parent.isremote) {
                     if ($debug) Debug.write("editRecordStream 
################# baseVideObject ");
                     if (this.parent.parent.isInterview) {
-                        new lz.editRecordStream(parent.parent.parent,{
+                        //TODO: fix it
+                        new lz.editRecordStreamSWF10(canvas.inner,{
+                                name:"editRecordStream",
                                 doDefaultAnimation:false,
                                 align:'center',valign:'middle',
                                 isInterview:true,
                                 myvideocontainer:parent.parent,
                                 isSyncUpdate:true});
                     } else {
-                        new 
lz.editRecordStream(canvas.main_content._content.inner,{
+                        new lz.editRecordStreamSWF10(canvas.inner,{
+                                name:"editRecordStream",
+                                isInterview:false,
                                 isSyncUpdate:true});
                     }
                 }
@@ -503,8 +507,7 @@
         <miniIcons name="_micButton" width="40" height="40" resource="mic_rsc" 
showhandcursor="true">
             <handler name="onclick">
                 <![CDATA[
-                    canvas.thishib.giveExclusiveAudio.publicSID = 
parent.parent.publicSID;
-                    canvas.thishib.giveExclusiveAudio.doCall();
+                    parent.parent.giveExclusiveAudio();
                 ]]>
             </handler>
             <labelTooltip labelid="1386" />
@@ -559,6 +562,10 @@
         }
         ]]>
     </handler>
+
+    <method name="giveExclusiveAudio">
+        canvas.videoComp_lc.send(canvas.videoComp_lc_name, 
'lc_giveExclusiveAudio', this.publicSID);
+    </method>
     
     <!--
         This will mute the Microphone only to the person that is speaking
@@ -574,10 +581,10 @@
                 if ($debug) Debug.write("Set Mute for Client :: 
",roomClientObj);
                 if (roomClientObj.micMuted) {
                     if ($debug) Debug.write("############ SET GAIN 0");
-                    this._chatvideoinner._videostream.micro.setGain(0);
+                    this._chatvideoinner._videostream.muteMicro(true);
                 } else {
-                    if ($debug) Debug.write("############ SET GAIN 50 micro: 
",this._chatvideoinner._videostream.micro);
-                    this._chatvideoinner._videostream.micro.setGain(50);
+                    if ($debug) Debug.write("############ SET GAIN 50");
+                    this._chatvideoinner._videostream.muteMicro(false);
                 }
             }
             this.isMutedByModerator = roomClientObj.micMuted;
@@ -609,6 +616,7 @@
                                                
refObj:this,showCheckBox:false});
                 return;
                } else {
+                   this._chatvideoinner._videostream.muteMicro(false);
                    canvas.videoComp_lc.send(canvas.videoComp_lc_name, 
'lc_switchMicMuted', this.publicSID, false);
                }
         } else {
@@ -657,6 +665,10 @@
     <method name="confirmGloballyOff" args="bool,t" >
        if ($debug) Debug.write("confirmGloballyOff :: ",bool);
        if (bool) {
+            this.setMicMuted(true);
+            if(this.publicSID == canvas.publicSID) {
+                this._chatvideoinner._videostream.muteMicro(true);
+            }
             canvas.videoComp_lc.send(canvas.videoComp_lc_name, 
'lc_switchMicMuted', this.publicSID, true);
        }
     </method>


Reply via email to