This commit is contained in:
Markos Calderon 2013-04-16 16:00:47 -05:00
commit 7ca3a26c54
11 changed files with 346 additions and 45 deletions

View File

@ -28,6 +28,7 @@
<property name="DESKSHARE" value="DeskShareModule" />
<property name="DESKSHARE_SA" value="DeskshareStandalone" />
<property name="CAM_PREVIEW_SA" value="WebcamPreviewStandalone" />
<property name="MICROPHONE_CHECK" value="MicrophoneCheck" />
<property name="CAM_VIEW_SA" value="WebcamViewStandalone" />
<property name="PHONE" value="PhoneModule" />
<property name="NOTES" value="NotesModule" />
@ -227,7 +228,12 @@
<echo message="Compiling webcam view standalone without optimization." />
<build-module-no-link src="${SRC_DIR}" target="${CAM_VIEW_SA}" />
</target>
<target name="build-mic-check" description="Compile Microphone Check Application">
<echo message="Compiling Microphone Check Application." />
<build-module-no-link src="${SRC_DIR}" target="${MICROPHONE_CHECK}" />
</target>
<target name="build-deskshare" description="Compile Deskshare Module">
<build-module src="${SRC_DIR}" target="${DESKSHARE}" />
<echo message="Copying deskshare applet for Deskshare Module" />
@ -402,6 +408,9 @@
<copy todir="${OUTPUT_DIR}/lib/" >
<fileset dir="${PROD_RESOURCES_DIR}/lib"/>
</copy>
<copy todir="${OUTPUT_DIR}/check/" >
<fileset dir="${PROD_RESOURCES_DIR}/check"/>
</copy>
<copy file="${PROD_RESOURCES_DIR}/BigBlueButtonTest.html" todir="${OUTPUT_DIR}" overwrite="true"/>
<copy file="${PROD_RESOURCES_DIR}/BigBlueButton.html" todir="${OUTPUT_DIR}" overwrite="true"/>
<copy file="${PROD_RESOURCES_DIR}/DeskshareStandalone.html" todir="${OUTPUT_DIR}" overwrite="true"/>
@ -486,7 +495,7 @@
<target name="clean-build-bbb" depends="clean, init-ant-contrib, generate-html-wrapper, compile-deskshare-standalone,
build-webcam-preview-standalone, build-webcam-view-standalone, compile-bbb"
description="Build BBB client skipping compiling of locales"/>
<target name="clean-build-all" depends="clean, init-ant-contrib, generate-html-wrapper, compile-deskshare-standalone,
<target name="clean-build-all" depends="clean, init-ant-contrib, generate-html-wrapper, compile-deskshare-standalone, build-polling, build-mic-check,
build-webcam-preview-standalone, build-webcam-view-standalone, compile-bbb, branding, branding-black"
description="Build BBB client including locales"/>
<target name="modules" depends="init-ant-contrib, generate-html-wrapper, compile-deskshare-standalone,

View File

@ -0,0 +1,60 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="screen">
html, body, #flashclient { height:100%; }
body { margin:0; padding:0; overflow:hidden; }
#altContent { /* style alt content */ }
</style>
<script type="text/javascript" src="../swfobject/swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("MicrophoneCheck", "11", "expressInstall.swf");
</script>
<script type="text/javascript" src="../lib/jquery-1.5.1.min.js" language="javascript"></script>
<script type="text/javascript" src="lib/deployJava.js" language="javascript"></script>
<script type="text/javascript" src="lib/bbb_check.js" language="javascript"></script>
<script type="text/javascript" src="lib/pre_flight_check.js" language="javascript"></script>
<script>
var testJava = function() {
window.open("http://www.java.com/en/download/testjava.jsp")
}
window.onload = function() {
registerListeners();
}
</script>
</head>
<body>
<div id="controls">
<button type="button" onclick="bbbCheckFlashVersion()">Check Flash Version</button>
<button type="button" onclick="bbbHasMinFlashVersion('9.0.18')">Min Version</button>
<button type="button" onclick="bbbGetBrowser()">Get browser</button>
<button type="button" onclick="bbbGetJREs()">Get JREs</button>
<button type="button" onclick="testJava()">test Java</button>
<button type="button" onclick="bbbCheckShowMicSettings()">show mic settings</button>
</div>
<div id="webcamview" style="background-color:#FFD700;height:215px;width:138px;float:left;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540002" width="215" height="138" id="MicrophoneCheck" name="MicrophoneCheck" align="middle">
<param name="movie" value="http://192.168.0.249/client/MicrophoneCheck.swf?v=VERSION" />
<param name="quality" value="high" />
<param name="allowfullscreen" value="true" />
<param name="bgcolor" value="#869ca7" />
<param name="wmode" value="window" />
<param name="allowScriptAccess" value="always" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="http://192.168.0.249/client/MicrophoneCheck.swf?v=VERSION" width="215" height="138" align="middle">
<param name="quality" value="high" />
<param name="bgcolor" value="#869ca7" />
<param name="allowScriptAccess" value="always" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflashplayer">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
</body>
</html>

View File

@ -0,0 +1,126 @@
(function(window, undefined) {
var BBBCheck = {};
/**
* Internal function to get the BBB embed object. Seems like we have to do this
* each time and can't create a var for it.
*
* To get the object, see https://code.google.com/p/swfobject/wiki/api
*/
function getSwfObj() {
return swfobject.getObjectById("MicrophoneCheck");
}
BBBCheck.getFlashPlayerVersion = function() {
return swfobject.getFlashPlayerVersion();
}
BBBCheck.hasMinFlashPlayerVersion = function(flashVersion) {
return swfobject.hasFlashPlayerVersion(flashVersion);
}
BBBCheck.getBrowser = function() {
return deployJava.getBrowser();
}
BBBCheck.getJREs = function() {
return deployJava.getJREs();
}
BBBCheck.installJRE = function(version) {
deployJava.installJRE(version);
}
BBBCheck.installLatestJRE = function() {
deployJava.installLatestJRE();
}
BBBCheck.runApplet = function(attributes, parameters, minimumVersion) {
deployJava.runApplet(attributes, parameters, minimumVersion);
}
BBBCheck.runApplet = function(attributes, parameters, minimumVersion) {
deployJava.runApplet(attributes, parameters, minimumVersion);
}
BBBCheck.showMicSettings = function() {
var swfObj = getSwfObj();
if (swfObj) {
swfObj.showMicSettings();
}
}
BBBCheck.microphoneCheckAppReady = function() {
console.log("microphone check app ready.");
broadcast("MicCheckAppReadyEvent");
}
BBBCheck.noAvailableMicrophoneError = function() {
console.log("no available microphone");
}
BBBCheck.microphoneAccessDenied = function() {
console.log("Mic access has been denied.");
}
BBBCheck.microphoneAccessAllowed = function() {
console.log("Mic access has been allowed.");
}
/* ***********************************************************************************
* Broadcasting of events to 3rd-party apps.
*************************************************************************************/
/** Stores the 3rd-party app event listeners ***/
var listeners = {};
/**
* 3rd-party apps should user this method to register to listen for events.
*/
BBBCheck.listen = function(eventName, handler) {
if (typeof listeners[eventName] === 'undefined')
listeners[eventName] = [];
listeners[eventName].push(handler);
};
/**
* 3rd-party app should use this method to unregister listener for a given event.
*/
BBBCheck.unlisten = function(eventName, handler) {
if (!listeners[eventName])
return;
for (var i = 0; i < listeners[eventName].length; i++) {
if (listeners[eventName][i] === handler) {
listeners.splice(i, 1);
break;
}
}
};
/**
* Private function to broadcast received event from the BigBlueButton Flash client to
* 3rd-parties.
*/
function broadcast(eventName, params) {
if (!listeners[eventName]) {
console.log("No listeners for [" + eventName + "]");
return;
}
for (var i = 0; i < listeners[eventName].length; i++) {
console.log("Notifying listeners for [" + eventName + "]");
if (params == null) {
listeners[eventName][i]();
} else {
listeners[eventName][i](params);
}
}
};
window.BBBCheck = BBBCheck;
})(this);

View File

@ -0,0 +1,31 @@
var registerListeners = function() {
console.log("Listening for events.");
BBBCheck.listen("MicCheckAppReadyEvent", function() {
console.log("Received [MicCheckAppReadyEvent].");
});
BBBCheck.listen("NewRoleEvent", function(bbbCheckEvent) {
console.log("New Role Event [amIPresenter=" + bbbCheckEvent.amIPresenter + ",role=" + bbbCheckEvent.role + ",newPresenterUserID=" + bbbCheckEvent.newPresenterUserID + "].");
});
}
var bbbCheckFlashVersion = function() {
var playerVersion = BBBCheck.getFlashPlayerVersion();
console.log("You have Flash player " + playerVersion.major + "." + playerVersion.minor + "." + playerVersion.release + " installed");
}
var bbbHasMinFlashVersion = function(version) {
console.log("Q: Do I have Flash player 9.0.18 or higher installed?\nA: " + BBBCheck.hasMinFlashPlayerVersion(version));
}
var bbbGetBrowser = function() {
console.log("Browser = " + BBBCheck.getBrowser());
}
var bbbGetJREs = function() {
console.log("JREs = " + BBBCheck.getJREs());
}
var bbbCheckShowMicSettings = function() {
BBBCheck.showMicSettings();
}

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" width="215" height="138"
applicationComplete="appInit()">
<mx:Script>
<![CDATA[
private function appInit():void {
if (ExternalInterface.available) {
ExternalInterface.addCallback("showMicSettings", handleShowMicSettingsRequest);
ExternalInterface.addCallback("testMicrophone", handleShowMicSettingsRequest);
}
// Tell out JS counterpart that we are ready.
if (ExternalInterface.available) {
ExternalInterface.call("BBBCheck.microphoneCheckAppReady");
}
}
private var mic:Microphone;
private function handleShowMicSettingsRequest():void {
mic = Microphone.getMicrophone();
if (mic != null) {
if (mic.muted) {
// user has disallowed access to the mic
mic.addEventListener(StatusEvent.STATUS, micStatusEventHandler);
Security.showSettings(SecurityPanel.PRIVACY);
} else {
// user has allowed access to the mic
mic.setLoopBack(false);
mic.setUseEchoSuppression(true);
}
} else {
ExternalInterface.call("BBBCheck.noAvailableMicrophoneError");
}
}
private function micStatusEventHandler(event:StatusEvent):void {
switch(event.code) {
case "Microphone.Muted":
ExternalInterface.call("BBBCheck.microphoneAccessDenied");
break;
case "Microphone.Unmuted":
ExternalInterface.call("BBBCheck.microphoneAccessAllowed");
break;
}
}
private function handleTestMicrophoneRequest(loopback:Boolean=false):void {
if (loopback) {
if (mic != null) {
mic.setLoopBack(true);
mic.setUseEchoSuppression(true);
}
Security.showSettings(SecurityPanel.MICROPHONE);
} else {
mic.setLoopBack(false);
}
}
]]>
</mx:Script>
</mx:Application>

View File

@ -40,7 +40,7 @@ package org.bigbluebutton.modules.polling.managers
public static const LOGNAME:String = "[Polling :: ToolBarButtonManager] ";
public function ToolbarButtonManager() {
LogUtil.debug(LOGNAME + " initialized ")
LogUtil.debug(LOGNAME + " initialized ***************************************************************** ")
globalDispatcher = new Dispatcher();
button = new ToolbarButton();
}

View File

@ -34,38 +34,42 @@
<mx:Script>
<![CDATA[
import flexlib.mdi.events.MDIWindowEvent;
import org.bigbluebutton.main.views.MainCanvas;
import mx.controls.Alert;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.modules.polling.events.StartPollingEvent;
import org.bigbluebutton.modules.polling.managers.PollingManager;
import org.bigbluebutton.modules.polling.events.VoteEvent;
import org.bigbluebutton.modules.polling.events.PollingStatsWindowEvent;
import org.bigbluebutton.modules.polling.events.PollRefreshEvent;
import org.bigbluebutton.modules.polling.events.StopPollEvent;
import org.bigbluebutton.modules.polling.events.SavePollEvent;
import org.bigbluebutton.modules.polling.events.PublishPollEvent;
import org.bigbluebutton.modules.polling.events.GenerateWebKeyEvent;
import org.bigbluebutton.modules.chat.events.SendPublicChatMessageEvent;
import org.bigbluebutton.modules.polling.model.PollObject;
import org.bigbluebutton.modules.polling.model.PollStatLineObject;
import org.bigbluebutton.modules.polling.model.AnswerObject;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.model.users.Conference
import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.common.Role;
import mx.validators.Validator;
import mx.utils.ObjectUtil;
import org.bigbluebutton.util.i18n.ResourceUtil;
import mx.collections.ArrayCollection;
import mx.core.IUIComponent;
import mx.controls.Text;
import mx.controls.TextArea;
import mx.containers.*;
import mx.controls.*;
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.events.TimerEvent;
import flash.utils.Timer;
import flexlib.mdi.events.MDIWindowEvent;
import mx.collections.ArrayCollection;
import mx.containers.*;
import mx.controls.*;
import mx.controls.Alert;
import mx.controls.Text;
import mx.controls.TextArea;
import mx.core.IUIComponent;
import mx.utils.ObjectUtil;
import mx.validators.Validator;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.main.views.MainCanvas;
import org.bigbluebutton.modules.chat.events.SendPublicChatMessageEvent;
import org.bigbluebutton.modules.polling.events.GenerateWebKeyEvent;
import org.bigbluebutton.modules.polling.events.PollRefreshEvent;
import org.bigbluebutton.modules.polling.events.PollingStatsWindowEvent;
import org.bigbluebutton.modules.polling.events.PublishPollEvent;
import org.bigbluebutton.modules.polling.events.SavePollEvent;
import org.bigbluebutton.modules.polling.events.StartPollingEvent;
import org.bigbluebutton.modules.polling.events.StopPollEvent;
import org.bigbluebutton.modules.polling.events.VoteEvent;
import org.bigbluebutton.modules.polling.managers.PollingManager;
import org.bigbluebutton.modules.polling.model.AnswerObject;
import org.bigbluebutton.modules.polling.model.PollObject;
import org.bigbluebutton.modules.polling.model.PollStatLineObject;
import org.bigbluebutton.util.i18n.ResourceUtil;
public static const LOGNAME:String = "[PollingStatsWindow] ";
[Bindable] public var question:String;
@ -88,8 +92,8 @@
private function init():void{
conference = UserManager.getInstance().getConference();
webPollText.visible = (conference.amIPresenter() && (!reviewing && trackingPoll.publishToWeb));
btnClosePoll.visible = conference.amIPresenter();
webPollText.visible = (UsersUtil.amIPresenter() && (!reviewing && trackingPoll.publishToWeb));
btnClosePoll.visible = UsersUtil.amIPresenter();
webPollBox.visible = webPollText.visible;
if (webPollText.visible){
@ -119,7 +123,7 @@
if(viewingClosedPoll)
stopPoll();
if (conference.amIPresenter()){
if (UsersUtil.amIPresenter()){
messageForRecording("A poll is open for voting.");
messageForRecording(ResourceUtil.getInstance().getString('bbb.polling.createPoll.title') + " " + trackingPoll.title);
messageForRecording(ResourceUtil.getInstance().getString('bbb.polling.createPoll.question') + " " + trackingPoll.question);
@ -148,7 +152,7 @@
public function setUrlBoxText():void{
webPollURLBox.text = webPollUrl;
LogUtil.debug("webPollURLBox.Text is : " + webPollURLBox.text);
if (conference.amIPresenter())
if (UsersUtil.amIPresenter())
messageForRecording(ResourceUtil.getInstance().getString('bbb.polling.stats.webPollURL') + " " + webPollUrl);
}
@ -189,7 +193,7 @@
private function stopPoll():void{
refreshPoll();
refreshTimer.stop();
btnRefreshResults.visible = conference.amIPresenter();
btnRefreshResults.visible = UsersUtil.amIPresenter();
btnRefreshResults.label = ResourceUtil.getInstance().getString('bbb.polling.stats.repost');
btnRefreshResults.removeEventListener(MouseEvent.CLICK, refreshWindow);
btnRefreshResults.addEventListener(MouseEvent.CLICK, publishPollAgain);

View File

@ -33,12 +33,12 @@
>
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import com.asfusion.mate.events.Dispatcher;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.main.views.MainToolbar;
import org.bigbluebutton.util.i18n.ResourceUtil;
import org.bigbluebutton.modules.polling.events.PollingInstructionsWindowEvent;
import org.bigbluebutton.modules.polling.events.PollingInstructionsWindowEvent;
import org.bigbluebutton.modules.polling.events.PollGetTitlesEvent;
import org.bigbluebutton.modules.polling.events.PollGetPollEvent;
import org.bigbluebutton.modules.polling.events.OpenSavedPollEvent;
@ -127,7 +127,7 @@
listInitialize();
}
private function menuClick(event:MenuEvent):void {
private function menuClick(event:MenuEvent):void {
if(event.index == 0){
openPollingInstructions();
}else{

View File

@ -650,7 +650,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<views:SlideView id="slideView" width="100%" height="100%" visible="false" mouseDown="mouseDown = true"
mouseUp="mouseDown = false" verticalScrollPolicy="off" horizontalScrollPolicy="off" tabIndex="{baseIndex+4}"/>
<mx:ControlBar id="presCtrlBar" width="100%" height="{CONTROL_BAR_HEIGHT}" styleName="presentationWindowControlsStyle" >
<mx:Button id="uploadPres" visible="false" width="25" height="25" styleName="presentationUploadButtonStyle"
<mx:Button id="uploadPres" visible="false" height="25" styleName="presentationUploadButtonStyle"
toolTip="{ResourceUtil.getInstance().getString('bbb.presentation.uploadPresBtn.toolTip')}"
click="onUploadButtonClicked()"
tabIndex="{baseIndex+5}"/>

View File

@ -104,10 +104,16 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var vidOptions:VideoConfOptions = new VideoConfOptions();
if (muteUnmuteBtn != null && switchPresenter != null && ejectUserBtn != null) {
if (UsersUtil.amIModerator()) {
if (UsersUtil.amIModerator()) {
muteUnmuteBtn.visible = switchPresenter.visible = ejectUserBtn.visible = true;
if (UsersUtil.amIPresenter()) {
switchPresenter.visible = false;
}
} else if (vidOptions.controlsForPresenter) {
muteUnmuteBtn.visible = switchPresenter.visible = ejectUserBtn.visible = presenter;
if (UsersUtil.amIPresenter()) {
switchPresenter.visible = false;
}
} else {
muteUnmuteBtn.visible = switchPresenter.visible = ejectUserBtn.visible = false;
}