Author: sebawagner
Date: Sat Feb 18 12:59:14 2012
New Revision: 1245912
URL: http://svn.apache.org/viewvc?rev=1245912&view=rev
Log:
OPENMEETINGS-54 fix recorder to use new audio/video components and fix
recording itself to reference correct streams => playback + stop +
calcProgressBar event is fixed
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/src/modules/lzrecordcontent/lzRecordNavigation.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.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=1245912&r1=1245911&r2=1245912&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 12:59:14 2012
@@ -27,21 +27,50 @@
-->
<class name="lzRecordingsViewAdapter" extends="view">
+ <attribute name="currentTime" value="0" type="number" />
+
+ <event name="onUpdateRecordingStreamTime" />
+
+ <method name="getTime">
+ return this.currentTime;
+ </method>
+
+ <handler name="oninit">
+ var t = this;
+ canvas.videoComp_lc.stopRecordingStream = function() {
+ if ($debug) Debug.write("LC stopRecordingStream");
+ t.parent.parent.stopStream();
+ }
+ canvas.videoComp_lc.updateRecordingStreamTime = function(newTime) {
+ if ($debug) Debug.write("LC updateRecordingStreamTime ::",newTime);
+ t.currentTime = newTime;
+ t.onUpdateRecordingStreamTime.sendEvent();
+ }
+ </handler>
+
<method name="connect">
if ($debug) Debug.write("connect");
var tx = this.getAttributeRelative("x",canvas);
var ty = this.getAttributeRelative("y",canvas);
- canvas.lc.send(canvas.rtmp_lc_name, "connectRecordingPlayer",
canvas.thishib.src, tx, ty, parent.width, parent.height);
+ canvas.lc.send(canvas.rtmp_lc_name, "connectRecordingPlayer",
canvas.thishib.src, tx, ty, this.width, this.height);
</method>
<method name="disconnect">
if ($debug) Debug.write("disconnect");
</method>
- <method name="playStream" args="stream">
- if ($debug) Debug.write("playStream ",stream);
+ <method name="playStream" args="stream,delay">
+ var tx = this.getAttributeRelative("x",canvas);
+ var ty = this.getAttributeRelative("y",canvas);
+ this.currentTime = 0;
+ if ($debug) Debug.write("playRecordingStream ",stream, delay,
tx, ty, this.width, this.height);
+ canvas.lc.send(canvas.rtmp_lc_name, "playRecordingStream",
stream, delay, tx, ty, this.width, this.height);
</method>
+ <method name="updateRecordingVideoPosition">
+ canvas.lc.send(canvas.rtmp_lc_name, "updateRecordingVideoPosition",
this.width, this.height);
+ </method>
+
<method name="seek" args="flvTime">
if ($debug) Debug.write("seek ",flvTime);
</method>
@@ -51,7 +80,8 @@
</method>
<method name="stop">
- if ($debug) Debug.write("stop ");
+ if ($debug) Debug.write("SEND stop ");
+ canvas.lc.send(canvas.rtmp_lc_name, "stopRecordingStream");
</method>
</class>
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=1245912&r1=1245911&r2=1245912&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 12:59:14 2012
@@ -34,17 +34,12 @@
<attribute name="isPaused" value="false" type="boolean"/>
- <attribute name="timerDelegate" value="null"/>
<attribute name="timerDelegateStarted" value="false" type="boolean"/>
<attribute name="recordingLog" value="" type="string"/>
<attribute name="deltaInSeconds" value="0" type="number"/>
- <handler name="oninit">
- this.timerDelegate = new LzDelegate( this, "calcProgressBar" );
- </handler>
-
<method name="connect">
this._content._videostream.connect();
</method>
@@ -185,7 +180,6 @@
if (recording.previewImage != null &&
recording.previewImage != "") {
this.recordingName = recording.fileHash;
- this.getStreamLength.doCall();
this._content.initW = recording.flvWidth;
this._content.initH = recording.flvHeight;
@@ -233,9 +227,9 @@
<method name="calcProgressBar">
<![CDATA[
- var flvTime = this._content._videostream._ns.time;
+ var flvTime = this._content._videostream.getTime();
- //if ($debug) Debug.write("flvTime :: ",flvTime);
+ if ($debug) Debug.write("flvTime :calcProgressBar:
",flvTime);
parent._recordingsViewBottom.showProgress(flvTime);
this._progress._progressbar._pointer.setAttribute("visibility","visible");
@@ -262,8 +256,6 @@
this._progress._progressbar._pointer.setAttribute("x",tNewX);
- lz.Timer.addTimer( this.timerDelegate , 1000 );
-
]]>
</method>
@@ -277,13 +269,9 @@
if (!this.timerDelegateStarted) {
this.timerDelegateStarted = true;
- lz.Timer.addTimer( this.timerDelegate , 1000 );
}
this._content._videostream.bringToFront();
-
- if ($debug) Debug.write("PLAY STREAM ",this.recordingName);
-
this._content._videostream.playStream(this.recordingName,0);
}
</method>
@@ -324,7 +312,6 @@
<method name="stopStream">
if (this.timerDelegateStarted) {
this.timerDelegateStarted = false;
- lz.Timer.removeTimer( this.timerDelegate );
}
parent._recordingsViewBottom.stopProgress();
this._progress._progressbar._time.setAttribute("text","");
@@ -369,8 +356,20 @@
</view>
</view>
- <lzRecordingsViewAdapter name="_videostream">
+ <lzRecordingsViewAdapter name="_videostream"
width="${parent.width}" height="${parent.height}">
+ <handler name="onwidth" args="w">
+ this.updateRecordingVideoPosition();
+ </handler>
+
+ <handler name="onheight" args="h">
+ this.updateRecordingVideoPosition();
+ </handler>
+
+ <handler name="onUpdateRecordingStreamTime">
+ if ($debug) Debug.write("updateRecordingStreamTime ");
+ parent.parent.calcProgressBar();
+ </handler>
</lzRecordingsViewAdapter>
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/lzRecordNavigation.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/lzRecordNavigation.lzx?rev=1245912&r1=1245911&r2=1245912&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/lzRecordNavigation.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/lzRecordNavigation.lzx
Sat Feb 18 12:59:14 2012
@@ -278,7 +278,7 @@
</method>
<method name="playRecording">
- if ($debug) Debug.write("playReording :: ");
+ if ($debug) Debug.write("playRecording :showMetaData: ");
parent._recordingsViewBottom.showMetaData(this.currentRecording);
</method>
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=1245912&r1=1245911&r2=1245912&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 12:59:14 2012
@@ -42,8 +42,9 @@
@keywords final -->
<attribute name="soundRefMC" value="null" />
- <event name="onMetaData" />
- <event name="onPlayStatus" />
+ <event name="onMetaDataEvent" />
+ <event name="onPlayStatusEvent" />
+ <event name="onCuePointEvent" />
<!-- save value for restart -->
<attribute name="streamName" />
@@ -62,19 +63,20 @@
<!--if($debug) Debug.write("simpleNetStream onStatus",info);-->
<!--]]></handler>-->
- <handler name="onCuePoint" args="info"><![CDATA[
+ <method name="onCuePoint" args="info"><![CDATA[
if($debug) Debug.write("simpleNetStream onCuePoint",info);
- ]]></handler>
+ this.onCuePointEvent.sendEvent(info);
+ ]]></method>
- <handler name="onPlayStatus" args="info"><![CDATA[
+ <method name="onPlayStatus" args="info"><![CDATA[
if($debug) Debug.write("simpleNetStream onPlayStatus",info);
- this.onPlayStatus.sendEvent(info);
- ]]></handler>
+ this.onPlayStatusEvent.sendEvent(info);
+ ]]></method>
- <handler name="onMetaData" args="info"><![CDATA[
+ <method name="onMetaData" args="info"><![CDATA[
if($debug) Debug.write("simpleNetStream onMetaData",info);
- this.onMetaData.sendEvent(info);
- ]]></handler>
+ this.onMetaDataEvent.sendEvent(info);
+ ]]></method>
<!--- Find the Flash NetConnection object.
@keywords private -->
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx?rev=1245912&r1=1245911&r2=1245912&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx
(original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/hibAdapter.lzx
Sat Feb 18 12:59:14 2012
@@ -28,6 +28,9 @@
client.closeInitTestingApplication = this.closeInitTestingApplication;
//Recording Player
client.connectRecordingPlayer = this.connectRecordingPlayer;
+ client.playRecordingStream = this.playRecordingStream;
+ client.updateRecordingVideoPosition =
this.updateRecordingVideoPosition;
+ client.stopRecordingStream = this.stopRecordingStream;
var rtmpLC:LocalConnection = new LocalConnection();
rtmpLC.connect(canvas.rtmp_lc_name);
@@ -105,20 +108,86 @@
});
</method>
+ <!---
+ plays a recorded stream
+ -->
+ <method name="playRecordingStream"
args="streamName,delay,x,y,width,height">
+ if($debug) Debug.write("playRecordingStream
",streamName,x,y,width,height);
+ if (this.baseVideoStream == null) {
+ return;
+ }
+ this.baseVideoStream.setAttribute("x",x);
+ this.baseVideoStream.setAttribute("y",y);
+ this.baseVideoStream.setAttribute("width",width);
+ this.baseVideoStream.setAttribute("height",height);
+ this.baseVideoStream.setAttribute("visibility","visible");
+ this.baseVideoStream.playRecordingStream(streamName,delay);
+ </method>
+
+ <!---
+ Updates the width/height property of the recording playback video
+ -->
+ <method name="updateRecordingVideoPosition" args="width,height">
+ if (this.baseVideoStream == null) {
+ return;
+ }
+ this.baseVideoStream.setAttribute("width",width);
+ this.baseVideoStream.setAttribute("height",height);
+ </method>
+
+ <!---
+ stops and hides the recording playback video
+ -->
+ <method name="stopRecordingStream">
+ if($debug) Debug.write("stopRecordingStream ");
+ if (this.baseVideoStream == null) {
+ return;
+ }
+ if($debug) Debug.write(" stopRecording ");
+ this.baseVideoStream.stopRecording();
+ this.baseVideoStream.setAttribute("visibility","hidden");
+ </method>
</class>
<class name="playBackVideoStream" extends="baseVideoStream" bgcolor="0x000000"
visibility="hidden">
- <handler name="onPlayStatus" args="info">
- if ($debug) Debug.write("onPlayStatus ",info);
+ <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" ) {
- parent.parent.stopStream();
+ canvas.videoComp_lc.send(canvas.videoComp_lc_name,
'stopRecordingStream');
}
</handler>
- <handler name="onMetaData" args="info">
+ <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 );
+ }
+ </method>
</class>