Author: solomax
Date: Sat Dec  5 19:39:45 2015
New Revision: 1718119

URL: http://svn.apache.org/viewvc?rev=1718119&view=rev
Log:
[OPENMEETINGS-1279, OPENMEETINGS-1284] WB video is fixed

Removed:
    
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/playBackWhiteboardVideo.lzx
Modified:
    
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/main.lzx
    
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx
    
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/library.lzx

Modified: 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx?rev=1718119&r1=1718118&r2=1718119&view=diff
==============================================================================
--- 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
 (original)
+++ 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
 Sat Dec  5 19:39:45 2015
@@ -635,42 +635,6 @@
     </method>
     
     <!---
-        Start playback of whiteboard video
-     -->
-    <method name="playbackWhiteboardVideo" 
args="tName,recordingName,seek,tx,ty,twidth,theight">
-       <![CDATA[
-          if($debug) Debug.write("playbackWhiteboardVideo 
",tName,recordingName,seek,tx,ty,twidth,theight);
-          if (this[tName]) {
-                if ($debug) Debug.warn("playbackWhiteboardVideo there was 
already a video with the same name");
-                this[tName]._stop();
-                this[tName].destroy();
-          }
-          
-          new lz.playBackWhiteboardVideo(canvas.whiteboardVideos, {
-                              name:tName,
-                              x:tx,
-                              y:ty,
-                                  width:twidth,
-                                  height:theight
-                          });
-          
-          canvas.whiteboardVideos[tName].playVideoStream(recordingName,0);
-       ]]>
-    </method>
-    
-       <method name="stopWhiteboardVideo" args="tName">
-       <![CDATA[
-               if($debug) Debug.write("stopWhiteboardVideo ",tName);
-               if (canvas.whiteboardVideos[tName]) {
-                       canvas.whiteboardVideos[tName].stopVideo();
-                       canvas.whiteboardVideos[tName].destroy();
-               } else {
-                       if ($debug) Debug.warn("stopWhiteboardVideo could not 
find video to stop");
-               }
-       ]]>
-    </method>
-    
-    <!---
        #################################
        Methods to handle screen sharing video playback and cursor
      -->
@@ -734,7 +698,6 @@
                 canvas.screenSharingDialogContainer.destroy();
                 canvas.screenSharingDialogContainer = null;
             }
-            canvas.whiteboardVideos.clearAll();
             parent._videoComponent.clearAll();
         ]]>
     </method>

Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/main.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/main.lzx?rev=1718119&r1=1718118&r2=1718119&view=diff
==============================================================================
--- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/main.lzx 
(original)
+++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/main.lzx Sat 
Dec  5 19:39:45 2015
@@ -8,8 +8,8 @@
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
-      http://www.apache.org/licenses/LICENSE-2.0
-         
+         http://www.apache.org/licenses/LICENSE-2.0
+                 
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -36,8 +36,7 @@
                        <debug fontsize="11" 
oninit="Debug.showInternalProperties = true" width="80%" y="50%" x="0" 
height="50%" />
                </when>
                <otherwise>
-                       <method name="doDebugInit">
-                       </method>
+                       <method name="doDebugInit"/>
                </otherwise>
        </switch>
 
@@ -45,20 +44,17 @@
        <include href="resources/" /> 
        <include href="modules/" />
        <include href="plugins/" />  
-    <include href="testVideoObject.lzx" />
-    <include href="video/" />
-    <include href="screensharing/" />
-    <include href="audioVideoTest/" />
-    <include href="lzrecorder/" />
-    <include href="commonVideoViewContentSWF10.lzx" />
-    <include href="dragHelper.lzx" />
+       <include href="testVideoObject.lzx" />
+       <include href="video/" />
+       <include href="screensharing/" />
+       <include href="audioVideoTest/" />
+       <include href="lzrecorder/" />
+       <include href="commonVideoViewContentSWF10.lzx" />
+       <include href="dragHelper.lzx" />
 
        <silverstyle name="defaultstyle" isdefault="true" canvascolor="white" />
-
        <silverstyle name="componentStyle" basecolor="0xFFFFFF" 
textcolor="0x000000" />
-
        <silverstyle name="itemStyle" textcolor="0xFFFFFF" />
-
        <whitestyle name="menuStyle" textcolor="0x000000" />
 
        <!-- main colors: 264269 -->
@@ -74,134 +70,123 @@
                canvas.removeModeratorList = [];
        ]]></handler>
        
-<handler name="onerror" args="errmsg">
-       canvas.remoteLogWrite("error " + errmsg);
-</handler>
-
-<!-- View for Contents. All Windows will be loaded on this view. -->
-<view name="main_content" y="${ canvas.naviHeightDelta }" 
width="${canvas.width}" 
-                           height="${ canvas.height-canvas.naviHeightDelta }"
-                           visibility="hidden" showhandcursor="false">
-    
-    <handler name="onmouseover">
-        setCurrentMouseWheelObject(this._scrollbar);
-    </handler>
-    <handler name="onmouseout">
-        disableCurrentMouseWheelObject();
-    </handler>
-    
-    <view x="0" name="_content" >
-        <view name="inner" />
-        <method name="clearAll">
-            <![CDATA[
-                canvas.commonVideoViewContent.clearAll();
-                if($debug) 
Debug.write("main.lzx/main_content._content.inner.clearAll(): 
",this.inner,this.inner.subviews.length);
-                if (this.inner.subviews != null) {
-                       if (this.inner.subviews[0] != null) {
-                               var baseContent = 
this.inner.subviews[0].close();
-                               for (var eg in this.inner.subviews) {
-                                   if($debug) 
Debug.write("main.lzx/main_content._content.inner.clearAll()-subviews: 
",this.inner.subviews[eg]);
-                                   if (eg!=0) this.inner.subviews[eg].close(); 
              
-                               }
-                       }
-                }
-                return baseContent;
-            ]]>
-        </method>
-    </view>
-    <om_hscrollbar name="_scrollbarH" id="_mainScrollHBar" visibility="hidden" 
/>
-    <om_vscrollbar name="_scrollbar" id="_mainScrollBar" />
-</view>  
-  
-<!-- View for Navigation-bar and App-name -->
-<view name="_mainbgcontentNavi" x="0" y="0" clip="true" width="100%" 
height="${ canvas.naviHeight }" visibility="hidden">
-       <image id="mainApplogo" visible="false" />
-       <text id="mainBaseText" visible="false" fgcolor="${ 
canvas.fontColorHeader }" fontsize="20" fontstyle="bold">
-               <switch>
-                       <when property="$as3">
-                               <passthrough>
-                                       import flash.filters.DropShadowFilter;
-                               </passthrough>
-                       </when>
-               </switch>
-               <method name="setShadow" >
+       <handler name="onerror" args="errmsg">
+               canvas.remoteLogWrite("error " + errmsg);
+       </handler>
+       
+       <!-- View for Contents. All Windows will be loaded on this view. -->
+       <view name="main_content" y="${ canvas.naviHeightDelta }" 
width="${canvas.width}" 
+                                       height="${ 
canvas.height-canvas.naviHeightDelta }"
+                                       visibility="hidden" 
showhandcursor="false">
+               
+               <handler name="onmouseover">
+                       setCurrentMouseWheelObject(this._scrollbar);
+               </handler>
+               <handler name="onmouseout">
+                       disableCurrentMouseWheelObject();
+               </handler>
+               
+               <view x="0" name="_content" >
+                       <view name="inner" />
+                       <method name="clearAll">
+                       <![CDATA[
+                               canvas.commonVideoViewContent.clearAll();
+                               if($debug) 
Debug.write("main.lzx/main_content._content.inner.clearAll(): 
",this.inner,this.inner.subviews.length);
+                               if (this.inner.subviews != null) {
+                                       if (this.inner.subviews[0] != null) {
+                                               var baseContent = 
this.inner.subviews[0].close();
+                                               for (var eg in 
this.inner.subviews) {
+                                                       if($debug) 
Debug.write("main.lzx/main_content._content.inner.clearAll()-subviews: 
",this.inner.subviews[eg]);
+                                                       if (eg!=0) 
this.inner.subviews[eg].close();                        
+                                               }
+                                       }
+                               }
+                               return baseContent;
+                       ]]>
+                       </method>
+               </view>
+               <om_hscrollbar name="_scrollbarH" id="_mainScrollHBar" 
visibility="hidden" />
+               <om_vscrollbar name="_scrollbar" id="_mainScrollBar" />
+       </view>  
+         
+       <!-- View for Navigation-bar and App-name -->
+       <view name="_mainbgcontentNavi" x="0" y="0" clip="true" width="100%" 
height="${ canvas.naviHeight }" visibility="hidden">
+               <image id="mainApplogo" visible="false" />
+               <text id="mainBaseText" visible="false" fgcolor="${ 
canvas.fontColorHeader }" fontsize="20" fontstyle="bold">
+                       <switch>
+                               <when property="$as3">
+                                       <passthrough>
+                                               import 
flash.filters.DropShadowFilter;
+                                       </passthrough>
+                               </when>
+                       </switch>
+                       <method name="setShadow" >
+                       <![CDATA[
+                               if (this.isinited && false){
+                                       this.normalMC = this.getDisplayObject();
+                                       this.displacementMap = new 
DropShadowFilter();
+                                       this.normalMC.filters = 
[this.displacementMap];
+                               }
+                       ]]>
+                       </method>
+                       <handler name="onclick">
+                               
lz.Browser.loadURL(canvas.currentappnameurl,"_blank");
+                       </handler>
+                       <labelTooltip id="mainBaseTextLabel" />
+               </text>
+               <handler name="oninit">
+                       var cmenu = new LzContextMenu();
+                       //if($debug) Debug.write("cmenu: ", cmenu, this);
+                       this.contextmenu = cmenu;
+                       cmenu.hideBuiltInItems();
+               </handler>       
+       </view>
+       
+       <!-- View for Conference menu bar at the top side. Visible on 
conference -->
+       <view name="_conferencemenu" y="0" x="0" width="100%" height="20" 
visible="false" > 
+               <method name="removeAll">
                <![CDATA[
-                       if (this.isinited && false){
-                               this.normalMC = this.getDisplayObject();
-                               this.displacementMap = new DropShadowFilter();
-                               this.normalMC.filters = [this.displacementMap];
+                       if($debug) 
Debug.write("main.lzx/_coferencemenu.removeAll(): ");
+                       while (this.subviews.length > 0) {
+                               this.subviews[0].destroy();
                        }
+                       parent._moderatormenu.removeAll();
                ]]>
                </method>
-               <handler name="onclick">
-                       lz.Browser.loadURL(canvas.currentappnameurl,"_blank");
-               </handler>
-               <labelTooltip id="mainBaseTextLabel" />
-       </text>
-       <handler name="oninit">
-               var cmenu = new LzContextMenu();
-               //if($debug) Debug.write("cmenu: ", cmenu, this);
-               this.contextmenu = cmenu;
-               cmenu.hideBuiltInItems();
-       </handler>     
-</view>
-
-<!-- View for Conference menu bar at the top side. Visible on conference -->
-<view name="_conferencemenu" y="0" x="0" width="100%" height="20" 
visible="false" > 
-    <method name="removeAll">
-        <![CDATA[
-            if($debug) Debug.write("main.lzx/_coferencemenu.removeAll(): ");
-            while (this.subviews.length > 0) {
-                this.subviews[0].destroy();
-            }
-            parent._moderatormenu.removeAll();
-        ]]>
-    </method>
-</view> 
-
-<view name="_moderatormenu" y="0" x="0" width="100%" height="20">
-    <method name="removeAll">
-        <![CDATA[
-            if($debug) Debug.write("main.lzx/_moderatormenu.removeAll(): ");
-            while (this.subviews.length > 0) {
-                this.subviews[0].destroy();
-            }
-        ]]>
-    </method>
-</view>  
-    
-<!-- View for "Loading" -->
-<view name="_loadingAll" visible="false" opacity="0.7" 
-    width="${ canvas.width }" height="${ canvas.height }" 
-    bgcolor="0xFFFFFF" clickable="true" showhandcursor="false">
-    <method name="hideContentOnly">
-       this.showLoadingAnni.setAttribute('started', true);
-        this.setAttribute("visibility","visible");
-        this._text.setAttribute("visibility","hidden");
-    </method>
-    <method name="showLoading">
-       this.showLoadingAnni.setAttribute('started', true);
-        this.setAttribute("visibility","visible");
-        this._text.setAttribute("visibility","visible");
-    </method>
-    <method name="hideLoading">
-        this.setAttribute("visibility","hidden");
-    </method>
-    <animator name="showLoadingAnni" attribute="opacity" 
-               from="0" to="0.7" started="false" duration="250" />
-    <text name="_text" align="right" y="56" fontsize="14" 
fgcolor="red">Loading...</text>
-</view>
-
-<view name="inner"></view>
-
-       <view name="whiteboardVideos">
-               <method name="clearAll">
+       </view> 
+       
+       <view name="_moderatormenu" y="0" x="0" width="100%" height="20">
+               <method name="removeAll">
                <![CDATA[
-                       while(this.subviews.length > 0) {
-                               this.subviews[0].stopVideo();
+                       if($debug) 
Debug.write("main.lzx/_moderatormenu.removeAll(): ");
+                       while (this.subviews.length > 0) {
                                this.subviews[0].destroy();
                        }
                ]]>
                </method>
+       </view>  
+               
+       <!-- View for "Loading" -->
+       <view name="_loadingAll" visible="false" opacity="0.7" 
+               width="${ canvas.width }" height="${ canvas.height }" 
+               bgcolor="0xFFFFFF" clickable="true" showhandcursor="false">
+               <method name="hideContentOnly">
+                       this.showLoadingAnni.setAttribute('started', true);
+                       this.setAttribute("visibility","visible");
+                       this._text.setAttribute("visibility","hidden");
+               </method>
+               <method name="showLoading">
+                       this.showLoadingAnni.setAttribute('started', true);
+                       this.setAttribute("visibility","visible");
+                       this._text.setAttribute("visibility","visible");
+               </method>
+               <method name="hideLoading">
+                       this.setAttribute("visibility","hidden");
+               </method>
+               <animator name="showLoadingAnni" attribute="opacity" 
+                               from="0" to="0.7" started="false" 
duration="250" />
+               <text name="_text" align="right" y="56" fontsize="14" 
fgcolor="red">Loading...</text>
        </view>
+       
+       <view name="inner"></view>
 </canvas>

Modified: 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx?rev=1718119&r1=1718118&r2=1718119&view=diff
==============================================================================
--- 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx
 (original)
+++ 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx
 Sat Dec  5 19:39:45 2015
@@ -8,8 +8,8 @@
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
-      http://www.apache.org/licenses/LICENSE-2.0
-         
+         http://www.apache.org/licenses/LICENSE-2.0
+                 
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -20,56 +20,26 @@
 -->
 <library>
 
-<class name="whiteboardVideoPlayer" extends="labelExplorerBox" 
allowDragging="false"
-    docking="false" resizeable="false" closable="false" 
-    x="0" y="0" width="${ parent.width }" height="${ parent.height }">
+<class name="whiteboardVideoPlayer" extends="labelExplorerBox" 
allowDragging="false" 
+               docking="false" resizeable="false" closable="false" 
+               x="0" y="0" width="${ parent.width }" height="${ parent.height 
- 10 }">
        
        <attribute name="fileId" value="0" type="number" />
-       
-    <attribute name="timerDelegateStarted" value="false" type="boolean" />
-    
-    <attribute name="deltaInSeconds" value="0" type="number" />
-    
-    <attribute name="currentTime" value="0" type="number" />   
-    
-    <attribute name="recordingName" value="" type="string" />
-    
-    <attribute name="isLoaded" value="false" type="boolean" />
-       
+       <attribute name="timerDelegateStarted" value="false" type="boolean" />
+       <attribute name="deltaInSeconds" value="0" type="number" />
+       <attribute name="currentTime" value="0" type="number" />        
+       <attribute name="recordingName" value="" type="string" />
+       <attribute name="isLoaded" value="false" type="boolean" />
        <attribute name="sendInit" value="false" type="boolean" />
-       
        <attribute name="flv_width" value="0" type="number" /> 
-       
-    <attribute name="flv_height" value="0" type="number" /> 
-    
-    <attribute name="isPaused" value="true" type="boolean" />
-    
+       <attribute name="flv_height" value="0" type="number" /> 
+       <attribute name="isPaused" value="true" type="boolean" />
        <handler name="oninit">
                if ($debug) Debug.write("whiteboardVideoPlayer :: 
",this.fileId);
                
                this.recordingName = "UPLOADFLV_" + this.fileId + ".flv";
                calcVideoWidthHeight();
                this.copyFileToCurrentRoom.doCall();
-               
-               var t = this;
-               canvas.videoComp_lc.stopRecordingStream = function(tName) {
-            if (t.name == tName) {
-               t.stopStream();
-            }
-        }
-        canvas.videoComp_lc.metaWhiteboardPlaybackStream = 
function(tName,duration) {
-            if (t.name == tName) {
-                t.deltaInSeconds = duration;
-                t.setDuration();
-            }
-        }
-        canvas.videoComp_lc.updateWhiteboardStreamTime = function(tName,time) {
-            if (t.name == tName) {
-                t.currentTime = time;
-                t.calcProgressBar();
-            }
-        }
-               
        </handler>
        
        <handler name="prepareForDelete" args="tRef">
@@ -92,253 +62,270 @@
        <!--
        public Long copyFileToCurrentRoom(String SID, Long flvFileExplorerId)
         -->
-    <netRemoteCallHib name="copyFileToCurrentRoom" 
funcname="fileservice.copyFileToCurrentRoom" 
-        remotecontext="$once{ canvas.thishib }" > 
-        <netparam><method name="getValue">return 
canvas.sessionId;</method></netparam>
-        <netparam><method name="getValue">return 
parent.parent.fileId;</method></netparam>
-        <handler name="ondata" args="value">
-               <![CDATA[    
-                   if ($debug) Debug.write("deleteFileOrFolder: ",value);
-                   parent.isLoaded = true;
-                   
-                   var downloadurl = 
canvas.getUrl()+'DownloadHandler?fileName=UPLOADFLV_'+parent.fileId+'.jpg'
-                                
+'&moduleName=lzRecorderApp&parentPath=&room_id='
-                                +'&sid='+canvas.sessionId;
-                   
-                
parent._content._preview.imagePreview.setAttribute("src",downloadurl)
-                    
-                parent._content._preview.bringToFront();
-                                
-                   if (parent.sendInit) {
-                       parent.parent.sendNewVideoRemote(parent);
-                   }
-            ]]>
-        </handler>
-    </netRemoteCallHib>
-    
-    <method name="startStreamPlay">
-       parent.playFLV(this,true);
-       this.startStream();
-    </method>
-    
-    <method name="stopStreamPlay">
-       parent.playFLV(this,false);
-       this.stopStream();
-    </method>
-    
-    <method name="playRemote">
-       this.startStream();
-    </method>
-    
-    <method name="stopRemote">
-        this.stopStream();
-    </method>
-    
-    <method name="startStream">
-       <![CDATA[
-               if (!this.isLoaded) {
-                       return;
-               }
-               
-               if ($debug) Debug.write("startStream ",this.recordingName);
-               
-               if (this.recordingName != "") {
-                       
-                       this.isPaused = false;
-                       
-                       if (!this.timerDelegateStarted) {
-                               this.timerDelegateStarted = true;
-                   }
-                   
-                       if ($debug) Debug.write("PLAY STREAM 
",this.recordingName);
-                       
-                       var tObjectDimension = calcVideoWidthHeight();
-                       
-                       if ($debug) Debug.write("SEND 
",this.recordingName,0,tObjectDimension.x,tObjectDimension.y,tObjectDimension.width,tObjectDimension.height);
-                       
-                   // 
this._content._videostream.playStream(this.recordingName,0,tObjectDimension.x,tObjectDimension.y,tObjectDimension.width,tObjectDimension.height);
-                   
-                       var tx = 
this.getAttributeRelative("x",canvas)+tObjectDimension.x+this._content.x;
-                       var ty = 
this.getAttributeRelative("y",canvas)+tObjectDimension.y+this._content.y;
-                       
-                   
canvas.commonVideoViewContent.playbackWhiteboardVideo(this.name,this.recordingName,0,tx,ty,tObjectDimension.width,tObjectDimension.height);
-               }
-       ]]>
-    </method>   
-    
-    <!---
-        calculates the new x, y, width and height of the video so that it is 
100% 
-        visible in the container
-     -->
-    <method name="calcVideoWidthHeight">
-        <![CDATA[
-        
-            if ($debug) Debug.write("calcVideoWidthHeight 
",this.flv_width,this.flv_height);
-        
-            var ratio = this.flv_width / this.flv_height;
-            
-            //max height of container is new height of video;
-            //calc new width and x-position of video
-            var newHeight = this._content.height;
-            var newWidth = ratio * newHeight; 
-            var newx = (this._content.width - newWidth) / 2;
-            var newy = 0;
-            
-            if ($debug) 
Debug.write("calcVideoWidthHeight",ratio,this._content.width,this._content.height,newWidth,newHeight,newx,newy);
-         
-            if (newWidth > this._content.width) {
-                newWidth = this._content.width;
-                newHeight = newWidth / ratio;
-                newx = 0;
-                newy = (this._content.height - newHeight) / 2;
-            }
-            
-            var t = {'x':newx,'y':newy,'width':newWidth,'height':newHeight};
-            
-            if ($debug) Debug.write("t",t);
-            
-            this._content._preview.setAttribute("x",newx);
-            this._content._preview.setAttribute("y",newy);
-            this._content._preview.setAttribute("width",newWidth);
-            this._content._preview.setAttribute("height",newHeight);
-            
-            return {'x':newx,'y':newy,'width':newWidth,'height':newHeight};
-        ]]>
-    </method>
-    
-    <method name="setDuration">
-       <![CDATA[
-           if ($debug) Debug.write("setDuration ",this.deltaInSeconds);
-           var tString = "";
-           if (this.deltaInSeconds > 60) {
-               var minutes = Math.floor(this.deltaInSeconds/60);
-               var restSeconds = Math.round(this.deltaInSeconds) - ( minutes * 
60 );
-               tString = minutes + " min " + restSeconds + " sec";
-           } else {
-               tString = Math.round(this.deltaInSeconds) + " sec";
-           }
-           this._progress._progressbar._duration.setAttribute("text",tString);
-        ]]>
-    </method>
-    
-    <method name="calcProgressBar">
-       <![CDATA[
-          if ($debug) Debug.write("calcProgressBar ",this.currentTime);
-          
this._progress._progressbar._pointer.setAttribute("visibility","visible");
-          var tString = "";
-          if (this.currentTime > 60) {
-                  var minutes = Math.floor(this.currentTime/60);
-                  var restSeconds = Math.round(this.currentTime) - ( minutes * 
60 );
-                  tString = minutes + " min " + restSeconds + " sec";
-          } else {
-                  tString = Math.round(this.currentTime) + " sec";
-          }
-          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> 
+       <netRemoteCallHib name="copyFileToCurrentRoom" 
funcname="fileservice.copyFileToCurrentRoom" 
+               remotecontext="$once{ canvas.thishib }" > 
+               <netparam><method name="getValue">return 
canvas.sessionId;</method></netparam>
+               <netparam><method name="getValue">return 
parent.parent.fileId;</method></netparam>
+               <handler name="ondata" args="value">
+               <![CDATA[       
+                       if ($debug) Debug.write("deleteFileOrFolder: ",value);
+                       parent.isLoaded = true;
+                       
+                       var downloadurl = 
canvas.getUrl()+'DownloadHandler?fileName=UPLOADFLV_'+parent.fileId+'.jpg'
+                                                       
+'&moduleName=lzRecorderApp&parentPath=&room_id='
+                                                       
+'&sid='+canvas.sessionId;
+                       
+                       
parent._content._preview.imagePreview.setAttribute("src",downloadurl)
+                               
+                       parent._content._preview.bringToFront();
+                                                       
+                       if (parent.sendInit) {
+                               parent.parent.sendNewVideoRemote(parent);
+                       }
+               ]]>
+               </handler>
+       </netRemoteCallHib>
+       
+       <method name="startStreamPlay">
+               parent.playFLV(this,true);
+               this.startStream();
+       </method>
+       
+       <method name="stopStreamPlay">
+               parent.playFLV(this,false);
+               this.stopStream();
+       </method>
+       
+       <method name="playRemote">
+               this.startStream();
+       </method>
+       
+       <method name="stopRemote">
+               this.stopStream();
+       </method>
+       
+       <method name="startStream">
+       <![CDATA[
+               if (!this.isLoaded) {
+                       return;
+               }
+               if ($debug) Debug.write("startStream ",this.recordingName);
+               
+               if (this.recordingName != "") {
+                       this.isPaused = false;
+                       
+                       if (!this.timerDelegateStarted) {
+                               this.timerDelegateStarted = true;
+                       }
+                       this._content._stop();
+                       var tObjectDimension = calcVideoWidthHeight();
+                       if ($debug) Debug.write("startStream::tObjectDimension 
", this.recordingName, tObjectDimension);
+                       this._content._preview.setAttribute('visible', false);
+                       this._content.playVideoStream(this.recordingName, 0);
+               }
+       ]]>
+       </method>   
+       
+       <!---
+               calculates the new x, y, width and height of the video so that 
it is 100% 
+               visible in the container
+        -->
+       <method name="calcVideoWidthHeight">
+       <![CDATA[
+       
+               if ($debug) Debug.write("calcVideoWidthHeight 
",this.flv_width,this.flv_height);
+       
+               var ratio = this.flv_width / this.flv_height;
+               
+               //max height of container is new height of video;
+               //calc new width and x-position of video
+               var newHeight = this._content.height;
+               var newWidth = ratio * newHeight; 
+               var newx = (this._content.width - newWidth) / 2;
+               var newy = 0;
+               
+               if ($debug) 
Debug.write("calcVideoWidthHeight",ratio,this._content.width,this._content.height,newWidth,newHeight,newx,newy);
+        
+               if (newWidth > this._content.width) {
+                       newWidth = this._content.width;
+                       newHeight = newWidth / ratio;
+                       newx = 0;
+                       newy = (this._content.height - newHeight) / 2;
+               }
+               
+               var t = {'x':newx,'y':newy,'width':newWidth,'height':newHeight};
+               
+               if ($debug) Debug.write("t",t);
+               
+               this._content._preview.setAttribute("x",newx);
+               this._content._preview.setAttribute("y",newy);
+               this._content._preview.setAttribute("width",newWidth);
+               this._content._preview.setAttribute("height",newHeight);
+               
+               return {'x':newx,'y':newy,'width':newWidth,'height':newHeight};
+       ]]>
+       </method>
+       
+       <method name="setDuration">
+       <![CDATA[
+          if ($debug) Debug.write("setDuration ",this.deltaInSeconds);
+          var tString = "";
+          if (this.deltaInSeconds > 60) {
+                  var minutes = Math.floor(this.deltaInSeconds/60);
+                  var restSeconds = Math.round(this.deltaInSeconds) - ( 
minutes * 60 );
+                  tString = minutes + " min " + restSeconds + " sec";
+          } else {
+                  tString = Math.round(this.deltaInSeconds) + " sec";
+          }
+          this._progress._progressbar._duration.setAttribute("text",tString);
+       ]]>
+       </method>
+       
+       <method name="calcProgressBar">
+       <![CDATA[
+          if ($debug) Debug.write("calcProgressBar ",this.currentTime);
+          
this._progress._progressbar._pointer.setAttribute("visibility","visible");
+          var tString = "";
+          if (this.currentTime > 60) {
+                  var minutes = Math.floor(this.currentTime/60);
+                  var restSeconds = Math.round(this.currentTime) - ( minutes * 
60 );
+                  tString = minutes + " min " + restSeconds + " sec";
+          } else {
+                  tString = Math.round(this.currentTime) + " sec";
+          }
+          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> 
        
        <method name="stopStream">
-       if (this.timerDelegateStarted) {
-               this.timerDelegateStarted = false;
-        }
-        this._progress._progressbar._time.setAttribute("text","");
-        this._progress._progressbar._pointer.setAttribute("x",0);
-        if ($debug) Debug.write("SEND stopWhiteboardVideo ",this.name);
-        canvas.commonVideoViewContent.stopWhiteboardVideo(this.name);
-        this.isPaused = true;
-    </method>
-    
-    <method name="toggleStream">
-       if (canvas.ismoderator &amp;&amp; this.isPaused) {
+               if (this.timerDelegateStarted) {
+                       this.timerDelegateStarted = false;
+               }
+               this._progress._progressbar._time.setAttribute("text","");
+               this._progress._progressbar._pointer.setAttribute("x",0);
+               this._content.stopVideo();
+               this._content._preview.setAttribute('visible', true);
+               this.isPaused = true;
+       </method>
+       
+       <method name="toggleStream">
+               if (canvas.ismoderator &amp;&amp; this.isPaused) {
                        this.startStreamPlay();
-       }
-    </method>
+               }
+       </method>
        
-       <view name="_content" height="${ parent.height-62 }" bgcolor="0x000000"
-                 y="22" x="1" width="${ parent.width-1 }">
+       <baseVideoStream name="_content" height="${ parent.height-62 }" 
bgcolor="0x000000" y="22" x="1" width="${ parent.width-1 }">
+               <attribute name="timerDelegate" value="null"/>
+               <attribute name="timerDelegateStarted" value="false" 
type="boolean"/>
                
+               <handler name="oninit">
+                       this.timerDelegate = new LzDelegate( this, 
"calcProgressBar" );
+               </handler>
+               
+               <method name="playVideoStream" args="streamName,delay">
+                       this.playStream(streamName,delay);
+                       this.timerDelegateStarted = true;
+                       lz.Timer.addTimer(this.timerDelegate , 1000);
+               </method>
+               
+               <method name="stopVideo">
+                       this._stop();
+                       lz.Timer.removeTimer(this.timerDelegate);
+                       this.timerDelegateStarted = false;
+               </method>
+               
+               <handler name="onNetStatus" args="info">
+                       //if ($debug) Debug.write("onNetStatus ",info);
+                       if (info.code ==  "NetStream.Play.Stop" ) {
+                               if ($debug) Debug.write("-- stopStream");
+                               parent.stopStream();
+                       }
+               </handler>
+               <handler name="onMetaDataEvent" args="info">
+                       //if ($debug) Debug.warn("onMetaData ",info);
+                       //if ($debug) Debug.write("parent.parent.deltaInSeconds 
",Number(info.duration));
+                       parent.deltaInSeconds = Number(info.duration);
+                       parent.setDuration();
+               </handler>
+               
+               <method name="calcProgressBar" args="tObjRef">
+                       //if ($debug) Debug.write("calcProgressBar 
updateRecordingStreamTime",this._ns.time)
+                       parent.currentTime = this._ns.time;
+                       parent.calcProgressBar();
+                       if (this.timerDelegateStarted) {
+                               lz.Timer.addTimer( this.timerDelegate , 1000 );
+                       }
+               </method>
                <view name="_preview" width="0" height="0" >
-               <image name="imagePreview" stretches="both"
-                          width="${parent.width}" height="${parent.height}" />
-            <handler name="onclick">
-               if ($debug) Debug.write("onclick -- toggleStream");
-                parent.parent.toggleStream();
-            </handler>            
-            <view width="60" height="40" valign="middle" opacity="0.7"
-                 align="center" bgcolor="0xFFFFFF">
-               <view resource="lz_recorder_play" valign="middle" 
align="center" />
-            </view>
-        </view>
-       
-       </view>
+                       <image name="imagePreview" stretches="both" 
width="${parent.width}" height="${parent.height}" />
+                       <handler name="onclick">
+                               if ($debug) Debug.write("onclick -- 
toggleStream");
+                               parent.parent.toggleStream();
+                       </handler>                 
+                       <view width="60" height="40" valign="middle" 
opacity="0.7" align="center" bgcolor="0xFFFFFF">
+                               <view resource="lz_recorder_play" 
valign="middle" align="center" />
+                       </view>
+               </view>
+       </baseVideoStream>
 
-    <view name="_progress" height="18" y="${ parent.height - 40 }" width="${ 
parent.width-2 }"
-                         x="1" bgcolor="$once{ 
canvas.getThemeColor('basebgcolorizer') }">
-       
-       <view resource="flv_recorder_play_small_rsc" y="1" height="16" 
width="16"
-                     bgcolor="$once{ 
canvas.getThemeColor('baseMouseOvercolorizer') }">
-               <handler name="onmouseover">
-                this.setAttribute("bgcolor",0xFFFFFF);
-            </handler>
-            <handler name="onmouseout">
-                
this.setAttribute("bgcolor",canvas.getThemeColor('baseMouseOvercolorizer'));
-            </handler>
-               <handler name="onclick">
-                       if (canvas.ismoderator &amp;&amp; 
parent.parent.isPaused) {
-                            parent.parent.startStreamPlay();
-                       }
-               </handler>
-               <labelTooltip labelid="875" />
-       </view>
-       
-       <view name="_progressbar" x="16" width="${ parent.width - 32 }" y="1" 
-                 height="16" bgcolor="$once{ 
canvas.getThemeColor('baseMouseOvercolorizer') }">
-               
-               <view x="0" width="${ parent.width }" y="0" height="16" 
bgcolor="0xFFFFFF" opacity="0.5" /> 
-               
-               <handler name="onclick">
-                       //parent.parent.seekStream(this.getMouse("x"));
-               </handler>
-               
-               <view name="_pointer" resource="flv_progress_pointer_rsc" 
visibility="hidden" />
-               
-               <text name="_time" resize="true" fontsize="10" />
-               
-               <text name="_duration" align="right" resize="true" 
fontsize="10" />
-               
-       </view>
-       
-       <view resource="flv_recorder_stop_small_rsc" align="right" y="1" 
height="16" width="16"
-                 bgcolor="$once{ 
canvas.getThemeColor('baseMouseOvercolorizer') }">
-               <handler name="onmouseover">
-                       this.setAttribute("bgcolor",0xFFFFFF);
-               </handler>
-               <handler name="onmouseout">
-                
this.setAttribute("bgcolor",canvas.getThemeColor('baseMouseOvercolorizer'));
-            </handler>
-            <handler name="onclick">
-               if (canvas.ismoderator) {
-                    parent.parent.stopStreamPlay();
-               }
-            </handler>
-            <labelTooltip labelid="876" />
-        </view>
-       
-    </view>    
-    
-    <simpleLabelButton labelid="85" width="100" x="${ parent.width-118 }" 
-                                  y="${ parent.height-20 }" >
-        <handler name="onclick">
-            if (canvas.ismoderator) {
-               this.parent.stopRemote();
-                this.parent.parent.deleteItemByName(this.parent.name);
-                this.parent.parent.deleteItemByNameSync(this.parent.name);
-            }
-        </handler>
-    </simpleLabelButton>
-    
+       <view name="_progress" height="18" y="${ parent.height - 40 }" 
width="${ parent.width-2 }" x="1" bgcolor="$once{ 
canvas.getThemeColor('basebgcolorizer') }">
+               <view resource="flv_recorder_play_small_rsc" y="1" height="16" 
width="16" bgcolor="$once{ canvas.getThemeColor('baseMouseOvercolorizer') }">
+                       <handler name="onmouseover">
+                               this.setAttribute("bgcolor",0xFFFFFF);
+                       </handler>
+                       <handler name="onmouseout">
+                               
this.setAttribute("bgcolor",canvas.getThemeColor('baseMouseOvercolorizer'));
+                       </handler>
+                       <handler name="onclick">
+                               if (canvas.ismoderator &amp;&amp; 
parent.parent.isPaused) {
+                                        parent.parent.startStreamPlay();
+                               }
+                       </handler>
+                       <labelTooltip labelid="875" />
+               </view>
+               
+               <view name="_progressbar" x="16" width="${ parent.width - 32 }" 
y="1" height="16" bgcolor="$once{ 
canvas.getThemeColor('baseMouseOvercolorizer') }">
+                       <view x="0" width="${ parent.width }" y="0" height="16" 
bgcolor="0xFFFFFF" opacity="0.5" /> 
+                       
+                       <handler name="onclick">
+                               //parent.parent.seekStream(this.getMouse("x"));
+                       </handler>
+                       
+                       <view name="_pointer" 
resource="flv_progress_pointer_rsc" visibility="hidden" />
+                       
+                       <text name="_time" resize="true" fontsize="10" />
+                       
+                       <text name="_duration" align="right" resize="true" 
fontsize="10" />
+               </view>
+               
+               <view resource="flv_recorder_stop_small_rsc" align="right" 
y="1" height="16" width="16"
+                         bgcolor="$once{ 
canvas.getThemeColor('baseMouseOvercolorizer') }">
+                       <handler name="onmouseover">
+                               this.setAttribute("bgcolor",0xFFFFFF);
+                       </handler>
+                       <handler name="onmouseout">
+                               
this.setAttribute("bgcolor",canvas.getThemeColor('baseMouseOvercolorizer'));
+                       </handler>
+                       <handler name="onclick">
+                               if (canvas.ismoderator) {
+                                       parent.parent.stopStreamPlay();
+                               }
+                       </handler>
+                       <labelTooltip labelid="876" />
+               </view>
+       </view> 
+       
+       <simpleLabelButton labelid="85" width="100" x="${ parent.width-118 }" 
y="${ parent.height-20 }" >
+               <handler name="onclick">
+                       if (canvas.ismoderator) {
+                               this.parent.stopRemote();
+                               
this.parent.parent.deleteItemByName(this.parent.name);
+                               
this.parent.parent.deleteItemByNameSync(this.parent.name);
+                       }
+               </handler>
+       </simpleLabelButton>
 </class>
 
 </library>

Modified: 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/library.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/library.lzx?rev=1718119&r1=1718118&r2=1718119&view=diff
==============================================================================
--- 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/library.lzx
 (original)
+++ 
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/library.lzx
 Sat Dec  5 19:39:45 2015
@@ -19,7 +19,6 @@
   
 -->
 <library>
-       
        <!-- APL author sebawagner -->
        <resource name="_boundingBoxPointerTR" 
src="resources/boundingBoxTR.png" />
        <!-- APL author sebawagner -->
@@ -51,6 +50,4 @@
     <include href="fixedFileExplorerWhiteboardPanel.lzx" />
     <include href="whiteboardMiniButton.lzx" />
     <include href="whiteboardBarMenu.lzx" />
-    <include href="playBackWhiteboardVideo.lzx" />
-
 </library>



Reply via email to