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/02/18 14:27:01 UTC

svn commit: r1245919 - in /incubator/openmeetings/trunk/singlewebapp/WebContent: src/modules/lzrecordcontent/contentviews/ swf10/ swf10/base/remote/ swf10/video/

Author: sebawagner
Date: Sat Feb 18 13:27:00 2012
New Revision: 1245919

URL: http://svn.apache.org/viewvc?rev=1245919&view=rev
Log:
OPENMEETINGS-54 fix recorder to use new audio/video components and fix recording itself to reference correct streams => enable pause(resume has some glitches) split up components

Added:
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/playBackVideoStream.lzx
Modified:
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewMain.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx
    incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/library.lzx

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx?rev=1245919&r1=1245918&r2=1245919&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx Sat Feb 18 13:27:00 2012
@@ -30,6 +30,7 @@
 	<attribute name="currentTime" value="0" type="number" />
 	
 	<event name="onUpdateRecordingStreamTime" />
+	<event name="onTogglePlayRecordingStream" />
     
     <method name="getTime">
         return this.currentTime;
@@ -46,6 +47,11 @@
             t.currentTime = newTime;
             t.onUpdateRecordingStreamTime.sendEvent();
         }
+        canvas.videoComp_lc.togglePlayRecordingStream = function() {
+        	if ($debug) Debug.write("LC togglePlayRecordingStream ::");
+        	t.onTogglePlayRecordingStream.sendEvent();
+        }
+        
 	</handler>
 	
 	<method name="connect">
@@ -76,7 +82,8 @@
 	</method>
 	
 	<method name="pause" args="pauseBool">
-		if ($debug) Debug.write("pauseBool",pauseBool);
+		if ($debug) Debug.write("lzRecordingsViewAdapter::pause value: ",pauseBool);
+		canvas.lc.send(canvas.rtmp_lc_name, "pauseRecordingPlayback", pauseBool);
 	</method>
 	
 	<method name="stop">

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewMain.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewMain.lzx?rev=1245919&r1=1245918&r2=1245919&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewMain.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewMain.lzx Sat Feb 18 13:27:00 2012
@@ -32,8 +32,14 @@
         
         <attribute name="recordingName" value="" type="string"/>
         
+        <!---
+        isPaused is true if a video is running but paused
+         -->
         <attribute name="isPaused" value="false" type="boolean"/>
         
+        <!--- 
+            Shows if there is currently a video running
+         -->
         <attribute name="timerDelegateStarted" value="false" type="boolean"/>
         
         <attribute name="recordingLog" value="" type="string"/>
@@ -128,7 +134,6 @@
         		this.stopStream();
         	    this.isPaused = false;
         	    
-        	    
         	    var hasFailed = false;
         			
     			var tLogString = "";
@@ -367,10 +372,15 @@
             	</handler>
             	
             	<handler name="onUpdateRecordingStreamTime">
-            		if ($debug) Debug.write("updateRecordingStreamTime ");
+            		if ($debug) Debug.write("onUpdateRecordingStreamTime ");
             		parent.parent.calcProgressBar();
             	</handler>
             	
+            	<handler name="onTogglePlayRecordingStream">
+            		if ($debug) Debug.write("onTogglePlayRecordingStream ");
+            		parent.parent.toggleStream();
+            	</handler>
+            	
             </lzRecordingsViewAdapter>
             
             <!--

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=1245919&r1=1245918&r2=1245919&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx Sat Feb 18 13:27:00 2012
@@ -243,6 +243,19 @@
             this._ns.soundTransform = new SoundTransform(volume/100.0);
         }
     </method>
+    
+    <method name="pause" args="pauseStatus">
+    	if ($debug) Debug.write("do Pause",pauseStatus);
+    	if (this._ns==null){
+    		if ($debug) Debug.warn("No NetStream");
+    		return;
+    	}
+    	if (pauseStatus) {
+    		this._ns.pause();
+    	} else {
+    		this._ns.resume();
+    	}
+    </method>
 
 </class>
 

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx?rev=1245919&r1=1245918&r2=1245919&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx Sat Feb 18 13:27:00 2012
@@ -31,6 +31,7 @@
         client.playRecordingStream = this.playRecordingStream;
         client.updateRecordingVideoPosition = this.updateRecordingVideoPosition;
         client.stopRecordingStream = this.stopRecordingStream;
+        client.pauseRecordingPlayback = this.pauseRecordingPlayback;
 
         var rtmpLC:LocalConnection = new LocalConnection();
         rtmpLC.connect(canvas.rtmp_lc_name);
@@ -147,48 +148,18 @@
         this.baseVideoStream.stopRecording();
         this.baseVideoStream.setAttribute("visibility","hidden");
     </method>
-
-</class>
-
-<class name="playBackVideoStream" extends="baseVideoStream" bgcolor="0x000000" visibility="hidden">
-	
-	<attribute name="timerDelegate" value="null"/>
-    <attribute name="timerDelegateStarted" value="false" type="boolean"/>
-	
-	<handler name="oninit">
-		this.timerDelegate = new LzDelegate( this, "calcProgressBar" );
-	</handler>
-	
-	<method name="playRecordingStream" args="streamName,delay">
-		this.playStream(streamName,delay);
-		this.timerDelegateStarted = true;
-        lz.Timer.addTimer( this.timerDelegate , 1000 );
-	</method>
-	
-	<method name="stopRecording">
-		this._stop();
-		lz.Timer.removeTimer(this.timerDelegate);
-		this.timerDelegateStarted = false;
-	</method>
-	
-	<handler name="onPlayStatusEvent" args="info">
-        if ($debug) Debug.write("onPlayStatusEvent ",info);
-        if (info.code ==  "NetStream.Play.Complete" ) {
-            canvas.videoComp_lc.send(canvas.videoComp_lc_name, 'stopRecordingStream');
+    
+    <!--- 
+        pauses the current video or continue at the same position
+     -->
+    <method name="pauseRecordingPlayback" args="pauseBool">
+    	if($debug) Debug.write("pauseRecordingPlayback ");
+        if (this.baseVideoStream == null) {
+            return;
         }
-    </handler>
-    <handler name="onMetaDataEvent" args="info">
-        if ($debug) Debug.write("onMetaData ",info);
-    </handler>
-    
-    <method name="calcProgressBar">
-    	if ($debug) Debug.write("calcProgressBar updateRecordingStreamTime",this._ns.time)
-    	canvas.videoComp_lc.send(canvas.videoComp_lc_name, 'updateRecordingStreamTime',this._ns.time);
-    	if (this.timerDelegateStarted) {
-    		lz.Timer.addTimer( this.timerDelegate , 1000 );
-    	}
+        this.baseVideoStream.pause(pauseBool);
     </method>
-	
+
 </class>
 
 </library>
\ No newline at end of file

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/library.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/library.lzx?rev=1245919&r1=1245918&r2=1245919&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/library.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/library.lzx Sat Feb 18 13:27:00 2012
@@ -29,5 +29,6 @@
     <include href="videoObjectPlayBroadcast.lzx" />
     <include href="videoObjectTestBroadcast.lzx" />
     <include href="videoObjectPlayTestBroadcast.lzx" />
+    <include href="playBackVideoStream.lzx" />
     
 </library>

Added: incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/playBackVideoStream.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/playBackVideoStream.lzx?rev=1245919&view=auto
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/playBackVideoStream.lzx (added)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/playBackVideoStream.lzx Sat Feb 18 13:27:00 2012
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<library>
+
+<!---
+    The playBackVideoStream is used in the recording playerback to show the video
+ -->
+<class name="playBackVideoStream" extends="baseVideoStream" bgcolor="0x000000" visibility="hidden">
+    
+    <attribute name="timerDelegate" value="null"/>
+    <attribute name="timerDelegateStarted" value="false" type="boolean"/>
+    
+    <handler name="oninit">
+        this.timerDelegate = new LzDelegate( this, "calcProgressBar" );
+    </handler>
+    
+    <handler name="onclick">
+        canvas.videoComp_lc.send(canvas.videoComp_lc_name, 'togglePlayRecordingStream');
+    </handler>
+    
+    <method name="playRecordingStream" args="streamName,delay">
+        this.playStream(streamName,delay);
+        this.timerDelegateStarted = true;
+        lz.Timer.addTimer( this.timerDelegate , 1000 );
+    </method>
+    
+    <method name="stopRecording">
+        this._stop();
+        lz.Timer.removeTimer(this.timerDelegate);
+        this.timerDelegateStarted = false;
+    </method>
+    
+    <handler name="onPlayStatusEvent" args="info">
+        if ($debug) Debug.write("onPlayStatusEvent ",info);
+        if (info.code ==  "NetStream.Play.Complete" ) {
+            canvas.videoComp_lc.send(canvas.videoComp_lc_name, 'stopRecordingStream');
+        }
+    </handler>
+    <handler name="onMetaDataEvent" args="info">
+        if ($debug) Debug.write("onMetaData ",info);
+    </handler>
+    
+    <method name="calcProgressBar" args="tObjRef">
+        if ($debug) Debug.write("calcProgressBar updateRecordingStreamTime",this._ns.time)
+        canvas.videoComp_lc.send(canvas.videoComp_lc_name, 'updateRecordingStreamTime',this._ns.time);
+        if (this.timerDelegateStarted) {
+            lz.Timer.addTimer( this.timerDelegate , 1000 );
+        }
+    </method>
+    
+</class>	
+
+</library>
\ No newline at end of file