From 89c73c9951f58cbae8e0d285e9d6f4fd56fe6dc9 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Fri, 12 Apr 2013 07:47:07 +0000 Subject: [PATCH 1/7] - start implementing standalone pre-flight check page --- .../resources/prod/check/bbb-check.html | 32 +++++++++++++++++++ .../resources/prod/check/lib/bbb_check.js | 0 .../prod/{ => check}/lib/deployJava.js | 0 3 files changed, 32 insertions(+) create mode 100755 bigbluebutton-client/resources/prod/check/bbb-check.html create mode 100755 bigbluebutton-client/resources/prod/check/lib/bbb_check.js rename bigbluebutton-client/resources/prod/{ => check}/lib/deployJava.js (100%) diff --git a/bigbluebutton-client/resources/prod/check/bbb-check.html b/bigbluebutton-client/resources/prod/check/bbb-check.html new file mode 100755 index 0000000000..c2b59ad95d --- /dev/null +++ b/bigbluebutton-client/resources/prod/check/bbb-check.html @@ -0,0 +1,32 @@ + + + + + + + + + + + + + +
+ +
+ + diff --git a/bigbluebutton-client/resources/prod/check/lib/bbb_check.js b/bigbluebutton-client/resources/prod/check/lib/bbb_check.js new file mode 100755 index 0000000000..e69de29bb2 diff --git a/bigbluebutton-client/resources/prod/lib/deployJava.js b/bigbluebutton-client/resources/prod/check/lib/deployJava.js similarity index 100% rename from bigbluebutton-client/resources/prod/lib/deployJava.js rename to bigbluebutton-client/resources/prod/check/lib/deployJava.js From e5887fe1b88f92ef1903b6f98abc48ff08aaf468 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Fri, 12 Apr 2013 09:36:21 +0000 Subject: [PATCH 2/7] - start adding checks --- .../resources/prod/check/bbb-check.html | 18 +++++++++--------- .../resources/prod/check/lib/bbb_check.js | 17 +++++++++++++++++ .../prod/check/lib/pre_flight_check.js | 9 +++++++++ 3 files changed, 35 insertions(+), 9 deletions(-) create mode 100755 bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js diff --git a/bigbluebutton-client/resources/prod/check/bbb-check.html b/bigbluebutton-client/resources/prod/check/bbb-check.html index c2b59ad95d..26e6bed466 100755 --- a/bigbluebutton-client/resources/prod/check/bbb-check.html +++ b/bigbluebutton-client/resources/prod/check/bbb-check.html @@ -8,25 +8,25 @@ body { margin:0; padding:0; overflow:hidden; } #altContent { /* style alt content */ } - + - - + + + +
- + +
diff --git a/bigbluebutton-client/resources/prod/check/lib/bbb_check.js b/bigbluebutton-client/resources/prod/check/lib/bbb_check.js index e69de29bb2..5e95a5b071 100755 --- a/bigbluebutton-client/resources/prod/check/lib/bbb_check.js +++ b/bigbluebutton-client/resources/prod/check/lib/bbb_check.js @@ -0,0 +1,17 @@ +(function(window, undefined) { + + var BBBCheck = {}; + + BBBCheck.getFlashPlayerVersion = function() { + return swfobject.getFlashPlayerVersion(); + } + + BBBCheck.hasMinFlashPlayerVersion = function(flashVersion) { + return swfobject.hasFlashPlayerVersion(flashVersion); + } + + + + window.BBBCheck = BBBCheck; +})(this); + \ No newline at end of file diff --git a/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js b/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js new file mode 100755 index 0000000000..37b90fb606 --- /dev/null +++ b/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js @@ -0,0 +1,9 @@ + +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)); +} \ No newline at end of file From 0f98d922bfb5ea24a9a436ccc56113e873027c38 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Fri, 12 Apr 2013 10:08:48 +0000 Subject: [PATCH 3/7] - add some checks for java --- .../resources/prod/check/bbb-check.html | 7 ++++++- .../resources/prod/check/lib/bbb_check.js | 18 ++++++++++++++++++ .../prod/check/lib/pre_flight_check.js | 8 ++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-client/resources/prod/check/bbb-check.html b/bigbluebutton-client/resources/prod/check/bbb-check.html index 26e6bed466..d6d8304790 100755 --- a/bigbluebutton-client/resources/prod/check/bbb-check.html +++ b/bigbluebutton-client/resources/prod/check/bbb-check.html @@ -19,7 +19,9 @@ @@ -27,6 +29,9 @@
+ + +
diff --git a/bigbluebutton-client/resources/prod/check/lib/bbb_check.js b/bigbluebutton-client/resources/prod/check/lib/bbb_check.js index 5e95a5b071..7a711309c7 100755 --- a/bigbluebutton-client/resources/prod/check/lib/bbb_check.js +++ b/bigbluebutton-client/resources/prod/check/lib/bbb_check.js @@ -10,7 +10,25 @@ 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); + } window.BBBCheck = BBBCheck; })(this); diff --git a/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js b/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js index 37b90fb606..8529671662 100755 --- a/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js +++ b/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js @@ -6,4 +6,12 @@ var bbbCheckFlashVersion = function() { 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()); } \ No newline at end of file From 9252447a92ea2a5b0ba98246420d4860fe3aa6e3 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Mon, 15 Apr 2013 20:48:10 +0000 Subject: [PATCH 4/7] - make polling module run with latest master --- bigbluebutton-client/build.xml | 2 +- .../polling/managers/ToolbarButtonManager.as | 2 +- .../polling/views/PollingStatsWindow.mxml | 78 ++++++++++--------- .../modules/polling/views/ToolbarButton.mxml | 6 +- 4 files changed, 46 insertions(+), 42 deletions(-) diff --git a/bigbluebutton-client/build.xml b/bigbluebutton-client/build.xml index 8d9c8aa7fb..7e7cb31ae2 100755 --- a/bigbluebutton-client/build.xml +++ b/bigbluebutton-client/build.xml @@ -486,7 +486,7 @@ - Date: Tue, 16 Apr 2013 15:42:31 +0000 Subject: [PATCH 5/7] - check for microphone --- bigbluebutton-client/build.xml | 13 ++- .../resources/prod/check/bbb-check.html | 31 ++++++- .../resources/prod/check/lib/bbb_check.js | 91 +++++++++++++++++++ .../prod/check/lib/pre_flight_check.js | 14 +++ bigbluebutton-client/src/MicrophoneCheck.mxml | 65 +++++++++++++ 5 files changed, 208 insertions(+), 6 deletions(-) create mode 100755 bigbluebutton-client/src/MicrophoneCheck.mxml diff --git a/bigbluebutton-client/build.xml b/bigbluebutton-client/build.xml index 8d9c8aa7fb..a0ef577a67 100755 --- a/bigbluebutton-client/build.xml +++ b/bigbluebutton-client/build.xml @@ -28,6 +28,7 @@ + @@ -227,7 +228,12 @@ - + + + + + + @@ -402,6 +408,9 @@ + + + @@ -486,7 +495,7 @@ - @@ -22,7 +20,9 @@ var testJava = function() { window.open("http://www.java.com/en/download/testjava.jsp") } - + window.onload = function() { + registerListeners(); + } @@ -32,6 +32,29 @@ + +
+ + + + + + + + + + + + + + + Get Adobe Flash player + + + + + +
diff --git a/bigbluebutton-client/resources/prod/check/lib/bbb_check.js b/bigbluebutton-client/resources/prod/check/lib/bbb_check.js index 7a711309c7..808c70d809 100755 --- a/bigbluebutton-client/resources/prod/check/lib/bbb_check.js +++ b/bigbluebutton-client/resources/prod/check/lib/bbb_check.js @@ -2,6 +2,16 @@ 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(); } @@ -30,6 +40,87 @@ 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); \ No newline at end of file diff --git a/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js b/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js index 8529671662..0a5a417c1b 100755 --- a/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js +++ b/bigbluebutton-client/resources/prod/check/lib/pre_flight_check.js @@ -1,3 +1,13 @@ +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(); @@ -14,4 +24,8 @@ var bbbGetBrowser = function() { var bbbGetJREs = function() { console.log("JREs = " + BBBCheck.getJREs()); +} + +var bbbCheckShowMicSettings = function() { + BBBCheck.showMicSettings(); } \ No newline at end of file diff --git a/bigbluebutton-client/src/MicrophoneCheck.mxml b/bigbluebutton-client/src/MicrophoneCheck.mxml new file mode 100755 index 0000000000..a6b25042f1 --- /dev/null +++ b/bigbluebutton-client/src/MicrophoneCheck.mxml @@ -0,0 +1,65 @@ + + + + + + From 8457c2b30d9f2d0cb1c1524ca9c808b5d92ece1a Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Tue, 16 Apr 2013 20:50:34 +0000 Subject: [PATCH 6/7] - don't show switch presenter button if you are already presenter --- .../modules/videoconf/views/ControlButtons.mxml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ControlButtons.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ControlButtons.mxml index 84a26b33bd..28540ed934 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ControlButtons.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/views/ControlButtons.mxml @@ -104,10 +104,16 @@ with BigBlueButton; if not, see . 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; } From 9913cba84258bbb8771c4ef903400ed235f99782 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Tue, 16 Apr 2013 20:51:04 +0000 Subject: [PATCH 7/7] - don't make upload button fix sized to allow changing icon through CSS --- .../modules/present/ui/views/PresentationWindow.mxml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml index f682dce9bc..e159a80638 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/present/ui/views/PresentationWindow.mxml @@ -650,7 +650,7 @@ with BigBlueButton; if not, see . -