diff --git a/bigbluebutton-client/libs/melomel-0.6.2.swc b/bigbluebutton-client/libs/melomel-0.6.2.swc new file mode 100644 index 0000000000000000000000000000000000000000..4ffc2b3815a05e038138672cb6fb14648a12cb1f Binary files /dev/null and b/bigbluebutton-client/libs/melomel-0.6.2.swc differ diff --git a/bigbluebutton-client/resources/prod/BigBlueButtonTest.html b/bigbluebutton-client/resources/prod/BigBlueButtonTest.html new file mode 100755 index 0000000000000000000000000000000000000000..decda046881a960f98a7b49be856953533911e45 --- /dev/null +++ b/bigbluebutton-client/resources/prod/BigBlueButtonTest.html @@ -0,0 +1,115 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!-- saved from url=(0014)about:internet --> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> + <!-- + Smart developers always View Source. + + This application was built using Adobe Flex, an open source framework + for building rich Internet applications that get delivered via the + Flash Player or to desktops via Adobe AIR. + + Learn more about Flex at http://flex.org + // --> + <head> + <title>BigBlueButton</title> + <meta name="google" value="notranslate" /> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and + the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as + the percentage of the height of its parent container, which has to be set explicitly. Fix for + Firefox 3.6 focus border issues. Initially, don't display flashContent div so it won't show + if JavaScript disabled. + --> + <style type="text/css" media="screen"> + html, body { height:100%; } + body { margin:0; padding:0; overflow:auto; text-align:center; + background-color: #ffffff; } + object:focus { outline:none; } + #flashContent { display:none; } + </style> + + <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens --> + <!-- BEGIN Browser History required section --> + <link rel="stylesheet" type="text/css" href="history/history.css" /> + <script type="text/javascript" src="history/history.js"></script> + <!-- END Browser History required section --> + + <script src="jquery-1.5.1.min.js" language="javascript"></script> + <script src="bigbluebutton.js" language="javascript"></script> + <script src="bbb_localization.js" language="javascript"></script> + <script src="deployJava.js" language="javascript"></script> + <script src="bbb_blinker.js" language="javascript"></script> + <script src="bbb_deskshare.js" language="javascript"></script> + + <script type="text/javascript" src="swfobject.js"></script> + <script type="text/javascript"> + // For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. + var swfVersionStr = "10.3.0"; + // To use express install, set to playerProductInstall.swf, otherwise the empty string. + var xiSwfUrlStr = "playerProductInstall.swf"; + var flashvars = {}; + var params = {}; + params.quality = "high"; + params.bgcolor = "#ffffff"; + params.allowscriptaccess = "sameDomain"; + params.allowfullscreen = "true"; + var attributes = {}; + attributes.id = "BigBlueButton"; + attributes.name = "BigBlueButton"; + attributes.align = "middle"; + swfobject.embedSWF( + "BigBlueButton.swf", "flashContent", + "100%", "100%", + swfVersionStr, xiSwfUrlStr, + flashvars, params, attributes); + // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. + swfobject.createCSS("#flashContent", "display:block;text-align:left;"); + </script> + </head> + <body> + <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough + JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show + when JavaScript is disabled. + --> + <div id="flashContent"> + <p> + To view this page ensure that Adobe Flash Player version + 10.3.0 or greater is installed. + </p> + <script type="text/javascript"> + var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://"); + document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='" + + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" ); + </script> + </div> + + <noscript> + <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="BigBlueButton"> + <param name="movie" value="BigBlueButton.swf" /> + <param name="quality" value="high" /> + <param name="bgcolor" value="#ffffff" /> + <param name="allowScriptAccess" value="sameDomain" /> + <param name="allowFullScreen" value="true" /> + <!--[if !IE]>--> + <object type="application/x-shockwave-flash" data="BigBlueButton.swf" width="100%" height="100%"> + <param name="quality" value="high" /> + <param name="bgcolor" value="#ffffff" /> + <param name="allowScriptAccess" value="sameDomain" /> + <param name="allowFullScreen" value="true" /> + <!--<![endif]--> + <!--[if gte IE 6]>--> + <p> + Either scripts and active content are not permitted to run or Adobe Flash Player version + 10.3.0 or greater is not installed. + </p> + <!--<![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> + </noscript> + </body> +</html> diff --git a/bigbluebutton-client/src/BigBlueButton.mxml b/bigbluebutton-client/src/BigBlueButton.mxml index e6a578edb6569cf91b5b31ada33058e328c64089..2271a1cd1b30d54a5c1e8da28f1027645946c31d 100755 --- a/bigbluebutton-client/src/BigBlueButton.mxml +++ b/bigbluebutton-client/src/BigBlueButton.mxml @@ -24,18 +24,25 @@ xmlns:views="org.bigbluebutton.main.views.*" xmlns:maps="org.bigbluebutton.main.maps.*" xmlns:mate="http://mate.asfusion.com/" + xmlns:m="library://melomel/2010" pageTitle="BigBlueButton" layout="absolute" preloader="org.bigbluebutton.main.model.BigBlueButtonPreloader"> <mx:Script> <![CDATA[ - import mx.managers.HistoryManager; - - import org.bigbluebutton.main.views.MainApplicationShell; - import org.bigbluebutton.util.i18n.ResourceUtil; - + import com.asfusion.mate.events.Dispatcher; + + import mx.managers.HistoryManager; + + import org.bigbluebutton.common.LogUtil; + import org.bigbluebutton.main.events.BBBEvent; + import org.bigbluebutton.main.views.MainApplicationShell; + import org.bigbluebutton.util.i18n.ResourceUtil; + private var langResources:ResourceUtil = ResourceUtil.getInstance(); + + public var myFoo:String = "bar"; /** * Thse two lines are workaround for this. (ralam - Nov 8, 2008) @@ -52,9 +59,155 @@ trace('Got CHAT_EVENT'); } + public function setFoo(f:String):void { + myFoo = f; + } + + /****************************** + * Testing + ******************************/ + + + + private var globalDispatcher:Dispatcher = new Dispatcher(); + + // Login test + private static var isLoggedIn:Boolean = false; // flag to indicate if we successfully logged in + + // Chat test + private static var chatMessageSent:String = ""; + private static var chatTestSucceeded:Boolean = false; + + // Voice test + private static var didUserJoin:Boolean = false; + + // Presentation test + private static var didPresentationConvert:Boolean = false; + + // Video test + private static var didVideoStart:Boolean = false; + + + public function handleLoginEvent(event:BBBEvent):void { + LogUtil.debug("******************* Received loggedin event"); + isLoggedIn = true; + LogUtil.debug("******************* Received loggedin event " + isLoggedIn.toString()); + } + + public function checkLogin():String { + LogUtil.debug("******************* " + isLoggedIn.toString()); + return isLoggedIn.toString(); + + } + + public function checkChat():String { + if (chatTestSucceeded) + { + chatTestSucceeded = false; + return "true"; + } + else + return chatTestSucceeded.toString(); + } + + public function handleReceivedPublicChatMessageEvent(event:BBBEvent):void { + if (event.message.search(chatMessageSent) != -1) + chatTestSucceeded = true; + } + + // Creates a random string and sends it as a chat message. + public function sendRandomChatMessage():void { + chatMessageSent = generateRandomString(15); + globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.SEND_PUBLIC_CHAT_MESSAGE_EVENT, chatMessageSent)); + } + + + /** + * Voice + */ + public function joinVoiceConference():void { + globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.JOIN_VOICE_CONFERENCE)); + } + + public function checkVoice():String { + return didUserJoin.toString(); + } + + public function handleAddedListenerEvent(event:BBBEvent):void { +// if (event.message == _attributes.username) { + didUserJoin = true; +// } + } + + /** + * Presentation + */ + + public function testPresentationConversion():String { + return didPresentationConvert.toString(); + } + + public function handlePresentationConversion(event:Event):void { + didPresentationConvert = true; + } + + // Obtained from: http://www.zedia.net/2008/generate-random-strings-in-as2-or-as3/ + private function generateRandomString(newLength:uint = 1, userAlphabet:String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"):String{ + var alphabet:Array = userAlphabet.split(""); + var alphabetLength:int = alphabet.length; + var randomLetters:String = ""; + for (var i:uint = 0; i < newLength; i++){ + randomLetters += alphabet[int(Math.floor(Math.random() * alphabetLength))]; + } + return randomLetters; + } + + + /** + * Video + */ + + public function startVideoConnection():String { + globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.START_VIDEO_CONNECTION)); + return "true"; + } + + public function playVideo():String { + globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.START_VIDEO_STREAM, "640x480avatar.flv")); + return "true"; + } + + public function videoHasStarted(e:Event):void { + didVideoStart = true; + } + + public function checkVideo():String { + return didVideoStart.toString(); + } + + /** + * Desktop Sharing + */ + + public function startDeskshare():String { + globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.START_DESKSHARE)); + return "true"; + } + + ]]> - </mx:Script> + </mx:Script> + + <m:Melomel/> + <maps:ApplicationEventMap /> <views:MainApplicationShell id="mainShell"/> + + <mate:Listener type="{BBBEvent.LOGIN_EVENT}" method="handleLoginEvent"/> + <mate:Listener type="{BBBEvent.RECEIVED_PUBLIC_CHAT_MESSAGE_EVENT}" method="handleReceivedPublicChatMessageEvent"/> + <mate:Listener type="{BBBEvent.ADDED_LISTENER}" method="handleAddedListenerEvent"/> + <mate:Listener type="{BBBEvent.PRESENTATION_CONVERTED}" method="handlePresentationConversion"/> + <mate:Listener type="{BBBEvent.VIDEO_STARTED}" method="videoHasStarted"/> + </mx:Application> diff --git a/bigbluebutton-client/src/BigBlueButtonTest.mxml b/bigbluebutton-client/src/BigBlueButtonTest.mxml new file mode 100755 index 0000000000000000000000000000000000000000..2271a1cd1b30d54a5c1e8da28f1027645946c31d --- /dev/null +++ b/bigbluebutton-client/src/BigBlueButtonTest.mxml @@ -0,0 +1,213 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- + BigBlueButton open source conferencing system - http://www.bigbluebutton.org + + Copyright (c) 2010 BigBlueButton Inc. and by respective authors (see below). + + 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 2.1 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/>. + + $Id: $ +--> + +<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" + xmlns:views="org.bigbluebutton.main.views.*" + xmlns:maps="org.bigbluebutton.main.maps.*" + xmlns:mate="http://mate.asfusion.com/" + xmlns:m="library://melomel/2010" + pageTitle="BigBlueButton" + layout="absolute" + preloader="org.bigbluebutton.main.model.BigBlueButtonPreloader"> + + <mx:Script> + <![CDATA[ + import com.asfusion.mate.events.Dispatcher; + + import mx.managers.HistoryManager; + + import org.bigbluebutton.common.LogUtil; + import org.bigbluebutton.main.events.BBBEvent; + import org.bigbluebutton.main.views.MainApplicationShell; + import org.bigbluebutton.util.i18n.ResourceUtil; + + private var langResources:ResourceUtil = ResourceUtil.getInstance(); + + public var myFoo:String = "bar"; + + /** + * Thse two lines are workaround for this. (ralam - Nov 8, 2008) + * http://gregjessup.com/flex-3-advanceddatagrid-cannot-convert-mxmanagersdragmanagerimpl-to-mxmanagersidragmanager/ + * http://butterfliesandbugs.wordpress.com/2007/10/25/workaround-for-error-when-loading-popups-from-modules/ + */ + import mx.managers.IDragManager; + private var iDragManager:IDragManager; + + /** another workaround - for this issue: https://bugs.adobe.com/jira/browse/SDK-13121*/ + private var hist:HistoryManager + + private function handleChatEvent(e:Event):void { + trace('Got CHAT_EVENT'); + } + + public function setFoo(f:String):void { + myFoo = f; + } + + /****************************** + * Testing + ******************************/ + + + + private var globalDispatcher:Dispatcher = new Dispatcher(); + + // Login test + private static var isLoggedIn:Boolean = false; // flag to indicate if we successfully logged in + + // Chat test + private static var chatMessageSent:String = ""; + private static var chatTestSucceeded:Boolean = false; + + // Voice test + private static var didUserJoin:Boolean = false; + + // Presentation test + private static var didPresentationConvert:Boolean = false; + + // Video test + private static var didVideoStart:Boolean = false; + + + public function handleLoginEvent(event:BBBEvent):void { + LogUtil.debug("******************* Received loggedin event"); + isLoggedIn = true; + LogUtil.debug("******************* Received loggedin event " + isLoggedIn.toString()); + } + + public function checkLogin():String { + LogUtil.debug("******************* " + isLoggedIn.toString()); + return isLoggedIn.toString(); + + } + + public function checkChat():String { + if (chatTestSucceeded) + { + chatTestSucceeded = false; + return "true"; + } + else + return chatTestSucceeded.toString(); + } + + public function handleReceivedPublicChatMessageEvent(event:BBBEvent):void { + if (event.message.search(chatMessageSent) != -1) + chatTestSucceeded = true; + } + + // Creates a random string and sends it as a chat message. + public function sendRandomChatMessage():void { + chatMessageSent = generateRandomString(15); + globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.SEND_PUBLIC_CHAT_MESSAGE_EVENT, chatMessageSent)); + } + + + /** + * Voice + */ + public function joinVoiceConference():void { + globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.JOIN_VOICE_CONFERENCE)); + } + + public function checkVoice():String { + return didUserJoin.toString(); + } + + public function handleAddedListenerEvent(event:BBBEvent):void { +// if (event.message == _attributes.username) { + didUserJoin = true; +// } + } + + /** + * Presentation + */ + + public function testPresentationConversion():String { + return didPresentationConvert.toString(); + } + + public function handlePresentationConversion(event:Event):void { + didPresentationConvert = true; + } + + // Obtained from: http://www.zedia.net/2008/generate-random-strings-in-as2-or-as3/ + private function generateRandomString(newLength:uint = 1, userAlphabet:String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"):String{ + var alphabet:Array = userAlphabet.split(""); + var alphabetLength:int = alphabet.length; + var randomLetters:String = ""; + for (var i:uint = 0; i < newLength; i++){ + randomLetters += alphabet[int(Math.floor(Math.random() * alphabetLength))]; + } + return randomLetters; + } + + + /** + * Video + */ + + public function startVideoConnection():String { + globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.START_VIDEO_CONNECTION)); + return "true"; + } + + public function playVideo():String { + globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.START_VIDEO_STREAM, "640x480avatar.flv")); + return "true"; + } + + public function videoHasStarted(e:Event):void { + didVideoStart = true; + } + + public function checkVideo():String { + return didVideoStart.toString(); + } + + /** + * Desktop Sharing + */ + + public function startDeskshare():String { + globalDispatcher.dispatchEvent(new BBBEvent(BBBEvent.START_DESKSHARE)); + return "true"; + } + + + ]]> + </mx:Script> + + <m:Melomel/> + + <maps:ApplicationEventMap /> + + <views:MainApplicationShell id="mainShell"/> + + <mate:Listener type="{BBBEvent.LOGIN_EVENT}" method="handleLoginEvent"/> + <mate:Listener type="{BBBEvent.RECEIVED_PUBLIC_CHAT_MESSAGE_EVENT}" method="handleReceivedPublicChatMessageEvent"/> + <mate:Listener type="{BBBEvent.ADDED_LISTENER}" method="handleAddedListenerEvent"/> + <mate:Listener type="{BBBEvent.PRESENTATION_CONVERTED}" method="handlePresentationConversion"/> + <mate:Listener type="{BBBEvent.VIDEO_STARTED}" method="videoHasStarted"/> + +</mx:Application>