Merge branch 'master' into record-and-playback-feature
This commit is contained in:
commit
f8b8d8f8e3
@ -41,6 +41,7 @@
|
||||
<module name="VideoconfModule" url="VideoconfModule.swf?v=VERSION"
|
||||
uri="rtmp://HOST/video"
|
||||
dependsOn="ViewersModule"
|
||||
videoQuality="70"
|
||||
/>
|
||||
|
||||
<module name="WhiteboardModule" url="WhiteboardModule.swf?v=VERSION"
|
||||
|
@ -3,13 +3,15 @@
|
||||
xmlns:maps="org.bigbluebutton.modules.videoconf.maps.*" implements="org.bigbluebutton.common.IBigBlueButtonModule">
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.modules.videoconf.events.CloseAllWindowsEvent;
|
||||
import org.bigbluebutton.modules.videoconf.business.VideoProxy;
|
||||
import mx.controls.Alert;
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import mx.controls.Alert;
|
||||
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.main.events.CloseWindowEvent;
|
||||
import org.bigbluebutton.main.events.OpenWindowEvent;
|
||||
import org.bigbluebutton.main.events.OpenWindowEvent;
|
||||
import org.bigbluebutton.modules.videoconf.business.VideoProxy;
|
||||
import org.bigbluebutton.modules.videoconf.events.CloseAllWindowsEvent;
|
||||
|
||||
private var _moduleId:String = "VideoconfModule";
|
||||
private var _moduleName:String = "Videoconf Module";
|
||||
@ -67,6 +69,10 @@
|
||||
return _attributes.userrole as String;
|
||||
}
|
||||
|
||||
public function get quality():Number{
|
||||
return Number(_attributes.videoQuality);
|
||||
}
|
||||
|
||||
public function start(attributes:Object):void {
|
||||
LogUtil.debug("Videoconf attr: " + attributes.username);
|
||||
_attributes = attributes;
|
||||
|
@ -21,11 +21,14 @@ package org.bigbluebutton.main.model.users
|
||||
{
|
||||
import com.asfusion.mate.events.Dispatcher;
|
||||
|
||||
import flash.events.TimerEvent;
|
||||
import flash.utils.Timer;
|
||||
|
||||
import mx.collections.ArrayCollection;
|
||||
import mx.controls.Alert;
|
||||
|
||||
import org.bigbluebutton.common.Role;
|
||||
import org.bigbluebutton.modules.viewers.events.StreamStartedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
|
||||
|
||||
public class BBBUser
|
||||
{
|
||||
@ -101,8 +104,14 @@ package org.bigbluebutton.main.model.users
|
||||
}
|
||||
|
||||
private function sendStreamStartedEvent():void{
|
||||
var t:Timer = new Timer(3000, 1);
|
||||
t.addEventListener(TimerEvent.TIMER, dispatch);
|
||||
t.start();
|
||||
}
|
||||
|
||||
private function dispatch(e:TimerEvent):void{
|
||||
var dispatcher:Dispatcher = new Dispatcher();
|
||||
dispatcher.dispatchEvent(new StreamStartedEvent(this.name, this.streamName));
|
||||
dispatcher.dispatchEvent(new StreamStartedEvent(this.userid, this.name, this.streamName));
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package org.bigbluebutton.modules.viewers.events
|
||||
package org.bigbluebutton.main.model.users.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
@ -8,9 +8,11 @@ package org.bigbluebutton.modules.viewers.events
|
||||
|
||||
public var user:String;
|
||||
public var stream:String;
|
||||
public var userid:Number
|
||||
|
||||
public function StreamStartedEvent(user:String, stream:String)
|
||||
public function StreamStartedEvent(userid:Number, user:String, stream:String)
|
||||
{
|
||||
this.userid = userid;
|
||||
this.user = user;
|
||||
this.stream = stream;
|
||||
super(STREAM_STARTED, true, false);
|
@ -23,40 +23,42 @@
|
||||
<EventMap xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="http://mate.asfusion.com/">
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import mx.controls.Alert;
|
||||
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
import org.bigbluebutton.main.events.OpenWindowEvent;
|
||||
import org.bigbluebutton.main.events.ToolbarButtonEvent;
|
||||
import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.BroadcastStoppedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
|
||||
import org.bigbluebutton.modules.videoconf.business.VideoProxy;
|
||||
import org.bigbluebutton.modules.videoconf.events.CloseAllWindowsEvent;
|
||||
import org.bigbluebutton.modules.videoconf.events.OpenPublishWindowEvent;
|
||||
import org.bigbluebutton.modules.videoconf.events.StartBroadcastEvent;
|
||||
import org.bigbluebutton.modules.videoconf.events.StopBroadcastEvent;
|
||||
import org.bigbluebutton.modules.videoconf.views.PublishWindow;
|
||||
import org.bigbluebutton.modules.videoconf.views.TiledVideoWindow;
|
||||
import org.bigbluebutton.modules.videoconf.views.ToolbarButton;
|
||||
import org.bigbluebutton.modules.videoconf.views.VideoWindow;
|
||||
import org.bigbluebutton.modules.viewers.events.StreamStartedEvent;
|
||||
import org.bigbluebutton.modules.viewers.events.ViewCameraEvent;
|
||||
|
||||
public var module:VideoconfModule;
|
||||
private var button:ToolbarButton;
|
||||
private var publishWindow:PublishWindow;
|
||||
public var proxy:VideoProxy;
|
||||
private var tiledWindow:TiledVideoWindow;
|
||||
|
||||
private function viewCamera(e:ViewCameraEvent, mock:Boolean = false):void{
|
||||
private function viewCamera(userid:Number, stream:String, name:String, mock:Boolean = false):void{
|
||||
if (userid == module.userid) return;
|
||||
|
||||
var window:VideoWindow = new VideoWindow();
|
||||
|
||||
if (mock) {
|
||||
window.startVideo(module.mockConnection, e.stream);
|
||||
window.startVideo(module.mockConnection, stream);
|
||||
}
|
||||
else {
|
||||
window.startVideo(module.connection, e.stream);
|
||||
window.startVideo(module.connection, stream);
|
||||
}
|
||||
window.title = e.viewedName;
|
||||
window.title = name;
|
||||
|
||||
var windowEvent:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
|
||||
windowEvent.window = window;
|
||||
@ -64,7 +66,7 @@
|
||||
}
|
||||
|
||||
private function viewVideoFile(e:BBBEvent):void {
|
||||
viewCamera(new ViewCameraEvent(e.message, e.message), true);
|
||||
viewCamera(1, e.message, e.message, true);
|
||||
}
|
||||
|
||||
private function mockConnect():void {
|
||||
@ -82,6 +84,7 @@
|
||||
publishWindow = new PublishWindow();
|
||||
publishWindow.streamName = module.userid.toString();
|
||||
publishWindow.userrole = module.role;
|
||||
publishWindow.quality = module.quality;
|
||||
|
||||
var windowEvent:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
|
||||
windowEvent.window = publishWindow;
|
||||
@ -115,22 +118,7 @@
|
||||
globalDispatcher.dispatchEvent(new CloseAllWindowsEvent());
|
||||
}
|
||||
|
||||
//Experimental, not used
|
||||
public function addTiledWindow():void{
|
||||
tiledWindow = new TiledVideoWindow();
|
||||
tiledWindow.connection = module.connection;
|
||||
|
||||
var windowEvent:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
|
||||
windowEvent.window = tiledWindow;
|
||||
globalDispatcher.dispatchEvent(windowEvent);
|
||||
|
||||
}
|
||||
|
||||
//Experimental, not used
|
||||
private function streamStarted(e:StreamStartedEvent):void{
|
||||
if (tiledWindow == null) return;
|
||||
tiledWindow.addStream(e.user, e.stream);
|
||||
}
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
@ -155,11 +143,11 @@
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{StreamStartedEvent.STREAM_STARTED}">
|
||||
<InlineInvoker method="streamStarted" arguments="{event}" />
|
||||
<InlineInvoker method="viewCamera" arguments="{[event.userid, event.stream, event.user]}" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{ViewCameraEvent.VIEW_CAMERA_EVENT}">
|
||||
<InlineInvoker method="viewCamera" arguments="{event}" />
|
||||
<InlineInvoker method="viewCamera" arguments="{[event.userid, event.stream, event.viewedName]}" />
|
||||
</EventHandlers>
|
||||
|
||||
</EventMap>
|
||||
|
@ -34,7 +34,6 @@
|
||||
<![CDATA[
|
||||
import flexlib.mdi.events.MDIWindowEvent;
|
||||
|
||||
import mx.controls.Alert;
|
||||
import mx.core.UIComponent;
|
||||
import mx.events.ResizeEvent;
|
||||
|
||||
@ -54,6 +53,7 @@
|
||||
[Bindable] private var camWidth:Number = 320;
|
||||
[Bindable] private var camHeight:Number = 240;
|
||||
private var _userrole:String;
|
||||
public var quality:Number = 0;
|
||||
|
||||
private function init():void{
|
||||
checkIfMacCamera();
|
||||
@ -75,7 +75,7 @@
|
||||
|
||||
camera.setKeyFrameInterval(5);
|
||||
camera.setMode(camWidth,camHeight,15);
|
||||
camera.setQuality(0,0);
|
||||
camera.setQuality(0,quality);
|
||||
|
||||
video = new Video(camWidth, camHeight);
|
||||
//Next two lines may seem redundant but they're not. Do not delete.
|
||||
|
@ -1,153 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
BigBlueButton - http://www.bigbluebutton.org
|
||||
|
||||
Copyright (c) 2008-2009 by respective authors (see below). All rights reserved.
|
||||
|
||||
BigBlueButton 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 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, If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$Id: $
|
||||
-->
|
||||
|
||||
<MDIWindow xmlns="flexlib.mdi.containers.*"
|
||||
xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
implements="org.bigbluebutton.common.IBbbModuleWindow"
|
||||
creationComplete="onCreationComplete()"
|
||||
resizable="false"
|
||||
width="390" height="361">
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import flexlib.mdi.events.MDIWindowEvent;
|
||||
|
||||
import mx.core.UIComponent;
|
||||
|
||||
import org.bigbluebutton.main.views.MainCanvas;
|
||||
|
||||
public static const TILE_WIDTH:Number = 128;
|
||||
public static const TILE_HEIGHT:Number = 96;
|
||||
|
||||
private var tiles:Array = new Array(9);
|
||||
public var connection:NetConnection;
|
||||
private var numStreamsPlaying:Number = 0;
|
||||
//private var ns:NetStream;
|
||||
|
||||
private function onCreationComplete():void{
|
||||
setupTiles();
|
||||
}
|
||||
|
||||
public function addStream(user:String, stream:String):void{
|
||||
LogUtil.debug("TiledVideo new stream added: " + stream);
|
||||
var ns:NetStream = new NetStream(connection);
|
||||
ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);
|
||||
ns.client = this;
|
||||
ns.bufferTime = 0;
|
||||
ns.receiveVideo(true);
|
||||
ns.receiveAudio(false);
|
||||
|
||||
var video:Video = tiles[numStreamsPlaying] as Video;
|
||||
video.width = TILE_WIDTH;
|
||||
video.height = TILE_HEIGHT;
|
||||
video.attachNetStream(ns);
|
||||
ns.play("small" + stream);
|
||||
|
||||
numStreamsPlaying ++;
|
||||
}
|
||||
|
||||
private function onAsyncError(e:AsyncErrorEvent):void{
|
||||
LogUtil.debug("TiledVideoWindow::asyncerror " + e.toString());
|
||||
}
|
||||
|
||||
public function getPrefferedPosition():String{
|
||||
return MainCanvas.POPUP;
|
||||
}
|
||||
|
||||
private function setupTiles():void{
|
||||
var tile0:UIComponent = new UIComponent();
|
||||
tile0.x = 0;
|
||||
tile0.y = 0;
|
||||
addChild(tile0);
|
||||
var video0:Video= new Video(TILE_WIDTH, TILE_HEIGHT);
|
||||
tiles[0] = video0;
|
||||
tile0.addChild(video0);
|
||||
|
||||
var tile1:UIComponent = new UIComponent();
|
||||
tile1.x = TILE_WIDTH + 1;
|
||||
tile1.y = 0;
|
||||
addChild(tile1);
|
||||
var video1:Video= new Video(TILE_WIDTH, TILE_HEIGHT);
|
||||
tiles[1] = video1;
|
||||
tile1.addChild(video1);
|
||||
|
||||
var tile2:UIComponent = new UIComponent();
|
||||
tile2.x = TILE_WIDTH*2 + 2;
|
||||
tile2.y = 0;
|
||||
addChild(tile2);
|
||||
var video2:Video= new Video(TILE_WIDTH, TILE_HEIGHT);
|
||||
tiles[2] = video2;
|
||||
tile2.addChild(video2);
|
||||
|
||||
var tile3:UIComponent = new UIComponent();
|
||||
tile3.x = 0;
|
||||
tile3.y = TILE_HEIGHT + 1;
|
||||
addChild(tile3);
|
||||
var video3:Video= new Video(TILE_WIDTH, TILE_HEIGHT);
|
||||
tiles[3] = video3;
|
||||
tile3.addChild(video3);
|
||||
|
||||
var tile4:UIComponent = new UIComponent();
|
||||
tile4.x = TILE_WIDTH + 1;
|
||||
tile4.y = TILE_HEIGHT + 1;
|
||||
addChild(tile4);
|
||||
var video4:Video= new Video(TILE_WIDTH, TILE_HEIGHT);
|
||||
tiles[4] = video4;
|
||||
tile4.addChild(video4);
|
||||
|
||||
var tile5:UIComponent = new UIComponent();
|
||||
tile5.x = TILE_WIDTH*2 + 2;
|
||||
tile5.y = TILE_HEIGHT + 1;
|
||||
addChild(tile5);
|
||||
var video5:Video= new Video(TILE_WIDTH, TILE_HEIGHT);
|
||||
tiles[5] = video5;
|
||||
tile5.addChild(video5);
|
||||
|
||||
var tile6:UIComponent = new UIComponent();
|
||||
tile6.x = 0;
|
||||
tile6.y = TILE_HEIGHT*2 + 2;
|
||||
addChild(tile6);
|
||||
var video6:Video= new Video(TILE_WIDTH, TILE_HEIGHT);
|
||||
tiles[6] = video6;
|
||||
tile6.addChild(video6);
|
||||
|
||||
var tile7:UIComponent = new UIComponent();
|
||||
tile7.x = TILE_WIDTH + 1;
|
||||
tile7.y = TILE_HEIGHT*2 + 2;
|
||||
addChild(tile7);
|
||||
var video7:Video= new Video(TILE_WIDTH, TILE_HEIGHT);
|
||||
tiles[7] = video7;
|
||||
tile7.addChild(video7);
|
||||
|
||||
var tile8:UIComponent = new UIComponent();
|
||||
tile8.x = TILE_WIDTH*2 + 2;
|
||||
tile8.y = TILE_HEIGHT*2 + 2;
|
||||
addChild(tile8);
|
||||
var video8:Video= new Video(TILE_WIDTH, TILE_HEIGHT);
|
||||
tiles[8] = video8;
|
||||
tile8.addChild(video8);
|
||||
}
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
</MDIWindow>
|
@ -27,10 +27,12 @@ package org.bigbluebutton.modules.viewers.events
|
||||
|
||||
public var stream:String;
|
||||
public var viewedName:String;
|
||||
public var userid:Number;
|
||||
|
||||
public function ViewCameraEvent(stream:String, viewedName:String)
|
||||
public function ViewCameraEvent(userid:Number, stream:String, viewedName:String)
|
||||
{
|
||||
super(VIEW_CAMERA_EVENT,true);
|
||||
this.userid = userid;
|
||||
this.stream = stream;
|
||||
this.viewedName = viewedName;
|
||||
}
|
||||
|
@ -22,7 +22,8 @@
|
||||
|
||||
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
xmlns:mate="http://mate.asfusion.com/"
|
||||
verticalScrollPolicy="off" horizontalScrollPolicy="off">
|
||||
verticalScrollPolicy="off" horizontalScrollPolicy="off"
|
||||
creationComplete="onCreationComplete()">
|
||||
|
||||
<mate:Listener type="ViewVideoCloseEvent" method="onViewVideoCloseEvent"/>
|
||||
|
||||
@ -40,11 +41,15 @@
|
||||
private var images:Images = new Images();
|
||||
private var streamName:String = "";
|
||||
|
||||
private function onCreationComplete():void{
|
||||
streamName = data.streamName;
|
||||
}
|
||||
|
||||
private function viewCamera():void {
|
||||
LogUtil.debug("ViewersModule - sending camera view request for stream" + data.streamName);
|
||||
streamIcon.enabled = false;
|
||||
streamName = data.streamName;
|
||||
dispatchEvent(new ViewCameraEvent(data.streamName, data.name));
|
||||
//streamName = data.streamName;
|
||||
dispatchEvent(new ViewCameraEvent(data.userid, data.streamName, data.name));
|
||||
}
|
||||
|
||||
private function onViewVideoCloseEvent(event:BBBEvent):void {
|
||||
@ -69,7 +74,7 @@
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.viewers.viewersGrid.statusItemRenderer.raiseHand.toolTip'),
|
||||
[new Date()]}"/>
|
||||
<mx:Button id="streamIcon" visible="{data.hasStream}" click="viewCamera()" icon="{webcamIcon}"
|
||||
width="18" height="18"
|
||||
width="18" height="18" enabled="false"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.viewers.viewersGrid.statusItemRenderer.streamIcon.toolTip')}"/>
|
||||
<mx:Image id="presIcon" visible="{data.presenter}" source="{presenterIcon}" toolTip="{ResourceUtil.getInstance().getString('bbb.viewers.viewersGrid.statusItemRenderer.presIcon.toolTip')}"/>
|
||||
</mx:HBox>
|
||||
|
@ -180,6 +180,11 @@ change_var_value () {
|
||||
check_and_backup $1
|
||||
sed -i "s<^[[:blank:]#]*\(${2}\).*<\1=\"${3}\"<" $1
|
||||
}
|
||||
|
||||
change_var_ip () {
|
||||
check_and_backup $1
|
||||
sed -i "s<^[[:blank:]#]*\(${2}\).*<\1=${3}<" $1
|
||||
}
|
||||
# same as change_var_value but without quotes
|
||||
change_var_salt() {
|
||||
check_and_backup $1
|
||||
@ -1186,7 +1191,7 @@ if [ -n "$HOST" ]; then
|
||||
/var/lib/${TOMCAT}/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties
|
||||
|
||||
# 3 paramenter: the file, the variable name, the new value
|
||||
change_var_value /usr/share/red5/webapps/bigbluebutton/WEB-INF/bigbluebutton.properties esl.host $HOST
|
||||
change_var_ip /usr/share/red5/webapps/bigbluebutton/WEB-INF/bigbluebutton.properties esl.host $HOST
|
||||
|
||||
# cat /var/lib/${TOMCAT}/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties
|
||||
|
||||
@ -1213,10 +1218,32 @@ if [ -n "$HOST" ]; then
|
||||
/var/lib/${TOMCAT}/webapps/bigbluebutton/demo/bbb_api_conf.jsp
|
||||
fi
|
||||
|
||||
#
|
||||
# Update Freeswitch config
|
||||
#
|
||||
HOSTIP=$(ifconfig | grep -v '127.0.0.1' | grep -m 1 'inet addr:' | cut -d: -f2 | awk '{ print $1}');
|
||||
if [ -f /opt/freeswitch/conf/autoload_configs/event_socket.conf.xml ]; then
|
||||
EVENTIP=$(cat /opt/freeswitch/conf/autoload_configs/event_socket.conf.xml | grep 'name="listen-ip"' | cut -d\" -f4 | awk '{print $1}')
|
||||
sed -i "s/$EVENTIP/$HOSTIP/g" \
|
||||
/opt/freeswitch/conf/autoload_configs/event_socket.conf.xml
|
||||
fi
|
||||
|
||||
echo "Restarting ${TOMCAT} and nginx ..."
|
||||
sudo /etc/init.d/${TOMCAT} restart > /tmp/result 2>&1;cat /tmp/result;rm /tmp/result
|
||||
sudo /etc/init.d/nginx restart
|
||||
#
|
||||
# Update bigbluebutton-sip.properties
|
||||
#
|
||||
SIPIP=$(cat /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties | grep 'sip.server.host' | cut -d= -f2)
|
||||
if [ -f /usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties ]; then
|
||||
sed -i "s/$SIPIP/$HOSTIP/g" \
|
||||
/usr/share/red5/webapps/sip/WEB-INF/bigbluebutton-sip.properties
|
||||
fi
|
||||
|
||||
echo "Restarting the bigbluebutton server ..."
|
||||
stop_bigbluebutton
|
||||
echo
|
||||
start_bigbluebutton
|
||||
# echo "Restarting ${TOMCAT} and nginx ..."
|
||||
# sudo /etc/init.d/${TOMCAT} restart > /tmp/result 2>&1;cat /tmp/result;rm /tmp/result
|
||||
# sudo /etc/init.d/nginx restart
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user