remove cursor code. now cursor comes embedded in video
This commit is contained in:
parent
c7e0f0211d
commit
8785fafb91
@ -1,36 +0,0 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2015 BigBlueButton Inc. and by respective authors (see below).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under the
|
||||
* terms of the GNU Lesser General Public License as published by the Free Software
|
||||
* Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License along
|
||||
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.webrtcDeskshare.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
public class CursorEvent extends Event
|
||||
{
|
||||
public static const UPDATE_CURSOR_LOC_EVENT:String = "Update sharer cursor event";
|
||||
|
||||
public var x:Number = 0;
|
||||
public var y:Number = 0;
|
||||
|
||||
public function CursorEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false)
|
||||
{
|
||||
super(type, bubbles, cancelable);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -38,7 +38,6 @@ package org.bigbluebutton.modules.webrtcDeskshare.services.red5
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.core.managers.ReconnectionManager;
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
import org.bigbluebutton.modules.webrtcDeskshare.events.CursorEvent;
|
||||
import org.bigbluebutton.modules.webrtcDeskshare.events.ViewStreamEvent;
|
||||
|
||||
|
||||
@ -266,13 +265,6 @@ package org.bigbluebutton.modules.webrtcDeskshare.services.red5
|
||||
dispatcher.dispatchEvent(ce);
|
||||
}
|
||||
|
||||
public function mouseLocationCallback(x:Number, y:Number):void {
|
||||
var event:CursorEvent = new CursorEvent(CursorEvent.UPDATE_CURSOR_LOC_EVENT);
|
||||
event.x = x;
|
||||
event.y = y;
|
||||
dispatcher.dispatchEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if anybody is publishing the stream for this room
|
||||
* This method is useful for clients which have joined a room where somebody is already publishing
|
||||
|
@ -56,7 +56,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.main.events.MadePresenterEvent;
|
||||
import org.bigbluebutton.main.events.ShortcutEvent;
|
||||
import org.bigbluebutton.main.views.MainCanvas;
|
||||
import org.bigbluebutton.modules.webrtcDeskshare.events.CursorEvent;
|
||||
import org.bigbluebutton.modules.webrtcDeskshare.events.ShareWindowEvent;
|
||||
import org.bigbluebutton.modules.webrtcDeskshare.events.StopSharingButtonEvent;
|
||||
import org.bigbluebutton.modules.webrtcDeskshare.events.StreamEvent;
|
||||
@ -73,7 +72,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
private var images:Images = new Images();
|
||||
[Bindable] public var bbbLogo:Class = images.bbb_logo;
|
||||
[Bindable] private var cursorIcon:Class = images.cursorIcon;
|
||||
|
||||
private var connection:NetConnection;
|
||||
private var uri:String;
|
||||
@ -92,7 +90,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private var autoStart:Boolean = false;
|
||||
private var globalDispatcher:Dispatcher = new Dispatcher();
|
||||
|
||||
[Bindable] private var cursor:Sprite;
|
||||
[Bindable] private var dsOptions:DeskshareOptions;
|
||||
|
||||
private function init():void {
|
||||
@ -102,10 +99,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private function onCreationComplete():void {
|
||||
windowControls.maximizeRestoreBtn.enabled = false;
|
||||
|
||||
cursor = new Sprite();
|
||||
cursor.graphics.lineStyle(6, 0xFF0000, 0.6);
|
||||
cursor.graphics.drawCircle(0,0,3);
|
||||
|
||||
setCurrentState("dispFullRegionControlBar"); //TODO ANTON
|
||||
resourcesChanged();
|
||||
|
||||
@ -246,10 +239,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
private function startPreviewStream(streamName:String, capWidth:Number, capHeight:Number):void{
|
||||
streaming = true;
|
||||
|
||||
// Store capture dimensions so we can position cursor properly.
|
||||
captureWidth = capWidth;
|
||||
captureHeight = capHeight;
|
||||
|
||||
videoHolder = new UIComponent();
|
||||
|
||||
var vidW:Number = captureWidth;
|
||||
@ -280,9 +269,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
video.y = videoHolder.y = (this.height - VID_HEIGHT_PAD - vidH) / 2;
|
||||
|
||||
videoHolder.addChild(video);
|
||||
// videoHolder.addChild(cursor);
|
||||
// videoHolder.addChild(cursorImg); //TODO anton remove
|
||||
// cursor.visible = false;
|
||||
this.addChild(videoHolder);
|
||||
|
||||
ns = new NetStream(connection);
|
||||
@ -395,6 +381,5 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
</mx:AddChild>
|
||||
</mx:State>
|
||||
</dspub:states>
|
||||
<mx:Image id="cursorImg" visible="false" source="@Embed('../../assets/images/cursor4.png')"/>
|
||||
|
||||
</dspub:CustomMdiWindow>
|
||||
|
@ -25,7 +25,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
xmlns:common="org.bigbluebutton.common.*"
|
||||
width="600" height="400"
|
||||
initialize="init()"
|
||||
creationComplete="onCreationComplete()"
|
||||
implements="org.bigbluebutton.common.IBbbModuleWindow"
|
||||
xmlns:mate="http://mate.asfusion.com/"
|
||||
title="{ResourceUtil.getInstance().getString('bbb.desktopView.title')}"
|
||||
@ -33,7 +32,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
resize="fitToWindow()" >
|
||||
|
||||
<mate:Listener type="{ViewStreamEvent.STOP}" method="onStopViewStreamEvent" />
|
||||
<mate:Listener type="{CursorEvent.UPDATE_CURSOR_LOC_EVENT}" method="onUpdateCursorEvent" />
|
||||
<mate:Listener type="{LocaleChangeEvent.LOCALE_CHANGED}" method="localeChanged" />
|
||||
|
||||
<mx:Script>
|
||||
@ -50,7 +48,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.common.Images;
|
||||
import org.bigbluebutton.common.events.LocaleChangeEvent;
|
||||
import org.bigbluebutton.main.views.MainCanvas;
|
||||
import org.bigbluebutton.modules.webrtcDeskshare.events.CursorEvent;
|
||||
import org.bigbluebutton.modules.webrtcDeskshare.events.StartedViewingEvent;
|
||||
import org.bigbluebutton.modules.webrtcDeskshare.events.ViewStreamEvent;
|
||||
import org.bigbluebutton.modules.webrtcDeskshare.events.ViewWindowEvent;
|
||||
@ -67,8 +64,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
[Bindable] public var fitToWidthIcon:Class = images.magnifier;
|
||||
[Bindable] public var fitToActualSizeIcon:Class = images.mag_reset;
|
||||
|
||||
private var cursor:Shape;
|
||||
|
||||
private var video:Video;
|
||||
private var ns:NetStream;
|
||||
private var videoHolder:UIComponent = new UIComponent();
|
||||
@ -106,12 +101,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
videoHolder.percentHeight = 100;
|
||||
addEventListener(MDIWindowEvent.RESIZE_END, onResizeEndEvent);
|
||||
fitToActualSize();
|
||||
cursor = new Shape();
|
||||
cursor.graphics.lineStyle(6, 0xFF0000, 0.6);
|
||||
cursor.graphics.drawCircle(0,0,3);
|
||||
videoHolder.addChild(cursor);
|
||||
videoHolder.addChild(cursorImg);
|
||||
cursor.visible = false;
|
||||
maximize();
|
||||
|
||||
resourcesChanged();
|
||||
@ -121,28 +110,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
maximizeRestoreBtn.tabIndex = baseIndex+2;
|
||||
closeBtn.tabIndex = baseIndex+3;
|
||||
}
|
||||
private function onCreationComplete():void{
|
||||
// videoHolder.addChild(video);
|
||||
// this.addChild(videoHolder);
|
||||
// videoHolder.percentWidth = 100;
|
||||
// videoHolder.percentHeight = 100;
|
||||
// addEventListener(MDIWindowEvent.RESIZE_END, onResizeEndEvent);
|
||||
// fitToActualSize();
|
||||
// cursor = new Shape();
|
||||
// cursor.graphics.lineStyle(6, 0xFF0000, 0.6);
|
||||
// cursor.graphics.drawCircle(0,0,3);
|
||||
// videoHolder.addChild(cursor);
|
||||
// videoHolder.addChild(cursorImg);
|
||||
// cursor.visible = false;
|
||||
// maximize();
|
||||
//
|
||||
// resourcesChanged();
|
||||
//
|
||||
// titleBarOverlay.tabIndex = baseIndex;
|
||||
// minimizeBtn.tabIndex = baseIndex+1;
|
||||
// maximizeRestoreBtn.tabIndex = baseIndex+2;
|
||||
// closeBtn.tabIndex = baseIndex+3;
|
||||
}
|
||||
|
||||
private function onResizeEndEvent(event:MDIWindowEvent):void {
|
||||
if (event.window == this) {
|
||||
@ -150,21 +117,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
}
|
||||
|
||||
private function onUpdateCursorEvent(event:CursorEvent):void {
|
||||
cursor.x = ((event.x/videoWidth)) * videoHolder.width;
|
||||
cursor.y = ((event.y/videoHeight)) * videoHolder.height;
|
||||
|
||||
cursorImg.visible = true;
|
||||
// DO NOT compute the x and y coordinate and assign directly to the cursorImg
|
||||
// as it results in a flickering and jerky mouse pointer (ralam jun 10, 2010).
|
||||
if (cursor.x < videoHolder.x) cursor.x = videoHolder.x;
|
||||
if (cursor.y < videoHolder.y) cursor.y = videoHolder.y;
|
||||
if (cursor.x > videoHolder.x + videoHolder.width) cursor.x = videoHolder.x + videoHolder.width;
|
||||
if (cursor.y > videoHolder.y + videoHolder.height) cursor.y = videoHolder.y + videoHolder.height;
|
||||
cursorImg.x = cursor.x;
|
||||
cursorImg.y = cursor.y;
|
||||
}
|
||||
|
||||
public function startVideo(rtmp:String, width:Number, height:Number):void{
|
||||
var videoURL:String;
|
||||
|
||||
@ -435,9 +387,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<common:TabIndexer startIndex="{dsOptions.baseTabIndex + 1}" tabIndices="{[minimizeBtn, maximizeRestoreBtn, closeBtn, btnActualSize]}"/>
|
||||
|
||||
<mx:Move id="cursorMove" target="{cursorImg}"/>
|
||||
<mx:Image id="cursorImg" visible="false" source="@Embed('../../assets/images/cursor4.png')"/>
|
||||
|
||||
<mx:HBox id="bottomBar" visible="true" height="30" horizontalAlign="center" paddingTop="0" paddingBottom="0" width="100%" >
|
||||
<mx:Button id="btnActualSize" paddingTop="0" paddingBottom="0" styleName="deskshareControlButtonStyle"
|
||||
toggle="true"
|
||||
|
Loading…
Reference in New Issue
Block a user