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/04/07 10:39:57 UTC
svn commit: r1310696 - in
/incubator/openmeetings/trunk/singlewebapp/WebContent:
src/modules/conference/whiteboard/base/
src/modules/lzrecordcontent/contentviews/ swf10/base/remote/
swf10/whiteboard/
Author: sebawagner
Date: Sat Apr 7 08:39:56 2012
New Revision: 1310696
URL: http://svn.apache.org/viewvc?rev=1310696&view=rev
Log:
OPENMEETINGS-141 onMetaData Event not thrown in AS3 Non-Debug version
+Fix playback of video in whiteboard when clicking multiple times video to play the stream
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/lzrecordcontent/contentviews/lzRecordingsViewAdapter.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/whiteboard/playBackWhiteboardVideo.lzx
Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx
URL: http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx?rev=1310696&r1=1310695&r2=1310696&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx Sat Apr 7 08:39:56 2012
@@ -20,7 +20,7 @@
-->
<library>
-<class name="whiteboardVideoPlayer" extends="guiPresenter"
+<class name="whiteboardVideoPlayer" extends="labelExplorerBox" allowDragging="false"
docking="false" resizeable="false" closable="false" minimizable="false"
x="0" y="0" width="${ parent.width }" height="${ parent.height }">
@@ -42,6 +42,8 @@
<attribute name="flv_height" value="0" type="number" />
+ <attribute name="isPaused" value="true" type="boolean" />
+
<handler name="oninit">
if ($debug) Debug.write("whiteboardVideoPlayer :: ",this.fileExplorerItemId);
@@ -51,20 +53,17 @@
var t = this;
canvas.videoComp_lc.stopRecordingStream = function(tName) {
- if ($debug) Debug.write("LC stopRecordingStream",tName,(t.name == tName));
if (t.name == tName) {
t.stopStream();
}
}
canvas.videoComp_lc.metaWhiteboardPlaybackStream = function(tName,duration) {
- if ($debug) Debug.write("LC metaWhiteboardPlaybackStream",tName,duration,(t.name == tName));
if (t.name == tName) {
t.deltaInSeconds = duration;
t.setDuration();
}
}
canvas.videoComp_lc.updateWhiteboardStreamTime = function(tName,time) {
- //if ($debug) Debug.write("LC metaWhiteboardPlaybackStream",tName,time,(t.name == tName));
if (t.name == tName) {
t.currentTime = time;
t.calcProgressBar();
@@ -82,11 +81,11 @@
this.stopStreamPlay();
</handler>
- <handler name="onwidth">
+ <handler name="onwidth" args="w">
calcVideoWidthHeight();
</handler>
- <handler name="onheight">
+ <handler name="onheight" args="h">
calcVideoWidthHeight();
</handler>
@@ -100,9 +99,6 @@
<handler name="ondata" args="value">
<![CDATA[
if ($debug) Debug.write("deleteFileOrFolder: ",value);
- //if (value > 0) {
- // parent.startStream();
- //}
parent.isLoaded = true;
var downloadurl = canvas.protocol + '://'+canvas.rtmphostlocal+':'+canvas.red5httpport
@@ -238,8 +234,8 @@
} else {
tString = Math.round(this.currentTime) + " sec";
}
- this._progress._progressbar._time.setAttribute("text",tString);
var tNewX = Math.round((this._progress._progressbar.width / this.deltaInSeconds) * this.currentTime);
+ this._progress._progressbar._time.setAttribute("text",tString);
this._progress._progressbar._pointer.setAttribute("x",tNewX);
]]>
</method>
@@ -252,11 +248,14 @@
this._progress._progressbar._pointer.setAttribute("x",0);
if ($debug) Debug.write("SEND stopWhiteboardVideo ",this.name);
canvas.lc.send(canvas.rtmp_lc_name, "stopWhiteboardVideo",this.name);
+ this.isPaused = true;
</method>
<method name="toggleStream">
if (canvas.ismoderator) {
- this.startStreamPlay();
+ if (this.isPaused) {
+ this.startStreamPlay();
+ }
}
</method>
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=1310696&r1=1310695&r2=1310696&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 Apr 7 08:39:56 2012
@@ -32,6 +32,7 @@
<event name="onUpdateRecordingStreamTime" />
<event name="onTogglePlayRecordingStream" />
<event name="onRecordingStoppedAndDisconnected" />
+ <event name="onPlayComplete" />
<method name="getTime">
return this.currentTime;
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=1310696&r1=1310695&r2=1310696&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/base/remote/baseVideoStream.lzx Sat Apr 7 08:39:56 2012
@@ -33,6 +33,13 @@
</passthrough>
</when>
</switch>
+
+ <attribute name="yDebug" value="-20" type="number" />
+
+ <method name="getYDebug">
+ this.yDebug += 20;
+ return this.yDebug;
+ </method>
<!--- the NetStream Object
@keywords final -->
@@ -67,6 +74,9 @@
<event name="onMetaDataEvent" />
<event name="onPlayStatusEvent" />
<event name="onCuePointEvent" />
+ <event name="onAsyncError" />
+ <event name="onNetStatus" />
+ <event name="onIoError" />
<!-- save value for restart -->
<attribute name="streamName" />
@@ -78,12 +88,48 @@
if ($debug) Debug.warn("NetConnection is not connected");
}
this._ns = new NetStream(tStream);
- this._ns.client = this;
+ //see: http://livedocs.adobe.com/flash/9.0_de/ActionScriptLangRefV3/flash/net/NetStream.html
+ //according to the docs the construct to catch event has to be implemented like this.
+ var t = this;
+ var clientObject = new Object();
+ clientObject.onMetaData = function(metadata:Object):void {
+ t.onMetaData(metadata);
+ };
+ clientObject.onPlayStatus = function(metadata:Object):void {
+ t.onPlayStatus(metadata);
+ };
+ clientObject.onCuePoint = function(metadata:Object):void {
+ t.onCuePoint(metadata);
+ };
+ 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);
+ };
+ clientObject.asyncError = function(error:Object):void {
+ t.asyncError(error);
+ };
+ this._ns.client = clientObject;
+ </method>
+
+ <method name="asyncError" args="error">
+ if($debug) Debug.write("simpleNetStream asyncError",error);
+ this.onAsyncError.sendEvent(error);
+ </method>
+
+ <method name="netStatus" args="status">
+ if($debug) Debug.write("simpleNetStream netStatus",status);
+ this.onNetStatus.sendEvent(status);
+ </method>
+
+ <method name="ioError" args="error">
+ if($debug) Debug.write("simpleNetStream ioError",error);
+ this.onIoError.sendEvent(error);
</method>
-
- <!--<handler name="onStatus" args="info"><![CDATA[-->
- <!--if($debug) Debug.write("simpleNetStream onStatus",info);-->
- <!--]]></handler>-->
<method name="onCuePoint" args="info"><![CDATA[
if($debug) Debug.write("simpleNetStream onCuePoint",info);
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=1310696&r1=1310695&r2=1310696&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/whiteboard/playBackWhiteboardVideo.lzx (original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/whiteboard/playBackWhiteboardVideo.lzx Sat Apr 7 08:39:56 2012
@@ -45,16 +45,16 @@
</method>
<handler name="onPlayStatusEvent" args="info">
- if ($debug) Debug.write("onPlayStatus ",info);
+ //if ($debug) Debug.write("onPlayStatus ",info);
if (info.code == "NetStream.Play.Complete" ) {
if ($debug) Debug.write("-- stopStream");
//parent.parent.stopStream();
- canvas.videoComp_lc.send(canvas.videoComp_lc_name, 'stopWhiteboardPlaybackStream', this.name);
+ canvas.videoComp_lc.send(canvas.videoComp_lc_name, 'stopRecordingStream', this.name);
}
</handler>
<handler name="onMetaDataEvent" args="info">
- if ($debug) Debug.warn("onMetaData ",info);
- if ($debug) Debug.write("parent.parent.deltaInSeconds ",Number(info.duration));
+ //if ($debug) Debug.warn("onMetaData ",info);
+ //if ($debug) Debug.write("parent.parent.deltaInSeconds ",Number(info.duration));
//parent.parent.deltaInSeconds = Number(info.duration);
canvas.videoComp_lc.send(canvas.videoComp_lc_name, 'metaWhiteboardPlaybackStream', this.name, Number(info.duration));
</handler>