Merge branch 'master' of github.com:bigbluebutton/bigbluebutton into refactor-bbb-api

This commit is contained in:
Marco Calderon 2011-06-24 21:06:47 +00:00
commit 8e698f51a9
19 changed files with 172 additions and 45 deletions

View File

@ -7,7 +7,7 @@
<application uri="rtmp://HOST/bigbluebutton" host="http://HOST/bigbluebutton/api/enter" />
<language userSelectionEnabled="true" />
<skinning enabled="false" url="branding/css/theme.css.swf" />
<debug showDebugWindow="false" />
<layout showDebugWindow="true" showVideoLayout="true" showResetLayout="true"/>
<modules>
@ -32,13 +32,13 @@
uri="rtmp://HOST/bigbluebutton"
host="http://HOST/bigbluebutton/api/enter"
allowKickUser="false"
visible="true"
windowVisible="true"
/>
<module name="ListenersModule" url="ListenersModule.swf?v=VERSION"
uri="rtmp://HOST/bigbluebutton"
recordingHost="http://HOST"
visible="true"
windowVisible="true"
/>
<module name="DeskShareModule"
@ -49,6 +49,7 @@
<module name="PhoneModule" url="PhoneModule.swf?v=VERSION"
uri="rtmp://HOST/sip"
autoJoin="false"
showButton="true"
dependsOn="ViewersModule"
/>
@ -69,6 +70,9 @@
videoQuality="70"
presenterShareOnly="false"
resolutions="160x120,320x240,640x480,1280x720"
autoStart="false"
showButton="true"
publishWindowVisible="true"
/>
<module name="WhiteboardModule" url="WhiteboardModule.swf?v=VERSION"

View File

@ -3,6 +3,7 @@
xmlns:maps="org.bigbluebutton.modules.videoconf.maps.*" implements="org.bigbluebutton.common.IBigBlueButtonModule">
<mx:Script>
<![CDATA[
import org.bigbluebutton.modules.videoconf.events.OpenPublishWindowEvent;
import com.asfusion.mate.events.Dispatcher;
import mx.controls.Alert;
@ -85,6 +86,11 @@
eventMap.module = this;
eventMap.proxy = proxy;
eventMap.addToolbarButton();
if (proxy.videoOptions.autoStart) {
var dispatcher:Dispatcher = new Dispatcher();
dispatcher.dispatchEvent(new OpenPublishWindowEvent());
}
}
public function stop():void {

View File

@ -51,10 +51,12 @@ package org.bigbluebutton.core.model
a.url = config.skinning.@url;
return a
}
public function get debug():Object {
public function get layout():Object {
var a:Object = new Object();
a.showDebugWindow = ((config.debug.@showDebugWindow).toUpperCase() == "TRUE") ? true : false;
a.showDebugWindow = ((config.layout.@showDebugWindow).toUpperCase() == "TRUE") ? true : false;
a.showVideoLayout = ((config.layout.@showVideoLayout).toUpperCase() == "TRUE") ? true : false;
a.showResetLayout = ((config.layout.@showResetLayout).toUpperCase() == "TRUE") ? true : false;
return a
}

View File

@ -0,0 +1,19 @@
package org.bigbluebutton.main.model
{
public class LayoutOptions
{
[Bindable]
public var showLogButton:Boolean = false;
[Bindable]
public var showVideoLayout:Boolean = false;
[Bindable]
public var showResetLayout:Boolean = false;
public function LayoutOptions()
{
}
}
}

View File

@ -27,7 +27,7 @@
xmlns:mate="http://mate.asfusion.com/"
xmlns:maps="org.bigbluebutton.main.maps.*"
xmlns:api="org.bigbluebutton.main.api.*"
width="100%" height="100%"
width="100%" height="100%"
creationComplete="initializeShell()" xmlns:common="org.bigbluebutton.common.*">
<mate:Listener type="{ConfigEvent.CONFIG_EVENT}" method="setLogVisibility" />
@ -43,6 +43,8 @@
<common:APIEventMap />
<mx:Script>
<![CDATA[
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.main.model.LayoutOptions;
import org.bigbluebutton.main.events.RecordStatusEvent;
import com.asfusion.mate.events.Dispatcher;
@ -99,9 +101,17 @@
return _mode;
}
protected function initializeShell():void {
trace('Initializing');
globalDispatcher = new Dispatcher();
[Bindable]
private var layoutOptions:LayoutOptions = new LayoutOptions();
private function initOptions():void {
layoutOptions.showLogButton = BBB.initConfigManager().config.layout.showDebugWindow;
layoutOptions.showResetLayout = BBB.initConfigManager().config.layout.showResetLayout;
layoutOptions.showVideoLayout = BBB.initConfigManager().config.layout.showVideoLayout;
}
protected function initializeShell():void {
globalDispatcher = new Dispatcher();
}
protected function initFullScreen():void {
@ -236,7 +246,8 @@
}
private function setLogVisibility(e:ConfigEvent):void{
logBtn.visible = e.config.showDebug;
// logBtn.visible = e.config.showDebug;
initOptions();
}
private function changeLayout():void{
@ -267,16 +278,14 @@
<mx:Label text="{ResourceUtil.getInstance().getString('bbb.mainshell.copyrightLabel2',[appVersion])}" id="copyrightLabel2"/>
<mx:Spacer width="20"/>
<mx:Spacer width="100%"/>
<mx:ComboBox width="100" height="20" id="cmbLayout" change="changeLayout()" prompt="Layout" selectedItem="-1">
<mx:ComboBox width="100" height="20" id="cmbLayout" change="changeLayout()" prompt="Layout" selectedItem="-1" visible="{layoutOptions.showVideoLayout}">
<mx:dataProvider>
<mx:Array>
<mx:String>Small videos</mx:String>
<!--mx:String>Presenter + presentation</mx:String>
<mx:String>Meeting</mx:String-->
</mx:Array>
</mx:dataProvider>
</mx:ComboBox>
<mx:Button width="20" height="20" toolTip="{ResourceUtil.getInstance().getString('bbb.mainshell.logBtn.toolTip')}" id="logBtn" icon="{logs_icon}" click="openLogWindow()" />
<mx:Button width="20" height="20" toolTip="{ResourceUtil.getInstance().getString('bbb.mainshell.resetLayoutBtn.toolTip')}" id="btnResetLayout" icon="{reset_layout_icon}" click="resetLayout()" />
<mx:Button width="20" height="20" visible="{layoutOptions.showLogButton}" toolTip="{ResourceUtil.getInstance().getString('bbb.mainshell.logBtn.toolTip')}" id="logBtn" icon="{logs_icon}" click="openLogWindow()" />
<mx:Button width="20" height="20" visible="{layoutOptions.showResetLayout}" toolTip="{ResourceUtil.getInstance().getString('bbb.mainshell.resetLayoutBtn.toolTip')}" id="btnResetLayout" icon="{reset_layout_icon}" click="resetLayout()" />
</mx:ControlBar>
</mx:VBox>

View File

@ -42,7 +42,7 @@ package org.bigbluebutton.modules.listeners.managers
var vxml:XML = BBB.initConfigManager().config.getModuleConfig("ListenersModule");
if (vxml != null) {
listenerOptions.visible = (vxml.@visible.toUpperCase() == "TRUE") ? true : false;
listenerOptions.windowVisible = (vxml.@windowVisible.toUpperCase() == "TRUE") ? true : false;
}
}

View File

@ -3,8 +3,8 @@ package org.bigbluebutton.modules.listeners.model
public class ListenerOptions
{
[Bindable]
public var visible:Boolean = true;
public var windowVisible:Boolean = true;
public function ListenerOptions()
{
}

View File

@ -67,7 +67,7 @@
private function onCreationComplete():void {
BindingUtils.bindSetter(updateNumberOfListeners, listeners, "length");
this.visible = listenerOptions.visible;
this.visible = listenerOptions.windowVisible;
}
private function updateNumberOfListeners(numListeners:int):void {

View File

@ -0,0 +1,13 @@
package org.bigbluebutton.modules.phone
{
public class PhoneOptions
{
[Bindable]
public var showButton:Boolean = true;
public function PhoneOptions()
{
}
}
}

View File

@ -22,13 +22,14 @@ package org.bigbluebutton.modules.phone.maps
{
import com.asfusion.mate.events.Dispatcher;
import flash.events.IEventDispatcher;
import org.bigbluebutton.common.events.ToolbarButtonEvent;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.modules.phone.PhoneOptions;
import org.bigbluebutton.modules.phone.views.components.ToolbarButton;
public class PhoneEventMapDelegate
{
private var phoneOptions:PhoneOptions;
private var phoneButton:ToolbarButton;
private var buttonOpen:Boolean = false;
private var globalDispatcher:Dispatcher;
@ -37,20 +38,25 @@ package org.bigbluebutton.modules.phone.maps
{
phoneButton = new ToolbarButton();
globalDispatcher = new Dispatcher();
phoneOptions = new PhoneOptions();
var vxml:XML = BBB.initConfigManager().config.getModuleConfig("PhoneModule");
if (vxml != null) {
phoneOptions.showButton = (vxml.@showButton.toUpperCase() == "TRUE") ? true : false;
}
}
public function addToolbarButton():void {
phoneButton.toggle = true;
// Use the GLobal Dispatcher so that this message will be heard by the
// main application.
var event:ToolbarButtonEvent = new ToolbarButtonEvent(ToolbarButtonEvent.ADD);
event.button = phoneButton;
trace("Dispatching ADD TOOLBAR BUTTON EVENT");
globalDispatcher.dispatchEvent(event);
buttonOpen = true;
if (phoneOptions.showButton) {
// Use the GLobal Dispatcher so that this message will be heard by the
// main application.
var event:ToolbarButtonEvent = new ToolbarButtonEvent(ToolbarButtonEvent.ADD);
event.button = phoneButton;
trace("Dispatching ADD TOOLBAR BUTTON EVENT");
globalDispatcher.dispatchEvent(event);
buttonOpen = true;
}
}
public function removeToolbarButton():void {

View File

@ -31,18 +31,29 @@ package org.bigbluebutton.modules.videoconf.business
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.UserManager;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
import org.bigbluebutton.modules.videoconf.events.StartBroadcastEvent;
import org.bigbluebutton.modules.videoconf.events.StopBroadcastEvent;
import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
public class VideoProxy
{
{
public var videoOptions:VideoConfOptions;
private var nc:NetConnection;
private var ns:NetStream;
public function VideoProxy(url:String)
{
videoOptions = new VideoConfOptions();
var vxml:XML = BBB.initConfigManager().config.getModuleConfig("VideoconfModule");
if (vxml != null) {
videoOptions.showButton = (vxml.@showButton.toUpperCase() == "TRUE") ? true : false;
videoOptions.autoStart = (vxml.@autoStart.toUpperCase() == "TRUE") ? true : false;
videoOptions.publishWindowVisible = (vxml.@publishWindowVisible.toUpperCase() == "TRUE") ? true : false;
}
nc = new NetConnection();
nc.client = this;
nc.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onAsyncError);

View File

@ -79,15 +79,18 @@
}
public function addToolbarButton():void{
button = new ToolbarButton();
button.isPresenter = !module.presenterShareOnly;
var event:ToolbarButtonEvent = new ToolbarButtonEvent(ToolbarButtonEvent.ADD);
event.button = button;
globalDispatcher.dispatchEvent(event);
if (proxy.videoOptions.showButton) {
button = new ToolbarButton();
button.isPresenter = !module.presenterShareOnly;
var event:ToolbarButtonEvent = new ToolbarButtonEvent(ToolbarButtonEvent.ADD);
event.button = button;
globalDispatcher.dispatchEvent(event);
}
}
private function openPublishWindow():void{
publishWindow = new PublishWindow();
publishWindow.videoOptions = proxy.videoOptions;
publishWindow.streamName = "-" + module.userid.toString();
publishWindow.userrole = module.role;
publishWindow.quality = module.quality;

View File

@ -0,0 +1,19 @@
package org.bigbluebutton.modules.videoconf.model
{
public class VideoConfOptions
{
[Bindable]
public var autoStart:Boolean = false;
[Bindable]
public var showButton:Boolean = true;
[Bindable]
public var publishWindowVisible:Boolean = true;
public function VideoConfOptions()
{
}
}
}

View File

@ -33,6 +33,7 @@
<mx:Script>
<![CDATA[
import org.bigbluebutton.modules.videoconf.model.VideoConfOptions;
import org.bigbluebutton.common.LogUtil;
import flexlib.mdi.events.MDIWindowEvent;
@ -70,6 +71,15 @@
private var _nOldWindowWidth:Number = 0;
private var _nOldWindowHeight:Number = 0;
// Timer to auto-publish webcam. We need this timer to delay
// the auto-publishing until after the Viewers's window has loaded
// to receive the publishing events. Otherwise, the user joining next
// won't be able to view the webcam.
private var autoPublishTimer:Timer;
[Bindable]
public var videoOptions:VideoConfOptions;
private function init():void{
currentState = "dispVideoOptionsControlBar";
checkIfMacCamera();
@ -87,8 +97,24 @@
this.resizable = false;
loadPrefs();
this.visible = videoOptions.publishWindowVisible;
if (videoOptions.autoStart) {
/*
* Need to have a timer to trigger auto-publishing of webcam.
*/
autoPublishTimer = new Timer(3000);
autoPublishTimer.addEventListener(TimerEvent.TIMER, autopublishTimerHandler);
autoPublishTimer.start();
}
}
private function autopublishTimerHandler(event:TimerEvent):void {
startPublishing();
autoPublishTimer.stop();
}
private function loadPrefs():void{
var sharedObject:SharedObject = SharedObject.getLocal("bbbUserProperties", "/");
var webcam:String = sharedObject.data["webcam"] as String;

View File

@ -43,7 +43,7 @@ package org.bigbluebutton.modules.viewers.managers
var vxml:XML = BBB.initConfigManager().config.getModuleConfig("ViewersModule");
if (vxml != null) {
viewerOptions.visible = (vxml.@visible.toUpperCase() == "TRUE") ? true : false;
viewerOptions.windowVisible = (vxml.@windowVisible.toUpperCase() == "TRUE") ? true : false;
}
}

View File

@ -3,7 +3,7 @@ package org.bigbluebutton.modules.viewers.model
public class ViewerOptions
{
[Bindable]
public var visible:Boolean = false;
public var windowVisible:Boolean = false;
public function ViewerOptions()
{

View File

@ -80,7 +80,7 @@
BindingUtils.bindSetter(updateNumberOfViewers, participants, "length");
dispatcher = new Dispatcher();
this.visible = viewerOptions.visible;
this.visible = viewerOptions.windowVisible;
}
private function updateNumberOfViewers(numViewers:int):void {

View File

@ -1244,6 +1244,15 @@ check_state() {
fi
fi
PLAYBACK_IP=$(cat /usr/local/bigbluebutton/core/scripts/simple.yml | sed -n '/playback_host/{s/.*:[ ]*//;s/;//;p}')
if [ $PLAYBACK_IP != $IP ]; then
echo
echo "# The IP address ($PLAYBACK_IP) set for playback_host in"
echo "# /usr/local/bigbluebutton/core/scripts/simple.yml"
echo "# does not match the local IP address ($IP)."
echo
fi
exit 0
}
@ -1320,7 +1329,7 @@ if [ $CHECK ]; then
PLAYBACK_IP=$(cat /usr/local/bigbluebutton/core/scripts/simple.yml | sed -n '/playback_host/{s/.*:[ ]*//;s/;//;p}')
echo
echo "/usr/local/bigbluebutton/core/scripts/simple.yml (record and playback)"
echo " playback host: $NGINX_IP"
echo " playback host: $PLAYBACK_IP"
fi

View File

@ -59,7 +59,7 @@
<div id="join">
<h2>Join a Demo Meeting</h2>
<p/>&nbsp;<p/>
<FORM NAME="form1" METHOD="GET" onSubmit="return checkform(this);" action="/bigbluebutton/demo/demo1.jsp">
<FORM NAME="form1" METHOD="GET" onSubmit="return checkform(this);" action="/demo/demo1.jsp">
<p class="content">Enter your name:</p>
<input type="text" id="username" name="username" size="29" /><input type="submit" value="Join"/> <br />
@ -79,7 +79,7 @@
<h2>API Examples</h2>
<p class="content">See examples of how you can integrate BigBlueButton into your applications.</p>
<img src="images/arrow.png" width="15" height="17" border="0" />
<div style="margin-top:-17px; margin-left:20px;"><a href="/bigbluebutton/demo/demo1.jsp">View API Examples</a></div>
<div style="margin-top:-17px; margin-left:20px;"><a href="/demo/demo1.jsp">View API Examples</a></div>
</div>
</div>