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 2012/08/26 12:07:40 UTC

svn commit: r1377409 - in /incubator/openmeetings/trunk/singlewebapp/WebContent: src/modules/lzrecordcontent/contentviews/ swf10/base/remote/ swf10/lzrecorder/ swf10/whiteboard/

Author: sebawagner
Date: Sun Aug 26 10:07:40 2012
New Revision: 1377409

URL: http://svn.apache.org/viewvc?rev=1377409&view=rev
Log:
Fixes OPENMEETINGS-415 NetStream NetStatus event does not work when attached to client object 

Modified:
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewBottom.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/lzrecorder/playBackVideoStream.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/whiteboard/playBackWhiteboardVideo.lzx

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewBottom.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewBottom.lzx?rev=1377409&r1=1377408&r2=1377409&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewBottom.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewBottom.lzx Sun Aug 26 10:07:40 2012
@@ -142,29 +142,31 @@
                 
                 if ($debug) Debug.write("widthItem ",widthItem);
                 
-                for (var i=0;i<rec.flvRecordingMetaData.length;i++) {
-                    
-                    if ($debug) Debug.write("isScreenData :: ",rec.flvRecordingMetaData[i].isScreenData);
-                    
-                    if (!rec.flvRecordingMetaData[i].isScreenData && 
-                           ( rec.flvRecordingMetaData[i].isAudioOnly ||
-                              ( !rec.flvRecordingMetaData[i].isAudioOnly && !rec.flvRecordingMetaData[i].isVideoOnly )
-                           )
-                        ) {
-	                    var startTimeInSeconds = Math.round((rec.flvRecordingMetaData[i].recordStart.getTime() - rec.recordStart.getTime())/1000);
-	                    var deltaInSecondsNew = Math.round((rec.flvRecordingMetaData[i].recordEnd.getTime() - rec.flvRecordingMetaData[i].recordStart.getTime())/1000);
+                if (rec.flvRecordingMetaData != null) {
+	                for (var i=0;i<rec.flvRecordingMetaData.length;i++) {
 	                    
-	                    var widthItem = Math.round(deltaInSecondsNew/this.pixelFactor);
-	                    var xItem = Math.round(startTimeInSeconds/this.pixelFactor);
-	                    if ($debug) Debug.write("widthItem ",i,widthItem,xItem);
+	                    if ($debug) Debug.write("isScreenData :: ",rec.flvRecordingMetaData[i].isScreenData);
 	                    
-		                new lz.userActivityItem(this.content._content.content.content,{
-	                                                  x:xItem,width:widthItem,
-		                                              userText:rec.flvRecordingMetaData[i].freeTextUserName
-		                                        });
-                    }    
-                    
-                }
+	                    if (!rec.flvRecordingMetaData[i].isScreenData && 
+	                           ( rec.flvRecordingMetaData[i].isAudioOnly ||
+	                              ( !rec.flvRecordingMetaData[i].isAudioOnly && !rec.flvRecordingMetaData[i].isVideoOnly )
+	                           )
+	                        ) {
+		                    var startTimeInSeconds = Math.round((rec.flvRecordingMetaData[i].recordStart.getTime() - rec.recordStart.getTime())/1000);
+		                    var deltaInSecondsNew = Math.round((rec.flvRecordingMetaData[i].recordEnd.getTime() - rec.flvRecordingMetaData[i].recordStart.getTime())/1000);
+		                    
+		                    var widthItem = Math.round(deltaInSecondsNew/this.pixelFactor);
+		                    var xItem = Math.round(startTimeInSeconds/this.pixelFactor);
+		                    if ($debug) Debug.write("widthItem ",i,widthItem,xItem);
+		                    
+			                new lz.userActivityItem(this.content._content.content.content,{
+		                                                  x:xItem,width:widthItem,
+			                                              userText:rec.flvRecordingMetaData[i].freeTextUserName
+			                                        });
+	                    }    
+	                    
+	                }
+	            }
                 
                 if ($debug) Debug.write("deltaInSeconds :: ",deltaInSeconds,(deltaInSeconds/60));
                 

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx?rev=1377409&r1=1377408&r2=1377409&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx Sun Aug 26 10:07:40 2012
@@ -28,6 +28,7 @@
     <switch>
     <when property="$as3">
         <passthrough>
+        	import flash.events.*;
             import flash.net.*;
             import flash.media.*
         </passthrough>
@@ -104,9 +105,6 @@
 		clientObject.ioError = function(error:Object):void {
 			t.ioError(error);
 		};
-		clientObject.ioError = function(error:Object):void {
-			t.ioError(error);
-		};
 		clientObject.netStatus = function(status:Object):void {
 			t.netStatus(status);
 		};
@@ -114,6 +112,13 @@
 			t.asyncError(error);
 		};
 		this._ns.client = clientObject;
+		//this is a workaround, attaching the event to the client object does not work
+		this._ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus2);
+	</method>
+	
+	<method name="onNetStatus2" args="evt">
+		if($debug) Debug.write("netStream_onNetStatus: " , evt.info.code, evt.target);
+		this.onNetStatus.sendEvent(evt.info);
 	</method>
 	
 	<method name="asyncError" args="error">

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/lzrecorder/playBackVideoStream.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/lzrecorder/playBackVideoStream.lzx?rev=1377409&r1=1377408&r2=1377409&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/lzrecorder/playBackVideoStream.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/lzrecorder/playBackVideoStream.lzx Sun Aug 26 10:07:40 2012
@@ -48,9 +48,9 @@
         this.timerDelegateStarted = false;
     </method>
     
-    <handler name="onPlayStatusEvent" args="info">
-        if ($debug) Debug.write("onPlayStatusEvent ",info);
-        if (info.code ==  "NetStream.Play.Complete" ) {
+    <handler name="onNetStatus" args="info">
+        if ($debug) Debug.write("onNetStatus ",info);
+        if (info.code ==  "NetStream.Play.Stop" ) {
             canvas.videoComp_lc.send(canvas.videoComp_lc_name, 'stopRecordingStream');
         }
     </handler>

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/whiteboard/playBackWhiteboardVideo.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/whiteboard/playBackWhiteboardVideo.lzx?rev=1377409&r1=1377408&r2=1377409&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/whiteboard/playBackWhiteboardVideo.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/whiteboard/playBackWhiteboardVideo.lzx Sun Aug 26 10:07:40 2012
@@ -44,9 +44,9 @@
         this.timerDelegateStarted = false;
     </method>
 	
-	<handler name="onPlayStatusEvent" args="info">
-        //if ($debug) Debug.write("onPlayStatus ",info);
-        if (info.code ==  "NetStream.Play.Complete" ) {
+	<handler name="onNetStatus" args="info">
+        //if ($debug) Debug.write("onNetStatus ",info);
+        if (info.code ==  "NetStream.Play.Stop" ) {
         	if ($debug) Debug.write("-- stopStream");
             //parent.parent.stopStream();
             canvas.videoComp_lc.send(canvas.videoComp_lc_name, 'stopRecordingStream', this.name);