Author: solomax
Date: Sat Jan  4 03:29:33 2014
New Revision: 1555316

URL: http://svn.apache.org/r1555316
Log:
[OPENMEETINGS-337] audio-only mode should work as expected in interview room

Modified:
    
openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
    
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx
    
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/interviewuserlist/interviewWhiteboard.lzx
    
openmeetings/trunk/singlewebapp/WebContent/swf10/commonVideoViewContentSWF10.lzx
    
openmeetings/trunk/singlewebapp/WebContent/swf10/video/editRecordStreamSWF10.lzx

Modified: 
openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx?rev=1555316&r1=1555315&r2=1555316&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/src/base/hibernate/hibRtmpConnection.lzx
 Sat Jan  4 03:29:33 2014
@@ -572,31 +572,30 @@
         </handler>   
     </netRemoteCallHib>
     
-    <netRemoteCallHib name="getRoomById" 
funcname="conferenceservice.getRoomById" >          
-        <netparam name="sessionId"><method name="getValue">return 
canvas.sessionId;</method></netparam>
-        <netparam name="roomId"><method name="getValue">return 
canvas.initroomid;</method></netparam>
-        <handler name="ondata" args="value">
-            <![CDATA[
-                //The onResult-Handler will be called be the rtmpconnection
-                if ($debug) Debug.write("getRoomById: ",value);
-                if (value!=null){
-                       if (canvas.wicketsid != null) {
-                               canvas.thishib.loaderVar.close();
-                       }
-                    if (canvas.directUserLogin) {
-                        canvas.directRoomObj = value;
-                        canvas.thishib.loaderVar.close();
-                        
-                    } else {
-                       
canvas.setRoomValues(value.roomtype.roomtypes_id,value.rooms_id,value);
-                       
canvas.sendViaLocalConnection(canvas.rtmp_lc_name,"setRoomValues",[value.roomtype.roomtypes_id,value.rooms_id,value]);
-                    }
-                } else {
-                    new lz.labelerrorPopup(canvas,{errorlabelid:1286});
-                }
-            ]]>
-        </handler>   
-    </netRemoteCallHib>
+       <netRemoteCallHib name="getRoomById" 
funcname="conferenceservice.getRoomById" >          
+               <netparam name="sessionId"><method name="getValue">return 
canvas.sessionId;</method></netparam>
+               <netparam name="roomId"><method name="getValue">return 
canvas.initroomid;</method></netparam>
+               <handler name="ondata" args="value">
+               <![CDATA[
+                       //The onResult-Handler will be called be the 
rtmpconnection
+                       if ($debug) Debug.write("getRoomById: ",value);
+                       if (value!=null){
+                               if (canvas.wicketsid != null) {
+                                       canvas.thishib.loaderVar.close();
+                               }
+                               if (canvas.directUserLogin) {
+                                       canvas.directRoomObj = value;
+                                       canvas.thishib.loaderVar.close();
+                               } else {
+                                       
canvas.setRoomValues(value.roomtype.roomtypes_id,value.rooms_id,value);
+                                       
canvas.sendViaLocalConnection(canvas.rtmp_lc_name,"setRoomValues",[value.roomtype.roomtypes_id,value.rooms_id,value]);
+                               }
+                       } else {
+                               new 
lz.labelerrorPopup(canvas,{errorlabelid:1286});
+                       }
+               ]]>
+               </handler>
+       </netRemoteCallHib>
         
     <netRemoteCallHib name="getLanguageByIdAndMax" 
funcname="languageservice.getLanguageByIdAndMax" >
         <attribute name="start" value="0" type="number" />
@@ -628,7 +627,11 @@
                     } else {
                        if($debug) Debug.write("getStates");
                         parent.initlanguageLoaded=true;
-                        parent.getStates.doCall();
+                        parent.getStates.doCall(); // this is very long call 
let it be async
+                       if($debug) Debug.write("getTimeZones");
+                                   parent.getTimeZones.doCall(); // this is 
very long call let it be async
+                       if($debug) Debug.write("getGeneralOptions");
+                                   parent.getGeneralOptions.doCall();
                     }
                 }
             ]]>
@@ -694,8 +697,6 @@
                        if (canvas.thishib.loaderVar != null) {
                canvas.thishib.loaderVar.setProgress();
             }
-            parent.getTimeZones.doCall(); // this is very long call let it be 
async
-            parent.getGeneralOptions.doCall();
         </handler>  
     </netRemoteCallHib>  
     

Modified: 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx?rev=1555316&r1=1555315&r2=1555316&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/commonVideoComponentAdapter.lzx
 Sat Jan  4 03:29:33 2014
@@ -37,6 +37,12 @@
                //FIXME: Throws a Null Pointer Exception if the parent view was 
already destroyed
                t.parent.as3ConnectionSuccess();
         }
+               canvas.videoComp_lc.onInterviewPodCount = function(count) {
+                       //if ($debug) Debug.write(":::: onInterviewPodCount", 
count);
+                       if (canvas._drawarea["onInterviewPodCount"]) {
+                               canvas._drawarea.onInterviewPodCount(count);
+                       }
+               }
     </handler>
     
     <!---

Modified: 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/interviewuserlist/interviewWhiteboard.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/interviewuserlist/interviewWhiteboard.lzx?rev=1555316&r1=1555315&r2=1555316&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/interviewuserlist/interviewWhiteboard.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/interviewuserlist/interviewWhiteboard.lzx
 Sat Jan  4 03:29:33 2014
@@ -21,21 +21,50 @@
 <library>
     
 <class name="interviewWhiteboard" extends="view" clip="true">
-        
-    <handler name="oninit">
-        canvas._drawarea = this;
-        this.reloadStatus();
+       <attribute name="checkPodsDelegate" value="null"/>
+               
+       <handler name="oninit">
+       <![CDATA[
+               canvas._drawarea = this;
+               if (checkPodsDelegate == null && !_recStarted.visible) {
+                       checkPodsDelegate = new LzDelegate(this, "checkPods");
+                       lz.Timer.addTimer(checkPodsDelegate, 1000);
+               }
+               this.reloadStatus();
+       ]]>
+       </handler>
+    
+    <handler name="ondestroy">
+               stopPodChecks();
     </handler>
+    
     <handler name="onopenWhiteBoard" >
         if ($debug) Debug.write("-- onOpenWhiteBoard --");
     </handler>
     
-    <method name="newInterviewStarting" args="refObj">
-        <![CDATA[
-           
this._videoviewcontent["interviewVideoBox"+refObj.interviewPodId].startInterView();
-        ]]>
-    </method>
-        
+       <method name="newInterviewStarting" args="refObj">
+       <![CDATA[
+               
this._videoviewcontent["interviewVideoBox"+refObj.interviewPodId].startInterView();
+       ]]>
+       </method>
+       
+       <method name="stopPodChecks">
+               if (checkPodsDelegate != null) {
+                       lz.Timer.removeTimer(checkPodsDelegate);
+                       checkPodsDelegate = null;
+               }
+       </method>
+
+       <method name="onInterviewPodCount" args="count">
+               _interview._start.setAttribute("enabled", count > 0);
+       </method>
+       
+       <method name="checkPods" args="ignore=null">
+               //if ($debug) Debug.write(":: Pods :: check :: ");
+               canvas.sendViaLocalConnection(canvas.vid_lc_name, 
"getVideoObjectCount", [null]);
+               lz.Timer.resetTimer(checkPodsDelegate, 1000);
+       </method>
+       
     <method name="reloadStatus">
         this.getInterviewRecordingStatus.doCall();
     </method>
@@ -67,7 +96,6 @@
     </commonVideoViewContent>
     
     <view name="_interview" align="center" visible="${ canvas.ismoderator }">
-        
         <!--
            public synchronized Boolean startInterviewRecording()
          -->

Modified: 
openmeetings/trunk/singlewebapp/WebContent/swf10/commonVideoViewContentSWF10.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/swf10/commonVideoViewContentSWF10.lzx?rev=1555316&r1=1555315&r2=1555316&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/swf10/commonVideoViewContentSWF10.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/swf10/commonVideoViewContentSWF10.lzx
 Sat Jan  4 03:29:33 2014
@@ -49,6 +49,7 @@
             client.getVideoObjectByPublicSID = this.getVideoObjectByPublicSID;
             client.getNewVideoObject = this.getNewVideoObject;
             client.getVideoObjectFreePos = this.getVideoObjectFreePos;
+            client.getVideoObjectCount = this.getVideoObjectCount;
             client.disconnectclient = this.disconnectclient;
             client.resetAllValues = this.resetAllValues;
             client.closeStreamClient = this.closeStreamClient;
@@ -142,7 +143,7 @@
                     vidContainer.setVideouserProfilePic(object);
                     if ($debug) Debug.warn("start play");
                     
vidContainer._chatvideoinner._videostream.playStream(broadcastId,-1);
-                    vidContainer.setAttribute("visibility","hidden");
+                    vidContainer.setAttribute("visible", false);
                 } else if (avsettings=="v" || avsettings=="av") {
                     //this means avsettings is either: "v" or "av"
                        
vidContainer.setDefaultVideoSize(object.VWidth,object.VHeight);
@@ -236,6 +237,19 @@
         ]]>
     </method>
 
+       <method name="getVideoObjectCount" args="a">
+       <![CDATA[
+               var count = 0;
+               for (var i = 0; i < this.subviews.length; ++i) {
+                       if (this.subviews[i].visible) {
+                               count++;
+                       }
+               }
+               //if ($debug) Debug.debug("COUNT :: ", count);
+               canvas.videoComp_lc.send(canvas.videoComp_lc_name, 
'onInterviewPodCount', count);
+       ]]>
+       </method>
+
     <method name="getVideoObjectFreePos" 
args="offsetLength,videoWidth,videoHeight">
         <![CDATA[
             var newx = 20;
@@ -366,27 +380,29 @@
        ]]>
        </method>
 
-    <method name="setAVSettingsToClient" args="rcl">
-        if ($debug) Debug.write("setAVSettingsToClient ",rcl.publicSID,rcl);
-        var obj = this.getVideoObjectByPublicSID(rcl.publicSID);
-        if ($debug) Debug.write("setAVSettingsToClient: ",obj,rcl.avsettings);
-        if (obj == null) {
-               obj = this.getNewVideoObjectByPos(rcl.publicSID);
-        }
-        if (rcl.avsettings=="n"){
-            obj.setAttribute("visibility","hidden");
-            obj.setVideouserProfilePic(rcl);
-        } else if (rcl.avsettings=="a"){
-            obj.setVideouserProfilePic(rcl);
-            obj.setAttribute("visibility","hidden");
-        } else {
-            obj.deleteVideoConfProfilePic();
-            obj.setAttribute("visibility","visible");
-        }
-        obj.thisVars = rcl;
-        obj.updateAVSettingsSymbol(rcl);
-        return;
-    </method>
+       <method name="setAVSettingsToClient" args="rcl">
+       <![CDATA[
+               if ($debug) Debug.write("setAVSettingsToClient: ", 
rcl.publicSID, rcl);
+               var obj = this.getVideoObjectByPublicSID(rcl.publicSID);
+               if ($debug) Debug.write("setAVSettingsToClient: ", obj, 
rcl.avsettings);
+               if (obj == null) {
+                       obj = this.getNewVideoObjectByPos(rcl.publicSID);
+               }
+               if ("n" == rcl.avsettings){
+                       obj.setVideouserProfilePic(rcl);
+               } else if ("a" == rcl.avsettings){
+                       obj.setVideouserProfilePic(rcl);
+               } else {
+                       obj.deleteVideoConfProfilePic();
+               }
+               obj.thisVars = rcl;
+               obj.updateAVSettingsSymbol(rcl);
+               var v = ("a" == rcl.avsettings && obj.isInterview) || ("a" != 
rcl.avsettings && rcl.avsettings != "n");
+               obj.setAttribute("visible", v);
+               obj.setAttribute("visibility", v ? "visible" : "hidden");
+               if ($debug) Debug.write("setAVSettingsToClient: ", v, 
obj.visible);
+       ]]>
+       </method>
 
     <method name="startStream" 
args="publicSID,broadcastId,firstname,lastname,interviewPodId,width,height">
         <![CDATA[

Modified: 
openmeetings/trunk/singlewebapp/WebContent/swf10/video/editRecordStreamSWF10.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/WebContent/swf10/video/editRecordStreamSWF10.lzx?rev=1555316&r1=1555315&r2=1555316&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/WebContent/swf10/video/editRecordStreamSWF10.lzx
 (original)
+++ 
openmeetings/trunk/singlewebapp/WebContent/swf10/video/editRecordStreamSWF10.lzx
 Sat Jan  4 03:29:33 2014
@@ -322,14 +322,14 @@
                if ($debug) Debug.write("BroadcastId: ", 
this.currentClient.broadCastID);
                switch (settings){
                        case "s":
-                               
this.myvideocontainer.setAttribute("visibility","hidden");
+                               this.myvideocontainer.setAttribute("visible", 
false);
                                break;
                        case "vs":
                                
videoview.broadcast(this.currentClient.broadCastID,_camera,null);
+                               this.myvideocontainer.setAttribute("visible", 
true);
                                if(canvas.isInterview) {
                                        
canvas.videoComp_lc.send(canvas.videoComp_lc_name, "onStartBroadcast", 
this.currentClient.broadCastID, settings);
                                } else {
-                                       
this.myvideocontainer.setAttribute("visibility","visible");
                                        if (this.myvideocontainer.minimized) {
                                                
this.myvideocontainer.reminimize();
                                        }
@@ -337,10 +337,10 @@
                                break;
                        case "av":
                                
videoview.broadcast(this.currentClient.broadCastID,_camera,_micro);
+                               this.myvideocontainer.setAttribute("visible", 
true);
                                if(canvas.isInterview) {
                                        
canvas.videoComp_lc.send(canvas.videoComp_lc_name, "onStartBroadcast", 
this.currentClient.broadCastID, settings);
                                } else {
-                                       
this.myvideocontainer.setAttribute("visibility","visible");
                                        if (this.myvideocontainer.minimized) {
                                                
this.myvideocontainer.reminimize();
                                        }
@@ -348,13 +348,11 @@
                                break;
                        case "a":
                                
videoview.broadcast(this.currentClient.broadCastID,null,_micro);
+                               this.myvideocontainer.setAttribute("visible", 
canvas.isInterview || !this.myvideocontainer.hidebyAudioOnly);
                                if(canvas.isInterview) {
                                        
canvas.videoComp_lc.send(canvas.videoComp_lc_name, "onStartBroadcast", 
this.currentClient.broadCastID, settings);
                                } else {
-                                       if 
(this.myvideocontainer.hidebyAudioOnly) {
-                                               
this.myvideocontainer.setAttribute("visibility","hidden");
-                                       } else {
-                                               
this.myvideocontainer.setAttribute("visibility","visible");
+                                       if 
(!this.myvideocontainer.hidebyAudioOnly) {
                                                if 
(!this.myvideocontainer.minimized) {
                                                        
this.myvideocontainer.minimize();
                                                }
@@ -363,10 +361,10 @@
                                break;
                        case "v":
                                
videoview.broadcast(this.currentClient.broadCastID,_camera,null);
+                               this.myvideocontainer.setAttribute("visible", 
true);
                                if(canvas.isInterview) {
                                        
canvas.videoComp_lc.send(canvas.videoComp_lc_name, "onStartBroadcast", 
this.currentClient.broadCastID, settings);
                                } else {
-                                       
this.myvideocontainer.setAttribute("visibility","visible");
                                        if (this.myvideocontainer.minimized) {
                                                
this.myvideocontainer.reminimize();
                                        }


Reply via email to