Modified: 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/restricted/restrictedUserList.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/restricted/restrictedUserList.lzx?rev=1220427&r1=1220426&r2=1220427&view=diff
==============================================================================
--- 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/restricted/restrictedUserList.lzx
 (original)
+++ 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/restricted/restrictedUserList.lzx
 Sun Dec 18 15:29:29 2011
@@ -12,6 +12,8 @@
        <attribute name="colorArray" value="null" />
        
        <attribute name="allowUserQuestions" value="true" type="boolean" />
+
+    <attribute name="showsVideoInSeparateComponent" value="true" 
type="boolean" />
        
        <handler name="onallowUserQuestions" args="bool">
                if (bool != null) {
@@ -44,7 +46,10 @@
                //The user is already in the correct Scope
                this.reconnectSuccess();
         }
+        _videoviewcontent.initVideoContainer(40, 100, 100);
        </handler>
+
+    <commonVideoComponentAdapter name="_videoviewcontent"/>
                   
     <method name="reconnectSuccess">
         if ($debug) Debug.warn("User Reloged In ",canvas.becomemoderator);
@@ -159,63 +164,9 @@
        <!-- invoked if another client logs into the room 
        after choosing devices -->     
     <method name="setAVSettingsToClient" args="rcl">
-       if ($debug) Debug.write("setAVSettingsToClient ",rcl.publicSID,rcl);
-       var obj = this.getVideoObjectByPublicSID(rcl.publicSID);
-       
-       if (obj == null) {
-               obj = this.getNewVideoObjectByPos(rcl.publicSID);
-       }
-       
-       if ($debug) Debug.write("setAVSettingsToClient: ",obj,rcl.avsettings);
-               if (rcl.avsettings=="n"){
-            obj.setAttribute("visibility","hidden");
-                       obj.setVideouserProfilePic(rcl);
-               } else if (rcl.avsettings=="a"){
-                       obj.setVideouserProfilePic(rcl);
-                       if (!obj.minimized) {
-                               obj.minimize();
-                       }
-            obj.setAttribute("visibility","visible");
-               } else {
-                       obj.deleteVideoConfProfilePic();
-            obj.setAttribute("visibility","visible");
-               }
-               obj.clientVars = rcl;
-       obj.updateAVSettingsSymbol(rcl);
+       this._videoviewcontent.setAVSettingsToClient(rcl);
     </method> 
-    
 
-    <!--- get a baseVideoObject by a Users publicSID
-       @param string publicSID publicSID
-        -->
-    <method name="getVideoObjectByPublicSID" args="publicSID">
-       <![CDATA[
-               //if ($debug) Debug.write("getVideoObjectByPublicSid SEARCH: 
",publicSID);
-               
-               var videoContainer = parent.parent._videoviewcontent;
-            
-               //for (var i=0;i<this._videoviewcontent.subviews.length;i++){
-               //      if ($debug) Debug.write("getVideoObjectByBroadCastId6 
broadcastId: ",this._videoviewcontent.subviews[i].broadcastId);
-               //      if ($debug) Debug.write("getVideoObjectByBroadCastId7 
streamid,user_id: 
",this._videoviewcontent.subviews[i].clientVars.streamid,this._videoviewcontent.subviews[i].clientVars.user_id);
-               //}
-               
-               for (var i=0;i<videoContainer.subviews.length;i++){
-                       //if ($debug) Debug.write("getVideoObjectByBroadCastId2 
broadcastId VIEW: ",videoContainer.subviews[i].broadcastId);
-                       //if ($debug) Debug.write("getVideoObjectByBroadCastId3 
broadcastId SEARCH: ",broadcastId);
-                       //if ($debug) Debug.write("getVideoObjectByBroadCastId4 
obj: ",videoContainer.subviews[i]);
-                       //if ($debug) Debug.write("getVideoObjectByBroadCastId5 
streamid,user_id: 
",videoContainer.subviews[i].clientVars.streamid,videoContainer.subviews[i].clientVars.user_id);
-                       if (videoContainer.subviews[i].publicSID==publicSID){
-                               return videoContainer.subviews[i];
-                       }
-               }
-               
-               if ($debug) Debug.warn(" - getVideoObjectByPublicSID - DID NOT 
FIND THE USER BY ",publicSID);
-            
-            return null;
-               
-       ]]>
-    </method>   
-    
     <method name="addItemInitial" 
args="connectedSince,isMod,streamid,username,userroom,formatedDate,position,color,object">
                <![CDATA[
                        //if ($debug) Debug.write("initializeStreams addItem: 
",connectedSince,isMod,streamid,username,formatedDate);
@@ -229,40 +180,14 @@
                 //if ($debug) Debug.write("???????? object.isBroadcasting :: 
",object.isBroadcasting);
                 
                                if (object.isBroadcasting) {
-                                       
-                   var myvideocontainer = 
this.getNewVideoObjectByPos(object.publicSID);
-                               myvideocontainer.clientVars = object;
-                               
myvideocontainer.setAttribute('chatpartnername',object.firstname+' 
'+object.lastname);
-                               if ($debug) Debug.write("object.isBroadcasting 
object.avsettings: ",object.avsettings);
-                               if (object.avsettings=="n"){
-                               myvideocontainer.setVideouserProfilePic(object);
-                        //myvideocontainer.setAttribute("visibility","hidden");
-                       } else if (object.avsettings=="a"){
-                               myvideocontainer.setVideouserProfilePic(object);
-                               if ($debug) Debug.warn("start play");
-                               
myvideocontainer._chatvideoinner._videostream.playStream(object.broadCastID,-1);
-                        myvideocontainer.setAttribute("visibility","visible");
-                        if (!myvideocontainer.minimized) {
-                            myvideocontainer.minimize();
-                        }
-                       } else {
-                               
myvideocontainer._chatvideoinner._videostream.playStream(object.broadCastID,-1);
        
-                        myvideocontainer.setAttribute("visibility","visible");
-                               if ($debug) Debug.warn("start play");
-                       }
-                       myvideocontainer.updateAVSettingsSymbol(object);
-                    return myvideocontainer;
-                    
+                    this._videoviewcontent.createVideo(object.publicSID, 
object.firstname+' '+object.lastname, object.broadCastID, object.avsettings, 
-1);
                                } else {
-                                       return null;
+                                       
this._videoviewcontent.createVideoObject(object.publicSID, false, -1);
                                }
                                
                        } else {
-                
                 //do add self too
                 this._participents.initialAddItem(object);
-                
-                return null;
             }
            
                ]]>
@@ -274,188 +199,57 @@
             
             //Do init only in case this stream is NOT the same as we are
                        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);
+
                                //do add others
                 this._participents.addItem(object);
-                
-                //if ($debug) Debug.write("???????? object.isBroadcasting :: 
",object.isBroadcasting);
-                
-                               if (object.isBroadcasting) {
-                                       
-                   var myvideocontainer = 
this.getNewVideoObjectByPos(object.publicSID);
-                               myvideocontainer.clientVars = object;
-                               
myvideocontainer.setAttribute('chatpartnername',object.firstname+' 
'+object.lastname);
-                               if ($debug) Debug.write("object.avsettings: 
",object.avsettings);
-                               if (object.avsettings=="n"){
-                               myvideocontainer.setVideouserProfilePic(object);
-                        //myvideocontainer.setAttribute("visibility","hidden");
-                       } else if (object.avsettings=="a"){
-                               myvideocontainer.setVideouserProfilePic(object);
-                               if ($debug) Debug.warn("start play");
-                               
myvideocontainer._chatvideoinner._videostream.playStream(object.broadCastID,-1);
-                        myvideocontainer.setAttribute("visibility","visible");
-                        if (!myvideocontainer.minimized) {
-                            myvideocontainer.minimize();
-                        }
-                       } else {
-                               
myvideocontainer._chatvideoinner._videostream.playStream(object.broadCastID,-1);
        
-                        myvideocontainer.setAttribute("visibility","visible");
-                               if ($debug) Debug.warn("start play");
-                       }
-                       myvideocontainer.updateAVSettingsSymbol(object);
-                    return myvideocontainer;
-                    
-                               } else {
-                                       return null;
-                               }
-                               
+
+                //return myvideocontainer;
                        } else {
-                
                 //do add self too
                 this._participents.addItem(object);
-                
-                return null;
             }
            
                ]]>
        </method>
        
        <method name="addClientItem" 
args="connectedSince,isMod,streamid,username,room_id,formatedDate,position,color,object">
-               <![CDATA[
-               if ($debug) Debug.write("### initializeStreams addClientItem: 
",connectedSince,isMod,streamid,username,room_id,formatedDate);
-               
-               if (canvas.publicSID != object.publicSID){
-                       
-                       if (object.isBroadcasting) {
-                    var myvideocontainer = 
this.getNewVideoObjectByPos(object.publicSID);
-                               myvideocontainer.clientVars = object;
-                               
myvideocontainer.setAttribute('chatpartnername',object.firstname+' 
'+object.lastname);
-                               if ($debug) Debug.write("addClientItem 
avsettings: ",object.avsettings);
-                       if (object.avsettings=="n" || object.avsettings=="a"){
-                               myvideocontainer.setVideouserProfilePic(object);
-                       }
-                       myvideocontainer.updateAVSettingsSymbol(object);
-                       }
-                       
-               }
+        <![CDATA[
+        if ($debug) Debug.write("### initializeStreams addClientItem: 
",connectedSince,isMod,streamid,username,room_id,formatedDate);
 
-               //Do Add it anyway
-               this._participents.addItem(object);
-               ]]>
-       </method>
+        if (canvas.publicSID != object.publicSID){
+            this._videoviewcontent.createVideoObject(object.publicSID, false, 
-1);
+        }
+
+        //Do Add it anyway
+        this._participents.addItem(object);
+        ]]>
+    </method>
                
     <!--
         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">
-               <![CDATA[
-                       //if ($debug) Debug.write("startStream broadcastId: 
",broadcastId);
-                       var obj = this.getVideoObjectByPublicSID(publicSID);
-                       
-                       if (obj == null) {
-                obj = this.getNewVideoObjectByPos(publicSID);
-            }
-                       
-                       //if ($debug) Debug.write("startStream obj: ",obj);
-                       if (obj != null ){
-                               
obj._chatvideoinner._videostream.playStream(broadcastId,-1);
-                               obj.setAttribute('chatpartnername',firstname+' 
'+lastname);
-                       } else {
-                               if ($debug) Debug.warn("Could Not find the 
correct obj to startStream - This should not happen logically",publicSID);
-                       }
-               ]]>
+               
this._videoviewcontent.startStream(publicSID,broadcastId,firstname,lastname,interviewPodId);
        </method>
 
-       
-       <!-- 
-               This method returns an object of type videoObjectBroadcast
-               you can only publish you a/v with this object
-               @param string broadcastId broadcastId
-        -->
-       <method name="getNewVideoObject" args="publicSID">
-               <![CDATA[
-                       var obj = this.getVideoObjectByPublicSID(publicSID);
-                       if (obj!=null){
-                               this.broadCastViewRef = obj;
-                       } else {
-                var videoContainer = parent.parent._videoviewcontent;
-                
-                //Get a Free VideoView Slot
-                var freePos = videoContainer.getVideoObjectFreePos(40, 100, 
100);
-                
-                               this.broadCastViewRef = new 
lz.videoObjectBroadcast(videoContainer,{
-                           publicSID:publicSID,
-                           x:freePos[0],y:freePos[1]
-                    });
-                               
-                               
this.broadCastViewRef._chatvideoinner.r.destroy();
-                               
this.broadCastViewRef.setAttribute('chatpartnername',hib.userobject.firstname+' 
'+hib.userobject.lastname);
-                       }
-                       return this.broadCastViewRef;
-               ]]>
-       </method>
-       
-       <!---
-               returns a new object of type videoObjectPlayBroadcast
-               you can only play a stream not publish you a/v with this object
-               @param string broadcastId broadcastId
-        -->
-       <method name="getNewVideoObjectByPos" args="publicSID">
-               <![CDATA[
-                       var obj = this.getVideoObjectByPublicSID(publicSID);
-                       if (obj!=null){
-                               return obj;
-                       }
-                       
-            var videoContainer = parent.parent._videoviewcontent;
-            
-            //Get a Free VideoView Slot
-            var freePos = videoContainer.getVideoObjectFreePos(40, 100, 100);
-            
-                       return new lz.videoObjectPlayBroadcast(videoContainer,{
-                    publicSID:publicSID,
-                    x:freePos[0],y:freePos[1]
-                });
-               ]]>
-       </method>
-       
-       <!--- 
-               invoked remotely by Red5-notification 
-               shows a green light if somebody is speaking
-               @param string broadcastId broadcastId
-               @param boolean bool show light on/off
-       -->
        <method name="setSpeakingByPos" args="publicSID,bool">
-               <![CDATA[
-                       var obj = this.getVideoObjectByPublicSID(publicSID);
-                       if (bool){
-                               
obj._loudness.loudness.setAttribute('opacity',1);
-                       } else {
-                               
obj._loudness.loudness.setAttribute('opacity',0.2);
-                       }
-               ]]>
-       </method>       
-       
-       <!--- 
-               stops the streaming but does not destroy the view
-               @param int broadcastId broadcastId
-        -->
-       <method name="closeStreamClient" args="publicSID">
-               <![CDATA[
-                       if ($debug) Debug.write("closeStreamclient: 
",publicSID);
-                       var obj = this.getVideoObjectByPublicSID(publicSID);
-                       if ($debug) Debug.write("closeStreamclient obj: ",obj);
-                       if (obj != null){
-                               obj.resetValues();
-                       }
-                       return obj;
-               ]]>
-       </method>
+        this._videoviewcontent.setSpeakingByPos(publicSID, bool);
+    </method>
+
+    <method name="closeStreamClient" args="publicSID">
+        this._videoviewcontent.closeStreamClient(publicSID);
+    </method>
+
+    <method name="resetAllValues">
+        this._videoviewcontent.resetAllValues();
+    </method>
        
        <method name="removeVideoByUser" args="userObject">
-               var obj = this.closeStreamClient(userObject.publicSID);
-               obj.destroy();
+               this._videoviewcontent.removeVideoByUser(userObject.publicSID);
        </method>
        
        <!--- 
@@ -463,29 +257,8 @@
                @param int broadcastId broadcastId
         -->
        <method name="disconnectclient" args="publicSID">
-               <![CDATA[
-                       //if ($debug) Debug.write("disconnectclient: 
",publicSID);
-                       
-                       var obj = this.getVideoObjectByPublicSID(publicSID);
-            var objList = this._participents.disconnectclient(publicSID);
-                       
-                       //if ($debug) Debug.write("disconnectclient obj: ",obj);
-                       
-                       if (obj != null){
-                               obj.resetValues();
-                               obj.destroy();
-                       }
-            
-                       return null;
-               ]]>
-       </method>       
-       
-       <method name="resetAllValues">
-               var videoContainer = parent.parent._videoviewcontent;
-
-               for (var eg in videoContainer.subviews){
-                       videoContainer.subviews[eg].resetValues();
-               }
+        this._videoviewcontent.disconnectclient(publicSID);
+        this._participents.disconnectclient(publicSID);
        </method>
        
        <method name="updateMuteStatusVideoView" args="roomClient">

Modified: 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/editRecordStream.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/editRecordStream.lzx?rev=1220427&r1=1220426&r2=1220427&view=diff
==============================================================================
--- 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/editRecordStream.lzx
 (original)
+++ 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/editRecordStream.lzx
 Sun Dec 18 15:29:29 2011
@@ -12,82 +12,49 @@
        So I think it is better if Users are forced to choose something from 
this list
        
  -->
- 
-<class name="editRecordStream"  extends="labelExplorerBox" labelid="51"
-       width="300" height="250" x="14" y="-340" >
 
-    <attribute name="myvideocontainer" value="null" />
-    
-    <attribute name="chosenCam" value="null" />
-    <attribute name="chosenMic" value="null" />
+<class name="editRecordStream">
+
     <attribute name="chosenSetting" value="null" />
-    <attribute name="currentClient" value="null" />
-    
     <attribute name="remoteMessage" value="null" />
-    
-    <attribute name="isSyncUpdate" value="false" type="boolean" />
-    
-    <attribute name="doDefaultAnimation" value="true" type="boolean" />
-    
+    <attribute name="currentClient" value="null" />
+
+    <attribute name="syncUpdate" value="false" />
     <attribute name="isInterview" value="false" type="boolean" />
-    
-       <handler name="oninit">
-               <![CDATA[
-                       if ($debug) Debug.write("this.myvideocontainer 
",this.myvideocontainer);                        
-                       if ($debug) Debug.write("editrecordstream 
###################### ");
-               var g = canvas.getUserData();
-               var save = g["savecamdata"];
-               //Debug.write("save: ",save,g["cam"],g["mic"]);
-            
-               //In case its an Audio-Only Room this box should not close 
automatically
-               if (canvas.currentRoomObject.isAudioOnly) {
-                       this._chooseDeviceAnimation.doStart();
-               } else {
-                       //In case the user presses the Sync Button this box 
should 
-                //not close automatically and do the user-prefered values
-                if(save && !this.isSyncUpdate) {
-                    this.chosenCam = g["cam"];
-                    this.chosenMic = g["mic"];
-                    this.chosenSetting = g["avstored"];
-                    this.remoteMessage = new Array();
-                    this.remoteMessage[0] = 'avsettings';
-                    this.remoteMessage[2] = this.chosenSetting;         
-                    this.getBroadCastId.doCall();       
-                } else {
-                    if (this.doDefaultAnimation) {
-                        this._chooseDeviceAnimation.doStart();
-                    }
-                }
-               }
-               
-            
-            
-        ]]>
-       </handler>
-    
-    <method name="storelocaldata">
+
+    <!---
+       Message to send to Clients
+        -->
+       <attribute name="objMessage" value="null" />
+
+    <handler name="oninit">
         <![CDATA[
-        //Debug.write("sharedobject store ");
-        var g = canvas.getUserData();
-        g["cam"] = this.availibleCams.getValue();
-        g["mic"] = this.availibleMics.getValue();
-        g["avstored"] = this.availibleSettings.getValue();
-        g["savecamdata"] = this.holddatainSO.getValue();
-        canvas.setUserData(g);
+        //this.getBroadCastId.doCall();
+        var t = this;
+        canvas.lc.send(canvas.vid_lc_name, "createEditRecordStream", 
this.syncUpdate, this.isInterview);
+        canvas.stream_lc.lc_getBroadCastId = 
function(chosenSetting,remoteMessage) {
+            if ($debug) 
Debug.write("lc_getBroadCastId",chosenSetting,remoteMessage);
+            t.chosenSetting = chosenSetting;
+            t.remoteMessage = remoteMessage;
+            t.getBroadCastId.doCall();
+        };
+        canvas.stream_lc.sendNotification = function(objMessage) {
+            //if ($debug) Debug.write("Level sendNotification 
",this.isgreater);
+            t.objMessage = objMessage;
+            t.sendMessage.doCall();
+        };
         ]]>
-    </method>          
-    
-    <netRemoteCallHib name="getBroadCastId" funcname="getBroadCastId" 
-                                 remotecontext="$once{ canvas.thishib }" >  
+    </handler>
+
+    <netRemoteCallHib name="getBroadCastId" funcname="getBroadCastId"
+                                 remotecontext="$once{ canvas.thishib }" >
+
        <handler name="ondata" args="value">
                <![CDATA[
                        if ($debug) 
Debug.write("getBroadCastId",value,canvas.publicSID);
-                       if (parent.myvideocontainer == null) {
-                    parent.myvideocontainer = 
canvas._videocontainer.getNewVideoObject(canvas.publicSID);
-                       } else {
-                               parent.myvideocontainer.publicSID = 
canvas.publicSID;
-                       }
-                       
+
+                       canvas.stream_lc.send(canvas.stream_lc_callback_name, 
'clb_getBroadCastId', value)
+
                        canvas.setAttribute("currentMicName", 
Microphone.names[parent.chosenMic]);
                        canvas.setAttribute("currentCamName", 
Camera.names[parent.chosenCam]);
                        
@@ -107,263 +74,20 @@
                <![CDATA[
                        if ($debug) Debug.write("setUserAVSettings",value);
                        parent.currentClient = value;
-               parent.doninitalize();
+               //parent.doninitalize();
+               canvas.stream_lc.send(canvas.stream_lc_callback_name, 
'clb_setUserAVSettings', value);
             ]]>
         </handler>   
     </netRemoteCallHib>    
 
-    <method name="doninitalize">
-       <![CDATA[
-               var valCam = this.chosenCam;
-                       var valMic = this.chosenMic;
-                       var settings = this.chosenSetting;
-                       var videoview = 
this.myvideocontainer._chatvideoinner._videostream;
-               if ($debug) Debug.write("this.myvideocontainer: 
",this.myvideocontainer);
-               if ($debug) Debug.write(valCam,valMic,settings);
-                       this.myvideocontainer.setAttribute('isremote',false);
-                       
-                       var _micro = Microphone.get(valMic);
-                       //always to default gain to 50 because the Flash Plugin 
will remember the last time you've set the value
-                       _micro.setGain(50);
-                       //Microphone setUseEchoSupression(bool)
-                       _micro.setUseEchoSuppression(true);
-                       var _camera = Camera.get(valCam);
-                       if ($debug) Debug.write("_camera.setMode: 
",videoview.width,videoview.height,canvas.framesPerSecond,true);
-                       
-                       
-                       //Microphone.set
-                       if (canvas.vaquality=="best") {
-                               _micro.setRate(canvas.microphoneRateBest);
-                               if ($debug) Debug.write("_camera.setQuality 
BEST: ",this.isInterview,(canvas.bandwidthNeededBest*2),canvas.camQualityBest);
-                               if (this.isInterview) {
-                                       
_camera.setMode(videoview.width,videoview.height,24,true);
-                                       if ($debug) Debug.warn("IS INTERVIEW ");
-                                   _camera.setQuality(0,98);
-                               } else {
-                                       
_camera.setMode(videoview.width,videoview.height,canvas.framesPerSecond,true);
-                                       if ($debug) Debug.warn("IS NO INTERVIEW 
");
-                                       
_camera.setQuality(canvas.bandwidthNeededBest,canvas.camQualityBest);
-                               }
-                       } else {
-                               
_camera.setMode(videoview.width,videoview.height,canvas.framesPerSecond,true);
-                               _micro.setRate(canvas.microphoneRateNormal);
-                               
_micro.setSilenceLevel(canvas.loudnessAcitviation);
-                               if ($debug) Debug.write("_camera.setQuality 
NORMAL: ",canvas.bandwidthNeededNormal,canvas.camQualityNormal);
-                               
_camera.setQuality(canvas.bandwidthNeededNormal,canvas.camQualityNormal);
-                       }
-                       
-               switch (settings){
-                case "s":
-                    this.myvideocontainer.setAttribute("visibility","hidden");
-                    break;
-                case "vs":
-                    
videoview.broadcast(this.currentClient.broadCastID,_camera,null);
-                    this.myvideocontainer.setAttribute("visibility","visible");
-                    break;
-                       case "av":
-                               
videoview.broadcast(this.currentClient.broadCastID,_camera,_micro);
-                    this.myvideocontainer.setAttribute("visibility","visible");
-                               break;
-                       case "a":
-                               
videoview.broadcast(this.currentClient.broadCastID,null,_micro);
-                               
-                               if (this.myvideocontainer.hidebyAudioOnly) {
-                                       
this.myvideocontainer.setAttribute("visibility","hidden");
-                               } else {
-                                       
this.myvideocontainer.setAttribute("visibility","visible");
-                                       if (!this.myvideocontainer.minimized) {
-                            this.myvideocontainer.minimize();
-                        }
-                               }
-                    
-                               break;   
-                       case "v":
-                               
videoview.broadcast(this.currentClient.broadCastID,_camera,null);
-                    this.myvideocontainer.setAttribute("visibility","visible");
-                               break;  
-                       case "n":
-                               if ($debug) Debug.write("Do not Publish A/V");
-                    //Prevent from Hiding the Box in Event Modus
-                    if (canvas.thishib.modus == "conference") {
-                        
this.myvideocontainer.setAttribute("visibility","hidden");
-                    }
-                               break;
-                       default:
-                               if ($debug) Debug.warn("no valid device Setup 
chosen");
-                               break;
-               }
-
-               
this.myvideocontainer.setAttribute('chatpartnername',canvas.firstName+' 
'+canvas.lastName);
-               
-               this.close();
-        ]]>
-    </method>    
-    
-    <animator name="_chooseDeviceAnimation" start="false" attribute="y" 
to="40" duration="750" />
-
-    <labelText labelid="447" fontsize="11" x="10" y="20" width="$once{ 
parent.width-20 }" />
-    
-    <resetCombobox fontsize="11" name="availibleSettings" x="10" y="40" 
width="280" editable="false">
-        
-        <handler name="oninit">
-            <![CDATA[
-            
-                if (canvas.currentRoomObject.isAudioOnly) {
-                    this.addItem(canvas.getLabelName(449),"a");
-                    //this.addItem(canvas.getLabelName(845),"s");
-                    //this.addItem(canvas.getLabelName(846),"sv");
-                    this.addItem(canvas.getLabelName(451),"n");
-                } else {
-                       this.addItem(canvas.getLabelName(448),"av");
-                    this.addItem(canvas.getLabelName(449),"a");
-                    this.addItem(canvas.getLabelName(450),"v");
-                    //this.addItem(canvas.getLabelName(845),"s");
-                    //this.addItem(canvas.getLabelName(846),"sv");
-                    this.addItem(canvas.getLabelName(451),"n");
-                }
-            
-                               //var r = "av";
-
-                               var g = canvas.getUserData();
-                               var cam = g["avstored"];
-                               
-                               var tItem = this.getItem(String(cam));  
-                               if (tItem != null) {
-                                   this.selectItem(String(cam));
-                               } else {
-                                       this.selectItemAt(0);
-                               }
-
-            ]]>
-        </handler>
-        
-        <handler name="onselect">
-               <![CDATA[
-                       var camVisible = "visible";
-                       var micVisible = "visible";
-                       var textVisible = "hidden";
-                       switch (this.getValue()){
-                               case "av":
-                                       break;
-                               case "a":
-                                       camVisible = "hidden";
-                                       break;   
-                               case "v":
-                                       micVisible = "hidden";
-                                       break;  
-                               case "n":
-                                       camVisible = "hidden";
-                                       micVisible = "hidden";
-                                       textVisible = "visible";
-                                       break;
-                               default:
-                                       if ($debug) Debug.warn("no valid device 
Setup chosen");
-                                       break;
-                       }
-                       
this.parent.availibleCamsLabel.setAttribute("visibility",camVisible);
-                       
this.parent.availibleCams.setAttribute("visibility",camVisible);
-                       
this.parent.availibleMicsLabel.setAttribute("visibility",micVisible);
-                       
this.parent.availibleMics.setAttribute("visibility",micVisible);           
-                       
this.parent.infoTextNoAV.setAttribute("visibility",textVisible);
-               ]]>
-        </handler>
-    </resetCombobox>    
-     
-    <labelText name="availibleCamsLabel" labelid="52" fontsize="11" x="10" 
y="80" width="$once{ parent.width-20 }" />
-
-    <resetCombobox fontsize="11" name="availibleCams" x="10" y="100" 
width="280" editable="false">
-        <handler name="oninit">
-            <![CDATA[
-                               //Get all availible Cam's
-                               var tw = Camera.names;
-                               var r = "";
-                               for (var eg=0;eg<tw.length;eg++){
-                                       this.addItem(tw[eg],eg);
-                                       r=eg;
-                               }
-                               var g = canvas.getUserData();
-                               var cam = g["cam"];
-                               if (cam=='undefined' || cam =='' || cam == 
null) cam=r;
-                               this.selectItem(String(cam));    
-
-            ]]>
-        </handler>
-    </resetCombobox>
-    
-    
-
-    <resetCombobox fontsize="11" name="availibleMics"  x="10" y="140" 
width="280" editable="false">
-        <handler name="oninit">
-            <![CDATA[
-                   //Get all availible Mic's
-                   var tw = Microphone.names;
-                   var r = "";
-                   for (var eg=0;eg<tw.length;eg++){
-                       r=eg;
-                       this.addItem(tw[eg],eg);
-                   }
-                   
-                   var g = canvas.getUserData();
-               var mic = g["mic"];
-                               if (mic=='undefined' || mic =='' || mic ==null) 
mic=r;
-                               this.selectItem(String(mic));  
-            ]]>
-        </handler>
-    </resetCombobox>
-    
-    <labelText name="infoTextNoAV" labelid="452" multiline="true" width="280" 
-                  fontsize="11" x="10" y="80" visibility="hidden" />
-               
-    <labelText name="availibleMicsLabel" labelid="53" fontsize="11" 
-                  x="10" y="120" width="$once{ parent.width-20 }" />
-    
-    <!-- Remember Me -->    
-    <labelCheckbox name="holddatainSO" labelid="762" x="10" y="210" >
-        <handler name="oninit">
-            var g = canvas.getUserData();
-            var save = g["savecamdata"];
-            if ($debug) Debug.write("savecamdata save: ",save);
-            if(save) this.setValue(true);
-        </handler>         
-    </labelCheckbox>
-    
-    <simpleLabelButton fontsize="11" visibility="${ (parent.isInterview) ? 
'visible' : 'hidden' }" 
-                       labelid="54" x="80" y="180" width="100">
-        <handler name="onclick">
-            this.parent.storelocaldata();
-            this.parent.chosenCam = parent.availibleCams.getValue();
-            this.parent.chosenMic = parent.availibleMics.getValue();
-            this.parent.chosenSetting = parent.availibleSettings.getValue();   
   
-            this.parent.remoteMessage = new Array();
-            this.parent.remoteMessage[0] = 'avsettings';
-            this.parent.remoteMessage[1] = "0";
-            this.parent.remoteMessage[2] = this.parent.chosenSetting;          
     
-            this.parent.getBroadCastId.doCall();
-        </handler>
-    </simpleLabelButton>
-    
-    <simpleLabelButton fontsize="11" visibility="${ (parent.isInterview) ? 
'visible' : 'hidden' }" 
-                       labelid="918" x="190" y="180" width="100">
-        <handler name="onclick">
-            parent.close();
-        </handler>
-    </simpleLabelButton>
-    
-    <simpleLabelButton fontsize="11" visibility="${ (!parent.isInterview) ? 
'visible' : 'hidden' }" 
-                                  labelid="54" x="190" y="180" width="100">
-        <handler name="onclick">
-               this.parent.storelocaldata();
-               this.parent.chosenCam = parent.availibleCams.getValue();
-               this.parent.chosenMic = parent.availibleMics.getValue();
-               this.parent.chosenSetting = 
parent.availibleSettings.getValue();      
-                       this.parent.remoteMessage = new Array();
-                       this.parent.remoteMessage[0] = 'avsettings';
-                       this.parent.remoteMessage[1] = "0";
-                       this.parent.remoteMessage[2] = 
this.parent.chosenSetting;               
-            this.parent.getBroadCastId.doCall();
-        </handler>
-    </simpleLabelButton>
-
+    <netRemoteCallHib name="sendMessage" funcname="sendMessage"
+               remotecontext="$once{ canvas.thishib }" showLoading="false" >
+       <netparam><method name="getValue"> return parent.parent.objMessage; 
</method></netparam>
+    </netRemoteCallHib>
+
+    <method name="close">
+        this.destroy();
+    </method>
 </class>
-    
+
 </library>

Modified: 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/videoContainer.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/videoContainer.lzx?rev=1220427&r1=1220426&r2=1220427&view=diff
==============================================================================
--- 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/videoContainer.lzx
 (original)
+++ 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/videoContainer.lzx
 Sun Dec 18 15:29:29 2011
@@ -14,6 +14,8 @@
        
        <!--- colors for each user -->
        <attribute name="colorArray" value="null" />
+
+    <attribute name="showsVideoInSeparateComponent" value="true" 
type="boolean" />
        
        <handler name="oninit">
                //set modus
@@ -175,10 +177,13 @@
                                this.broadCastViewRef = obj;
                        } else {
                                //Get a Free VideoView Slot
-                               var freePos = 
this._videoviewcontent.getVideoObjectFreePos(36, 100, 100);
+                               var neededWidth = 100;
+                               var neededHeight = 100;
+                               var neededOffsetLength = 36;
+                               var freePos = 
this._videoviewcontent.getVideoObjectFreePos(neededOffsetLength, neededWidth, 
neededHeight);
 
                                this.broadCastViewRef = new 
lz.videoObjectBroadcast(this._videoviewcontent,{
-                           publicSID:publicSID,
+                           publicSID:publicSID, 
width:neededWidth,height:neededHeight,
                            x:freePos[0],y:freePos[1]
                     });
                                canvas.currentusercolor = 
this.colorArray[this.subviews.length];
@@ -202,10 +207,13 @@
                                return obj;
                        }
             //Get a Free VideoView Slot
-            var freePos = this._videoviewcontent.getVideoObjectFreePos(36, 
100, 100);
+            var neededWidth = 100;
+            var neededHeight = 100;
+            var neededOffsetLength = 36;
+            var freePos = 
this._videoviewcontent.getVideoObjectFreePos(neededOffsetLength, neededWidth, 
neededHeight);
 
                        return new 
lz.videoObjectPlayBroadcast(this._videoviewcontent,{
-                    publicSID:publicSID,
+                    publicSID:publicSID, width:neededWidth,height:neededHeight,
                     x:freePos[0],y:freePos[1]
                 });
                ]]>

Modified: 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/videoObjectPlayBroadcast.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/videoObjectPlayBroadcast.lzx?rev=1220427&r1=1220426&r2=1220427&view=diff
==============================================================================
--- 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/videoObjectPlayBroadcast.lzx
 (original)
+++ 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/video/videoObjectPlayBroadcast.lzx
 Sun Dec 18 15:29:29 2011
@@ -24,6 +24,16 @@
      ]]>
    </handler>
 
+    <handler name="onpublicSID" args="value">
+        if (canvas.publicSID == value) {
+            this._toolbar._mute.setAttribute('visibility','hidden');
+            this.setSoundVolume(0);
+        } else {
+            this._toolbar._mute.setAttribute('visibility','visible');
+            this.setSoundVolume(100);
+        }
+    </handler>
+
        <view name="_chatvideoinner" x="1" y="20"  
           width="${parent.width-2}" height="${parent.height-21}" >
         
@@ -44,6 +54,12 @@
         
        </view>
 
+    <method name="setSoundVolume" args="volume">
+        if (this._chatvideoinner._videostream != null){
+            this._chatvideoinner._videostream.setVolume(volume);
+        }
+    </method>
+
 </class>
 
 </library>

Modified: 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/videoclassroom/videoContainerAudience.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/videoclassroom/videoContainerAudience.lzx?rev=1220427&r1=1220426&r2=1220427&view=diff
==============================================================================
--- 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/videoclassroom/videoContainerAudience.lzx
 (original)
+++ 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/conference/videoclassroom/videoContainerAudience.lzx
 Sun Dec 18 15:29:29 2011
@@ -17,6 +17,8 @@
 
        <attribute name="allUsers" value="null" />
        <attribute name="modLoaded" value="false" type="boolean" />
+
+    <attribute name="showsVideoInSeparateComponent" value="true" 
type="boolean" />
        
        <handler name="oninit">
                canvas.thishib.modus = "audience";

Modified: 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/recording/video/videoContainerStream.lzx
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/recording/video/videoContainerStream.lzx?rev=1220427&r1=1220426&r2=1220427&view=diff
==============================================================================
--- 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/recording/video/videoContainerStream.lzx
 (original)
+++ 
incubator/openmeetings/branches/video-components/WebContent/openmeetings/modules/recording/video/videoContainerStream.lzx
 Sun Dec 18 15:29:29 2011
@@ -5,7 +5,7 @@
                This class is using for video and audio panel of conference 
recording viewer.
         -->
         
-       <class name="videoContainerStream" extends="view" width="288" 
height="$once{ parent.height-22 }" >      
+       <class name="videoContainerStream" extends="view" width="288" 
height="$once{ parent.height-22 }" >
                <handler name="oninit">
                        canvas._videocontainer=this;
                </handler>

Modified: incubator/openmeetings/branches/video-components/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/build.xml?rev=1220427&r1=1220426&r2=1220427&view=diff
==============================================================================
--- incubator/openmeetings/branches/video-components/build.xml (original)
+++ incubator/openmeetings/branches/video-components/build.xml Sun Dec 18 
15:29:29 2011
@@ -126,7 +126,7 @@
        <!-- build webapp -->
 
        <target name="dist" description="binary distribution of OpenMeetings"
-        depends="cleanForBinary, jar, compile.laszlo.main, enhance, 
signWebStartJars">
+        depends="cleanForBinary, jar, compile.laszlo.main, 
compile.laszlo.main.as3, enhance, signWebStartJars">
 
        </target>
 
@@ -138,7 +138,7 @@
 
        <!-- compiles the sources only with laszlo debug client -->
        <target name="dist-debug" description="binary distribution of 
OpenMeetings"
-        depends="cleanForBinary, jar, compile.laszlo.main.debug, 
signWebStartJars">
+        depends="cleanForBinary, jar, compile.laszlo.main.debug, 
compile.laszlo.main.debug.as3, signWebStartJars">
 
        </target>
 
@@ -452,6 +452,38 @@
                </signjar>
        </target>
 
+        <target name = "compile.laszlo.main.as3" 
depends="compile.laszlo.main.debug.as3">
+               <java classname = "org.openlaszlo.compiler.Main" fork = "true"
+               newenvironment="true"
+               failonerror="true"
+               dir = "${laszlo.src.dir}"
+               classpathref="laszlo.lib"
+              >
+                       <jvmarg value = "-DLPS_HOME=${laszlo.home}"/>
+                       <jvmarg value = "-Dlzdebug=${laszlo.debug}"/>
+                       <jvmarg value = "-Dlzproxied=${laszlo.proxied}"/>
+                       <jvmarg value = "-Xms1024M"/>
+                       <jvmarg value = "-Xmx1024M"/>
+            <arg line="--runtime=swf10 --dir ${out.dir.swf} --onerror warn 
main.as3.lzx" />
+               </java>
+       </target>
+
+        <target name = "compile.laszlo.main.debug.as3">
+               <java classname = "org.openlaszlo.compiler.Main" fork = "true"
+               newenvironment="true"
+               failonerror="true"
+               dir = "${laszlo.src.dir}"
+               classpathref="laszlo.lib"
+              >
+                       <jvmarg value = "-DLPS_HOME=${laszlo.home}"/>
+                       <jvmarg value = "-Dlzdebug=${laszlo.debug}"/>
+                       <jvmarg value = "-Dlzproxied=${laszlo.proxied}"/>
+                       <jvmarg value = "-Xms1024M"/>
+                       <jvmarg value = "-Xmx1024M"/>
+            <arg line="--runtime=swf10 --dir ${out.dir.swf} --onerror warn 
maindebug.as3.lzx" />
+               </java>
+       </target>
+
        <target name = "compile.laszlo.main" 
depends="compile.laszlo.main.debug">
                <java classname = "org.openlaszlo.compiler.Main" fork = "true"
                newenvironment="true"

Modified: 
incubator/openmeetings/branches/video-components/src/app/org/openmeetings/app/remote/red5/ClientListManager.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/src/app/org/openmeetings/app/remote/red5/ClientListManager.java?rev=1220427&r1=1220426&r2=1220427&view=diff
==============================================================================
--- 
incubator/openmeetings/branches/video-components/src/app/org/openmeetings/app/remote/red5/ClientListManager.java
 (original)
+++ 
incubator/openmeetings/branches/video-components/src/app/org/openmeetings/app/remote/red5/ClientListManager.java
 Sun Dec 18 15:29:29 2011
@@ -80,12 +80,30 @@ public class ClientListManager {
                return null;
        }
 
+    public synchronized List<RoomClient> getClientsByPublicSID(String 
publicSID) {
+               try {
+            log.debug(" :: getClientByPublicSID :: " + publicSID);
+                       Query q = em.createQuery("select rc from RoomClient rc 
where rc.publicSID = :publicSID");
+                       q.setParameter("publicSID", publicSID);
+            List<RoomClient> clients = q.getResultList();
+            if (!clients.isEmpty()) {
+                return clients;
+            }
+               } catch (Exception err) {
+                       log.error("[getClientByPublicSID]", err);
+               }
+               return null;
+       }
+
        public RoomClient getClientByPublicSID(String publicSID) {
                try {
                        log.debug(" :: getClientByPublicSID :: " + publicSID);
                        Query q = em.createQuery("select rc from RoomClient rc 
where rc.publicSID = :publicSID");
                        q.setParameter("publicSID", publicSID);
-                       return (RoomClient)q.getSingleResult();
+            List<RoomClient> clients = q.getResultList();
+            if (!clients.isEmpty()) {
+                return clients.get(0);
+            }
                } catch (NoResultException nre) {
                        //expected
                } catch (Exception err) {

Modified: 
incubator/openmeetings/branches/video-components/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java?rev=1220427&r1=1220426&r2=1220427&view=diff
==============================================================================
--- 
incubator/openmeetings/branches/video-components/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
 (original)
+++ 
incubator/openmeetings/branches/video-components/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
 Sun Dec 18 15:29:29 2011
@@ -1260,19 +1260,24 @@ public class ScopeApplicationAdapter ext
                        IConnection current = Red5.getConnectionLocal();
                        // String streamid = current.getClient().getId();
 
-                       RoomClient currentClient = this.clientListManager
-                                       .getClientByPublicSID(publicSID);
+            List<RoomClient> clients = this.clientListManager
+                                       .getClientsByPublicSID(publicSID);
 
-                       if (currentClient == null) {
+                       if (clients == null) {
                                return -1L;
                        }
 
-                       currentClient.setIsBroadcasting(value);
-                       currentClient.setInterviewPodId(interviewPodId);
+                       for (RoomClient rcl : clients) {
+                rcl.setIsBroadcasting(value);
+                           rcl.setInterviewPodId(interviewPodId);
+
+                // Put the mod-flag to true for this client
+                           this.clientListManager.updateClientByStreamId(
+                                       rcl.getStreamid(), rcl);
+            }
 
-                       // Put the mod-flag to true for this client
-                       this.clientListManager.updateClientByStreamId(
-                                       currentClient.getStreamid(), 
currentClient);
+            // workaround for as3 interview room
+            RoomClient currentClient = clients.get(0);
 
                        // Notify all clients of the same scope (room)
                        Collection<Set<IConnection>> conCollection = 
current.getScope()

Modified: 
incubator/openmeetings/branches/video-components/src/app/org/openmeetings/servlet/outputhandler/DefaultIndex.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/src/app/org/openmeetings/servlet/outputhandler/DefaultIndex.java?rev=1220427&r1=1220426&r2=1220427&view=diff
==============================================================================
--- 
incubator/openmeetings/branches/video-components/src/app/org/openmeetings/servlet/outputhandler/DefaultIndex.java
 (original)
+++ 
incubator/openmeetings/branches/video-components/src/app/org/openmeetings/servlet/outputhandler/DefaultIndex.java
 Sun Dec 18 15:29:29 2011
@@ -122,7 +122,7 @@ public class DefaultIndex extends Veloci
                        // Parse the Param for the SWF URL
                        String swf = httpServletRequest.getParameter("swf");
                        if (swf == null) {
-                               ctx.put("SWF_URL", "main.swf8.swf");
+                               ctx.put("SWF_URL", "main.as3.swf10.swf");
                        } else {
                                ctx.put("SWF_URL", swf);
                        }


Reply via email to