You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2011/12/18 16:22:22 UTC

svn commit: r1220424 [9/10] - in /incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10: ./ base/ base/components/ base/components/button/ base/components/button/doc/ base/components/button/doc/lzx/ base/components/button/doc/l...

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/base/remote/rtmpConnection.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/base/remote/rtmpConnection.lzx?rev=1220424&view=auto
==============================================================================
--- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/base/remote/rtmpConnection.lzx (added)
+++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/base/remote/rtmpConnection.lzx Sun Dec 18 15:22:12 2011
@@ -0,0 +1,336 @@
+<library>
+
+
+<class name="rtmpConnection" extends="node">
+
+        <switch>
+            <when property="$as3">
+                <passthrough>
+                    import flash.net.NetConnection;
+                    import flash.events.NetStatusEvent;
+                </passthrough>
+            </when>
+        </switch>
+
+    	<attribute name="debug" value="false" type="boolean" />
+    	
+    	<event name="onconnect"/>
+    	<event name="onerror"/>
+        
+        <!-- this attribute holds a reference to the current/last called netremoteCall,
+        in case of error you can debug that way which call did fail -->
+        <attribute name="lastCalled" value="null" />
+    	
+    	<attribute name="src" value="" type="string"/>
+
+		<method name="connect">
+            this._nc = new NetConnection();
+
+            // local reference to rtmpconnection
+            //this._nc.t = this;
+            
+            var ok = this._nc.connect(src == "null" ? null : src);
+            if (this.debug) {
+            	Debug.write("*** debug ***");
+            }
+            
+            //canvas.currentNC is the reference to the NetConnection that is used in the NetStream
+            canvas.currentNC = this._nc;
+
+            this._nc.addEventListener(NetStatusEvent.NET_STATUS, _onStatus);
+            
+    		if($debug) Debug.write("devRtmpConnection/registerMethods()");
+			//Register Methods
+			this.registerMethods();
+		</method>
+		
+        <method name="_onStatus" args="stats"><![CDATA[
+            if ($debug) {
+                Debug.write("devrtmpconnection", this, "_onStatus", stats.info.code);
+            }
+
+            var msg = "";
+            var s;
+
+            switch (stats.info.code) {
+
+                case "NetConnection.Connect.Success": {
+                    // The connection attempt succeeded.
+                    msg = stats.info.code;
+                    s = 2;
+                    break;
+                }
+
+                default: {
+                    msg = stats.info.code;
+                    s = 0;
+                    break;
+                }
+
+            }
+
+            this.setAttribute("status", msg);
+
+            if (s == 2) {
+                this.onconnect.sendEvent();
+            } else {
+            	this.onerror.sendEvent();
+            }
+
+          ]]>
+        </method>	
+        
+        <method name="disconnect">
+        	canvas.currentNC = null;
+            this._nc.close();
+        </method>
+    <!--- 
+        With this function all methods are registered to the NetConnection
+        A server can invoke this Method with a call for it from the Client
+        Only subnodes of rtmpconnections which are a instance of netRemoteCallHib
+        are registered, to add dynamically methods to the remotefunction you will
+        have to invoke this method once again
+        -swagner
+     -->
+    <method name="registerMethods">
+        <![CDATA[
+	        if (this.subnodes!=null){
+	            var clientObj = {};
+		        //Register all methods which are onstanceof netRemoteCallHib
+		        for (var i=0;i<this.subnodes.length;i++){
+		            //If it is of Type netRemoteCallHib then register it to the NetConnection
+		            if (this.subnodes[i] instanceof lz.netRemoteCallHib){
+		                clientObj[this.subnodes[i].funcname] = function( args ){
+                            return canvas.thishib.remoteCallMethod(arguments.callee,arguments);
+		                    //return hib.remoteCallMethod(arguments.callee,args);
+		                }
+		            }
+		        }
+		        this._nc.client = clientObj;
+        	}
+        ]]>
+    </method>
+    
+    <!-- 
+        Process the RemoteCall to the Right Funtion
+        -swagner
+     -->
+    <method name="remoteCallMethod" args="callee,args">
+        <![CDATA[
+            for (var eg in this._nc){
+                if (this._nc[eg]==callee){
+                    if (this.debug) {
+                        //_root.Debug.write.write("DEBUG invoked a function remotely: ",eg,args);
+                    }    
+                    if (args.length == 1) {
+                        return this.callFuntion(eg,args[0]);
+                    } else {
+                        return this.callFuntion(eg,args);
+                    }
+                    //return this.callFuntion(eg,args);
+                }
+            }
+        ]]>
+    </method>
+    
+    <!-- 
+        Map the Function to a netRemoteCallHib
+        -swagner
+     -->
+    <method name="callFuntion" args="funcname,args">
+        <![CDATA[
+            for (var i=0;i<this.subnodes.length;i++){
+                if (this.subnodes[i].funcname==funcname){
+                    return this.subnodes[i].onResult(args);
+                }
+            }
+        ]]>
+    </method>		
+    
+    <method name="callRPC" args="func, obj, params">
+    	//if ($debug) Debug.write("*** call: func, obj, params",func,obj, typeof (params) ,params.length);
+    	if (params.length != 0){
+	    	//does this really work?
+	    	//ASSetPropFlags(_global, null, 8, 1);
+            //setPropertyIsEnumerable(8, 1);
+	    	//Debug.write("does it work?",arguments);
+	    	<!--
+	    	this._nc.call.apply(this._nc,arguments);
+	    	 -->
+			if (params.length==1){
+			    this._nc.call(func, obj,params[0]);
+			} else if (params.length==2){
+			    this._nc.call(func, obj,params[0],params[1]);
+			} else if (params.length==3){
+			    this._nc.call(func, obj,params[0],params[1],params[2]);
+			} else if (params.length==4){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3]);
+			} else if (params.length==5){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4]);
+			} else if (params.length==6){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5]);
+			} else if (params.length==7){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6]);
+			} else if (params.length==8){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7]);
+			} else if (params.length==9){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8]);
+			} else if (params.length==10){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9]);
+			} else if (params.length==11){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10]);
+			} else if (params.length==12){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11]);
+			} else if (params.length==13){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12]);
+			} else if (params.length==14){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13]);
+			} else if (params.length==15){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14]);
+			} else if (params.length==16){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15]);
+			} else if (params.length==17){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16]);
+			} else if (params.length==18){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17]);
+			} else if (params.length==19){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17],params[18]);
+			} else if (params.length==20){
+			    this._nc.call(func, obj,params[0],params[1],params[2],params[3],params[4],params[5],params[6],params[7],params[8],params[9],params[10],params[11],params[12],params[13],params[14],params[15],params[16],params[17],params[18],params[19]);
+			}	    	 
+        } else {
+            this._nc.call(func, obj);
+        }
+    </method>
+    
+</class>
+
+
+    <!---
+        Net remote call. 
+        @todo Document netremotecall class.
+    -->
+    <class name="netremotecall" extends="node">
+
+        <switch>
+            <when property="$as3">
+                <passthrough>
+                    import flash.net.Responder;
+                </passthrough>
+            </when>
+        </switch>
+
+        <!--- Name of the remote function. -->
+        <attribute name="funcname" value="$once{null}" type="string" />
+    
+        <attribute name="remotecontext" value="null" />
+    
+        <attribute name="dataobject" value="null" />
+
+        <attribute name="responder" value="null" />
+		
+        <!--- Data handling event. args="value"  -->
+        <event name="ondata" />
+
+        <!--- Error handling event. -->
+        <event name="onerror"/>
+
+        <!--- Call the remote method, passing the array of params. -->
+        <method name="callRPC" args="params"><![CDATA[
+            if (this.funcname == null) {
+                //Debug.write("No funcname given");
+                if (this.onerror) this.onerror.sendEvent("No funcname given");
+                return;
+            }
+
+            if (params == null) {
+                params = new Array();
+
+                var subnodes = this.subnodes;
+                if (subnodes != null) {
+                    var i;
+                    var n = subnodes.length;
+                    for (i = 0; i < n; i++) {
+                        // If getValue method is declared in param, call that
+                        // instead to get value.
+                        var tsi = subnodes[i];
+                        //TODO: fixme
+                        //if ((tsi["getValue"] != null) && (tsi.getValue["prototype"] != null)) {
+                        //    params[i] = tsi.getValue();
+                        //    Debug.write("tsi.getValue():", tsi.getValue());
+                        //} else {
+                        //    params[i] = tsi.value;
+                        //}
+                        params[i] = tsi.getValue();
+                    }
+                }
+
+            } else if (params.__proto__ != Array.prototype) {
+                //Debug.write(this.name, "error: first argument (params) is not an array");
+                return -1;
+            }
+
+            //if ($debug) Debug.write("call", this, this.parent, this.parent.status);
+            var rtmpObject = null;
+            if (this.parent instanceof lz.rtmpConnection){
+        	    rtmpObject = this.parent;
+            } else if(this.remotecontext  instanceof lz.rtmpConnection){
+        	    rtmpObject = this.remotecontext;
+            } else {
+        	    if ($debug) Debug.warn("ERROR: no remotecontext availible abort call", this.funcname, this);
+        	    return;
+            }
+        	//Debug.write('call', this, rtmpObject, rtmpObject.status);
+        	//Debug.write('call', this.remotecontext);
+            if (rtmpObject.debug) Debug.write('call', this, rtmpObject, rtmpObject.status);
+            rtmpObject.lastCalled = this;
+
+            this.responder = new Responder(onResult);
+
+            rtmpObject.callRPC(this.funcname, this.responder, params);
+
+          ]]>
+        </method>
+
+        <!--- Handle the result returned from the remote method. -->
+        <method name="onResult" args="value"><![CDATA[
+            // Can be overriden.
+            // Would be great if it can be used with dataobject,
+            // but I don't know how to convert Array/primitive to LzDataset/LzDataPointer.
+            ////Debug.write("netremotecall", this, "onResult", value);
+
+            if (this.dataobject!=null) {
+                if ( this.dataobject instanceof LzDataset ) {
+                    //Debug.write("onResult: ",this,value,dataobject);
+                    var element = LzDataElement.valueToElement(value);
+                    this.dataobject.setData(element.childNodes);
+                } else if ( this.dataobject instanceof LzDataElement ) {
+                    var element = LzDataElement.valueToElement(value);
+                    this.dataobject.appendChild( element );
+                } else {
+                    //TODO:fixme
+                    //Debug.warn("dataobject is not LzDataset or LzDataElement: ",this,this.dataobject,delegate);
+                }
+            }
+            this.ondata.sendEvent(value);		
+          ]]>
+        </method>
+
+
+    </class>
+
+
+    <!---
+        Net parameter.
+        Element to use inside netremotecall.
+        @todo Document netparam class.
+    -->
+    <class name="netparam" extends="node">
+
+        <!--- The value of the netparam. -->
+        <attribute name="value" value="null"/>
+
+    </class>
+
+
+</library>

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/base/remote/sharedObject.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/base/remote/sharedObject.lzx?rev=1220424&view=auto
==============================================================================
--- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/base/remote/sharedObject.lzx (added)
+++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/base/remote/sharedObject.lzx Sun Dec 18 15:22:12 2011
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+
+<class name="sharedObject" extends="node">
+
+    <switch>
+        <when property="$as3">
+            <passthrough>
+                import flash.net.SharedObject;
+            </passthrough>
+        </when>
+    </switch>
+
+	<attribute name="so" value="null" />
+	<attribute name="onStatus" value="null" />
+	
+
+	<method name="connect" args="so_Name,nc,persistant">
+
+		//Debug.write("connect SharedObject: ",nc.uri);
+		this.so = this.getRemote(so_Name,nc.uri,persistant);
+		
+		var t = this;
+		this.so.onSync = function (evtObj){
+			if (t.onStatus)t.onStatus.sendEvent(evtObj);
+			//_root.Debug.write.write("Shared Object onSync",evtObj,arguments);
+		}
+		
+		this.so.connect(nc);
+		
+	</method>
+	
+    
+    <method name="getRemote" args="so_Name,nc,persistant">
+
+        //Debug.write("connect SharedObject: ",nc.uri);
+        this.so = this.getRemote(so_Name,nc.uri,persistant);
+
+        var t = this;
+        this.so.onSync = function (evtObj){
+            if (t.onStatus)t.onStatus.sendEvent(evtObj);
+            //_root.Debug.write.write("Shared Object onSync",evtObj,arguments);
+        }
+    </method>
+    
+    <!--- create Object if not existing  -->
+    <method name="getLocal" args="name">
+
+        this.so = this.getLocal(name);
+
+        var t = this;
+        this.so.onSync = function (evtObj){
+            if (t.onStatus)t.onStatus.sendEvent(evtObj);
+            //_root.Debug.write.write("Shared Object onSync",evtObj,arguments);
+        }
+        
+    </method>
+    
+    <!--- 
+        force write to disk
+        @return true(success) false(User has forbidden to store data local)
+      -->
+    <method name="flush">
+        return this.so.flush();
+    </method>
+
+    <method name="getData" args="key">
+        if (this.so.data["key"] == undefined){
+            return null;
+           //_root.Debug.write.write("key undefined",key);
+        } else {
+            return this.so.data["key"];
+        }
+    </method>
+	
+    <method name="setSharedData" args="key,val">
+    	//Debug.write("this...... so: ",this.so);
+        this.so.data["key"] = val;
+    </method>
+
+		
+</class>
+
+</library>

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/commonVideoViewContent.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/commonVideoViewContent.lzx?rev=1220424&view=auto
==============================================================================
--- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/commonVideoViewContent.lzx (added)
+++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/commonVideoViewContent.lzx Sun Dec 18 15:22:12 2011
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+
+
+<class name="commonVideoViewContent" extends="view">
+
+    <switch>
+        <when property="$as3">
+            <passthrough>
+                import flash.net.LocalConnection;
+            </passthrough>
+        </when>
+    </switch>
+
+    <attribute name="offsetLength" type="number" value="40"/>
+    <attribute name="videoWidth" type="number" value="132"/>
+    <attribute name="videoHeight" type="number" value="132"/>
+
+    <handler name="oninit">
+        <![CDATA[
+
+            var client = {};
+            client.t = this;
+
+            client.reconnect = this.reconnect;
+            client.initVideoContainer = this.initVideoContainer;
+            client.createEditRecordStream = this.createEditRecordStream;
+            client.createVideoObject = this.createVideoObject;
+            client.createVideo = this.createVideo;
+            client.getVideoObjectByPublicSID = this.getVideoObjectByPublicSID;
+            client.getNewVideoObject = this.getNewVideoObject;
+            client.getVideoObjectFreePos = this.getVideoObjectFreePos;
+            client.disconnectclient = this.disconnectclient;
+            client.resetAllValues = this.resetAllValues;
+            client.closeStreamClient = this.closeStreamClient;
+            client.setSpeakingByPos = this.setSpeakingByPos;
+            client.setAVSettingsToClient = this.setAVSettingsToClient;
+            client.startStream = this.startStream;
+            client.clearAll = this.clearAll;
+            client.removeVideoByUser = this.removeVideoByUser;
+            client.muteSound = this.muteSound;
+            client.videoOnMove = this.videoOnMove;
+
+            var lc:LocalConnection = new LocalConnection();
+            lc.connect(canvas.vid_lc_name);
+            lc.client = client;
+            canvas.setAttribute("lc", lc);
+        ]]>
+    </handler>
+
+    <method name="reconnect" args="src">
+        canvas.thishib.setAttribute('src',src);
+        canvas.thishib.disconnect();
+    </method>
+
+    <method name="initVideoContainer" args="publicSID,firstName,lastName,offsetLength,videoWidth,videoHeight">
+        canvas.setAttribute("publicSID",publicSID);
+        canvas.setAttribute("firstName",firstName);
+        canvas.setAttribute("lastName",lastName);
+        this.setAttribute("offsetLength",offsetLength);
+        this.setAttribute("videoWidth",videoWidth);
+        this.setAttribute("videoHeight",videoHeight);
+    </method>
+
+    <method name="createEditRecordStream" args="syncUpdate,isInterview">
+        if(canvas.inner.editRecordStream != null) canvas.inner.editRecordStream.destroy();
+        new lz.editRecordStream(canvas.inner,{name:"editRecordStream", isSyncUpdate:syncUpdate,isInterview:isInterview});
+    </method>
+
+    <method name="createVideoObject" args="publicSID,isBroadcasting,interviewPodId">
+        if($debug) Debug.info("createVideoObject, publicSID: ",publicSID, "isBroadcasting: ", isBroadcasting);
+        var vidContainer = getVideoObjectByPublicSID(publicSID);
+        if(vidContainer == null) {
+            vidContainer = isBroadcasting ? this.getNewVideoObject(publicSID) : this.getNewVideoObjectByPos(publicSID);
+            vidContainer.publicSID = publicSID;
+            vidContainer.setAttribute("interviewPodId", interviewPodId);
+        }
+        vidContainer.setAttribute('visibility','hidden');
+        return vidContainer;
+    </method>
+
+    <method name="createVideo" args="publicSID,displayName,broadcastId,avsettings,interviewPodId">
+        <![CDATA[
+            if($debug) Debug.info("createVideo, publicSID: ",publicSID,"broadcastId: ",broadcastId,"AVsettings: ",avsettings);
+            var vidContainer = getVideoObjectByPublicSID(publicSID);
+            if(vidContainer == null) {
+                vidContainer = this.getNewVideoObjectByPos(publicSID);
+                vidContainer.setAttribute('chatpartnername',displayName);
+                if (avsettings=="n"){
+                    //vidContainer.setVideouserProfilePic(object);
+                } else if (avsettings=="a"){
+                    //vidContainer.setVideouserProfilePic(object);
+                    if ($debug) Debug.warn("start play");
+                    vidContainer._chatvideoinner._videostream.playStream(broadcastId,-1);
+                    vidContainer.setAttribute("visibility","visible");
+                } else {
+                    vidContainer._chatvideoinner._videostream.playStream(broadcastId,-1);
+                    vidContainer.setAttribute("visibility","visible");
+                }
+                //vidContainer.updateAVSettingsSymbol(object);
+                vidContainer.setAttribute("interviewPodId", interviewPodId);
+            }
+
+        ]]>
+    </method>
+
+    <method name="getVideoObjectByPublicSID" args="publicSID">
+    	<![CDATA[
+    		//if ($debug) Debug.write("getVideoObjectByPublicSid SEARCH: ",publicSID);
+
+        	for (var i=0;i<this.subviews.length;i++){
+    			if (this.subviews[i].publicSID==publicSID){
+    				return this.subviews[i];
+    			}
+    		}
+
+    		if ($debug) Debug.warn(" - getVideoObjectByPublicSID - DID NOT FIND THE USER BY ",publicSID);
+
+            return null;
+
+    	]]>
+    </method>
+
+    <method name="getNewVideoObjectByPos" args="publicSID">
+        <![CDATA[
+            var obj = this.getVideoObjectByPublicSID(publicSID);
+            if (obj!=null){
+                return obj;
+            }
+
+            //Get a Free VideoView Slot
+            var freePos = this.getVideoObjectFreePos(this.offsetLength,this.videoWidth,this.videoHeight);
+
+            return new lz.videoObjectPlayBroadcast(this,{
+                    publicSID:publicSID, width:videoWidth,height:videoHeight,
+                    x:freePos[0],y:freePos[1]
+                });
+        ]]>
+    </method>
+
+    <method name="getNewVideoObject" args="publicSID">
+		<![CDATA[
+			var obj = this.getVideoObjectByPublicSID(publicSID);
+			if (obj!=null){
+				this.broadCastViewRef = obj;
+			} else {
+                //Get a Free VideoView Slot
+                var freePos = this.getVideoObjectFreePos(this.offsetLength,this.videoWidth,this.videoHeight);
+
+				this.broadCastViewRef = new lz.videoObjectBroadcast(this,{
+	                    publicSID:publicSID, width:videoWidth,height:videoHeight,
+	                    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>
+
+    <method name="getVideoObjectByInterviewPodId" args="interviewPodId">
+        <![CDATA[
+            for (var i=0;i<this.subviews.length;i++){
+                if (this.subviews[i].interviewPodId==interviewPodId){
+                    return this.subviews[i];
+                }
+            }
+
+            if ($debug) Debug.warn(" - getVideoObjectByInterviewPodId - DID NOT FIND THE USER BY ",interviewPodId);
+
+            return null;
+        ]]>
+    </method>
+
+    <method name="getVideoObjectFreePos" args="offsetLength,videoWidth,videoHeight">
+        <![CDATA[
+            var newx = 20;
+            var newy = 0;
+            var posFound = false;
+            if (offsetLength == undefined) {
+                offsetLength=10;
+            }
+            while (!posFound) {
+                posFound = true;
+                for (var i=0;i<this.subviews.length;i++){
+                    var subview = this.subviews[i];
+                    var left = subview.x;
+                    var right = subview.x + subview.width;
+                    var top = subview.y;
+                    var bottom = subview.y + subview.height;
+
+                    if( !(newx > right
+                        || (newx + videoWidth) < left
+                        || newy > bottom
+                        || (newy + videoHeight) < top ))
+                    {
+                        newx = right + offsetLength;
+                        posFound = false;
+                    }
+                    if ((newx + videoWidth) >= canvas.width) {
+                        newx = 20;
+                        newy += 10;
+                        posFound = false;
+                    }
+                }
+            }
+
+            if ((newy + videoHeight) >= canvas.height) {
+                newy = 0;
+            }
+
+            var result = [newx, newy];
+            return result;
+        ]]>
+    </method>
+
+    <method name="disconnectclient" args="publicSID">
+        <![CDATA[
+            if ($debug) Debug.write("disconnectclient: ",publicSID);
+
+            var obj = this.getVideoObjectByPublicSID(publicSID);
+
+            //if ($debug) Debug.write("disconnecclient obj: ",obj);
+            if (obj == null) {
+            	if ($debug) Debug.warn("Could Not find this To disconnect",publicSID);
+            }
+
+            if (obj != null){
+                obj.resetValues();
+                obj.destroy();
+            }
+        ]]>
+    </method>
+
+    <method name="muteSound" args="publicSID">
+        <![CDATA[
+            var obj = this.getVideoObjectByPublicSID(publicSID);
+            if (obj != null) {
+                obj._toolbar._mute.clickIt();
+            }
+        ]]>
+    </method>
+
+    <method name="resetAllValues">
+        for (var eg in this.subviews){
+            this.subviews[eg].resetValues();
+        }
+    </method>
+
+    <method name="closeStreamclient" args="publicSID">
+        <![CDATA[
+            if ($debug) Debug.write("closeStreamthis: ",publicSID);
+            var obj = this.getVideoObjectByPublicSID(publicSID);
+            if ($debug) Debug.write("closeStreamthis obj: ",obj);
+            if (obj != null){
+                obj.resetValues();
+            }
+            return obj;
+        ]]>
+    </method>
+
+    <method name="removeVideoByUser" args="publicSID"><![CDATA[
+        var obj = this.closeStreamclient(publicSID);
+        obj.destroy();
+    ]]></method>
+
+
+    <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>
+
+    <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");
+            //TODO: fixme: startStream must be called by rtmp
+            // For some reason the method 'startStream' is not called by rtmp, so workaround here
+            if(rcl.publicSID != canvas.publicSID) {
+                this.startStream(rcl.publicSID, rcl.broadCastID, rcl.firstname, rcl.lastname, rcl.interviewPodId);
+            }
+        } else {
+            obj.deleteVideoConfProfilePic(null);
+            //TODO: fixme: startStream must be called by rtmp
+            // For some reason the method 'startStream' is not called by rtmp, so workaround here
+            if(rcl.publicSID != canvas.publicSID) {
+                this.startStream(rcl.publicSID, rcl.broadCastID, rcl.firstname, rcl.lastname, rcl.interviewPodId);
+            }
+            obj.setAttribute("visibility","visible");
+        }
+        obj.thisVars = rcl;
+        obj.updateAVSettingsSymbol(rcl);
+    </method>
+
+    <method name="startStream" args="publicSID,broadcastId,firstname,lastname,interviewPodId">
+        <![CDATA[
+            if ($debug) Debug.write("startStream publicSID: ", publicSID, ", broadcastId: ",broadcastId);
+            var obj = this.getVideoObjectByPublicSID(publicSID);
+            //if ($debug) Debug.write("startStream obj: ",obj);
+            if (obj != null ){
+                obj._chatvideoinner._videostream.playStream(broadcastId,-1);
+                obj.setAttribute('chatpartnername',firstname+' '+lastname);
+            }
+        ]]>
+    </method>
+
+    <method name="clearAll">
+        <![CDATA[
+            if ($debug) Debug.write("clearAll", this.subviews);
+            //var baseContent = this.subviews[0].close();
+            while(this.subviews.length > 0) {
+                //if ($debug) Debug.write(this.subviews[0]);
+                this.subviews[0]._chatvideoinner._videostream._stop();
+                this.subviews[0].destroy();
+            }
+            if (canvas.inner.editRecordStream != null) {
+                canvas.inner.editRecordStream.destroy();
+            }
+        ]]>
+    </method>
+
+    <method name="videoOnMove" args="interviewPodId, x, y">
+        if($debug) Debug.write("videoOnY: ", interviewPodId, y);
+        var obj = getVideoObjectByInterviewPodId(interviewPodId);
+        if($debug) Debug.write("getVideoObjectByInterviewPodId: ", interviewPodId, obj);
+        if(obj != null) {
+            obj.setAttribute('x', x);
+            obj.setAttribute('y', y);
+        }
+    </method>
+
+</class>
+
+</library>

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/dragHelper.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/dragHelper.lzx?rev=1220424&view=auto
==============================================================================
--- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/dragHelper.lzx (added)
+++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/dragHelper.lzx Sun Dec 18 15:22:12 2011
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+
+<class name="dragHelper">
+
+    <attribute name="dragHelper" value="null" />
+
+    <method name="create">
+        if(this.dragHelper != null ) this.dragHelper.destroy();
+        this.dragHelper = new lz.view(canvas, {width:canvas.width,height:canvas.height,x:'0',y:'0', bgcolor:'0xFFFFFF', opacity:0.01,clickable:true});
+        this.dragHelper.sendInFrontOf(canvas.mainComponent);
+    </method>
+
+    <method name="remove">
+        this.dragHelper.destroy();
+        this.dragHelper = null;
+    </method>
+
+</class>
+
+</library>
\ No newline at end of file

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/hibAdapter.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/hibAdapter.lzx?rev=1220424&view=auto
==============================================================================
--- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/hibAdapter.lzx (added)
+++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/hibAdapter.lzx Sun Dec 18 15:22:12 2011
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+
+<class name="hibAdapter">
+    <switch>
+        <when property="$as3">
+            <passthrough>
+                import flash.net.LocalConnection;
+            </passthrough>
+        </when>
+    </switch>
+
+    <handler name="oninit"><![CDATA[
+        var client = {};
+        client.t = this;
+
+        client.hibAdapter_setLabelObjectByHundred = this.hibAdapter_setLabelObjectByHundred;
+        client.setRoomValues = this.setRoomValues;
+        client.getRoomTypes = this.getRoomTypes;
+
+        var rtmpLC:LocalConnection = new LocalConnection();
+        rtmpLC.connect(canvas.rtmp_lc_name);
+        rtmpLC.client=client;
+        canvas.setAttribute("rtmp_lc", rtmpLC);
+    ]]></handler>
+
+    <method name="hibAdapter_setLabelObjectByHundred" args="start,value">
+        //if($debug) Debug.write("hibAdapter_setLabelObjectByHundred",start,value);
+        setLabelObjectByHundred(start,value);
+    </method>
+
+    <method name="setRoomValues" args="roomtypes_id,rooms_id,value">
+        if($debug) Debug.write("setRoomValues",value);
+        canvas.setRoomValues(roomtypes_id,rooms_id,value);
+    </method>
+
+    <method name="getRoomTypes" args="value">
+        canvas.roomTypesInitValues = value;
+    </method>
+
+</class>
+
+</library>
\ No newline at end of file

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/miniIcons.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/miniIcons.lzx?rev=1220424&view=auto
==============================================================================
--- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/miniIcons.lzx (added)
+++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/miniIcons.lzx Sun Dec 18 15:22:12 2011
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+
+<class name="miniIcons" extends="view" stretches="both">
+    <handler name="onmouseover">
+    	if (this.showhandcursor) {
+        	this.setAttribute("x",this.x-1);
+        	this.setAttribute("y",this.y-1);
+        	this.setAttribute("height",this.height+2);
+        	this.setAttribute("width",this.width+2);
+    	}
+        parent.parent.onmouseover.sendEvent();
+    </handler>
+    <handler name="onmouseout">
+    	if (this.showhandcursor) {
+        	this.setAttribute("x",this.x+1);
+            this.setAttribute("y",this.y+1);
+            this.setAttribute("height",this.height-2);
+            this.setAttribute("width",this.width-2);
+    	}
+        parent.parent.onmouseout.sendEvent();
+    </handler>
+</class>
+
+</library>
\ No newline at end of file

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/testVideoObject.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/testVideoObject.lzx?rev=1220424&view=auto
==============================================================================
--- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/testVideoObject.lzx (added)
+++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/testVideoObject.lzx Sun Dec 18 15:22:12 2011
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+
+    <class name="testVideoObject" extends="view" bgcolor="0x000000" width="132" height="120" onmousedown="dragger.setAttribute('applied', true)" onmouseup="dragger.setAttribute('applied', false)">
+        <dragstate name="dragger"/>>
+    </class>
+</library>
\ No newline at end of file

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/baseVideoObject.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/baseVideoObject.lzx?rev=1220424&view=auto
==============================================================================
--- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/baseVideoObject.lzx (added)
+++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/baseVideoObject.lzx Sun Dec 18 15:22:12 2011
@@ -0,0 +1,647 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+
+
+<!---
+	Base container for a client, can be either:
+	a remote-video (subscribing/playing a video)
+	or a self-video (broadcasting a cam/mic)
+ -->
+    
+<class name="baseVideoObject" extends="view" bgcolor="0x000000" width="132" height="120">
+
+    <switch>
+	  <when property="$as3">
+		<passthrough>
+		  import flash.filters.DropShadowFilter;
+		</passthrough>
+	  </when>
+	</switch>
+	 
+	<!--- @keywords private -->
+	<attribute name="chatpartnername" value="" type="string" />
+	<!--- @keywords private -->
+	<attribute name="showUserProfilePic" type="boolean" value="false" />
+	
+	<!--- color of this user, this is the color the user will also use for his chat-color -->
+	<attribute name="usercolor" value="0" type="number" />
+		
+	<!--- publicSID is a hash-value to identify a user -->
+	<attribute name="publicSID" value="" type="string" />
+
+	<!--- micMuted indicates if the microphone is currently turned sound or gain to 0 -->
+    <attribute name="micMuted" value="false" type="boolean" />
+	
+	<!--- @keywords private -->
+	<attribute name="isremote" value="true" type="boolean" />
+	
+	<!--- @keywords private -->
+	<attribute name="clientVars" value="null" />
+    
+    <!--- @keywords private -->
+    <attribute name="isResizing" value="false" type="boolean" />
+    
+    <!--- @keywords private -->
+    <attribute name="isInterview" value="false" type="boolean" />
+    
+    <attribute name="respectRatio" value="true" type="boolean" />
+    
+    <attribute name="minimized" value="false" type="boolean" />
+    
+    <attribute name="hidebyAudioOnly" value="false" type="boolean" />
+    
+    <attribute name="custom" value="false" type="boolean" />
+    
+    <attribute name="initH" value="40" type="number" />
+    <attribute name="initW" value="40" type="number" />
+
+    <attribute name="isShowMicMute" value="false" type="boolean"/>
+
+    <attribute name="isMutedByModerator" value="false" type="boolean"/>
+	
+	<handler name="onisremote" args="r">
+		this.isremote = r;
+	</handler>
+    
+    <handler name="oninit">
+        <![CDATA[
+            this.clientVars = new Array();
+            this.clientVars['User']='No User Connected';
+            
+            if (this.isInterview) {
+            	this._toolbar._showusercontext.setAttribute("visibility","hidden");
+            	this._toolbar._minimize.setAttribute("visibility","hidden");
+            	this._resizeview.setAttribute("visibility","hidden");
+            	return;
+            }
+            
+            if (this.custom) {
+                this._toolbar._showusercontext.setAttribute("visibility","hidden");
+                this._toolbar._minimize.setAttribute("visibility","hidden");
+                this._resizeview.setAttribute("visibility","hidden");
+                this._toolbar.setAttribute("visibility","hidden");
+                this._resizeview.setAttribute("visibility","hidden");
+                this._loudness.setAttribute("visibility","hidden");
+                this._innertop.setAttribute("visibility","hidden");
+                
+                //return;
+            }
+            
+            var prop1 = [this, "width"];
+            var prop2 = [this, "height"];
+            this.applyConstraintMethod("setItemContraints", prop1);
+            this.applyConstraintMethod("setItemContraints", prop2);
+            this.setShadow();   
+            
+            if (this.publicSID == canvas.publicSID) {
+            	this._toolbar._resync._tip.setAttribute("labelid",610);
+            }
+        ]]>
+    
+    </handler>
+	
+	<handler name="ony">
+		<![CDATA[
+		
+		    if (this.isInterview) {
+                return;
+            }
+            
+            if (this.custom) {
+                return;
+            }
+            
+			var bounds = this.getBounds();
+			var parentBounds = canvas.getBounds();
+			if ( bounds.y < 0 )
+			{
+				this.setAttribute('y',0);
+			}
+			
+			if ( bounds.y > ( parentBounds.height - bounds.height ) )
+			{			
+				this.setAttribute('y', parentBounds.height - bounds.height );
+			}
+		]]>
+	</handler>
+
+	<handler name="onx">
+		<![CDATA[
+		
+            if (this.isInterview) {
+                return;
+            }	
+            
+            if (this.custom) {
+                return;
+            }
+		
+			var bounds = this.getBounds();
+			var parentBounds = canvas.getBounds();
+			if ( bounds.x < 0 )
+			{
+				this.setAttribute('x',0);
+			}
+			
+			if ( bounds.x > ( parentBounds.width - bounds.width ) )
+			{
+				this.setAttribute('x', parentBounds.width - bounds.width );
+			}
+		]]>
+	</handler>
+	
+    <method name="setShadow">
+        <![CDATA[
+        if (this.isinited){
+            this.normalMC = this.getDisplayObject();
+            //Debug.write(this.normalMC);
+            ////Debug.write("this.normalMC: ",this.normalMC);
+            ////Debug.write("this: ",this);
+            this.displacementMap = new flash.filters.DropShadowFilter();
+            this.normalMC.filters = [this.displacementMap];
+        }
+        ]]>              
+    </method>   
+        
+    <!-- respect ratio and keep minimum width / height -->
+    <method name="setItemContraints" args="w">
+        <![CDATA[
+            if (!this.respectRatio) {
+                return;
+            }
+
+            //if ($debug) Debug.write("setItemContraints ",w);
+
+            //if ($debug) Debug.write("setItemContraints",w)
+            var w=this.height * this.initW/this.initH;
+            w=((w < this.initW ) ? initW : w);
+            var h=this.width * this.initH/this.initW;
+            h=((h < this.initH ) ? initH : h);
+    
+            this.setAttribute("width",w);
+            this.setAttribute("height",h);
+        ]]>
+    </method>
+        
+	
+	<method name="updateAVSettingsSymbol" args="rcl">
+		//FIXME: Set a Symbol wether this Client is Audio(only)/Video(only), both or Profile Picture 
+		if ($debug) Debug.warn("updateAVSettingsSymbol TODO ",rcl);
+	</method>
+
+
+    
+    <method name="doResize" args="bool">
+        if ($debug) Debug.write("doResize ",bool);
+        if(bool) {
+            dragHelper.create();
+        } else {
+            dragHelper.remove();
+        }
+        if (this.isInterview) {
+            return;
+        }   
+        
+        if (this.custom) {
+                return;
+        }
+        
+        if (bool) {
+            this.isResizing = true;
+            this.rs.apply();
+        } else {
+            this.isResizing = false;
+            this.rs.remove();
+        }
+    </method>
+    
+    <!--- resets all values and stops the streaming -->
+    <method name="resetValues">
+      <![CDATA[
+    	this.clientVars=null;
+    	if (this.showUserProfilePic && !this.isremote){
+    		this._chatvideoinner.userProfilePic.destroy();
+    		this.showUserProfilePic = false;
+    	}
+    	if ($debug) Debug.write("resetValues: ",this.isremote);
+    	if (this.isremote){
+    		this._chatvideoinner._videostream.restart();
+    	} else {
+    		this._chatvideoinner._videostream.stop();
+    	}
+     ]]>
+    </method>
+    <method name="setVideouserProfilePic" args="value">
+    	if ($debug) Debug.write("### setVideouserProfilePic ",value);
+    	this.deleteVideoConfProfilePic(value);
+    	new lz.videoUserProfilePic(this._chatvideoinner,{name:'userProfilePic',value:value});
+    	this.showUserProfilePic = true;
+    </method>    
+    <method name="deleteVideoConfProfilePic" args="value">
+    	if ($debug) Debug.write("### deleteVideoConfProfilePic ",value);
+        if ($debug) Debug.write("delete ",this.showUserProfilePic);
+    	if (this.showUserProfilePic){
+    		this._chatvideoinner.userProfilePic.destroy();
+    		this.showUserProfilePic = false;
+    	}
+    </method>    
+    
+        <!--- @keywords private  -->
+    <method name="_startDragState" args="obj">
+    	
+        if (this.isInterview) {
+            return;
+        }    	
+        
+        if (this.custom) {
+            return;
+        }
+
+        dragHelper.create();
+
+        this.bringToFront();
+        parent.bringToFront();
+        this.dragger.apply();
+    </method> 
+    
+        <!--- @keywords private  -->
+    <method name="_removeDragState" args="obj">
+    	<![CDATA[
+	        lz.Cursor.unlock();
+	        
+	        if (this.x < 0) {
+	        	this.setAttribute("x",20);
+	        }
+	        
+	        if (this.y < 0) {
+	        	this.setAttribute("y",20);
+	        }
+	        
+	        if (this.x+this.width > parent.width) {
+	        	this.setAttribute("x",parent.width - this.width - 20);
+	        }
+	        
+	        if (this.y+this.height > parent.height) {
+	        	this.setAttribute("y",parent.height - this.height - 20);
+	        }
+
+	        dragHelper.remove();
+
+	        this.dragger.remove();
+        
+        ]]>
+    </method>
+    
+    <method name="minimize">
+        <![CDATA[
+        
+            this.respectRatio = false;
+        
+            this.setAttribute("minimized",true);
+            
+            this._toolbar._minimize.setAttribute("visibility","hidden");
+            this._toolbar._maximize2.setAttribute("visibility","visible");
+            
+            for (var eg in this.subviews) {
+                if (this.subviews[eg].name != "_toolbar" 
+                        && this.subviews[eg].name != "_innertop"
+                        && this.subviews[eg].name != "_loudness"
+                        && this.subviews[eg].name != "_micView") {
+                     this.subviews[eg].setAttribute("visibility","hidden");   
+                }
+            }
+            
+            this._loudness.setAttribute("x",this.width - 84 - (this.isShowMicMute ? 20 : 0));
+            this._loudness.bringToFront();
+            
+            this.initialHeight = this.height;
+            //this.setAttribute("height",20);
+            this._minimizeZoom.setAttribute("to",20);
+            this._minimizeZoom.doStart();
+        ]]>
+    </method>
+    
+    <method name="reminimize">
+        <![CDATA[
+            this.setAttribute("minimized",false);
+            
+            this._toolbar._minimize.setAttribute("visibility","visible");
+            this._toolbar._maximize2.setAttribute("visibility","hidden");
+            
+            this._loudness.setAttribute("x",1);
+            this._micView.setAttribute("x",21);
+            
+            //this.setAttribute("height",this.initialHeight); 
+            this._minimizeZoom.setAttribute("to",this.initialHeight);
+            this._minimizeZoom.doStart();
+        ]]>
+    </method>    
+    
+    <method name="reminimizeComplete">
+        <![CDATA[
+            if (!this.minimized) {
+                
+                for (var eg in this.subviews) {
+                    if (this.subviews[eg].name != "_toolbar" 
+                            && this.subviews[eg].name != "_innertop"
+                            && this.subviews[eg].name != "_loudness"
+                            && this.subviews[eg].name != "_micView") {
+                         this.subviews[eg].setAttribute("visibility","visible");   
+                    }
+                }
+                
+                
+            
+                this.respectRatio = true;
+            }
+            
+        ]]>
+    </method>    
+
+	<view name="_innertop" width="${parent.width-2 }" 
+		  height="18" x="1" y="1" bgcolor="$once{ canvas.basebgcolorizer }">
+  		<text text="${ parent.parent.chatpartnername }" 
+              onmousedown="parent.parent._startDragState(this)" 
+              onmouseup="parent.parent._removeDragState(this)"
+              width="${ parent.width-2 }" fgcolor="white"
+  			fontsize="9">
+            <handler name="onmouseover">
+		        //cursor="arrow_draw_panel_cursor" 
+		        lz.Cursor.setCursorGlobal("arrow_draw_panel_cursor");
+		    </handler>
+		    
+		    <handler name="onmouseout">
+		        lz.Cursor.unlock();
+		    </handler>
+        </text>
+	</view>	
+    
+	<view name="_loudness" x="1" y="${parent.height - 20}">
+		<view x="2" y="2" name="loudness" resource="speaking" opacity="0.2"
+			  onmouseover="" onmouseout="" >		
+			<labelTooltip inittwice="true" labelid="372" />
+		</view>
+	</view>
+
+    <!--
+	<view name="showuser" x="${ parent.width-20 }" y="2" width="20"
+		onmouseover="" onmouseup="" resource="showusercontext">
+		<handler name="onclick">
+			new lz.remoteUserDetails(parent);
+		</handler>
+		<labelTooltip inittwice="true" labelid="68" />
+	</view>
+     -->
+
+    <view name="_resizeview" x="${ this.parent.width - 17 }" 
+          y="${ this.parent.height - 17 }" 
+        resource="explorer_resize_rsc" cursor="explorer_resizemouse_rsc" 
+        onmousedown="this.parent.doResize(true)"
+        onmouseup="this.parent.doResize(false)" >
+        <handler name="oninit">
+            //if ($debug) Debug.write("setTint");
+            //TODO: Fix this, does not work at the moment
+            //canvas.protocol + '://code.google.com/p/openmeetings/issues/detail?id=470
+            this.setColor(canvas.baseMousecolorizer);
+        </handler>      
+    </view>
+    
+    <view name="_toolbar" x="${ parent.width-this.width-2 }" layout="axis:x;spacing:0" y="2">     
+        
+        <attribute name="isload" value="true" type="boolean"/>        
+        
+        <miniIconsPresenter name="_minimize"
+            iconRessourceName="btn_presenter_minimize">
+            <handler name="onclick">
+                this.parent.parent.minimize();
+            </handler>
+            <labelTooltip labelid="856" />
+        </miniIconsPresenter>
+        
+        <miniIconsPresenter name="_maximize2" visibility="hidden"
+            iconRessourceName="btn_presenter_maximize">
+            <handler name="onclick">
+                this.parent.parent.reminimize();
+            </handler>
+            <labelTooltip labelid="857" />
+        </miniIconsPresenter>
+        
+        <miniIconsPresenter name="_mute" width="16" height="16" iconRessourceName="mute_micro_btn_rsc">
+            <handler name="onclick">
+                parent.parent.silenceMicrophone(!parent.parent.micMuted);
+            </handler>
+            <labelTooltip name="_tip" labelid="1405" />
+        </miniIconsPresenter>
+        
+        <miniIconsPresenter name="_resync"
+            iconRessourceName="resyncuser_rsc">
+            <handler name="onclick">
+                parent.parent.resetValues();
+                if(!this.parent.parent.isremote) {
+                	if ($debug) Debug.write("editRecordStream ################# baseVideObject ");
+                    if(canvas.inner.editRecordStream != null) canvas.inner.editRecordStream.destroy();
+                	if (this.parent.parent.isInterview) {
+                		new lz.editRecordStream(canvas.inner,{
+                                name:"editRecordStream",
+                			    doDefaultAnimation:false,
+                                align:'center',valign:'middle',
+                			    isInterview:true,
+                			    myvideocontainer:parent.parent,
+                                isSyncUpdate:true});
+                	} else {
+                		new lz.editRecordStream(canvas.inner,{
+                                name:"editRecordStream",
+                                isSyncUpdate:true});
+                	}
+                }
+            </handler>
+            <labelTooltip name="_tip" labelid="540" />
+        </miniIconsPresenter>  
+        
+        <!--<miniIconsPresenter name="_showusercontext"-->
+            <!--iconRessourceName="showusercontext">-->
+            <!--<handler name="onclick">-->
+                <!--new lz.remoteUserDetails(parent.parent);-->
+            <!--</handler>-->
+            <!--<labelTooltip labelid="68" />-->
+        <!--</miniIconsPresenter>  -->
+        
+    </view>         
+    
+    <dragstate name="dragger" />
+    <resizestate name="rs"/>
+    <dragHelper name="dragHelper"/>
+    
+    <animator name="_minimizeZoom" attribute="height" 
+              duration="750" to="20" start="false">
+        <handler name="onstop" args="s">
+            parent.reminimizeComplete();
+        </handler>
+    </animator>
+
+    <handler name="onismoderator" reference="canvas" args="m">
+        if ($debug) Debug.write("###### ismoderator ", m);
+        <![CDATA[
+
+        if (this.minimized) {
+            this._loudness.setAttribute("x",this.width - 84 - (this.isShowMicMute ? 20 : 0));
+            this._loudness.bringToFront();
+        }
+        ]]>
+    </handler>
+
+    <!--
+        This will mute the Microphone only to the person that is speaking
+        if the gain is set to zero NOBODY will hear 'em
+     -->
+    <method name="muteMicrophone" args="roomClientObj">
+        <![CDATA[
+
+        if ($debug) Debug.write("############ muteMicrophone ",roomClientObj.micMuted);
+
+        if (roomClientObj.publicSID == this.publicSID) {
+            if (roomClientObj.publicSID == canvas.publicSID) {
+            	if ($debug) Debug.write("Set Mute for Client :: ",roomClientObj.username);
+                if (roomClientObj.micMuted) {
+                	if ($debug) Debug.write("############ SET GAIN 0");
+                    this._chatvideoinner._videostream.micro.setGain(0);
+                } else {
+                	if ($debug) Debug.write("############ SET GAIN 50");
+                    this._chatvideoinner._videostream.micro.setGain(50);
+                }
+            }
+            this.isMutedByModerator = roomClientObj.micMuted;
+            this.setMicMuted(roomClientObj.micMuted);
+
+        } else {
+        	if (!roomClientObj.micMuted) {
+        		//Make sure sound is on, in case a user has set it locally to 0
+        		//in other words: overwrite any local settings
+        	    this._chatvideoinner._videostream.setVolume(100);
+        	}
+        }
+        ]]>
+    </method>
+
+    <!--
+        This will mute it only locally, that means on other screens
+        the user might be still online and loud
+     -->
+    <method name="silenceMicrophone" args="mute">
+        <![CDATA[
+
+        if ($debug) Debug.write("!!!!!!!!!!!!! 1");
+        if (this.publicSID == canvas.publicSID) {
+            if ($debug) Debug.write("!!!!!!!!!!!!! 2");
+        	//self sound turned off
+        	if (mute) {
+        	    if ($debug) Debug.write("!!!!!!!!!!!!! 3");
+            	new lz.confirmationSingle(canvas,{
+                                               labelid:1388,labeliderror:1389,
+                                               refReturnMethod:'confirmGloballyOff',
+                                               refObj:this,showCheckBox:false});
+                return;
+        	} else {
+        	    if ($debug) Debug.write("!!!!!!!!!!!!! 4");
+        		canvas.thishib.switchMicMuted.setMute(this.publicSID,false);
+        		if ($debug) Debug.write("!!!!!!!!!!!!! 5");
+        	}
+        	if ($debug) Debug.write("!!!!!!!!!!!!! 6");
+        } else {
+            if ($debug) Debug.write("!!!!!!!!!!!!! 7");
+        	//disable this action for now
+        	if (!canvas.ismoderator) {
+        	    if ($debug) Debug.write("!!!!!!!!!!!!! 8");
+        		new lz.labelerrorPopup(canvas,{errorlabelid:1409});
+        		if ($debug) Debug.write("!!!!!!!!!!!!! 9");
+        		return;
+        	}
+            if ($debug) Debug.write("!!!!!!!!!!!!! 10");
+        	//you can not unmute it locally by putting sound to 100 cause the gain is set to zero globally in the micro of the sender!
+        	//so setting the sound/volume on the other remote clients has zero effect
+        	if (this.isMutedByModerator && !canvas.ismoderator) {
+        	if ($debug) Debug.write("!!!!!!!!!!!!! 11");
+                //FIXME: That is not true, you could restart audio/video ...
+                var errorlabelid = 1402;
+                if (this.publicSID == canvas.publicSID) {
+                    if ($debug) Debug.write("!!!!!!!!!!!!! 12");
+                    errorlabelid = 1387;
+                }
+                if ($debug) Debug.write("!!!!!!!!!!!!! 13");
+                new lz.labelerrorPopup(canvas,{errorlabelid:errorlabelid});
+                if ($debug) Debug.write("!!!!!!!!!!!!! 14");
+                return;
+            }
+            if ($debug) Debug.write("!!!!!!!!!!!!! 15");
+        	if (canvas.ismoderator) {
+        	    if ($debug) Debug.write("!!!!!!!!!!!!! 16");
+        		if (mute) {
+        		    if ($debug) Debug.write("!!!!!!!!!!!!! 17");
+                    new lz.confirmationSingle(canvas,{
+                                                   labelid:1392,labeliderror:1393,
+                                                   refReturnMethod:'confirmGloballyOff',
+                                                   refObj:this,showCheckBox:false});
+                    if ($debug) Debug.write("!!!!!!!!!!!!! 18");
+                    return;
+                } else {
+                    if ($debug) Debug.write("!!!!!!!!!!!!! 19");
+                    canvas.thishib.switchMicMuted.setMute(this.publicSID,false);
+                    if ($debug) Debug.write("!!!!!!!!!!!!! 20");
+                }
+        	} else {
+        	    if ($debug) Debug.write("!!!!!!!!!!!!! 21");
+            	if (mute) {
+            	    if ($debug) Debug.write("!!!!!!!!!!!!! 22");
+            		new lz.confirmationSingle(canvas,{
+                                                   labelid:1390,labeliderror:1391,
+                                                   refReturnMethod:'confirmLocallyOff',
+                                                   refObj:this,showCheckBox:false});
+                    if ($debug) Debug.write("!!!!!!!!!!!!! 23");
+                    return;
+                } else {
+                    if ($debug) Debug.write("!!!!!!!!!!!!! 24");
+                    this._chatvideoinner._videostream.setVolume(100);
+                    if ($debug) Debug.write("!!!!!!!!!!!!! 25");
+                }
+        	}
+        }
+        if ($debug) Debug.write("!!!!!!!!!!!!! 26");
+        this.setMicMuted(mute);
+        if ($debug) Debug.write("!!!!!!!!!!!!! 27");
+        ]]>
+    </method>
+
+    <method name="confirmGloballyOff" args="bool,t" >
+    	if ($debug) Debug.write("confirmGloballyOff :: ",bool);
+    	if (bool) {
+            if ($debug) Debug.write("???????? 1");
+            canvas.thishib.switchMicMuted.setMute(this.publicSID,true);
+            if ($debug) Debug.write("???????? 4");
+    	}
+    </method>
+
+    <method name="confirmLocallyOff" args="bool,t" >
+        if ($debug) Debug.write("confirmLocallyOff :: ",bool);
+        if (bool) {
+        	this.setMicMuted(true);
+            this._chatvideoinner._videostream.setVolume(0);
+        }
+    </method>
+
+    <method name="setMicMuted" args="micMuted">
+        <![CDATA[
+        this.micMuted = micMuted;
+        if (micMuted) {
+            this._toolbar._mute._tip.setAttribute("labelid","1406");
+            this._toolbar._mute._itemRsc.setAttribute('frame',2);
+        } else {
+            this._toolbar._mute._tip.setAttribute("labelid","1405");
+            this._toolbar._mute._itemRsc.setAttribute('frame',1);
+        }
+        ]]>
+    </method>
+    
+</class>
+
+
+</library>

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/editRecordStream.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/editRecordStream.lzx?rev=1220424&view=auto
==============================================================================
--- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/editRecordStream.lzx (added)
+++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/editRecordStream.lzx Sun Dec 18 15:22:12 2011
@@ -0,0 +1,444 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+    
+<!-- #######################
+	Class editRecordStream
+	
+	Description:
+	This Class shows a window where you can alter you Video-/Microphone- Input-Resources
+	and start to stream. The app could also use the default values for Cam/Mic but
+	must users don't know how to alter this (wether in System-Control-Panel or by Right Clicking
+	on the Flash-Screen and *>Preferences>Camera* )
+	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" >
+
+    <switch>
+        <when property="$as3">
+            <passthrough>
+                import flash.media.Camera;
+                import flash.media.Microphone;
+                import flash.net.SharedObject;
+            </passthrough>
+        </when>
+    </switch>
+
+    <attribute name="myvideocontainer" value="null" />
+
+    <attribute name="chosenCam" value="null" />
+    <attribute name="chosenMic" value="null" />
+    <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="isInterview" value="false" type="boolean" />
+
+	<handler name="oninit">
+		<![CDATA[
+			if ($debug) Debug.write("this.myvideocontainer ",this.myvideocontainer);
+			if ($debug) Debug.write("editrecordstream ###################### ");
+
+			canvas.stream_lc.client = {clb_getBroadCastId: this.clb_getBroadCastId, clb_setUserAVSettings: this.clb_setUserAVSettings};
+
+	        var t:SharedObject = SharedObject.getLocal('userdata');
+	        var g = t.data;
+	        var save = g["savecamdata"];
+	        if ($debug) Debug.write("save: ",save,g["cam"],g["mic"]);
+	        //In case its an Audio-Only Room this box should not close automatically
+            if ($debug) Debug.write("canvas.currentRoomObject: ", canvas.currentRoomObject);
+
+	        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();
+                    canvas.stream_lc.send(canvas.stream_lc_name, 'lc_getBroadCastId', this.chosenSetting, this.remoteMessage);
+                } else {
+                    if (this.doDefaultAnimation) {
+                        this._chooseDeviceAnimation.doStart();
+                    }
+                }
+	        }
+        ]]>
+	</handler>
+
+    <!--
+        Called by local connection
+    -->
+    <method name="clb_getBroadCastId" args="value">
+        if ($debug) Debug.write("getBroadCastId",value,canvas.publicSID);
+        this.myvideocontainer = canvas._videoComponent.createVideoObject(canvas.publicSID, true, -1);
+        this.myvideocontainer.setAttribute("visibility","hidden");
+    </method>
+
+    <!--
+        Called by local connection
+    -->
+    <method name="clb_setUserAVSettings" args="value">
+        if ($debug) Debug.write("setUserAVSettings",value);
+        this.currentClient = value;
+        this.doninitalize();
+    </method>
+
+    <method name="storelocaldata">
+        <![CDATA[
+        if (this.holddatainSO.getValue()){
+            //Debug.write("sharedobject store ");
+            var t:SharedObject = SharedObject.getLocal('userdata');
+            var g = t.data;
+            if (g==null) g = new Array();
+            g["cam"] = this.availibleCams.getValue();
+            g["mic"] = this.availibleMics.getValue();
+            g["avstored"] = this.availibleSettings.getValue();
+            g["savecamdata"] = true;
+            t.flush();
+        } else {
+            var t:SharedObject = SharedObject.getLocal('userdata');
+            var g = t.data;
+            if (g==null) g = new Array();
+            g["cam"] = this.availibleCams.getValue();
+            g["mic"] = this.availibleMics.getValue();
+            g["avstored"] = this.availibleSettings.getValue();
+            g["savecamdata"]=false;
+            t.flush();
+        }
+        ]]>
+    </method>
+
+    <method name="doninitalize">
+    	<![CDATA[
+    	    if ($debug) Debug.write("doninitalize");
+    		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.getMicrophone(valMic);
+			var _camera = Camera.getCamera(valCam);
+			if ($debug) Debug.write("_camera.setMode: ",videoview.width,videoview.height,canvas.framesPerSecond,true);
+
+			//Microphone.set
+			if ($debug) Debug.write("canvas.vaquality: ",canvas.vaquality, "canvas.microphoneRateBest: ",canvas.microphoneRateBest);
+			if (canvas.vaquality=="best") {
+				_micro.rate = 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);
+			}
+
+			//Microphone setUseEchoSupression(bool)
+		    _micro.setUseEchoSuppression(true);
+
+            if ($debug) Debug.write("settings: ", settings);
+            if ($debug) Debug.write("BroadcastId: ", this.currentClient.broadCastID);
+	    	switch (settings){
+                case "s":
+                    this.myvideocontainer.setAttribute("visibility","hidden");
+                    break;
+                case "vs":
+                    videoview.broadcast(this.currentClient.broadCastID,_camera,null);
+                    if(isInterview) {
+                        canvas.stream_lc.send(canvas.stream_lc_name, "onStartBroadcast", this.currentClient.broadCastID, settings);
+                    } else {
+                        this.myvideocontainer.setAttribute("visibility","visible");
+                    }
+                    break;
+	    		case "av":
+	    			videoview.broadcast(this.currentClient.broadCastID,_camera,_micro);
+                    if(isInterview) {
+                        canvas.stream_lc.send(canvas.stream_lc_name, "onStartBroadcast", this.currentClient.broadCastID, settings);
+                    } else {
+                        this.myvideocontainer.setAttribute("visibility","visible");
+                    }
+
+	    			break;
+	    		case "a":
+	    			videoview.broadcast(this.currentClient.broadCastID,null,_micro);
+                    if(isInterview) {
+                        canvas.stream_lc.send(canvas.stream_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.minimized) {
+                                this.myvideocontainer.minimize();
+                            }
+                        }
+                    }
+	    			break;
+	    		case "v":
+	    			videoview.broadcast(this.currentClient.broadCastID,_camera,null);
+	    			if(isInterview) {
+                        canvas.stream_lc.send(canvas.stream_lc_name, "onStartBroadcast", this.currentClient.broadCastID, settings);
+                    } else {
+                        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">
+
+        <switch>
+            <when property="$as3">
+                <passthrough>
+                    import flash.net.SharedObject;
+                </passthrough>
+            </when>
+        </switch>
+
+        <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 t:SharedObject = SharedObject.getLocal('userdata');
+				var g = t.data;
+				var cam = null;
+				if (g!=null){
+					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">
+        <switch>
+            <when property="$as3">
+                <passthrough>
+                    import flash.media.Camera;
+                    import flash.net.SharedObject;
+                </passthrough>
+            </when>
+        </switch>
+        <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 t:SharedObject = SharedObject.getLocal('userdata');
+				var g = t.data;
+				if (g!=null){
+					var cam = g["cam"];
+				} else {
+					var cam = r;
+				}
+				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">
+        <switch>
+            <when property="$as3">
+                <passthrough>
+                    import flash.media.Microphone;
+                    import flash.net.SharedObject;
+                </passthrough>
+            </when>
+        </switch>
+        <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 t:SharedObject = SharedObject.getLocal('userdata');
+	            var g = t.data;
+	            if (g!=null){
+	            	var mic = g["mic"];
+	            } else {
+	            	var mic = r;
+	            }
+				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" >
+        <switch>
+            <when property="$as3">
+                <passthrough>
+                    import flash.net.SharedObject;
+                </passthrough>
+            </when>
+        </switch>
+        <handler name="oninit">
+            var t:SharedObject = SharedObject.getLocal('userdata');
+            var g = t.data;
+            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();
+            canvas.stream_lc.send(canvas.stream_lc_name, 'lc_getBroadCastId', this.parent.chosenSetting, this.parent.remoteMessage);
+        </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();
+            if ($debug) Debug.write(canvas.stream_lc_name, 'lc_getBroadCastId', this.parent.chosenSetting, this.parent.remoteMessage);
+            canvas.stream_lc.send(canvas.stream_lc_name, 'lc_getBroadCastId', this.parent.chosenSetting, this.parent.remoteMessage);
+        </handler>
+    </simpleLabelButton>
+
+</class>
+    
+</library>

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/library.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/library.lzx?rev=1220424&view=auto
==============================================================================
--- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/library.lzx (added)
+++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/library.lzx Sun Dec 18 15:22:12 2011
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+
+	<resource name="chatbgitem" src="resources/bgitemvideochat.swf" />
+
+	<resource name="showusercontextclose" src="resources/error.png" />
+	<resource name="showusercontext" src="resources/1downarrow.png" />
+	<resource name="resyncuser_rsc" src="resources/noatunloopsong.png" />
+
+	<resource name="speaking" src="resources/speaking.png" />
+	<resource name="mute_btn_rsc">
+		<frame src="resources/icon_mute.png" />
+		<frame src="resources/icon_mute_red.png" />
+	</resource>
+    <resource name="mute_micro_btn_rsc">
+		<frame src="resources/micro_on.png" />
+		<frame src="resources/micro_off.png" />
+	</resource>
+
+	<resource name="lz_recorder_play" src="resources/webstart_play.png" />
+
+    <include href="videoUserProfilePic.lzx" />
+    <!--<include href="remoteUserDetails.lzx" />-->
+    <include href="editRecordStream.lzx" />
+    <include href="baseVideoObject.lzx" />
+    <include href="videoObjectBroadcast.lzx" />
+    <include href="videoObjectPlayBroadcast.lzx" />
+    <include href="videoObjectTestBroadcast.lzx" />
+    <include href="videoObjectPlayTestBroadcast.lzx" />
+    
+    <!--
+    <include href="videoContainer.lzx" />
+     -->
+    
+</library>

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/1downarrow.png
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/1downarrow.png?rev=1220424&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/1downarrow.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/bgitemvideochat.swf
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/bgitemvideochat.swf?rev=1220424&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/bgitemvideochat.swf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/error.png
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/error.png?rev=1220424&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/error.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/icon_mute.png
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/icon_mute.png?rev=1220424&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/icon_mute.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/icon_mute_red.png
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/icon_mute_red.png?rev=1220424&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/icon_mute_red.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/micro_off.png
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/micro_off.png?rev=1220424&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/micro_off.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/micro_on.png
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/micro_on.png?rev=1220424&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/micro_on.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/noatunloopsong.png
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/noatunloopsong.png?rev=1220424&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/noatunloopsong.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/speaking.png
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/speaking.png?rev=1220424&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/speaking.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/webstart_play.png
URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/webstart_play.png?rev=1220424&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/resources/webstart_play.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream