Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoContainer.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoContainer.lzx?rev=1220424&view=auto ============================================================================== --- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoContainer.lzx (added) +++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoContainer.lzx Sun Dec 18 15:22:12 2011 @@ -0,0 +1,273 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<library> + +<!--- + Container view including all audio/video - views for a Meeting + + @keywords deprecated see participents.lzx + --> + +<class name="videoContainer" extends="view"> + + <!--- holds a references to the videoview which is broadcasting --> + <attribute name="broadCastViewRef" value="null" /> + + <!--- colors for each user --> + <attribute name="colorArray" value="null" /> + + <handler name="oninit"> + //set modus + canvas.thishib.modus = "conference"; + //color array + this.colorArray = [0x4174B1,0x00CC00,0xFFCC33,0xFF6633,0x4174B1,0x00CC00,0xFFCC33,0xFF6633, + 0x4174B1,0x00CC00,0xFFCC33,0xFF6633,0x4174B1,0x00CC00,0xFFCC33,0xFF6633]; + //set reference, this reference will be cleared at *ontabcontenctleave* event + canvas._videocontainer=this; + + // Reconnect User to its Room Id + canvas.thishib.userScope = canvas.thishib.currentroomid; + var src = hib.protocollName+'://'+canvas.rtmphostlocal+':'+hib.protocollPort+'/'+canvas.webAppRootKey+'/'+hib.userScope; + canvas.thishib.setAttribute('src',src); + + if( $debug ) Debug.write("videoContainer: canvas.thishib: ",canvas.thishib.src,canvas.thishib); + + canvas.thishib.reconnectionAction = true; + canvas.thishib.reconnectObjRef = this; + if ($debug) Debug.write("################ disconnect -1- "); + canvas.thishib.disconnect(); + </handler> + + <method name="reconnectSuccess"> + if ($debug) Debug.write("User Reloged In"); + //set default values and get already availible streams + if ($debug) Debug.write("################ setRoomValues3: ",canvas.becomemoderator); + this.setRoomValues.doCall(); + </method> + + <netRemoteCallHib name="setRoomValues" funcname="setRoomValues" remotecontext="$once{ canvas.thishib }" > + <netparam><method name="getValue">return hib.currentroomid;</method></netparam> + <netparam><method name="getValue">return canvas.becomemoderator;</method></netparam> + <handler name="ondata" args="value"> + //The onResult-Handler will be called be the rtmpconnection + if ($debug) Debug.write("setRoomValues1: ",value); + if ($debug) Debug.write("setRoomValues2: ",hib.currentroomid); + + if ($debug) Debug.write("+++++++++++++++++ getClientListScope : ",value); + for (var i in value){ + if ($debug) Debug.write("getClientListScope value: ",value[i]); + if (value[i].username!=null){ + this.parent.addItem(value[i].connectedSince,value[i].isMod,value[i].streamid,value[i].username,value[i].userroom,value[i].formatedDate,value[i].userpos,value[i].usercolor,value[i]); + } + } + //this content must be inited _after_ setting the default values + canvas.thishib.getCurrentModeratorList.doCall(); + canvas._mymod.checkForRecording.doCall(); + canvas._chatcontent.doInit(); + </handler> + </netRemoteCallHib> + + <!-- 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 ($debug) Debug.write("setAVSettingsToClient: ",obj,rcl.avsettings); + if (rcl.avsettings=="n"){ + obj.setVideouserProfilePic(rcl); + } else if (rcl.avsettings=="a"){ + obj.setVideouserProfilePic(rcl); + } else { + obj.deleteVideoConfProfilePic(); + } + obj.clientVars = rcl; + obj.updateAVSettingsSymbol(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); + + //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<this._videoviewcontent.subviews.length;i++){ + //if ($debug) Debug.write("getVideoObjectByBroadCastId2 broadcastId VIEW: ",this._videoviewcontent.subviews[i].broadcastId); + //if ($debug) Debug.write("getVideoObjectByBroadCastId3 broadcastId SEARCH: ",broadcastId); + //if ($debug) Debug.write("getVideoObjectByBroadCastId4 obj: ",this._videoviewcontent.subviews[i]); + //if ($debug) Debug.write("getVideoObjectByBroadCastId5 streamid,user_id: ",this._videoviewcontent.subviews[i].clientVars.streamid,this._videoviewcontent.subviews[i].clientVars.user_id); + if (this._videoviewcontent.subviews[i].publicSID==publicSID){ + return this._videoviewcontent.subviews[i]; + } + } + + ]]> + </method> + + <method name="addItem" args="connectedSince,isMod,streamid,username,userroom,formatedDate,position,color,object"> + <![CDATA[ + if ($debug) Debug.write("initializeStreams addItem: ",connectedSince,isMod,streamid,username,userroom,formatedDate); + if (streamid!=canvas.streamid){ + 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); + } else if (object.avsettings=="a"){ + myvideocontainer.setVideouserProfilePic(object); + if ($debug) Debug.warn("start play"); + myvideocontainer._chatvideoinner._videostream.playStream(object.broadCastID,-1); + } else { + myvideocontainer._chatvideoinner._videostream.playStream(object.broadCastID,-1); + if ($debug) Debug.warn("start play"); + } + myvideocontainer.updateAVSettingsSymbol(object); + return myvideocontainer; + } + ]]> + </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 (streamid!=canvas.streamid){ + 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); + } + ]]> + </method> + + <method name="startStream" args="publicSID,broadcastId,firstname,lastname"> + <![CDATA[ + //if ($debug) Debug.write("startStream 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> + + + <!-- + 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 { + //Get a Free VideoView Slot + var freePos = this._videoviewcontent.getVideoObjectFreePos(36, 100, 100); + + this.broadCastViewRef = new lz.videoObjectBroadcast(this._videoviewcontent,{ + publicSID:publicSID, + x:freePos[0],y:freePos[1] + }); + canvas.currentusercolor = this.colorArray[this.subviews.length]; + this.broadCastViewRef._chatvideoinner.r.destroy(); + canvas.thishib.setAudienceModus.doCall(); + 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; + } + //Get a Free VideoView Slot + var freePos = this._videoviewcontent.getVideoObjectFreePos(36, 100, 100); + + return new lz.videoObjectPlayBroadcast(this._videoviewcontent,{ + 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(); + } + ]]> + </method> + + <!--- + stops the streaming but and destroys the view + @param int broadcastId broadcastId + --> + <method name="disconnectclient" args="publicSID"> + <![CDATA[ + if ($debug) Debug.write("disconnectclient: ",publicSID); + var obj = this.getVideoObjectByPublicSID(publicSID); + if ($debug) Debug.write("disconnectclient obj: ",obj); + if (obj != null){ + obj.resetValues(); + obj.destroy(); + } + return null; + ]]> + </method> + + <method name="resetAllValues"> + for (var eg in this._videoviewcontent.subviews){ + this._videoviewcontent.subviews[eg].resetValues(); + } + </method> + + <commonVideoViewContent name="_videoviewcontent" /> + +</class> + +</library>
Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoInfoStuff.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoInfoStuff.lzx?rev=1220424&view=auto ============================================================================== --- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoInfoStuff.lzx (added) +++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoInfoStuff.lzx Sun Dec 18 15:22:12 2011 @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<library> + +<class name="videoInfoStuff" extends="view" width="$once{ parent.width-2 }" + height="$once{ parent.height-21 }" y="20" x="1" bgcolor="white"> + <handler name="oninit"> + <![CDATA[ + var tString = ''; + //Debug.write("clientVars: ",parent.clientVars); + for (var eg in parent.clientVars){ + if (eg!='userip'){ + tString += eg+': <BR/>'+parent.clientVars[eg]+'<BR />'; + } else { + tString += eg+': <BR/>'+parent.clientVars[eg]+'<BR />'; + tString += 'WHOIS:<BR/>'; + tString += '<A HREF="http://www.networksolutions.com/whois/results.jsp?whoistoken='+parent.clientVars[eg]+'" TARGET="_BLANK">'+parent.clientVars[eg]+'</A><BR/><BR/>'; + } + } + //Debug.write("tString: ",tString); + this.inner._usertext.setAttribute('text',tString); + ]]> + </handler> + <view x="$once{ parent.width-20 }" y="2" name="infoview" resource="showusercontextclose"> + <handler name="onclick"> + parent.setAttribute('visible',false); + </handler> + <labelTooltip inittwice="true" labelid="85" /> + </view> + <view name="inner" width="${parent.width}" + height="$once{ parent.height-20 }" y="20" clip="true"> + <text name="_usertext" width="$once{ parent.width }" multiline="true" /> + <vscrollbar /> + </view> + +</class> + +</library> Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectBroadcast.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectBroadcast.lzx?rev=1220424&view=auto ============================================================================== --- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectBroadcast.lzx (added) +++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectBroadcast.lzx Sun Dec 18 15:22:12 2011 @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<library> + + +<!--- + contains microphone and camera for broadcasting, + this class is used only in Meetings-Modus + --> + + +<class name="videoObjectBroadcast" extends="baseVideoObject" isremote="false"> + <attribute name="interviewPodId" value="-1" /> + <attribute name="ratioW" value="1" /> + <attribute name="ratioH" value="1" /> + <handler name="oninit"> + <![CDATA[ + //Display widget defined in mother class + if(this.syncuser) this.syncuser.bringToFront(); + this._loudness.bringToFront(); + if(this.showuser) this.showuser.bringToFront(); + this._resizeview.bringToFront(); + ]]> + </handler> + + <view name="_chatvideoinner" x="1" y="20" height="${parent.height-21}" width="${parent.width-2}"> + <view name="r" resource="chatbgitem" x="1" y="2" stretches="both" + width="$once{parent.width}" height="$once{parent.height}" /> + <handler name="oninit"> + this.r.setAttribute('frame',5); + this.initH = this.height; + this.initW = this.width; + </handler> + + <baseVideoStreamDevice name="_videostream" mode="broadcast" + width="${parent.width}" height="${parent.height}" bgcolor="black" /> + + </view> +</class> + + +</library> Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectPlayBroadcast.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectPlayBroadcast.lzx?rev=1220424&view=auto ============================================================================== --- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectPlayBroadcast.lzx (added) +++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectPlayBroadcast.lzx Sun Dec 18 15:22:12 2011 @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<library> + + +<!--- + Contains no microphone or camera Object, this view can only + subscribe to a video or live-stream + + --> + +<class name="videoObjectPlayBroadcast" extends="baseVideoObject" isremote="true"> + <attribute name="interviewPodId" value="-1" /> + <attribute name="ratioW" value="1" /> + <attribute name="ratioH" value="1" /> + <handler name="oninit"> + <![CDATA[ + if ($debug) Debug.write("Init videoObjectPlayBroadcast ",this.name); + + //Display widget defined in mother class + if(this.syncuser) this.syncuser.bringToFront() + this._loudness.bringToFront(); + if(this.showuser) this.showuser.bringToFront(); + this._resizeview.bringToFront(); + ]]> + </handler> + + <view name="_chatvideoinner" x="1" y="20" width="${parent.width-2}" height="${parent.height-21}" > + + <attribute name="initH"/> + <attribute name="initW"/> + + <handler name="oninit"> + this.r.setAttribute('frame',5); + this.initH = this.height; + this.initW = this.width; + </handler> + + <view name="r"></view> + <!--<view name="r" resource="chatbgitem" width="${parent.width}"--> + <!--height="${parent.height}" stretches="both" />--> + + <baseVideoStream name="_videostream" bgcolor="black" + width="${parent.width}" height="${parent.height}" /> + + </view> + +</class> + +</library> Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectPlayTestBroadcast.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectPlayTestBroadcast.lzx?rev=1220424&view=auto ============================================================================== --- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectPlayTestBroadcast.lzx (added) +++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectPlayTestBroadcast.lzx Sun Dec 18 15:22:12 2011 @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<library> + + +<!--- + contains microphone and camera for broadcasting, + this class is used only in Meetings-Modus + --> + + +<class name="videoObjectPlayTestBroadcast" extends="view" > + + <view name="_chatvideoinner" x="0" y="0" height="$once{parent.height}" width="$once{parent.width}"> + + <baseVideoStream name="_videostream" mode="broadcast" + width="${parent.width}" height="${parent.height}" bgcolor="black" /> + + </view> +</class> + + +</library> Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectTestBroadcast.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectTestBroadcast.lzx?rev=1220424&view=auto ============================================================================== --- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectTestBroadcast.lzx (added) +++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoObjectTestBroadcast.lzx Sun Dec 18 15:22:12 2011 @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<library> + + +<!--- + contains microphone and camera for broadcasting, + this class is used only in Meetings-Modus + --> + + +<class name="videoObjectTestBroadcast" extends="view" > + + <event name="sendCameraStatus" /> + + <event name="sendMicroStatus" /> + + <view name="_chatvideoinner" x="0" y="0" height="$once{parent.height}" width="$once{parent.width}"> + + <baseVideoStreamDevice name="_videostream" mode="broadcast" + width="${parent.width}" height="${parent.height}" bgcolor="black"> + <handler name="sendCameraStatus" args="camStatus"> + if ($debug) Debug.write("sendCameraStatus",camStatus); + parent.parent.sendCameraStatus.sendEvent(camStatus); + </handler> + + <handler name="sendMicroStatus" args="micStatus"> + if ($debug) Debug.write("sendMicroStatus",micStatus); + parent.parent.sendMicroStatus.sendEvent(micStatus); + </handler> + </baseVideoStreamDevice> + + </view> +</class> + + +</library> Added: incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoUserProfilePic.lzx URL: http://svn.apache.org/viewvc/incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoUserProfilePic.lzx?rev=1220424&view=auto ============================================================================== --- incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoUserProfilePic.lzx (added) +++ incubator/openmeetings/branches/video-components/WebContent/openmeetings/swf10/video/videoUserProfilePic.lzx Sun Dec 18 15:22:12 2011 @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<library> + +<class name="videoUserProfilePic" extends="view" x="1" y="2" width="${parent.width-2}" height="${parent.height-3}" + clip="true" bgcolor="white"> + <attribute name="value" value="null" /> + <handler name="oninit"> + <![CDATA[ + if (this.value.picture_uri==null || this.value.picture_uri.length==0){ + this.value.picture_uri = "d.jpg"; + } else { + this.value.picture_uri = "_profile_"+value.picture_uri; + } + var downloadurl = 'http://'+canvas.rtmphostlocal+':'+canvas.red5httpport + +canvas.httpRootKey+'DownloadHandler?fileName='+value.picture_uri + +'&moduleName=remoteuserprofile&parentPath=&room_id=' + +'&remoteUserid='+this.value.user_id + +'&sid='+canvas.sessionId; + if ($debug) Debug.write(downloadurl); + this._userpic.setAttribute('src',downloadurl); + ]]> + </handler> + <image name="_userpic" stretches="both" width="${parent.width}" height="${parent.height}" /> +</class> + +</library>
