Initial import.
git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@96 af16638f-c34d-0410-8cfa-b39d5352b314
16
bigbluebutton-core/.actionScriptProperties
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<actionScriptProperties mainApplicationPath="BigBlueButton.mxml" version="3">
|
||||
<compiler additionalCompilerArguments="-locale en_US" copyDependentFiles="true" enableModuleDebug="true" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersion="9.0.28" htmlPlayerVersionCheck="true" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
|
||||
<compilerSourcePath/>
|
||||
<libraryPath defaultLinkType="1">
|
||||
<libraryPathEntry kind="4" path=""/>
|
||||
<libraryPathEntry kind="1" linkType="1" path="libs"/>
|
||||
</libraryPath>
|
||||
<sourceAttachmentPath/>
|
||||
</compiler>
|
||||
<applications>
|
||||
<application path="BigBlueButton.mxml"/>
|
||||
</applications>
|
||||
<modules/>
|
||||
<buildCSSFiles/>
|
||||
</actionScriptProperties>
|
2
bigbluebutton-core/.flexProperties
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flexProperties flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="1"/>
|
18
bigbluebutton-core/.project
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>bigbluebutton-core</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.adobe.flexbuilder.project.flexbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.adobe.flexbuilder.project.flexnature</nature>
|
||||
<nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,3 @@
|
||||
#Wed Jun 25 11:15:17 EDT 2008
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=utf-8
|
276
bigbluebutton-core/html-template/AC_OETags.js
Normal file
@ -0,0 +1,276 @@
|
||||
// Flash Player Version Detection - Rev 1.6
|
||||
// Detect Client Browser type
|
||||
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
|
||||
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
|
||||
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
|
||||
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
|
||||
|
||||
function ControlVersion()
|
||||
{
|
||||
var version;
|
||||
var axo;
|
||||
var e;
|
||||
|
||||
// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
|
||||
|
||||
try {
|
||||
// version will be set for 7.X or greater players
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
|
||||
version = axo.GetVariable("$version");
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
if (!version)
|
||||
{
|
||||
try {
|
||||
// version will be set for 6.X players only
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
|
||||
|
||||
// installed player is some revision of 6.0
|
||||
// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
|
||||
// so we have to be careful.
|
||||
|
||||
// default to the first public version
|
||||
version = "WIN 6,0,21,0";
|
||||
|
||||
// throws if AllowScripAccess does not exist (introduced in 6.0r47)
|
||||
axo.AllowScriptAccess = "always";
|
||||
|
||||
// safe to call for 6.0r47 or greater
|
||||
version = axo.GetVariable("$version");
|
||||
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!version)
|
||||
{
|
||||
try {
|
||||
// version will be set for 4.X or 5.X player
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
|
||||
version = axo.GetVariable("$version");
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!version)
|
||||
{
|
||||
try {
|
||||
// version will be set for 3.X player
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
|
||||
version = "WIN 3,0,18,0";
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!version)
|
||||
{
|
||||
try {
|
||||
// version will be set for 2.X player
|
||||
axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
|
||||
version = "WIN 2,0,0,11";
|
||||
} catch (e) {
|
||||
version = -1;
|
||||
}
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
// JavaScript helper required to detect Flash Player PlugIn version information
|
||||
function GetSwfVer(){
|
||||
// NS/Opera version >= 3 check for Flash plugin in plugin array
|
||||
var flashVer = -1;
|
||||
|
||||
if (navigator.plugins != null && navigator.plugins.length > 0) {
|
||||
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
|
||||
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
|
||||
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
|
||||
var descArray = flashDescription.split(" ");
|
||||
var tempArrayMajor = descArray[2].split(".");
|
||||
var versionMajor = tempArrayMajor[0];
|
||||
var versionMinor = tempArrayMajor[1];
|
||||
var versionRevision = descArray[3];
|
||||
if (versionRevision == "") {
|
||||
versionRevision = descArray[4];
|
||||
}
|
||||
if (versionRevision[0] == "d") {
|
||||
versionRevision = versionRevision.substring(1);
|
||||
} else if (versionRevision[0] == "r") {
|
||||
versionRevision = versionRevision.substring(1);
|
||||
if (versionRevision.indexOf("d") > 0) {
|
||||
versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
|
||||
}
|
||||
}
|
||||
var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
|
||||
}
|
||||
}
|
||||
// MSN/WebTV 2.6 supports Flash 4
|
||||
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
|
||||
// WebTV 2.5 supports Flash 3
|
||||
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
|
||||
// older WebTV supports Flash 2
|
||||
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
|
||||
else if ( isIE && isWin && !isOpera ) {
|
||||
flashVer = ControlVersion();
|
||||
}
|
||||
return flashVer;
|
||||
}
|
||||
|
||||
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
|
||||
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
|
||||
{
|
||||
versionStr = GetSwfVer();
|
||||
if (versionStr == -1 ) {
|
||||
return false;
|
||||
} else if (versionStr != 0) {
|
||||
if(isIE && isWin && !isOpera) {
|
||||
// Given "WIN 2,0,0,11"
|
||||
tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
|
||||
tempString = tempArray[1]; // "2,0,0,11"
|
||||
versionArray = tempString.split(","); // ['2', '0', '0', '11']
|
||||
} else {
|
||||
versionArray = versionStr.split(".");
|
||||
}
|
||||
var versionMajor = versionArray[0];
|
||||
var versionMinor = versionArray[1];
|
||||
var versionRevision = versionArray[2];
|
||||
|
||||
// is the major.revision >= requested major.revision AND the minor version >= requested minor
|
||||
if (versionMajor > parseFloat(reqMajorVer)) {
|
||||
return true;
|
||||
} else if (versionMajor == parseFloat(reqMajorVer)) {
|
||||
if (versionMinor > parseFloat(reqMinorVer))
|
||||
return true;
|
||||
else if (versionMinor == parseFloat(reqMinorVer)) {
|
||||
if (versionRevision >= parseFloat(reqRevision))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function AC_AddExtension(src, ext)
|
||||
{
|
||||
if (src.indexOf('?') != -1)
|
||||
return src.replace(/\?/, ext+'?');
|
||||
else
|
||||
return src + ext;
|
||||
}
|
||||
|
||||
function AC_Generateobj(objAttrs, params, embedAttrs)
|
||||
{
|
||||
var str = '';
|
||||
if (isIE && isWin && !isOpera)
|
||||
{
|
||||
str += '<object ';
|
||||
for (var i in objAttrs)
|
||||
str += i + '="' + objAttrs[i] + '" ';
|
||||
str += '>';
|
||||
for (var i in params)
|
||||
str += '<param name="' + i + '" value="' + params[i] + '" /> ';
|
||||
str += '</object>';
|
||||
} else {
|
||||
str += '<embed ';
|
||||
for (var i in embedAttrs)
|
||||
str += i + '="' + embedAttrs[i] + '" ';
|
||||
str += '> </embed>';
|
||||
}
|
||||
|
||||
document.write(str);
|
||||
}
|
||||
|
||||
function AC_FL_RunContent(){
|
||||
var ret =
|
||||
AC_GetArgs
|
||||
( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
|
||||
, "application/x-shockwave-flash"
|
||||
);
|
||||
AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
|
||||
}
|
||||
|
||||
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
|
||||
var ret = new Object();
|
||||
ret.embedAttrs = new Object();
|
||||
ret.params = new Object();
|
||||
ret.objAttrs = new Object();
|
||||
for (var i=0; i < args.length; i=i+2){
|
||||
var currArg = args[i].toLowerCase();
|
||||
|
||||
switch (currArg){
|
||||
case "classid":
|
||||
break;
|
||||
case "pluginspage":
|
||||
ret.embedAttrs[args[i]] = args[i+1];
|
||||
break;
|
||||
case "src":
|
||||
case "movie":
|
||||
args[i+1] = AC_AddExtension(args[i+1], ext);
|
||||
ret.embedAttrs["src"] = args[i+1];
|
||||
ret.params[srcParamName] = args[i+1];
|
||||
break;
|
||||
case "onafterupdate":
|
||||
case "onbeforeupdate":
|
||||
case "onblur":
|
||||
case "oncellchange":
|
||||
case "onclick":
|
||||
case "ondblClick":
|
||||
case "ondrag":
|
||||
case "ondragend":
|
||||
case "ondragenter":
|
||||
case "ondragleave":
|
||||
case "ondragover":
|
||||
case "ondrop":
|
||||
case "onfinish":
|
||||
case "onfocus":
|
||||
case "onhelp":
|
||||
case "onmousedown":
|
||||
case "onmouseup":
|
||||
case "onmouseover":
|
||||
case "onmousemove":
|
||||
case "onmouseout":
|
||||
case "onkeypress":
|
||||
case "onkeydown":
|
||||
case "onkeyup":
|
||||
case "onload":
|
||||
case "onlosecapture":
|
||||
case "onpropertychange":
|
||||
case "onreadystatechange":
|
||||
case "onrowsdelete":
|
||||
case "onrowenter":
|
||||
case "onrowexit":
|
||||
case "onrowsinserted":
|
||||
case "onstart":
|
||||
case "onscroll":
|
||||
case "onbeforeeditfocus":
|
||||
case "onactivate":
|
||||
case "onbeforedeactivate":
|
||||
case "ondeactivate":
|
||||
case "type":
|
||||
case "codebase":
|
||||
ret.objAttrs[args[i]] = args[i+1];
|
||||
break;
|
||||
case "id":
|
||||
case "width":
|
||||
case "height":
|
||||
case "align":
|
||||
case "vspace":
|
||||
case "hspace":
|
||||
case "class":
|
||||
case "title":
|
||||
case "accesskey":
|
||||
case "name":
|
||||
case "tabindex":
|
||||
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
|
||||
break;
|
||||
default:
|
||||
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
|
||||
}
|
||||
}
|
||||
ret.objAttrs["classid"] = classid;
|
||||
if (mimeType) ret.embedAttrs["type"] = mimeType;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
6
bigbluebutton-core/html-template/history/history.css
Normal file
@ -0,0 +1,6 @@
|
||||
/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
|
||||
|
||||
#ie_historyFrame { width: 0px; height: 0px; display:none }
|
||||
#firefox_anchorDiv { width: 0px; height: 0px; display:none }
|
||||
#safari_formDiv { width: 0px; height: 0px; display:none }
|
||||
#safari_rememberDiv { width: 0px; height: 0px; display:none }
|
645
bigbluebutton-core/html-template/history/history.js
Normal file
@ -0,0 +1,645 @@
|
||||
BrowserHistoryUtils = {
|
||||
addEvent: function(elm, evType, fn, useCapture) {
|
||||
useCapture = useCapture || false;
|
||||
if (elm.addEventListener) {
|
||||
elm.addEventListener(evType, fn, useCapture);
|
||||
return true;
|
||||
}
|
||||
else if (elm.attachEvent) {
|
||||
var r = elm.attachEvent('on' + evType, fn);
|
||||
return r;
|
||||
}
|
||||
else {
|
||||
elm['on' + evType] = fn;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BrowserHistory = (function() {
|
||||
// type of browser
|
||||
var browser = {
|
||||
ie: false,
|
||||
firefox: false,
|
||||
safari: false,
|
||||
opera: false,
|
||||
version: -1
|
||||
};
|
||||
|
||||
// if setDefaultURL has been called, our first clue
|
||||
// that the SWF is ready and listening
|
||||
//var swfReady = false;
|
||||
|
||||
// the URL we'll send to the SWF once it is ready
|
||||
//var pendingURL = '';
|
||||
|
||||
// Default app state URL to use when no fragment ID present
|
||||
var defaultHash = '';
|
||||
|
||||
// Last-known app state URL
|
||||
var currentHref = document.location.href;
|
||||
|
||||
// Initial URL (used only by IE)
|
||||
var initialHref = document.location.href;
|
||||
|
||||
// Initial URL (used only by IE)
|
||||
var initialHash = document.location.hash;
|
||||
|
||||
// History frame source URL prefix (used only by IE)
|
||||
var historyFrameSourcePrefix = 'history/historyFrame.html?';
|
||||
|
||||
// History maintenance (used only by Safari)
|
||||
var currentHistoryLength = -1;
|
||||
|
||||
var historyHash = [];
|
||||
|
||||
var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
|
||||
|
||||
var backStack = [];
|
||||
var forwardStack = [];
|
||||
|
||||
var currentObjectId = null;
|
||||
|
||||
//UserAgent detection
|
||||
var useragent = navigator.userAgent.toLowerCase();
|
||||
|
||||
if (useragent.indexOf("opera") != -1) {
|
||||
browser.opera = true;
|
||||
} else if (useragent.indexOf("msie") != -1) {
|
||||
browser.ie = true;
|
||||
browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
|
||||
} else if (useragent.indexOf("safari") != -1) {
|
||||
browser.safari = true;
|
||||
browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
|
||||
} else if (useragent.indexOf("gecko") != -1) {
|
||||
browser.firefox = true;
|
||||
}
|
||||
|
||||
if (browser.ie == true && browser.version == 7) {
|
||||
window["_ie_firstload"] = false;
|
||||
}
|
||||
|
||||
// Accessor functions for obtaining specific elements of the page.
|
||||
function getHistoryFrame()
|
||||
{
|
||||
return document.getElementById('ie_historyFrame');
|
||||
}
|
||||
|
||||
function getAnchorElement()
|
||||
{
|
||||
return document.getElementById('firefox_anchorDiv');
|
||||
}
|
||||
|
||||
function getFormElement()
|
||||
{
|
||||
return document.getElementById('safari_formDiv');
|
||||
}
|
||||
|
||||
function getRememberElement()
|
||||
{
|
||||
return document.getElementById("safari_remember_field");
|
||||
}
|
||||
|
||||
/* Get the Flash player object for performing ExternalInterface callbacks. */
|
||||
function getPlayer(objectId) {
|
||||
var objectId = objectId || null;
|
||||
var player = null; /* AJH, needed? = document.getElementById(getPlayerId()); */
|
||||
if (browser.ie && objectId != null) {
|
||||
player = document.getElementById(objectId);
|
||||
}
|
||||
if (player == null) {
|
||||
player = document.getElementsByTagName('object')[0];
|
||||
}
|
||||
|
||||
if (player == null || player.object == null) {
|
||||
player = document.getElementsByTagName('embed')[0];
|
||||
}
|
||||
|
||||
return player;
|
||||
}
|
||||
|
||||
function getPlayers() {
|
||||
var players = [];
|
||||
if (players.length == 0) {
|
||||
var tmp = document.getElementsByTagName('object');
|
||||
players = tmp;
|
||||
}
|
||||
|
||||
if (players.length == 0 || players[0].object == null) {
|
||||
var tmp = document.getElementsByTagName('embed');
|
||||
players = tmp;
|
||||
}
|
||||
return players;
|
||||
}
|
||||
|
||||
function getIframeHash() {
|
||||
var doc = getHistoryFrame().contentWindow.document;
|
||||
var hash = String(doc.location.search);
|
||||
if (hash.length == 1 && hash.charAt(0) == "?") {
|
||||
hash = "";
|
||||
}
|
||||
else if (hash.length >= 2 && hash.charAt(0) == "?") {
|
||||
hash = hash.substring(1);
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
/* Get the current location hash excluding the '#' symbol. */
|
||||
function getHash() {
|
||||
// It would be nice if we could use document.location.hash here,
|
||||
// but it's faulty sometimes.
|
||||
var idx = document.location.href.indexOf('#');
|
||||
return (idx >= 0) ? document.location.href.substr(idx+1) : '';
|
||||
}
|
||||
|
||||
/* Get the current location hash excluding the '#' symbol. */
|
||||
function setHash(hash) {
|
||||
// It would be nice if we could use document.location.hash here,
|
||||
// but it's faulty sometimes.
|
||||
if (hash == '') hash = '#'
|
||||
document.location.hash = hash;
|
||||
}
|
||||
|
||||
function createState(baseUrl, newUrl, flexAppUrl) {
|
||||
return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
|
||||
}
|
||||
|
||||
/* Add a history entry to the browser.
|
||||
* baseUrl: the portion of the location prior to the '#'
|
||||
* newUrl: the entire new URL, including '#' and following fragment
|
||||
* flexAppUrl: the portion of the location following the '#' only
|
||||
*/
|
||||
function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
|
||||
|
||||
//delete all the history entries
|
||||
forwardStack = [];
|
||||
|
||||
if (browser.ie) {
|
||||
//Check to see if we are being asked to do a navigate for the first
|
||||
//history entry, and if so ignore, because it's coming from the creation
|
||||
//of the history iframe
|
||||
if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
|
||||
currentHref = initialHref;
|
||||
return;
|
||||
}
|
||||
if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
|
||||
newUrl = baseUrl + '#' + defaultHash;
|
||||
flexAppUrl = defaultHash;
|
||||
} else {
|
||||
// for IE, tell the history frame to go somewhere without a '#'
|
||||
// in order to get this entry into the browser history.
|
||||
getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
|
||||
}
|
||||
setHash(flexAppUrl);
|
||||
} else {
|
||||
|
||||
//ADR
|
||||
if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
|
||||
initialState = createState(baseUrl, newUrl, flexAppUrl);
|
||||
} else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
|
||||
backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
|
||||
}
|
||||
|
||||
if (browser.safari) {
|
||||
// for Safari, submit a form whose action points to the desired URL
|
||||
if (browser.version <= 419.3) {
|
||||
var file = window.location.pathname.toString();
|
||||
file = file.substring(file.lastIndexOf("/")+1);
|
||||
getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
|
||||
//get the current elements and add them to the form
|
||||
var qs = window.location.search.substring(1);
|
||||
var qs_arr = qs.split("&");
|
||||
for (var i = 0; i < qs_arr.length; i++) {
|
||||
var tmp = qs_arr[i].split("=");
|
||||
var elem = document.createElement("input");
|
||||
elem.type = "hidden";
|
||||
elem.name = tmp[0];
|
||||
elem.value = tmp[1];
|
||||
document.forms.historyForm.appendChild(elem);
|
||||
}
|
||||
document.forms.historyForm.submit();
|
||||
} else {
|
||||
top.location.hash = flexAppUrl;
|
||||
}
|
||||
// We also have to maintain the history by hand for Safari
|
||||
historyHash[history.length] = flexAppUrl;
|
||||
_storeStates();
|
||||
} else {
|
||||
// Otherwise, write an anchor into the page and tell the browser to go there
|
||||
addAnchor(flexAppUrl);
|
||||
setHash(flexAppUrl);
|
||||
}
|
||||
}
|
||||
backStack.push(createState(baseUrl, newUrl, flexAppUrl));
|
||||
}
|
||||
|
||||
function _storeStates() {
|
||||
if (browser.safari) {
|
||||
getRememberElement().value = historyHash.join(",");
|
||||
}
|
||||
}
|
||||
|
||||
function handleBackButton() {
|
||||
//The "current" page is always at the top of the history stack.
|
||||
var current = backStack.pop();
|
||||
if (!current) { return; }
|
||||
var last = backStack[backStack.length - 1];
|
||||
if (!last && backStack.length == 0){
|
||||
last = initialState;
|
||||
}
|
||||
forwardStack.push(current);
|
||||
}
|
||||
|
||||
function handleForwardButton() {
|
||||
//summary: private method. Do not call this directly.
|
||||
|
||||
var last = forwardStack.pop();
|
||||
if (!last) { return; }
|
||||
backStack.push(last);
|
||||
}
|
||||
|
||||
function handleArbitraryUrl() {
|
||||
//delete all the history entries
|
||||
forwardStack = [];
|
||||
}
|
||||
|
||||
/* Called periodically to poll to see if we need to detect navigation that has occurred */
|
||||
function checkForUrlChange() {
|
||||
|
||||
if (browser.ie) {
|
||||
if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
|
||||
//This occurs when the user has navigated to a specific URL
|
||||
//within the app, and didn't use browser back/forward
|
||||
//IE seems to have a bug where it stops updating the URL it
|
||||
//shows the end-user at this point, but programatically it
|
||||
//appears to be correct. Do a full app reload to get around
|
||||
//this issue.
|
||||
if (browser.version < 7) {
|
||||
currentHref = document.location.href;
|
||||
document.location.reload();
|
||||
} else {
|
||||
if (getHash() != getIframeHash()) {
|
||||
// this.iframe.src = this.blankURL + hash;
|
||||
var sourceToSet = historyFrameSourcePrefix + getHash();
|
||||
getHistoryFrame().src = sourceToSet;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (browser.safari) {
|
||||
// For Safari, we have to check to see if history.length changed.
|
||||
if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
|
||||
//alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
|
||||
// If it did change, then we have to look the old state up
|
||||
// in our hand-maintained array since document.location.hash
|
||||
// won't have changed, then call back into BrowserManager.
|
||||
currentHistoryLength = history.length;
|
||||
var flexAppUrl = historyHash[currentHistoryLength];
|
||||
if (flexAppUrl == '') {
|
||||
//flexAppUrl = defaultHash;
|
||||
}
|
||||
//ADR: to fix multiple
|
||||
if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
|
||||
var pl = getPlayers();
|
||||
for (var i = 0; i < pl.length; i++) {
|
||||
pl[i].browserURLChange(flexAppUrl);
|
||||
}
|
||||
} else {
|
||||
getPlayer().browserURLChange(flexAppUrl);
|
||||
}
|
||||
_storeStates();
|
||||
}
|
||||
}
|
||||
if (browser.firefox) {
|
||||
if (currentHref != document.location.href) {
|
||||
var bsl = backStack.length;
|
||||
|
||||
var urlActions = {
|
||||
back: false,
|
||||
forward: false,
|
||||
set: false
|
||||
}
|
||||
|
||||
if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
|
||||
urlActions.back = true;
|
||||
// FIXME: could this ever be a forward button?
|
||||
// we can't clear it because we still need to check for forwards. Ugg.
|
||||
// clearInterval(this.locationTimer);
|
||||
handleBackButton();
|
||||
}
|
||||
|
||||
// first check to see if we could have gone forward. We always halt on
|
||||
// a no-hash item.
|
||||
if (forwardStack.length > 0) {
|
||||
if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
|
||||
urlActions.forward = true;
|
||||
handleForwardButton();
|
||||
}
|
||||
}
|
||||
|
||||
// ok, that didn't work, try someplace back in the history stack
|
||||
if ((bsl >= 2) && (backStack[bsl - 2])) {
|
||||
if (backStack[bsl - 2].flexAppUrl == getHash()) {
|
||||
urlActions.back = true;
|
||||
handleBackButton();
|
||||
}
|
||||
}
|
||||
|
||||
if (!urlActions.back && !urlActions.forward) {
|
||||
var foundInStacks = {
|
||||
back: -1,
|
||||
forward: -1
|
||||
}
|
||||
|
||||
for (var i = 0; i < backStack.length; i++) {
|
||||
if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
|
||||
arbitraryUrl = true;
|
||||
foundInStacks.back = i;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < forwardStack.length; i++) {
|
||||
if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
|
||||
arbitraryUrl = true;
|
||||
foundInStacks.forward = i;
|
||||
}
|
||||
}
|
||||
handleArbitraryUrl();
|
||||
}
|
||||
|
||||
// Firefox changed; do a callback into BrowserManager to tell it.
|
||||
currentHref = document.location.href;
|
||||
var flexAppUrl = getHash();
|
||||
if (flexAppUrl == '') {
|
||||
//flexAppUrl = defaultHash;
|
||||
}
|
||||
//ADR: to fix multiple
|
||||
if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
|
||||
var pl = getPlayers();
|
||||
for (var i = 0; i < pl.length; i++) {
|
||||
pl[i].browserURLChange(flexAppUrl);
|
||||
}
|
||||
} else {
|
||||
getPlayer().browserURLChange(flexAppUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
//setTimeout(checkForUrlChange, 50);
|
||||
}
|
||||
|
||||
/* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
|
||||
function addAnchor(flexAppUrl)
|
||||
{
|
||||
if (document.getElementsByName(flexAppUrl).length == 0) {
|
||||
getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
|
||||
}
|
||||
}
|
||||
|
||||
var _initialize = function () {
|
||||
if (browser.ie)
|
||||
{
|
||||
var scripts = document.getElementsByTagName('script');
|
||||
for (var i = 0, s; s = scripts[i]; i++) {
|
||||
if (s.src.indexOf("history.js") > -1) {
|
||||
var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
|
||||
}
|
||||
}
|
||||
historyFrameSourcePrefix = iframe_location + "?";
|
||||
var src = historyFrameSourcePrefix;
|
||||
|
||||
var iframe = document.createElement("iframe");
|
||||
iframe.id = 'ie_historyFrame';
|
||||
iframe.name = 'ie_historyFrame';
|
||||
//iframe.src = historyFrameSourcePrefix;
|
||||
try {
|
||||
document.body.appendChild(iframe);
|
||||
} catch(e) {
|
||||
setTimeout(function() {
|
||||
document.body.appendChild(iframe);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (browser.safari)
|
||||
{
|
||||
var rememberDiv = document.createElement("div");
|
||||
rememberDiv.id = 'safari_rememberDiv';
|
||||
document.body.appendChild(rememberDiv);
|
||||
rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
|
||||
|
||||
var formDiv = document.createElement("div");
|
||||
formDiv.id = 'safari_formDiv';
|
||||
document.body.appendChild(formDiv);
|
||||
|
||||
var reloader_content = document.createElement('div');
|
||||
reloader_content.id = 'safarireloader';
|
||||
var scripts = document.getElementsByTagName('script');
|
||||
for (var i = 0, s; s = scripts[i]; i++) {
|
||||
if (s.src.indexOf("history.js") > -1) {
|
||||
html = (new String(s.src)).replace(".js", ".html");
|
||||
}
|
||||
}
|
||||
reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
|
||||
document.body.appendChild(reloader_content);
|
||||
reloader_content.style.position = 'absolute';
|
||||
reloader_content.style.left = reloader_content.style.top = '-9999px';
|
||||
iframe = reloader_content.getElementsByTagName('iframe')[0];
|
||||
|
||||
if (document.getElementById("safari_remember_field").value != "" ) {
|
||||
historyHash = document.getElementById("safari_remember_field").value.split(",");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (browser.firefox)
|
||||
{
|
||||
var anchorDiv = document.createElement("div");
|
||||
anchorDiv.id = 'firefox_anchorDiv';
|
||||
document.body.appendChild(anchorDiv);
|
||||
}
|
||||
|
||||
//setTimeout(checkForUrlChange, 50);
|
||||
}
|
||||
|
||||
return {
|
||||
historyHash: historyHash,
|
||||
backStack: function() { return backStack; },
|
||||
forwardStack: function() { return forwardStack },
|
||||
getPlayer: getPlayer,
|
||||
initialize: function(src) {
|
||||
_initialize(src);
|
||||
},
|
||||
setURL: function(url) {
|
||||
document.location.href = url;
|
||||
},
|
||||
getURL: function() {
|
||||
return document.location.href;
|
||||
},
|
||||
getTitle: function() {
|
||||
return document.title;
|
||||
},
|
||||
setTitle: function(title) {
|
||||
try {
|
||||
backStack[backStack.length - 1].title = title;
|
||||
} catch(e) { }
|
||||
//if on safari, set the title to be the empty string.
|
||||
if (browser.safari) {
|
||||
if (title == "") {
|
||||
try {
|
||||
var tmp = window.location.href.toString();
|
||||
title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
|
||||
} catch(e) {
|
||||
title = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
document.title = title;
|
||||
},
|
||||
setDefaultURL: function(def)
|
||||
{
|
||||
defaultHash = def;
|
||||
def = getHash();
|
||||
//trailing ? is important else an extra frame gets added to the history
|
||||
//when navigating back to the first page. Alternatively could check
|
||||
//in history frame navigation to compare # and ?.
|
||||
if (browser.ie)
|
||||
{
|
||||
window['_ie_firstload'] = true;
|
||||
var sourceToSet = historyFrameSourcePrefix + def;
|
||||
var func = function() {
|
||||
getHistoryFrame().src = sourceToSet;
|
||||
window.location.replace("#" + def);
|
||||
setInterval(checkForUrlChange, 50);
|
||||
}
|
||||
try {
|
||||
func();
|
||||
} catch(e) {
|
||||
window.setTimeout(function() { func(); }, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (browser.safari)
|
||||
{
|
||||
currentHistoryLength = history.length;
|
||||
if (historyHash.length == 0) {
|
||||
historyHash[currentHistoryLength] = def;
|
||||
var newloc = "#" + def;
|
||||
window.location.replace(newloc);
|
||||
} else {
|
||||
//alert(historyHash[historyHash.length-1]);
|
||||
}
|
||||
//setHash(def);
|
||||
setInterval(checkForUrlChange, 50);
|
||||
}
|
||||
|
||||
|
||||
if (browser.firefox || browser.opera)
|
||||
{
|
||||
var reg = new RegExp("#" + def + "$");
|
||||
if (window.location.toString().match(reg)) {
|
||||
} else {
|
||||
var newloc ="#" + def;
|
||||
window.location.replace(newloc);
|
||||
}
|
||||
setInterval(checkForUrlChange, 50);
|
||||
//setHash(def);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/* Set the current browser URL; called from inside BrowserManager to propagate
|
||||
* the application state out to the container.
|
||||
*/
|
||||
setBrowserURL: function(flexAppUrl, objectId) {
|
||||
if (browser.ie && typeof objectId != "undefined") {
|
||||
currentObjectId = objectId;
|
||||
}
|
||||
//fromIframe = fromIframe || false;
|
||||
//fromFlex = fromFlex || false;
|
||||
//alert("setBrowserURL: " + flexAppUrl);
|
||||
//flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
|
||||
|
||||
var pos = document.location.href.indexOf('#');
|
||||
var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
|
||||
var newUrl = baseUrl + '#' + flexAppUrl;
|
||||
|
||||
if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
|
||||
currentHref = newUrl;
|
||||
addHistoryEntry(baseUrl, newUrl, flexAppUrl);
|
||||
currentHistoryLength = history.length;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
browserURLChange: function(flexAppUrl) {
|
||||
var objectId = null;
|
||||
if (browser.ie && currentObjectId != null) {
|
||||
objectId = currentObjectId;
|
||||
}
|
||||
pendingURL = '';
|
||||
|
||||
if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
|
||||
var pl = getPlayers();
|
||||
for (var i = 0; i < pl.length; i++) {
|
||||
try {
|
||||
pl[i].browserURLChange(flexAppUrl);
|
||||
} catch(e) { }
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
getPlayer(objectId).browserURLChange(flexAppUrl);
|
||||
} catch(e) { }
|
||||
}
|
||||
|
||||
currentObjectId = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
// Initialization
|
||||
|
||||
// Automated unit testing and other diagnostics
|
||||
|
||||
function setURL(url)
|
||||
{
|
||||
document.location.href = url;
|
||||
}
|
||||
|
||||
function backButton()
|
||||
{
|
||||
history.back();
|
||||
}
|
||||
|
||||
function forwardButton()
|
||||
{
|
||||
history.forward();
|
||||
}
|
||||
|
||||
function goForwardOrBackInHistory(step)
|
||||
{
|
||||
history.go(step);
|
||||
}
|
||||
|
||||
//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
|
||||
(function(i) {
|
||||
var u =navigator.userAgent;var e=/*@cc_on!@*/false;
|
||||
var st = setTimeout;
|
||||
if(/webkit/i.test(u)){
|
||||
st(function(){
|
||||
var dr=document.readyState;
|
||||
if(dr=="loaded"||dr=="complete"){i()}
|
||||
else{st(arguments.callee,10);}},10);
|
||||
} else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
|
||||
document.addEventListener("DOMContentLoaded",i,false);
|
||||
} else if(e){
|
||||
(function(){
|
||||
var t=document.createElement('doc:rdy');
|
||||
try{t.doScroll('left');
|
||||
i();t=null;
|
||||
}catch(e){st(arguments.callee,0);}})();
|
||||
} else{
|
||||
window.onload=i;
|
||||
}
|
||||
})( function() {BrowserHistory.initialize();} );
|
29
bigbluebutton-core/html-template/history/historyFrame.html
Normal file
@ -0,0 +1,29 @@
|
||||
<html>
|
||||
<head>
|
||||
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
||||
<META HTTP-EQUIV="Expires" CONTENT="-1">
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
function processUrl()
|
||||
{
|
||||
|
||||
var pos = url.indexOf("?");
|
||||
url = pos != -1 ? url.substr(pos + 1) : "";
|
||||
if (!parent._ie_firstload) {
|
||||
parent.BrowserHistory.setBrowserURL(url);
|
||||
try {
|
||||
parent.BrowserHistory.browserURLChange(url);
|
||||
} catch(e) { }
|
||||
} else {
|
||||
parent._ie_firstload = false;
|
||||
}
|
||||
}
|
||||
|
||||
var url = document.location.href;
|
||||
processUrl();
|
||||
document.write(url);
|
||||
</script>
|
||||
Hidden frame for Browser History support.
|
||||
</body>
|
||||
</html>
|
121
bigbluebutton-core/html-template/index.template.html
Normal file
@ -0,0 +1,121 @@
|
||||
<!-- saved from url=(0014)about:internet -->
|
||||
<html 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>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<!-- BEGIN Browser History required section -->
|
||||
<link rel="stylesheet" type="text/css" href="history/history.css" />
|
||||
<!-- END Browser History required section -->
|
||||
|
||||
<title>${title}</title>
|
||||
<script src="AC_OETags.js" language="javascript"></script>
|
||||
|
||||
<!-- BEGIN Browser History required section -->
|
||||
<script src="history/history.js" language="javascript"></script>
|
||||
<!-- END Browser History required section -->
|
||||
|
||||
<style>
|
||||
body { margin: 0px; overflow:hidden }
|
||||
</style>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
// -----------------------------------------------------------------------------
|
||||
// Globals
|
||||
// Major version of Flash required
|
||||
var requiredMajorVersion = ${version_major};
|
||||
// Minor version of Flash required
|
||||
var requiredMinorVersion = ${version_minor};
|
||||
// Minor version of Flash required
|
||||
var requiredRevision = ${version_revision};
|
||||
// -----------------------------------------------------------------------------
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body scroll="no">
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
|
||||
var hasProductInstall = DetectFlashVer(6, 0, 65);
|
||||
|
||||
// Version check based upon the values defined in globals
|
||||
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
|
||||
|
||||
if ( hasProductInstall && !hasRequestedVersion ) {
|
||||
// DO NOT MODIFY THE FOLLOWING FOUR LINES
|
||||
// Location visited after installation is complete if installation is required
|
||||
var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
|
||||
var MMredirectURL = window.location;
|
||||
document.title = document.title.slice(0, 47) + " - Flash Player Installation";
|
||||
var MMdoctitle = document.title;
|
||||
|
||||
AC_FL_RunContent(
|
||||
"src", "playerProductInstall",
|
||||
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
|
||||
"width", "${width}",
|
||||
"height", "${height}",
|
||||
"align", "middle",
|
||||
"id", "${application}",
|
||||
"quality", "high",
|
||||
"bgcolor", "${bgcolor}",
|
||||
"name", "${application}",
|
||||
"allowScriptAccess","sameDomain",
|
||||
"type", "application/x-shockwave-flash",
|
||||
"pluginspage", "http://www.adobe.com/go/getflashplayer"
|
||||
);
|
||||
} else if (hasRequestedVersion) {
|
||||
// if we've detected an acceptable version
|
||||
// embed the Flash Content SWF when all tests are passed
|
||||
AC_FL_RunContent(
|
||||
"src", "${swf}",
|
||||
"width", "${width}",
|
||||
"height", "${height}",
|
||||
"align", "middle",
|
||||
"id", "${application}",
|
||||
"quality", "high",
|
||||
"bgcolor", "${bgcolor}",
|
||||
"name", "${application}",
|
||||
"allowScriptAccess","sameDomain",
|
||||
"type", "application/x-shockwave-flash",
|
||||
"pluginspage", "http://www.adobe.com/go/getflashplayer"
|
||||
);
|
||||
} else { // flash is too old or we can't detect the plugin
|
||||
var alternateContent = 'Alternate HTML content should be placed here. '
|
||||
+ 'This content requires the Adobe Flash Player. '
|
||||
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
|
||||
document.write(alternateContent); // insert non-flash content
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
<noscript>
|
||||
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
|
||||
id="${application}" width="${width}" height="${height}"
|
||||
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
|
||||
<param name="movie" value="${swf}.swf" />
|
||||
<param name="quality" value="high" />
|
||||
<param name="bgcolor" value="${bgcolor}" />
|
||||
<param name="allowScriptAccess" value="sameDomain" />
|
||||
<embed src="${swf}.swf" quality="high" bgcolor="${bgcolor}"
|
||||
width="${width}" height="${height}" name="${application}" align="middle"
|
||||
play="true"
|
||||
loop="false"
|
||||
quality="high"
|
||||
allowScriptAccess="sameDomain"
|
||||
type="application/x-shockwave-flash"
|
||||
pluginspage="http://www.adobe.com/go/getflashplayer">
|
||||
</embed>
|
||||
</object>
|
||||
</noscript>
|
||||
</body>
|
||||
</html>
|
BIN
bigbluebutton-core/html-template/playerProductInstall.swf
Normal file
9
bigbluebutton-core/src/BigBlueButton.mxml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
xmlns:mainView="org.bigbluebutton.main.view.components.*"
|
||||
pageTitle="Big Blue Button"
|
||||
layout="absolute">
|
||||
|
||||
<mainView:MainApplicationShell id="mainShell"/>
|
||||
|
||||
</mx:Application>
|
@ -0,0 +1,105 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.common
|
||||
{
|
||||
import mx.modules.ModuleBase;
|
||||
import flexlib.mdi.containers.MDIWindow;
|
||||
import org.bigbluebutton.main.view.components.MainApplicationShell;
|
||||
|
||||
/**
|
||||
* This is an abstract-like class which is a base for a BigBlueButton Module. Extends this class if you
|
||||
* wish to dynamicaly add your module to the MainApplicationShell.
|
||||
* You can add the module by calling the addModule() method of the MainApplicationShellMediator
|
||||
* @author Denis Zgonjanin
|
||||
*
|
||||
*/
|
||||
public class BigBlueButtonModule extends ModuleBase
|
||||
{
|
||||
public var preferedX:Number;
|
||||
public var preferedY:Number;
|
||||
private var MDIComponent:MDIWindow;
|
||||
public var name:String;
|
||||
private var _router:Router;
|
||||
public var mshell:MainApplicationShell;
|
||||
|
||||
public function BigBlueButtonModule(name:String)
|
||||
{
|
||||
super();
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return - The X coordinate of the position where you'd like the module to appear on the main screen
|
||||
*
|
||||
*/
|
||||
public function getXPosition():Number{
|
||||
return this.preferedX;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return - The X coordinate of the position where you'd like the module to appear on the main screen
|
||||
*
|
||||
*/
|
||||
public function getYPosition():Number{
|
||||
return this.preferedY;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return - The GUI component of this module. The component must be MDI compatible, since BBB is
|
||||
* using the Flexlib MDI library
|
||||
*
|
||||
*/
|
||||
public function getMDIComponent():MDIWindow{
|
||||
return this.MDIComponent;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called on all modules by the MainApplicationShell when the user logs out.
|
||||
* Handle any module-specific logout tasks here (network connection closures, etc...)
|
||||
* If using PureMVC, make sure you call the removeCore() method in the facade in order to
|
||||
* clean up any leftover singletons.
|
||||
* The GUI component of the module is removed from the MainApplicationShell prior to this method
|
||||
* being called.
|
||||
*
|
||||
*/
|
||||
public function logout():void{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Accept the PureMVC piping utility router
|
||||
* @param router
|
||||
* @param shell
|
||||
*
|
||||
*/
|
||||
public function acceptRouter(router:Router, shell:MainApplicationShell):void{
|
||||
mshell = shell;
|
||||
_router = router;
|
||||
}
|
||||
|
||||
public function get router():Router{
|
||||
return _router;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
66
bigbluebutton-core/src/org/bigbluebutton/common/Constants.as
Normal file
@ -0,0 +1,66 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.common
|
||||
{
|
||||
import mx.core.Application;
|
||||
|
||||
/**
|
||||
* Holds various constants
|
||||
* NOTE: PLEASE DON'T CHANGE THE CONSTANTS, JUST CHANGE THE STATIC VARIABLES. ADD YOUR OWN CONSTANTS IF
|
||||
* YOU WANT
|
||||
* @author Denis Zgonjanin
|
||||
*
|
||||
*/
|
||||
public class Constants
|
||||
{
|
||||
public static const DEMO_RED5_HOST:String = "present.carleton.ca";
|
||||
public static const DEMO_PRESENTATION_HOST:String = "present.carleton.ca";
|
||||
public static const KIRUS_COMP:String = "134.117.58.103";
|
||||
|
||||
public static const HTML_RED5_HOST:String = mx.core.Application.application.parameters.red5Host;
|
||||
public static const HTML_PRES_HOST:String = mx.core.Application.application.parameters.presentationHost;
|
||||
|
||||
public static const NEW_RELATIVE_FILE_UPLOAD:String = "/bigbluebutton/file";
|
||||
//The old relative file upload is used for testing the new client on the old server
|
||||
//at present.carleton.ca. The reference to this string can be found in the
|
||||
//PresentationApplication class, in the presentation module under model
|
||||
public static const OLD_RELATIVE_FILE_UPLOAD:String = "/blindside/file";
|
||||
|
||||
public static var red5Host:String = HTML_RED5_HOST;
|
||||
public static var presentationHost:String = HTML_PRES_HOST;
|
||||
public static var relativeFileUpload:String = NEW_RELATIVE_FILE_UPLOAD;
|
||||
|
||||
/**
|
||||
* If the client is being run from a server, the URLs will be retrieved from the index.template.html
|
||||
* file. If we're running the client from an IDE, it will connect to the Carleton demo server.
|
||||
* This is basicaly meant to ease development. Call this method when the application starts up.
|
||||
*
|
||||
*/
|
||||
public static function setHost():void{
|
||||
|
||||
red5Host = DEMO_RED5_HOST;
|
||||
presentationHost = DEMO_PRESENTATION_HOST;
|
||||
//if (HTML_RED5_HOST == "localhost") red5Host = DEMO_RED5_HOST;
|
||||
//if (HTML_PRES_HOST == "localhost") presentationHost = DEMO_PRESENTATION_HOST;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.common
|
||||
{
|
||||
import org.bigbluebutton.main.view.components.MainApplicationShell;
|
||||
|
||||
public interface IRouterAware
|
||||
{
|
||||
function acceptRouter(router : Router, shell : MainApplicationShell) : void;
|
||||
}
|
||||
}
|
130
bigbluebutton-core/src/org/bigbluebutton/common/Images.as
Normal file
@ -0,0 +1,130 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.common
|
||||
{
|
||||
[Bindable]
|
||||
public class Images
|
||||
{
|
||||
[Embed(source="assets/images/group.png")]
|
||||
public var participants_img:Class;
|
||||
|
||||
[Embed(source="assets/images/user_gray.png")]
|
||||
public var user_gray:Class;
|
||||
|
||||
[Embed(source="assets/images/user_green.png")]
|
||||
public var user_green:Class;
|
||||
|
||||
[Embed(source="assets/images/user_orange.png")]
|
||||
public var user_orange:Class;
|
||||
|
||||
[Embed(source="assets/images/user_red.png")]
|
||||
public var user_red:Class;
|
||||
|
||||
[Embed(source="assets/images/user.png")]
|
||||
public var user:Class;
|
||||
|
||||
[Embed(source="assets/images/administrator.gif")]
|
||||
public var admin:Class;
|
||||
|
||||
[Embed(source="assets/images/participant.gif")]
|
||||
public var participant:Class;
|
||||
|
||||
[Embed(source="assets/images/participant-mute.png")]
|
||||
public var participant_mute:Class;
|
||||
|
||||
[Embed(source="assets/images/raisehand.png")]
|
||||
public var raisehand:Class;
|
||||
|
||||
[Embed(source="assets/images/sound_mute.png")]
|
||||
public var sound_mute:Class;
|
||||
|
||||
[Embed(source="assets/images/sound_none.png")]
|
||||
public var sound_none:Class;
|
||||
|
||||
[Embed(source="assets/images/sound.png")]
|
||||
public var sound:Class;
|
||||
|
||||
[Embed(source="assets/images/cancel.png")]
|
||||
public var cancel_user:Class;
|
||||
|
||||
[Embed(source="assets/images/waaaht.png")]
|
||||
public var eject_user:Class;
|
||||
|
||||
[Embed(source="assets/images/bin.png")]
|
||||
public var trash_bin:Class;
|
||||
|
||||
[Embed(source="assets/images/bin_closed.png")]
|
||||
public var bin_closed:Class;
|
||||
|
||||
[Embed(source="assets/images/door_in.png")]
|
||||
public var door_in:Class;
|
||||
|
||||
[Embed(source="assets/images/door_open.png")]
|
||||
public var door_open:Class;
|
||||
|
||||
[Embed(source="assets/images/door_out.png")]
|
||||
public var door_out:Class;
|
||||
|
||||
[Embed(source="assets/images/door.png")]
|
||||
public var door:Class;
|
||||
|
||||
[Embed(source="assets/images/application_get.png")]
|
||||
public var upload_file:Class;
|
||||
|
||||
[Embed(source="assets/images/table_refresh.png")]
|
||||
public var refresh_slides:Class;
|
||||
|
||||
[Embed(source="assets/images/table.png")]
|
||||
public var presentation:Class;
|
||||
|
||||
[Embed(source="assets/images/tfn.png")]
|
||||
public var blindside:Class;
|
||||
|
||||
[Embed(source="assets/images/connect.png")]
|
||||
public var connect:Class;
|
||||
|
||||
[Embed(source="assets/images/disconnect.png")]
|
||||
public var disconnect:Class;
|
||||
|
||||
[Embed(source="assets/images/link.png")]
|
||||
public var link:Class;
|
||||
|
||||
[Embed(source="assets/images/webcam.png")]
|
||||
public var webcam:Class;
|
||||
|
||||
[Embed(source="assets/images/link_break.png")]
|
||||
public var link_break:Class;
|
||||
|
||||
[Embed(source="assets/images/page_white_powerpoint.png")]
|
||||
public var powerpoint:Class;
|
||||
|
||||
[Embed(source="assets/images/pdf_icon.png")]
|
||||
public var pdf:Class;
|
||||
|
||||
[Embed(source="assets/images/comment.gif")]
|
||||
public var chat_request:Class;
|
||||
|
||||
[Embed(source="assets/images/comment_yellow.gif")]
|
||||
public var chat_request_new:Class;
|
||||
|
||||
[Embed(source="assets/images/telephone.png")]
|
||||
public var phone:Class;
|
||||
}
|
||||
}
|
64
bigbluebutton-core/src/org/bigbluebutton/common/InputPipe.as
Normal file
@ -0,0 +1,64 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.common
|
||||
{
|
||||
import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeFitting;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.plumbing.Pipe;
|
||||
|
||||
/**
|
||||
* The class is used by the module to receive messages from the Router.
|
||||
*/
|
||||
public class InputPipe implements IPipeFitting
|
||||
{
|
||||
private var NAME : String;
|
||||
|
||||
// Pipe used to send message into the module.
|
||||
private var output : Pipe = new Pipe();
|
||||
|
||||
public function InputPipe(name : String)
|
||||
{
|
||||
NAME = name;
|
||||
}
|
||||
|
||||
public function get name() : String
|
||||
{
|
||||
return NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by the router to send message into the module.
|
||||
*/
|
||||
public function write( message:IPipeMessage ) : Boolean
|
||||
{
|
||||
return output.write( message );
|
||||
}
|
||||
|
||||
public function connect( listener:IPipeFitting ) : Boolean
|
||||
{
|
||||
return output.connect(listener);
|
||||
}
|
||||
|
||||
public function disconnect( ) : IPipeFitting
|
||||
{
|
||||
return output.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.common
|
||||
{
|
||||
import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeFitting;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.plumbing.Pipe;
|
||||
|
||||
/**
|
||||
* This class is used by the module to send messages to the Router.
|
||||
*/
|
||||
public class OutputPipe implements IPipeFitting
|
||||
{
|
||||
private var NAME : String;
|
||||
|
||||
// Pipe used to receive messages from the module.
|
||||
private var input : Pipe = new Pipe();
|
||||
|
||||
public function OutputPipe(name : String)
|
||||
{
|
||||
NAME = name;
|
||||
}
|
||||
|
||||
public function get name() : String
|
||||
{
|
||||
return NAME;
|
||||
}
|
||||
|
||||
public function connect( output:IPipeFitting ) : Boolean
|
||||
{
|
||||
return input.connect(output);
|
||||
}
|
||||
|
||||
public function disconnect( ) : IPipeFitting
|
||||
{
|
||||
return input.disconnect();
|
||||
}
|
||||
|
||||
/**
|
||||
* To send a message, add a header with SRC and TO fields as a convention.
|
||||
* The Router will look at the TO field and routes the message to the
|
||||
* correct inputpipe for a module.
|
||||
* e.g. // create a message
|
||||
* var messageToSend:IPipeMessage = new Message( Message.NORMAL,
|
||||
* { SRC:'MAININPUT', TO: 'LOGGERINPUT' },
|
||||
* new XML(<testMessage testAtt='Hello'/>),
|
||||
* Message.PRIORITY_HIGH );
|
||||
*/
|
||||
public function write( message:IPipeMessage ) : Boolean
|
||||
{
|
||||
return input.write(message);
|
||||
}
|
||||
}
|
||||
}
|
28
bigbluebutton-core/src/org/bigbluebutton/common/Role.as
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.common
|
||||
{
|
||||
public class Role
|
||||
{
|
||||
public static const VIEWER : String = "VIEWER";
|
||||
public static const MODERATOR : String = "MODERATOR";
|
||||
public static const ADMINISTRATOR : String = "ADMINISTRATOR";
|
||||
}
|
||||
}
|
97
bigbluebutton-core/src/org/bigbluebutton/common/Router.as
Normal file
@ -0,0 +1,97 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.common
|
||||
{
|
||||
import org.bigbluebutton.main.view.components.MainApplicationShell;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeFitting;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.plumbing.Junction;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.plumbing.PipeListener;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.plumbing.TeeMerge;
|
||||
|
||||
/**
|
||||
* The Router is responsible for routing messages between cores/modules
|
||||
* in the BigBlueButton system.
|
||||
*
|
||||
* Modules register an InputPipe where it wants to receive messages and
|
||||
* an OutputPipe where it uses to send messages to other modules.
|
||||
*/
|
||||
public class Router
|
||||
{
|
||||
// Listens from messages from the core and routes messages.
|
||||
private var inputMessageRouter : PipeListener;
|
||||
|
||||
// Mergers all OutputPipes from the modules so that the Router
|
||||
// will have only one listener.
|
||||
// outpipe --->|
|
||||
// outpipe --->|---> listener ---> inputpipe
|
||||
// outpipe --->|
|
||||
//
|
||||
private var teeMerge:TeeMerge = new TeeMerge( );
|
||||
|
||||
// Stores all our INPUT and OUTPUT Pipes
|
||||
private var junction : Junction = new Junction();
|
||||
|
||||
private var rshell : MainApplicationShell;
|
||||
|
||||
public function Router(shell : MainApplicationShell = null)
|
||||
{
|
||||
rshell = shell;
|
||||
inputMessageRouter = new PipeListener(this, routeMessage);
|
||||
teeMerge.connect(inputMessageRouter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register an InputPipe to receive a message from the Router.
|
||||
*/
|
||||
public function registerInputPipe(name : String, pipe: IPipeFitting) : void
|
||||
{
|
||||
// Register the pipe as an OUTPUT because the Router will use this
|
||||
// pipe to send OUT to the module.
|
||||
junction.registerPipe(name, Junction.OUTPUT, pipe);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register an OutputPipe to send a message to other modules through the Router.
|
||||
*/
|
||||
public function registerOutputPipe(name : String, pipe: IPipeFitting) : void
|
||||
{
|
||||
// Register the pipe as an INPUT because the Router will use this
|
||||
// pipe to receive messages from the module.
|
||||
junction.registerPipe(name, Junction.INPUT, pipe);
|
||||
teeMerge.connectInput(pipe);
|
||||
}
|
||||
|
||||
/**
|
||||
* Routes the message using the TO field in the Message Header.
|
||||
* The TO field contains the name of the INPUT Pipe.
|
||||
*/
|
||||
private function routeMessage(message:IPipeMessage):void
|
||||
{
|
||||
//rshell.debugLog.text = 'routing message to ' + message.getHeader().TO;
|
||||
|
||||
var TO : String = message.getHeader().TO;
|
||||
var haspipe : Boolean = junction.hasOutputPipe(TO);
|
||||
//rshell.debugLog.text = 'There is a pipe with name ' + message.getHeader().TO + haspipe;
|
||||
var success: Boolean = junction.sendMessage(TO, message);
|
||||
//rshell.debugLog.text = 'routing message to ' + message.getHeader().TO + success;
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 139 B |
After Width: | Height: | Size: 581 B |
After Width: | Height: | Size: 476 B |
After Width: | Height: | Size: 363 B |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 587 B |
After Width: | Height: | Size: 257 B |
After Width: | Height: | Size: 257 B |
After Width: | Height: | Size: 748 B |
After Width: | Height: | Size: 796 B |
After Width: | Height: | Size: 412 B |
After Width: | Height: | Size: 693 B |
After Width: | Height: | Size: 508 B |
After Width: | Height: | Size: 688 B |
After Width: | Height: | Size: 753 B |
@ -0,0 +1,22 @@
|
||||
Silk icon set 1.3
|
||||
|
||||
_________________________________________
|
||||
Mark James
|
||||
http://www.famfamfam.com/lab/icons/silk/
|
||||
_________________________________________
|
||||
|
||||
This work is licensed under a
|
||||
Creative Commons Attribution 2.5 License.
|
||||
[ http://creativecommons.org/licenses/by/2.5/ ]
|
||||
|
||||
This means you may use it for any purpose,
|
||||
and make any changes you like.
|
||||
All I ask is that you include a link back
|
||||
to this page in your credits.
|
||||
|
||||
Are you using this icon set? Send me an email
|
||||
(including a link or picture if available) to
|
||||
mjames@gmail.com
|
||||
|
||||
Any other questions about this icon set please
|
||||
contact mjames@gmail.com
|
After Width: | Height: | Size: 343 B |
After Width: | Height: | Size: 657 B |
After Width: | Height: | Size: 858 B |
After Width: | Height: | Size: 588 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 143 B |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 835 B |
After Width: | Height: | Size: 610 B |
After Width: | Height: | Size: 474 B |
After Width: | Height: | Size: 417 B |
After Width: | Height: | Size: 566 B |
After Width: | Height: | Size: 795 B |
After Width: | Height: | Size: 791 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 741 B |
After Width: | Height: | Size: 706 B |
After Width: | Height: | Size: 722 B |
After Width: | Height: | Size: 723 B |
After Width: | Height: | Size: 717 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 728 B |
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.main
|
||||
{
|
||||
/**
|
||||
* Contains the constants being used in the application piping
|
||||
* @author dev_team@bigbluebutton.org
|
||||
*
|
||||
*/
|
||||
public class MainApplicationConstants
|
||||
{
|
||||
public static const FROM_MAIN:String = 'MAIN_SRC_ADDR';
|
||||
public static const TO_MAIN:String = 'MAIN_DST_ADDR';
|
||||
|
||||
public static const ADD_WINDOW_MSG:String = 'ADD_WINDOW_MSG';
|
||||
public static const REMOVE_WINDOW_MSG:String = 'REMOVE_WINDOW_MSG';
|
||||
|
||||
public static const LOGIN_COMPLETE:String = "LOGIN_COMPLETE";
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.main
|
||||
{
|
||||
import mx.collections.ArrayCollection;
|
||||
|
||||
import org.bigbluebutton.common.BigBlueButtonModule;
|
||||
import org.bigbluebutton.main.controller.StartupCommand;
|
||||
import org.bigbluebutton.main.view.components.MainApplicationShell;
|
||||
import org.bigbluebutton.modules.viewers.ViewersFacade;
|
||||
import org.bigbluebutton.modules.viewers.model.business.Conference;
|
||||
import org.bigbluebutton.modules.viewers.model.vo.User;
|
||||
import org.puremvc.as3.multicore.interfaces.IFacade;
|
||||
import org.puremvc.as3.multicore.patterns.facade.Facade;
|
||||
/**
|
||||
*
|
||||
* Facade for the Shell
|
||||
*
|
||||
*/
|
||||
public class MainApplicationFacade extends Facade implements IFacade
|
||||
{
|
||||
// Notification constants
|
||||
public static const STARTUP:String = 'startup';
|
||||
public static const ADD_WINDOW1:String = 'addWindow';
|
||||
public static const REMOVE_WINDOW1:String = 'removeWindow';
|
||||
public static const OPEN_CAMERA:String = "open_camera_window";
|
||||
|
||||
public static const ADD_MODULE:String = "Add New Module";
|
||||
|
||||
public function MainApplicationFacade(key:String)
|
||||
{
|
||||
super(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Singleton ApplicationFacade Factory Method
|
||||
*/
|
||||
public static function getInstance( key:String ) : MainApplicationFacade
|
||||
{
|
||||
if ( instanceMap[ key ] == null ) instanceMap[ key ] = new MainApplicationFacade( key );
|
||||
return instanceMap[ key ] as MainApplicationFacade;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register Commands with the Controller
|
||||
*/
|
||||
override protected function initializeController( ) : void
|
||||
{
|
||||
super.initializeController();
|
||||
registerCommand( STARTUP, StartupCommand );
|
||||
}
|
||||
|
||||
/**
|
||||
* Application startup
|
||||
*
|
||||
* @param app a reference to the application component
|
||||
*/
|
||||
public function startup( app:MainApplicationShell ):void
|
||||
{
|
||||
sendNotification( STARTUP, app );
|
||||
}
|
||||
|
||||
//public function openViewCamera(user:User):void{
|
||||
// sendNotification(OPEN_CAMERA, user);
|
||||
//}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return - The local client User object
|
||||
*
|
||||
*/
|
||||
public function getClientUser():User{
|
||||
var conf:Conference = ViewersFacade.getInstance().retrieveMediator(Conference.NAME) as Conference;
|
||||
return conf.me;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return - The User objects of all people in the conference
|
||||
*
|
||||
*/
|
||||
public function getAllUsers():ArrayCollection{
|
||||
var conf:Conference = ViewersFacade.getInstance().retrieveMediator(Conference.NAME) as Conference;
|
||||
return conf.users;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return - The Conference object of the conference the client is conencted to
|
||||
*
|
||||
*/
|
||||
public function getConference():Conference{
|
||||
var conf:Conference = ViewersFacade.getInstance().retrieveMediator(Conference.NAME) as Conference;
|
||||
return conf;
|
||||
}
|
||||
|
||||
public function addModule(module:BigBlueButtonModule):void{
|
||||
sendNotification(ADD_MODULE, module);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.main.controller
|
||||
{
|
||||
import org.bigbluebutton.main.view.MainApplicationShellMediator;
|
||||
import org.bigbluebutton.main.view.components.MainApplicationShell;
|
||||
import org.puremvc.as3.multicore.interfaces.ICommand;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
|
||||
/**
|
||||
*
|
||||
* Registers the main mediator with the main facade
|
||||
*
|
||||
*/
|
||||
public class StartupCommand extends SimpleCommand implements ICommand
|
||||
{
|
||||
override public function execute(note:INotification):void
|
||||
{
|
||||
var app:MainApplicationShell = note.getBody() as MainApplicationShell;
|
||||
facade.registerMediator( new MainApplicationShellMediator( app ) );
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.main.view
|
||||
{
|
||||
import org.puremvc.as3.multicore.interfaces.IMediator;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.mediator.Mediator;
|
||||
|
||||
public class LoginWindowMediator extends Mediator implements IMediator
|
||||
{
|
||||
public function LoginWindowMediator(mediatorName:String=null, viewComponent:Object=null)
|
||||
{
|
||||
super(mediatorName, viewComponent);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,212 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.main.view
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
import org.bigbluebutton.common.BigBlueButtonModule;
|
||||
import org.bigbluebutton.common.Constants;
|
||||
import org.bigbluebutton.common.InputPipe;
|
||||
import org.bigbluebutton.common.OutputPipe;
|
||||
import org.bigbluebutton.common.Router;
|
||||
import org.bigbluebutton.main.MainApplicationConstants;
|
||||
import org.bigbluebutton.main.MainApplicationFacade;
|
||||
import org.bigbluebutton.main.view.components.MainApplicationShell;
|
||||
import org.bigbluebutton.modules.log.LogModule;
|
||||
import org.bigbluebutton.modules.log.LogModuleFacade;
|
||||
import org.bigbluebutton.modules.viewers.ViewersModule;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.mediator.Mediator;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.plumbing.PipeListener;
|
||||
|
||||
/**
|
||||
* This is the Mediator class for MainApplicationShell view compom\nent
|
||||
*/
|
||||
public class MainApplicationShellMediator extends Mediator
|
||||
{
|
||||
public static const NAME:String = 'MainApplicationShellMediator';
|
||||
public static const OPEN_CHAT_MODULE:String = 'openChatModule';
|
||||
public static const OPEN_LOG_MODULE:String = 'openLogModule';
|
||||
public static const LOGOUT:String = "Logout";
|
||||
public static const START_WEBCAM:String = "Start Webcam";
|
||||
|
||||
public var log:LogModuleFacade = LogModuleFacade.getInstance(LogModule.NAME);
|
||||
private var mshell:MainApplicationShell;
|
||||
|
||||
private var xPos:Number;
|
||||
private var yPos:Number;
|
||||
|
||||
private var outpipe : OutputPipe;
|
||||
private var inpipe : InputPipe;
|
||||
public var router : Router;
|
||||
private var inpipeListener : PipeListener;
|
||||
|
||||
private var modules:Array;
|
||||
|
||||
private var logModule:LogModule;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param viewComponent:MainApplicationShell
|
||||
* Constructor of class, initializing the router and pipes.
|
||||
* Also starts the presentation and viewer modules
|
||||
*/
|
||||
public function MainApplicationShellMediator( viewComponent:MainApplicationShell )
|
||||
{
|
||||
super( NAME, viewComponent );
|
||||
modules = new Array();
|
||||
mshell = viewComponent;
|
||||
router = new Router(viewComponent);
|
||||
///viewComponent.debugLog.text = "Log Module inited 1";
|
||||
viewComponent.addEventListener(OPEN_LOG_MODULE , showLogWindow);
|
||||
viewComponent.addEventListener(LOGOUT, logout);
|
||||
//viewComponent.addEventListener(START_WEBCAM, startWebcam);
|
||||
inpipe = new InputPipe(MainApplicationConstants.TO_MAIN);
|
||||
outpipe = new OutputPipe(MainApplicationConstants.FROM_MAIN);
|
||||
inpipeListener = new PipeListener(this, messageReceiver);
|
||||
inpipe.connect(inpipeListener);
|
||||
router.registerOutputPipe(outpipe.name, outpipe);
|
||||
router.registerInputPipe(inpipe.name, inpipe);
|
||||
|
||||
logModule = new LogModule();
|
||||
addModule(logModule);
|
||||
logModule.mediator.logWindow.visible = false;
|
||||
|
||||
log.debug("red5:" + Constants.HTML_RED5_HOST);
|
||||
log.debug("present:" + Constants.HTML_PRES_HOST);
|
||||
|
||||
addModule(new ViewersModule());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows/Hides the Log Module
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
public function showLogWindow(event:Event) : void
|
||||
{
|
||||
//logModule.openLogWindow();
|
||||
if (logModule.mediator.logWindow.visible == true)
|
||||
logModule.mediator.logWindow.visible = false;
|
||||
else
|
||||
logModule.mediator.logWindow.visible = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a module to this application
|
||||
* @param module
|
||||
*
|
||||
*/
|
||||
public function addModule(module:BigBlueButtonModule):void{
|
||||
this.modules.push(module);
|
||||
acceptRouter(module);
|
||||
}
|
||||
|
||||
public function acceptRouter(module:BigBlueButtonModule):void{
|
||||
module.acceptRouter(router, mshell);
|
||||
}
|
||||
|
||||
private function logout(e:Event):void{
|
||||
shell.mdiCanvas.windowManager.removeAll();
|
||||
|
||||
var c:Number;
|
||||
for (c = 0; c< this.modules.length; c++){
|
||||
var module:BigBlueButtonModule = modules[c] as BigBlueButtonModule;
|
||||
module.logout();
|
||||
modules.pop();
|
||||
}
|
||||
|
||||
modules = new Array();
|
||||
logModule = new LogModule();
|
||||
addModule(logModule);
|
||||
addModule(new ViewersModule());
|
||||
shell.toolbar.enabled = false;
|
||||
}
|
||||
|
||||
private function setLayout(module:BigBlueButtonModule):void{
|
||||
|
||||
shell.mdiCanvas.windowManager.add(module.getMDIComponent());
|
||||
shell.mdiCanvas.windowManager.absPos(module.getMDIComponent(),
|
||||
module.getXPosition(), module.getYPosition());
|
||||
}
|
||||
|
||||
private function removeWindow(module:BigBlueButtonModule):void{
|
||||
shell.mdiCanvas.windowManager.remove(module.getMDIComponent());
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the incoming messages through pipes to shell
|
||||
* @param message:IPipeMessage
|
||||
*
|
||||
*/
|
||||
private function messageReceiver(message : IPipeMessage) : void
|
||||
{
|
||||
var msg : String = message.getHeader().MSG as String;
|
||||
var module :BigBlueButtonModule;
|
||||
|
||||
//shell.debugLog.text = "Got message: " + msg;
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case MainApplicationConstants.ADD_WINDOW_MSG:
|
||||
module = message.getBody() as BigBlueButtonModule;
|
||||
//shell.mdiCanvas.windowManager.add(window);
|
||||
setLayout(module);
|
||||
break;
|
||||
case MainApplicationConstants.REMOVE_WINDOW_MSG:
|
||||
module = message.getBody() as BigBlueButtonModule;
|
||||
if(module.name == LogModule.NAME) {
|
||||
//shell.toolbar.LogBtn.enabled = true;
|
||||
module.getMDIComponent().visible = false;
|
||||
} else removeWindow(module);
|
||||
break;
|
||||
case MainApplicationConstants.LOGIN_COMPLETE:
|
||||
shell.toolbar.enabled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @return : MainApplicationShell
|
||||
*
|
||||
*/
|
||||
protected function get shell():MainApplicationShell
|
||||
{
|
||||
return viewComponent as MainApplicationShell;
|
||||
}
|
||||
|
||||
override public function listNotificationInterests():Array{
|
||||
return [
|
||||
MainApplicationFacade.ADD_MODULE
|
||||
];
|
||||
}
|
||||
|
||||
override public function handleNotification(notification:INotification):void{
|
||||
switch(notification.getName()){
|
||||
case MainApplicationFacade.ADD_MODULE:
|
||||
addModule(notification.getBody() as BigBlueButtonModule);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.main.view
|
||||
{
|
||||
import org.puremvc.as3.multicore.interfaces.IMediator;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.mediator.Mediator;
|
||||
|
||||
public class MainToolbarMediator extends Mediator implements IMediator
|
||||
{
|
||||
public function MainToolbarMediator(mediatorName:String=null, viewComponent:Object=null)
|
||||
{
|
||||
super(mediatorName, viewComponent);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
xmlns:flexmdi="flexlib.mdi.containers.*"
|
||||
xmlns:logModule="org.bigbluebutton.modules.log.view.components.*"
|
||||
xmlns:main="org.bigbluebutton.main.view.components.*"
|
||||
width="100%" height="100%"
|
||||
creationComplete="initializeShell()">
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import mx.controls.Alert;
|
||||
import mx.events.CloseEvent;
|
||||
import org.bigbluebutton.common.Constants;
|
||||
import flexlib.mdi.effects.effectsLib.MDIVistaEffects;
|
||||
import org.bigbluebutton.main.MainApplicationFacade;
|
||||
import org.bigbluebutton.main.view.MainApplicationShellMediator;
|
||||
import flash.events.MouseEvent;
|
||||
|
||||
public static const NAME:String = 'MainApplicationShell';
|
||||
protected var facade:MainApplicationFacade = MainApplicationFacade.getInstance( NAME );
|
||||
|
||||
protected function initializeShell():void
|
||||
{
|
||||
checkFlashVersion();
|
||||
Constants.setHost();
|
||||
//debugLog.text = "before startup in initShell";
|
||||
facade.startup(this);
|
||||
//debugLog.text = "After startup in initShell";
|
||||
this.LogBtn.addEventListener(MouseEvent.CLICK , openLogModule);
|
||||
toolbar.btnLogout.addEventListener(MouseEvent.CLICK, logout);
|
||||
toolbar.webcamBtn.addEventListener(MouseEvent.CLICK, openWebcam);
|
||||
}
|
||||
|
||||
private function checkFlashVersion():void {
|
||||
if (Number(Capabilities.version.substr(4,1)) < 9){
|
||||
Alert.show("You are using FlashPlayer v." + Capabilities.version.substr(4,7) +
|
||||
". Please upgrade to the newest version. You will be redirected when you click OK","Warning",Alert.OK,this,downloadFlash);
|
||||
}
|
||||
}
|
||||
|
||||
private function downloadFlash(eventObject:CloseEvent):void{
|
||||
var urlRequest:URLRequest =
|
||||
new URLRequest("http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash");
|
||||
navigateToURL(urlRequest, "_top");
|
||||
}
|
||||
|
||||
public function openLogModule(event:MouseEvent) : void
|
||||
{
|
||||
dispatchEvent(new Event(MainApplicationShellMediator.OPEN_LOG_MODULE));
|
||||
}
|
||||
|
||||
private function logout(e:MouseEvent):void{
|
||||
dispatchEvent(new Event(MainApplicationShellMediator.LOGOUT));
|
||||
}
|
||||
|
||||
private function openWebcam(e:MouseEvent) : void
|
||||
{
|
||||
dispatchEvent(new Event(MainApplicationShellMediator.START_WEBCAM));
|
||||
}
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
|
||||
<main:MainToolbar id="toolbar" dock="true" width="100%" height="30" visible="true" verticalAlign="middle"/>
|
||||
<flexmdi:MDICanvas id="mdiCanvas" horizontalScrollPolicy="off" verticalScrollPolicy="off"
|
||||
effectsLib="{flexlib.mdi.effects.effectsLib.MDIVistaEffects}"
|
||||
width="100%" height="100%">
|
||||
</flexmdi:MDICanvas>
|
||||
|
||||
<mx:ControlBar width="100%" height="20" paddingTop="0">
|
||||
<mx:Label text="(c) 2008, BigBlueButton Project" id="copyrightLabel2"/>
|
||||
<mx:Spacer width="20"/>
|
||||
|
||||
<mx:Label id="lblVersion" text="0.32g" />
|
||||
<mx:Spacer width="100%"/>
|
||||
<mx:LinkButton id="LogBtn" label="Log" width="25" height="16"
|
||||
paddingBottom="0" paddingLeft="0" paddingRight="0"
|
||||
paddingTop="0" toolTip="Show/Hide Log Window" right="0"/>
|
||||
|
||||
</mx:ControlBar>
|
||||
</mx:VBox>
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<mx:ApplicationControlBar xmlns:mx="http://www.adobe.com/2006/mxml" enabled="false">
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.bigbluebutton.common.Images;
|
||||
import org.bigbluebutton.main.view.MainApplicationShellMediator;
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
<mx:Button id="webcamBtn" label="Open Webcam" visible="true" height="20" toolTip="Click to open webcam"/>
|
||||
<!--<mx:Button id="LogBtn" label="Log" visible="true" toolTip="Log Window"/>-->
|
||||
<mx:Spacer width="100%"/>
|
||||
<mx:Button label="Logout" id="btnLogout" toolTip="Log out" right="10"/>
|
||||
</mx:ApplicationControlBar>
|
@ -0,0 +1,43 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.main.view.events
|
||||
{
|
||||
|
||||
import flash.events.Event;
|
||||
import flexlib.mdi.containers.MDIWindow;
|
||||
|
||||
public class AddWindowEvent extends Event
|
||||
{
|
||||
// The View Component to be added
|
||||
public var component:MDIWindow;
|
||||
// public var component:String;
|
||||
// The type of event
|
||||
public static const NAME:String = 'ADD_WINDOW';
|
||||
|
||||
// Constructor
|
||||
public function AddWindowEvent( component:MDIWindow )
|
||||
// public function AddWindowEvent( component:String )
|
||||
{
|
||||
super( NAME, true );
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.main.view.events
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flexlib.mdi.containers.MDIWindow;
|
||||
|
||||
public class RemoveWindowEvent extends Event
|
||||
{
|
||||
// The View Component to be removed
|
||||
public var component:MDIWindow;
|
||||
|
||||
// The type of event
|
||||
public static const NAME:String = 'removeComponent';
|
||||
|
||||
// Constructor
|
||||
public function RemoveWindowEvent( component:MDIWindow )
|
||||
{
|
||||
super( NAME, true );
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.log
|
||||
{
|
||||
import flash.system.Capabilities;
|
||||
|
||||
import flexlib.mdi.containers.MDIWindow;
|
||||
|
||||
import org.bigbluebutton.common.BigBlueButtonModule;
|
||||
import org.bigbluebutton.common.IRouterAware;
|
||||
import org.bigbluebutton.common.Router;
|
||||
import org.bigbluebutton.main.view.components.MainApplicationShell;
|
||||
import org.bigbluebutton.modules.log.view.LogModuleMediator;
|
||||
|
||||
/**
|
||||
*
|
||||
* view component class for LogModuleMediator
|
||||
*
|
||||
*/
|
||||
public class LogModule extends BigBlueButtonModule implements IRouterAware
|
||||
{
|
||||
public static const NAME:String = 'LogModule';
|
||||
|
||||
private var facade : LogModuleFacade;
|
||||
public var mediator:LogModuleMediator;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* Gets an instance of facade
|
||||
*/
|
||||
public function LogModule()
|
||||
{
|
||||
super(NAME);
|
||||
facade = LogModuleFacade.getInstance(NAME);
|
||||
this.preferedX = Capabilities.screenResolutionX - 500;
|
||||
this.preferedY = Capabilities.screenResolutionY - 500;
|
||||
}
|
||||
/**
|
||||
* setting up the router for the shell
|
||||
* @param router:Router
|
||||
* @param shell:MAinApplicationShell
|
||||
*
|
||||
*/
|
||||
override public function acceptRouter(router : Router, shell : MainApplicationShell) : void
|
||||
{
|
||||
super.acceptRouter(router, shell);
|
||||
//shell.debugLog.text = 'In LogModule';
|
||||
//shell.debugLog.text = 'In LogModule 2';
|
||||
facade.startup(this);
|
||||
//shell.debugLog.text = 'In LogModule 3';
|
||||
}
|
||||
|
||||
override public function getMDIComponent():MDIWindow{
|
||||
//var mediator:LogModuleMediator = facade.retrieveMediator(LogModuleMediator.NAME) as LogModuleMediator;
|
||||
return mediator.logWindow;
|
||||
}
|
||||
|
||||
public function openLogWindow():void{
|
||||
mediator.addWindow();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.log
|
||||
{
|
||||
/**
|
||||
*
|
||||
* Class containing the constants required
|
||||
*
|
||||
*/
|
||||
public class LogModuleConstants
|
||||
{
|
||||
public static const FROM_LOG_MODULE:String = 'FROM_LOG_MODULE';
|
||||
public static const TO_LOG_MODULE:String = 'TO_LOG_MODULE';
|
||||
|
||||
public static const OPEN_WINDOW_MSG:String = 'OPEN_WINDOW_MSG';
|
||||
public static const CLOSE_WINDOW_MSG:String = 'CLOSE_WINDOW_MSG';
|
||||
|
||||
public static const ERROR:int = 1;
|
||||
public static const WARN:int = 2;
|
||||
public static const INFO:int = 3;
|
||||
public static const DEBUG:int = 4;
|
||||
}
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.log
|
||||
{
|
||||
import org.bigbluebutton.modules.log.controller.ClearCommand;
|
||||
import org.bigbluebutton.modules.log.controller.SetLevelCommand;
|
||||
import org.bigbluebutton.modules.log.controller.StartupCommand;
|
||||
import org.puremvc.as3.multicore.interfaces.IFacade;
|
||||
import org.puremvc.as3.multicore.patterns.facade.Facade;
|
||||
|
||||
public class LogModuleFacade extends Facade implements IFacade
|
||||
{
|
||||
public static const STARTUP:String = 'STARTUP';
|
||||
public static const SET_LEVEL:String = 'SET_LEVEL';
|
||||
public static const CLEAR:String = 'CLEAR';
|
||||
public static const DEBUG:String = 'DEBUG';
|
||||
public static const WARNING:String = 'WARNING';
|
||||
public static const ERROR:String = 'ERROR';
|
||||
public static const INFO:String = 'INFO';
|
||||
public static const CHAT:String = 'CHAT';
|
||||
public static const PRESENTATION:String = 'PRESENTATION';
|
||||
public static const VOICE:String = 'VOICE';
|
||||
public static const VIDEO:String = 'VIDEO';
|
||||
public static const VIEWER:String = 'VIEWER';
|
||||
|
||||
public function LogModuleFacade( key:String )
|
||||
{
|
||||
super(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Singleton ApplicationFacade Factory Method
|
||||
*/
|
||||
public static function getInstance( key:String ) : LogModuleFacade
|
||||
{
|
||||
if ( instanceMap[ key ] == null ) instanceMap[ key ] = new LogModuleFacade( key );
|
||||
return instanceMap[ key ] as LogModuleFacade;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register Commands with the Controller
|
||||
*/
|
||||
override protected function initializeController( ) : void
|
||||
{
|
||||
super.initializeController();
|
||||
registerCommand( STARTUP, StartupCommand );
|
||||
registerCommand( SET_LEVEL, SetLevelCommand );
|
||||
registerCommand( CLEAR, ClearCommand );
|
||||
}
|
||||
|
||||
/**
|
||||
* Application startup
|
||||
*
|
||||
* @param app a reference to the application component
|
||||
*/
|
||||
public function startup( app:LogModule ):void
|
||||
{
|
||||
sendNotification( STARTUP, app );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* sends debug notification
|
||||
* @param message
|
||||
*
|
||||
*/
|
||||
public function debug(message:String):void
|
||||
{
|
||||
sendNotification(DEBUG , message);
|
||||
}
|
||||
/**
|
||||
* sends warning notification
|
||||
* @param message
|
||||
*
|
||||
*/
|
||||
public function warning(message:String):void
|
||||
{
|
||||
sendNotification(WARNING , message);
|
||||
}
|
||||
/**
|
||||
* sends info notification
|
||||
* @param message
|
||||
*
|
||||
*/
|
||||
public function info(message:String):void
|
||||
{
|
||||
sendNotification(INFO , message);
|
||||
}
|
||||
/**
|
||||
* sends error notification
|
||||
* @param message
|
||||
*
|
||||
*/
|
||||
public function error(message:String):void
|
||||
{
|
||||
sendNotification(ERROR , message);
|
||||
}
|
||||
|
||||
public function chat(message:String):void {sendNotification (CHAT , message);}
|
||||
public function presentation(message:String):void {sendNotification (PRESENTATION , message);}
|
||||
public function voice(message:String):void {sendNotification (VOICE , message);}
|
||||
public function viewer(message:String):void {sendNotification (VIEWER , message);}
|
||||
public function video(message:String):void {sendNotification (VIDEO , message);}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.log.controller
|
||||
{
|
||||
import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
|
||||
|
||||
public class ClearCommand extends SimpleCommand
|
||||
{
|
||||
public function ClearCommand()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.log.controller
|
||||
{
|
||||
import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
|
||||
|
||||
public class ModelPrepCommand extends SimpleCommand
|
||||
{
|
||||
public function ModelPrepCommand()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.log.controller
|
||||
{
|
||||
import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
|
||||
|
||||
public class SetLevelCommand extends SimpleCommand
|
||||
{
|
||||
public function SetLevelCommand()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.log.controller
|
||||
{
|
||||
import org.puremvc.as3.multicore.patterns.command.MacroCommand;
|
||||
|
||||
public class StartupCommand extends MacroCommand
|
||||
{
|
||||
override protected function initializeMacroCommand():void
|
||||
{
|
||||
addSubCommand(ModelPrepCommand);
|
||||
addSubCommand(ViewPrepCommand);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.log.controller
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flash.events.TimerEvent;
|
||||
import flash.utils.Timer;
|
||||
|
||||
import org.bigbluebutton.modules.log.LogModuleFacade;
|
||||
import org.bigbluebutton.modules.log.view.LogModuleMediator;
|
||||
import org.bigbluebutton.modules.log.LogModule;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
|
||||
|
||||
public class ViewPrepCommand extends SimpleCommand
|
||||
{
|
||||
public function ViewPrepCommand()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
override public function execute(note:INotification):void
|
||||
{
|
||||
var app:LogModule = note.getBody() as LogModule;
|
||||
facade.registerMediator( new LogModuleMediator( app ) );
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,268 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.log.view
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flash.events.MouseEvent;
|
||||
|
||||
import org.bigbluebutton.common.InputPipe;
|
||||
import org.bigbluebutton.common.OutputPipe;
|
||||
import org.bigbluebutton.common.Router;
|
||||
import org.bigbluebutton.main.MainApplicationConstants;
|
||||
import org.bigbluebutton.modules.log.LogModule;
|
||||
import org.bigbluebutton.modules.log.LogModuleConstants;
|
||||
import org.bigbluebutton.modules.log.LogModuleFacade;
|
||||
import org.bigbluebutton.modules.log.view.components.LogWindow;
|
||||
import org.puremvc.as3.multicore.interfaces.IMediator;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.mediator.Mediator;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.messages.Message;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.plumbing.PipeListener;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Mediator for LogModule and LogWindow
|
||||
*
|
||||
*/
|
||||
public class LogModuleMediator extends Mediator implements IMediator
|
||||
{
|
||||
public static const NAME:String = 'LogModuleMediator';
|
||||
|
||||
private var debug : Boolean;
|
||||
private var warn : Boolean;
|
||||
private var error : Boolean;
|
||||
private var info : Boolean;
|
||||
private var outpipe : OutputPipe;
|
||||
private var inpipe : InputPipe;
|
||||
private var router : Router;
|
||||
private var inpipeListener : PipeListener;
|
||||
public var logWindow : LogWindow;
|
||||
|
||||
/**
|
||||
* Constructor, initializing the router, pipes, and listeners
|
||||
* @param viewComponent
|
||||
*
|
||||
*/
|
||||
public function LogModuleMediator( viewComponent:LogModule )
|
||||
{
|
||||
super( NAME, viewComponent );
|
||||
viewComponent.mediator = this;
|
||||
//viewComponent.mshell.debugLog.text = "in logmodule mediator";
|
||||
router = viewComponent.router;
|
||||
inpipe = new InputPipe(LogModuleConstants.TO_LOG_MODULE);
|
||||
outpipe = new OutputPipe(LogModuleConstants.FROM_LOG_MODULE);
|
||||
inpipeListener = new PipeListener(this, messageReceiver);
|
||||
router.registerOutputPipe(outpipe.name, outpipe);
|
||||
router.registerInputPipe(inpipe.name, inpipe);
|
||||
//viewComponent.mshell.debugLog.text = "in logmodule mediator 2";
|
||||
addWindow();
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* initializing notifiers
|
||||
* @param key
|
||||
*
|
||||
*/
|
||||
override public function initializeNotifier(key:String):void
|
||||
{
|
||||
super.initializeNotifier(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* notification(s) that should be taken care off
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
override public function listNotificationInterests():Array
|
||||
{
|
||||
return [
|
||||
LogModuleFacade.DEBUG,
|
||||
LogModuleFacade.WARNING,
|
||||
LogModuleFacade.ERROR,
|
||||
LogModuleFacade.INFO,
|
||||
LogModuleFacade.CLEAR,
|
||||
LogModuleFacade.CHAT,
|
||||
LogModuleFacade.VOICE,
|
||||
LogModuleFacade.VIDEO,
|
||||
LogModuleFacade.PRESENTATION,
|
||||
LogModuleFacade.VIEWER
|
||||
];
|
||||
}
|
||||
/**
|
||||
* handlers for the notifiers this mediator is listening to
|
||||
* @param note
|
||||
*
|
||||
*/
|
||||
override public function handleNotification(note:INotification):void
|
||||
{
|
||||
|
||||
switch ( note.getName() )
|
||||
{
|
||||
case LogModuleFacade.DEBUG:
|
||||
this.logWindow.logMessages.addItem({Module:"To be redirected" , logs:"[" + time() + "] " + (note.getBody() as String)});
|
||||
break;
|
||||
case LogModuleFacade.ERROR:
|
||||
this.logWindow.logMessages.addItem({Module:"To be redirected" , logs:"[" + time() + "] " + (note.getBody() as String)});
|
||||
break;
|
||||
case LogModuleFacade.WARNING:
|
||||
this.logWindow.logMessages.addItem({Module:"To be redirected" , logs:"[" + time() + "] " + (note.getBody() as String)});
|
||||
break;
|
||||
case LogModuleFacade.INFO:
|
||||
this.logWindow.logMessages.addItem({Module:"To be redirected" , logs:"[" + time() + "] " + (note.getBody() as String)});
|
||||
break;
|
||||
case LogModuleFacade.CLEAR:
|
||||
break;
|
||||
|
||||
case LogModuleFacade.CHAT:
|
||||
this.logWindow.logMessages.addItem({Module:"Chat" , logs:"[" + time() + "] " + (note.getBody() as String)});
|
||||
break;
|
||||
case LogModuleFacade.VIDEO:
|
||||
this.logWindow.logMessages.addItem({Module:"Video" , logs:"[" + time() + "] " + (note.getBody() as String)});
|
||||
break;
|
||||
case LogModuleFacade.PRESENTATION:
|
||||
this.logWindow.logMessages.addItem({Module:"Presentation" , logs:"[" + time() + "] " + (note.getBody() as String)});
|
||||
break;
|
||||
case LogModuleFacade.VOICE:
|
||||
this.logWindow.logMessages.addItem({Module:"Voice" , logs:"[" + time() + "] " + (note.getBody() as String)});
|
||||
break;
|
||||
case LogModuleFacade.VIEWER:
|
||||
this.logWindow.logMessages.addItem({Module:"Viewer" , logs:"[" + time() + "] " + (note.getBody() as String)});
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* prepare Log window and send it through pipes to Shell
|
||||
*
|
||||
*/
|
||||
public function addWindow() : void
|
||||
{
|
||||
// create a message
|
||||
var msg:IPipeMessage = new Message(Message.NORMAL);
|
||||
msg.setHeader( {MSG:MainApplicationConstants.ADD_WINDOW_MSG, SRC: LogModuleConstants.FROM_LOG_MODULE,
|
||||
TO: MainApplicationConstants.TO_MAIN });
|
||||
msg.setPriority(Message.PRIORITY_HIGH );
|
||||
|
||||
logWindow = new LogWindow();
|
||||
logWindow.width = 500;
|
||||
logWindow.height = 220;
|
||||
logWindow.title = LogWindow.TITLE;
|
||||
|
||||
//logWindow.visible = false;
|
||||
|
||||
msg.setBody(viewComponent as LogModule);
|
||||
//viewComponent.mshell.debugLog.text = "in logmodule mediator: addWindow()";
|
||||
outpipe.write(msg);
|
||||
|
||||
// Adding listeners
|
||||
//logWindow.clear_Btn.addEventListener(MouseEvent.CLICK , clear);
|
||||
//logWindow.debug_box.addEventListener(Event.CHANGE,changeLevel);
|
||||
//logWindow.info_box.addEventListener(Event.CHANGE,changeLevel);
|
||||
//logWindow.warn_box.addEventListener(Event.CHANGE,changeLevel);
|
||||
//logWindow.error_box.addEventListener(Event.CHANGE,changeLevel);
|
||||
//logWindow.closeBtn.addEventListener(MouseEvent.CLICK, removeWindow);
|
||||
//logWindow.debug_box.selected = true;
|
||||
//logWindow.error_box.selected = true;
|
||||
//logWindow.info_box.selected = true;
|
||||
//logWindow.warn_box.selected = true;
|
||||
//logWindow.visible = false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Preparing a message to remove the window and sending it through pipes to shell
|
||||
* @param event:Event
|
||||
*
|
||||
*/
|
||||
private function removeWindow(event:Event) : void
|
||||
{
|
||||
var msg:IPipeMessage = new Message(Message.NORMAL);
|
||||
msg.setHeader( {MSG:MainApplicationConstants.REMOVE_WINDOW_MSG, SRC: LogModuleConstants.FROM_LOG_MODULE,
|
||||
TO: MainApplicationConstants.TO_MAIN });
|
||||
msg.setPriority(Message.PRIORITY_HIGH );
|
||||
|
||||
//Removing listeners
|
||||
logWindow.clear_Btn.removeEventListener(MouseEvent.CLICK , clear);
|
||||
//logWindow.debug_box.removeEventListener(Event.CHANGE,changeLevel);
|
||||
//logWindow.info_box.removeEventListener(Event.CHANGE,changeLevel);
|
||||
//logWindow.warn_box.removeEventListener(Event.CHANGE,changeLevel);
|
||||
//logWindow.error_box.removeEventListener(Event.CHANGE,changeLevel);
|
||||
logWindow.closeBtn.removeEventListener(MouseEvent.CLICK, removeWindow);
|
||||
|
||||
msg.setBody(viewComponent as LogModule);
|
||||
outpipe.write(msg);
|
||||
}
|
||||
/**
|
||||
* getting logModule
|
||||
* @return LogModule
|
||||
*
|
||||
*/
|
||||
protected function get logModule():LogModule
|
||||
{
|
||||
return viewComponent as LogModule;
|
||||
}
|
||||
/**
|
||||
* Handles incoming messages through pipes
|
||||
* @param message
|
||||
*
|
||||
*/
|
||||
private function messageReceiver(message : IPipeMessage) : void
|
||||
{
|
||||
var msg : String = message.getHeader().MSG;
|
||||
}
|
||||
/**
|
||||
* Getting current date and time
|
||||
* @return Date + Time as String
|
||||
*
|
||||
*/
|
||||
private function time() : String
|
||||
{
|
||||
var date:Date = new Date();
|
||||
var t:String = date.toLocaleTimeString();
|
||||
var d:String = date.toLocaleDateString();
|
||||
return (t + ", " + d) as String;
|
||||
}
|
||||
/**
|
||||
* clears Log dispaly
|
||||
* @param e:Event
|
||||
*
|
||||
*/
|
||||
private function clear(e:MouseEvent) : void
|
||||
{
|
||||
//this.logWindow.status_txt.text = "";
|
||||
}
|
||||
/**
|
||||
* Handler for logWindow checkboxes
|
||||
* @param e:Event
|
||||
*
|
||||
*/
|
||||
/*private function changeLevel(e:Event) : void
|
||||
{
|
||||
if( logWindow.debug_box.selected) debug = true else debug = false;
|
||||
if( logWindow.warn_box.selected) warn = true else warn = false;
|
||||
if( logWindow.info_box.selected) info = true else info = false;
|
||||
if( logWindow.error_box.selected) error = true else error = false;
|
||||
}*/
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MDIWindow xmlns="flexlib.mdi.containers.*"
|
||||
xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
width="400" height="300" showCloseButton="false" >
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import mx.collections.ArrayCollection;
|
||||
public static const TITLE:String = "Log";
|
||||
public var i:Number=0;
|
||||
// public var logMessage: Array = new Array({Module:"Chat", logs:""},
|
||||
// {Module:"Presentation", logs:""},
|
||||
// {Module:"Viewers", logs:""},
|
||||
// {Module:"Voice Conference", logs:""},
|
||||
// {Module:"Video", logs:""});
|
||||
[Bindable]public var logMessages: ArrayCollection = new ArrayCollection();//logMessage);
|
||||
private function updateScroll():void
|
||||
{
|
||||
//status_txt.verticalScrollPosition = status_txt.maxVerticalScrollPosition;
|
||||
}
|
||||
private function report():void
|
||||
{
|
||||
|
||||
}
|
||||
]]>
|
||||
</mx:Script>
|
||||
<!--<mx:Box width="100%" height="100%">
|
||||
<mx:TextArea id="status_txt" updateComplete="updateScroll()"
|
||||
borderColor="0xD0D0D0"
|
||||
width="100%" height="100%" borderStyle="solid"
|
||||
textIndent="6" fontSize="10" focusEnabled="false"
|
||||
editable="false" htmlText=""/>
|
||||
</mx:Box>-->
|
||||
<mx:AdvancedDataGrid id="status_txt" initialize="gc.refresh();" editable="false"
|
||||
dragEnabled="false" width="100%" height="100%">
|
||||
|
||||
<mx:dataProvider>
|
||||
<mx:GroupingCollection id="gc" source="{logMessages}">
|
||||
<mx:grouping>
|
||||
<mx:Grouping>
|
||||
<mx:GroupingField name="Module"/>
|
||||
|
||||
</mx:Grouping>
|
||||
</mx:grouping>
|
||||
|
||||
</mx:GroupingCollection>
|
||||
</mx:dataProvider>
|
||||
|
||||
<mx:columns>
|
||||
<!--<mx:AdvancedDataGridColumn dataField="Module"/>-->
|
||||
<mx:AdvancedDataGridColumn dataField="logs"/>
|
||||
</mx:columns>
|
||||
</mx:AdvancedDataGrid>
|
||||
<mx:Box direction="horizontal" height="35"
|
||||
paddingLeft="5" paddingRight="5" paddingTop="5"
|
||||
horizontalAlign="right" verticalAlign="top">
|
||||
<!--<mx:CheckBox label="Debug" id="debug_box"/>
|
||||
<mx:CheckBox label="Error" id="error_box"/>
|
||||
<mx:CheckBox label="Warning" id="warn_box"/>
|
||||
<mx:CheckBox label="Info" id="info_box"/>
|
||||
<mx:Spacer width="40" id="spacer"/>-->
|
||||
<mx:Button id="clear_Btn" label="Send Errors" enabled="false" toolTip="Sends the errors to support team" click="report()"/>
|
||||
|
||||
</mx:Box>
|
||||
</MDIWindow>
|
@ -0,0 +1,40 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers
|
||||
{
|
||||
/**
|
||||
* This class holds some of the constants relevant to this module
|
||||
* @author Denis Zgonjanin
|
||||
*
|
||||
*/
|
||||
public class ViewersConstants
|
||||
{
|
||||
public static const FROM_VIEWERS_MODULE:String = "From Viewers Module";
|
||||
public static const TO_VIEWERS_MODULE:String = "To Viewers Module";
|
||||
|
||||
public static const OPEN_WINDOW_MESSAGE:String = "Open Window Message";
|
||||
public static const CLOSE_WINDOW_MESSAGE:String = "Close Window Messsage";
|
||||
|
||||
public static const ERROR:int = 1;
|
||||
public static const WARN:int = 2;
|
||||
public static const INFO:int = 3;
|
||||
public static const DEBUG:int = 4;
|
||||
}
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers
|
||||
{
|
||||
import org.bigbluebutton.modules.viewers.controller.StartLoginCommand;
|
||||
import org.bigbluebutton.modules.viewers.controller.StartViewersCommand;
|
||||
import org.bigbluebutton.modules.viewers.controller.StartWindowCommand;
|
||||
import org.puremvc.as3.multicore.interfaces.IFacade;
|
||||
import org.puremvc.as3.multicore.patterns.facade.Facade;
|
||||
|
||||
/**
|
||||
* The ViewersFacade represents a singleton which holds the Viewers Module together in one instance
|
||||
* @author Denis Zgonjanin
|
||||
*
|
||||
*/
|
||||
public class ViewersFacade extends Facade implements IFacade
|
||||
{
|
||||
public static const NAME:String = "ViewersFacade";
|
||||
|
||||
public static const STARTUP:String = "Startup Command";
|
||||
public static const START_VIEWER_WINDOW:String = "Start Viewer Window";
|
||||
public static const CHANGE_STATUS:String = "Change Status Event";
|
||||
public static const START_LOGIN_WINDOW:String = "Start Login Window";
|
||||
public static const CONNECT_SUCCESS:String = "Connection Successful";
|
||||
|
||||
public static const DEBUG:String = "Viewer Debug";
|
||||
|
||||
/**
|
||||
* The constructor. Should NEVER be called. Use getInstance() instead
|
||||
*
|
||||
*/
|
||||
public function ViewersFacade()
|
||||
{
|
||||
super(NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to get an instance of the ViewersFacade
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
public static function getInstance():ViewersFacade{
|
||||
if (instanceMap[NAME] == null) instanceMap[NAME] = new ViewersFacade;
|
||||
return instanceMap[NAME] as ViewersFacade;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register notifications to command execution
|
||||
*
|
||||
*/
|
||||
override protected function initializeController():void{
|
||||
super.initializeController();
|
||||
registerCommand(STARTUP, StartViewersCommand);
|
||||
registerCommand(START_VIEWER_WINDOW, StartWindowCommand);
|
||||
registerCommand(START_LOGIN_WINDOW, StartLoginCommand);
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the ViewersModule business logic and gui components
|
||||
* @param app
|
||||
*
|
||||
*/
|
||||
public function startup(app:ViewersModule):void{
|
||||
sendNotification(STARTUP, app);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers
|
||||
{
|
||||
import flash.system.Capabilities;
|
||||
|
||||
import flexlib.mdi.containers.MDIWindow;
|
||||
|
||||
import org.bigbluebutton.common.BigBlueButtonModule;
|
||||
import org.bigbluebutton.common.IRouterAware;
|
||||
import org.bigbluebutton.common.Router;
|
||||
import org.bigbluebutton.main.view.components.MainApplicationShell;
|
||||
import org.bigbluebutton.modules.viewers.model.services.SharedObjectConferenceDelegate;
|
||||
|
||||
/**
|
||||
* This is the main class of the ViewersModule. It extends the ModuleBase class of the Flex Framework
|
||||
* @author dzgonjan
|
||||
*
|
||||
*/
|
||||
public class ViewersModule extends BigBlueButtonModule implements IRouterAware
|
||||
{
|
||||
public static const NAME:String = "VoiceModule";
|
||||
|
||||
private var facade:ViewersFacade;
|
||||
public var activeWindow:MDIWindow;
|
||||
|
||||
public function ViewersModule()
|
||||
{
|
||||
super(NAME);
|
||||
facade = ViewersFacade.getInstance();
|
||||
this.preferedX = Capabilities.screenResolutionX/2 - 328/2;
|
||||
this.preferedY = Capabilities.screenResolutionY/2 - 265;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accept the Router object through which this class can send and receive messages to other modules
|
||||
* @param router
|
||||
* @param shell
|
||||
*
|
||||
*/
|
||||
override public function acceptRouter(router:Router, shell:MainApplicationShell):void{
|
||||
super.acceptRouter(router, shell);
|
||||
facade.startup(this);
|
||||
}
|
||||
|
||||
override public function getMDIComponent():MDIWindow{
|
||||
return activeWindow;
|
||||
}
|
||||
|
||||
override public function logout():void{
|
||||
var delegate:SharedObjectConferenceDelegate =
|
||||
facade.retrieveProxy(SharedObjectConferenceDelegate.NAME) as SharedObjectConferenceDelegate;
|
||||
|
||||
delegate.leave();
|
||||
|
||||
facade.removeCore(ViewersFacade.NAME);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,192 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers
|
||||
{
|
||||
import flash.system.Capabilities;
|
||||
|
||||
import org.bigbluebutton.common.InputPipe;
|
||||
import org.bigbluebutton.common.OutputPipe;
|
||||
import org.bigbluebutton.common.Router;
|
||||
import org.bigbluebutton.main.MainApplicationConstants;
|
||||
import org.bigbluebutton.modules.log.LogModule;
|
||||
import org.bigbluebutton.modules.log.LogModuleFacade;
|
||||
import org.bigbluebutton.modules.viewers.view.JoinWindow;
|
||||
import org.bigbluebutton.modules.viewers.view.ViewersWindow;
|
||||
import org.puremvc.as3.multicore.interfaces.IMediator;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.mediator.Mediator;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.interfaces.IPipeMessage;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.messages.Message;
|
||||
import org.puremvc.as3.multicore.utilities.pipes.plumbing.PipeListener;
|
||||
|
||||
/**
|
||||
* This is the mediator class for the ViewersModule class
|
||||
* @author Denis Zgonjanin
|
||||
*
|
||||
*/
|
||||
public class ViewersModuleMediator extends Mediator implements IMediator
|
||||
{
|
||||
public static const NAME:String = "ViewersModuleMediator";
|
||||
|
||||
private var outpipe : OutputPipe;
|
||||
private var inpipe : InputPipe;
|
||||
private var router : Router;
|
||||
private var inpipeListener : PipeListener;
|
||||
|
||||
private var module:ViewersModule;
|
||||
private var joinWindow:JoinWindow;
|
||||
private var viewersWindow:ViewersWindow;
|
||||
|
||||
private var log:LogModuleFacade = LogModuleFacade.getInstance(LogModule.NAME);
|
||||
|
||||
/**
|
||||
* The constructor. registers this mediator with the ViewersModuel
|
||||
* @param module
|
||||
*
|
||||
*/
|
||||
public function ViewersModuleMediator(module:ViewersModule)
|
||||
{
|
||||
super(NAME, module);
|
||||
this.module = module;
|
||||
router = module.router;
|
||||
inpipe = new InputPipe(ViewersConstants.TO_VIEWERS_MODULE);
|
||||
outpipe = new OutputPipe(ViewersConstants.FROM_VIEWERS_MODULE);
|
||||
inpipeListener = new PipeListener(this, messageReceiver);
|
||||
router.registerOutputPipe(outpipe.name, outpipe);
|
||||
router.registerInputPipe(inpipe.name, inpipe);
|
||||
addJoinWindow();
|
||||
}
|
||||
|
||||
private function messageReceiver(message:IPipeMessage):void{
|
||||
var msg:String = message.getHeader().MSG;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the login gui part of this module to the main application shell
|
||||
*
|
||||
*/
|
||||
private function addJoinWindow():void{
|
||||
var msg:IPipeMessage = new Message(Message.NORMAL);
|
||||
msg.setHeader({MSG:MainApplicationConstants.ADD_WINDOW_MSG, SRC: ViewersConstants.FROM_VIEWERS_MODULE,
|
||||
TO: MainApplicationConstants.TO_MAIN });
|
||||
msg.setPriority(Message.PRIORITY_HIGH);
|
||||
|
||||
joinWindow = new JoinWindow();
|
||||
joinWindow.showCloseButton = false;
|
||||
joinWindow.title = JoinWindow.TITLE;
|
||||
|
||||
module.preferedX = Capabilities.screenResolutionX/2 - 328/2;
|
||||
module.preferedY = Capabilities.screenResolutionY/2 - 265;
|
||||
module.activeWindow = joinWindow;
|
||||
|
||||
msg.setBody(viewComponent as ViewersModule);
|
||||
outpipe.write(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the viewers gui part of this module to the main application shell
|
||||
*
|
||||
*/
|
||||
private function addViewersWindow():void{
|
||||
var msg:IPipeMessage = new Message(Message.NORMAL);
|
||||
msg.setHeader({MSG:MainApplicationConstants.ADD_WINDOW_MSG, SRC: ViewersConstants.FROM_VIEWERS_MODULE,
|
||||
TO: MainApplicationConstants.TO_MAIN });
|
||||
msg.setPriority(Message.PRIORITY_HIGH);
|
||||
|
||||
viewersWindow = new ViewersWindow();
|
||||
|
||||
module.preferedX = 20;
|
||||
module.preferedY = 20;
|
||||
module.activeWindow = viewersWindow;
|
||||
|
||||
viewersWindow.width = 210;
|
||||
viewersWindow.height = 220;
|
||||
viewersWindow.title = ViewersWindow.TITLE;
|
||||
viewersWindow.showCloseButton = false;
|
||||
sendNotification(ViewersFacade.START_VIEWER_WINDOW, viewersWindow);
|
||||
msg.setBody(viewComponent as ViewersModule);
|
||||
outpipe.write(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the login window from the main application shell once login is completed
|
||||
*
|
||||
*/
|
||||
private function removeJoinWindow():void{
|
||||
module.activeWindow = joinWindow;
|
||||
var msg:IPipeMessage = new Message(Message.NORMAL);
|
||||
msg.setHeader({MSG:MainApplicationConstants.REMOVE_WINDOW_MSG, SRC: ViewersConstants.FROM_VIEWERS_MODULE,
|
||||
TO: MainApplicationConstants.TO_MAIN });
|
||||
msg.setPriority(Message.PRIORITY_HIGH);
|
||||
|
||||
msg.setBody(viewComponent as ViewersModule);
|
||||
outpipe.write(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a login complete notice
|
||||
*
|
||||
*/
|
||||
private function sendLoginCompleteNotice():void{
|
||||
var msg:IPipeMessage = new Message(Message.NORMAL);
|
||||
msg.setHeader({MSG:MainApplicationConstants.LOGIN_COMPLETE, SRC: ViewersConstants.FROM_VIEWERS_MODULE,
|
||||
TO: MainApplicationConstants.TO_MAIN });
|
||||
msg.setPriority(Message.PRIORITY_HIGH);
|
||||
|
||||
outpipe.write(msg);
|
||||
}
|
||||
|
||||
override public function initializeNotifier(key:String):void{
|
||||
super.initializeNotifier(key);
|
||||
sendNotification(ViewersFacade.START_LOGIN_WINDOW, joinWindow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists the notifications to which this mediator listens to
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
override public function listNotificationInterests():Array{
|
||||
return [
|
||||
ViewersFacade.CONNECT_SUCCESS,
|
||||
ViewersFacade.DEBUG
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the notifications as they're received
|
||||
* @param notification
|
||||
*
|
||||
*/
|
||||
override public function handleNotification(notification:INotification):void{
|
||||
switch(notification.getName()){
|
||||
case ViewersFacade.CONNECT_SUCCESS:
|
||||
removeJoinWindow();
|
||||
addViewersWindow();
|
||||
sendLoginCompleteNotice();
|
||||
break;
|
||||
case ViewersFacade.DEBUG:
|
||||
log.debug(notification.getBody() as String);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.controller
|
||||
{
|
||||
import org.bigbluebutton.modules.viewers.view.JoinWindow;
|
||||
import org.bigbluebutton.modules.viewers.view.mediators.JoinWindowMediator;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
|
||||
|
||||
/**
|
||||
* The StartLoginCommand registers a JoinWindowMediator with the JoinWindow gui component
|
||||
* @author Denis Zgonjanin
|
||||
*
|
||||
*/
|
||||
public class StartLoginCommand extends SimpleCommand
|
||||
{
|
||||
override public function execute(notification:INotification):void{
|
||||
var window:JoinWindow = notification.getBody() as JoinWindow;
|
||||
facade.registerMediator(new JoinWindowMediator(window));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.controller
|
||||
{
|
||||
import org.bigbluebutton.modules.viewers.ViewersModule;
|
||||
import org.bigbluebutton.modules.viewers.ViewersModuleMediator;
|
||||
import org.bigbluebutton.modules.viewers.model.business.Conference;
|
||||
import org.bigbluebutton.modules.viewers.model.services.SharedObjectConferenceDelegate;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
|
||||
|
||||
/**
|
||||
* The StartViewersCommand registers the ViewersModuleMediator with the ViewersModule
|
||||
* It also registers a Conference object as a mediator in the facade
|
||||
* @author dzgonjan
|
||||
*
|
||||
*/
|
||||
public class StartViewersCommand extends SimpleCommand
|
||||
{
|
||||
override public function execute(notification:INotification):void{
|
||||
var app:ViewersModule = notification.getBody() as ViewersModule;
|
||||
|
||||
facade.registerMediator(new ViewersModuleMediator(app));
|
||||
var conf:Conference = new Conference()
|
||||
facade.registerMediator(conf);
|
||||
facade.registerProxy(new SharedObjectConferenceDelegate(conf));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.controller
|
||||
{
|
||||
import org.bigbluebutton.modules.viewers.view.ViewersWindow;
|
||||
import org.bigbluebutton.modules.viewers.view.mediators.ViewersWindowMediator;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
|
||||
|
||||
/**
|
||||
* The StartWindowCommand registers a ViewersWindowMediator with the ViewersWindow gui component
|
||||
* @author Denis Zgonjanin
|
||||
*
|
||||
*/
|
||||
public class StartWindowCommand extends SimpleCommand
|
||||
{
|
||||
override public function execute(notification:INotification):void{
|
||||
var window:ViewersWindow = notification.getBody() as ViewersWindow;
|
||||
|
||||
facade.registerMediator(new ViewersWindowMediator(window));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.controller.notifiers
|
||||
{
|
||||
/**
|
||||
* This is a convinience class so that multiple pieces of information can be sent via a notification
|
||||
* @author dzgonjan
|
||||
*
|
||||
*/
|
||||
public class LoginInfoNotifier
|
||||
{
|
||||
public var name:String;
|
||||
public var password:String;
|
||||
public var room:String;
|
||||
|
||||
public function LoginInfoNotifier(name:String, password:String, room:String)
|
||||
{
|
||||
this.name = name;
|
||||
this.password = password;
|
||||
this.room = room;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.controller.notifiers
|
||||
{
|
||||
/**
|
||||
* This is a convinience class so that multiple pieces of information can be sent via a notification
|
||||
* @author Denis Zgonjanin
|
||||
*
|
||||
*/
|
||||
public class StatusNotifier
|
||||
{
|
||||
public var userid:Number;
|
||||
public var newStatus:String;
|
||||
|
||||
public function StatusNotifier(userid:Number, newStatus:String)
|
||||
{
|
||||
this.newStatus = newStatus;
|
||||
this.userid = userid;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,183 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.model.business
|
||||
{
|
||||
import mx.collections.ArrayCollection;
|
||||
|
||||
import org.bigbluebutton.modules.viewers.model.vo.User;
|
||||
import org.puremvc.as3.multicore.interfaces.IMediator;
|
||||
import org.puremvc.as3.multicore.patterns.mediator.Mediator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
public class Conference extends Mediator implements IMediator
|
||||
{
|
||||
public static const NAME:String = "Conference";
|
||||
|
||||
private var _myUserid : Number;
|
||||
|
||||
[Bindable] public var me:User = null;
|
||||
[Bindable] public var users : ArrayCollection = null;
|
||||
[Bindable] public var connected : Boolean = false;
|
||||
|
||||
public var connectFailReason : String;
|
||||
public var host : String;
|
||||
public var room : String;
|
||||
|
||||
/**
|
||||
* The default constructor. Creates a new Conference object
|
||||
*
|
||||
*/
|
||||
public function Conference() : void
|
||||
{
|
||||
super(NAME);
|
||||
me = new User();
|
||||
users = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a user to this conference
|
||||
* @param newuser
|
||||
*
|
||||
*/
|
||||
public function addUser(newuser : User) : void
|
||||
{
|
||||
if (! hasParticipant(newuser.userid)) {
|
||||
users.addItem(newuser);
|
||||
sort();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user with the specified id exists
|
||||
* @param id
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
public function hasParticipant(id : Number) : Boolean
|
||||
{
|
||||
var index : int = getParticipantIndex(id);
|
||||
|
||||
if (index > -1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user with the specific id
|
||||
* @param id
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
public function getParticipant(id : Number) : User
|
||||
{
|
||||
var index : int = getParticipantIndex(id);
|
||||
|
||||
if (index > -1) {
|
||||
return users.getItemAt(index) as User;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove participant with the specified id number
|
||||
* @param userid
|
||||
*
|
||||
*/
|
||||
public function removeParticipant(userid : Number) : void
|
||||
{
|
||||
var index : int = getParticipantIndex(userid);
|
||||
|
||||
//log.debug( "removing user[" + userid + " at index=" + index + "]")
|
||||
|
||||
if (index > -1) {
|
||||
//log.debug( "remove user[" + userid + " at index=" + index + "]");
|
||||
|
||||
users.removeItemAt(index);
|
||||
sort();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the index number of the participant with the specific userid
|
||||
* @param userid
|
||||
* @return -1 if participant not found
|
||||
*
|
||||
*/
|
||||
private function getParticipantIndex(userid : Number) : int
|
||||
{
|
||||
var aUser : User;
|
||||
|
||||
for (var i:int = 0; i < users.length; i++)
|
||||
{
|
||||
aUser = users.getItemAt(i) as User;
|
||||
|
||||
if (aUser.userid == userid) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
// Participant not found.
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all the participants from the conference
|
||||
*
|
||||
*/
|
||||
public function removeAllParticipants() : void
|
||||
{
|
||||
users.removeAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the status of the user
|
||||
* @param id
|
||||
* @param newStatus
|
||||
*
|
||||
*/
|
||||
public function newUserStatus(id : Number, newStatus : String) : void
|
||||
{
|
||||
var aUser : User = getParticipant(id);
|
||||
|
||||
if (aUser != null) {
|
||||
aUser.status = newStatus;
|
||||
}
|
||||
|
||||
sort();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts the users by name
|
||||
*
|
||||
*/
|
||||
private function sort() : void
|
||||
{
|
||||
users.source.sortOn("name", Array.CASEINSENSITIVE);
|
||||
users.refresh();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,201 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.model.services
|
||||
{
|
||||
import mx.rpc.IResponder;
|
||||
import flash.net.NetConnection;
|
||||
import flash.events.*;
|
||||
|
||||
/**
|
||||
* The NetConnectionDelegate class has the job of communicating with the server on behalf
|
||||
* of the viewers module
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
public class NetConnectionDelegate
|
||||
{
|
||||
public static const ID : String = "CONFERENCE::NetConnectionDelegate";
|
||||
|
||||
private var _confDelegate : SharedObjectConferenceDelegate;
|
||||
|
||||
private var _netConnection : NetConnection;
|
||||
|
||||
|
||||
/**
|
||||
* The constructor. Received a SharedObjectConferenceDelegate Object
|
||||
* @param confDelegate
|
||||
*
|
||||
*/
|
||||
public function NetConnectionDelegate(confDelegate : SharedObjectConferenceDelegate) : void
|
||||
{
|
||||
_confDelegate = confDelegate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to the server using the specified parameters
|
||||
* @param host
|
||||
* @param room
|
||||
* @param username
|
||||
* @param password
|
||||
*
|
||||
*/
|
||||
public function connect(host : String , room : String,
|
||||
username : String, password : String) : void
|
||||
{
|
||||
_netConnection = _confDelegate.netConnection;
|
||||
|
||||
_netConnection.addEventListener( NetStatusEvent.NET_STATUS, netStatus );
|
||||
_netConnection.addEventListener( AsyncErrorEvent.ASYNC_ERROR, netASyncError );
|
||||
_netConnection.addEventListener( SecurityErrorEvent.SECURITY_ERROR, netSecurityError );
|
||||
_netConnection.addEventListener( IOErrorEvent.IO_ERROR, netIOError );
|
||||
|
||||
try {
|
||||
//log.info( "Connecting to <b>" + host + "</b>");
|
||||
|
||||
_netConnection.connect(host, room, username, password );
|
||||
|
||||
} catch( e : ArgumentError ) {
|
||||
// Invalid parameters.
|
||||
switch ( e.errorID )
|
||||
{
|
||||
case 2004 :
|
||||
//log.error( "Invalid server location: <b>" + host + "</b>");
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disconnect from the server
|
||||
*
|
||||
*/
|
||||
public function disconnect() : void
|
||||
{
|
||||
_netConnection.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method is called when a net_status_event is received
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
protected function netStatus( event : NetStatusEvent ) : void
|
||||
{
|
||||
handleResult( event );
|
||||
}
|
||||
|
||||
/**
|
||||
* Method is called when a result is received from the server
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
public function handleResult( event : Object ) : void {
|
||||
var info : Object = event.info;
|
||||
var statusCode : String = info.code;
|
||||
|
||||
switch ( statusCode )
|
||||
{
|
||||
case "NetConnection.Connect.Success" :
|
||||
_confDelegate.connected();
|
||||
|
||||
// find out if it's a secure (HTTPS/TLS) connection
|
||||
if ( event.target.connectedProxyType == "HTTPS" || event.target.usingTLS ) {
|
||||
//log.info( "Connected to secure server");
|
||||
} else {
|
||||
//log.info( "Connected to server");
|
||||
}
|
||||
break;
|
||||
|
||||
case "NetConnection.Connect.Failed" :
|
||||
_confDelegate.disconnected("The connection to the server failed.");
|
||||
|
||||
//log.info("Connection to server failed");
|
||||
break;
|
||||
|
||||
case "NetConnection.Connect.Closed" :
|
||||
_confDelegate.disconnected("The connection to the server closed.");
|
||||
//log.info("Connection to server closed");
|
||||
break;
|
||||
|
||||
case "NetConnection.Connect.InvalidApp" :
|
||||
_confDelegate.disconnected("The application was not found on the server.")
|
||||
//log.info("Application not found on server");
|
||||
break;
|
||||
|
||||
case "NetConnection.Connect.AppShutDown" :
|
||||
_confDelegate.disconnected("The application has been shutdown.");
|
||||
//log.info("Application has been shutdown");
|
||||
break;
|
||||
|
||||
case "NetConnection.Connect.Rejected" :
|
||||
_confDelegate.disconnected("No permission to connect to the application.");
|
||||
//log.info("No permissions to connect to the application" );
|
||||
break;
|
||||
|
||||
default :
|
||||
// statements
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method is called when a net_security_error is received
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
protected function netSecurityError( event : SecurityErrorEvent ) : void
|
||||
{
|
||||
handleFault( "Security error - " + event.text );
|
||||
}
|
||||
|
||||
/**
|
||||
* Method is called when a net_io_error is received
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
protected function netIOError( event : IOErrorEvent ) : void
|
||||
{
|
||||
handleFault( "Input/output error - " + event.text );
|
||||
}
|
||||
|
||||
/**
|
||||
* Method is called when a net_async_error is received
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
protected function netASyncError( event : AsyncErrorEvent ) : void
|
||||
{
|
||||
handleFault( "Asynchronous code error - " + event.error );
|
||||
}
|
||||
|
||||
/**
|
||||
* Method is called when a fault is received from the server
|
||||
* @param reason
|
||||
*
|
||||
*/
|
||||
public function handleFault( reason : String ) : void
|
||||
{
|
||||
_confDelegate.disconnected(reason);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,371 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.model.services
|
||||
{
|
||||
import flash.events.AsyncErrorEvent;
|
||||
import flash.events.NetStatusEvent;
|
||||
import flash.events.SyncEvent;
|
||||
import flash.net.NetConnection;
|
||||
import flash.net.SharedObject;
|
||||
|
||||
import org.bigbluebutton.modules.viewers.ViewersFacade;
|
||||
import org.bigbluebutton.modules.viewers.controller.notifiers.StatusNotifier;
|
||||
import org.bigbluebutton.modules.viewers.model.business.Conference;
|
||||
import org.bigbluebutton.modules.viewers.model.vo.User;
|
||||
import org.puremvc.as3.multicore.interfaces.IProxy;
|
||||
import org.puremvc.as3.multicore.patterns.proxy.Proxy;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
public class SharedObjectConferenceDelegate extends Proxy implements IProxy
|
||||
{
|
||||
public static const NAME:String = "SharedObjectConferenceDelegate";
|
||||
|
||||
private var _conference : Conference;
|
||||
private var _connection : NetConnection;
|
||||
private var _participantsSO : SharedObject;
|
||||
private var _ncDelegate : NetConnectionDelegate;
|
||||
|
||||
private static const SO_NAME : String = "participantsSO";
|
||||
|
||||
/**
|
||||
* Creates a new SharedObjectConferenceDelegate object
|
||||
* @param conference - A Conference object
|
||||
*
|
||||
*/
|
||||
public function SharedObjectConferenceDelegate(conference:Conference)
|
||||
{
|
||||
super(NAME);
|
||||
_conference = conference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the user status in the conference object, and sends the update to the server shared object
|
||||
* @param newStatus
|
||||
*
|
||||
*/
|
||||
public function sendNewStatus(newStatus : String) : void {
|
||||
_conference.me.status = newStatus;
|
||||
|
||||
var id : Number = _conference.me.userid;
|
||||
var aUser:User = _conference.getParticipant(id);
|
||||
if (aUser != null) {
|
||||
// This sets this user's status
|
||||
aUser.status = newStatus;
|
||||
_participantsSO.setProperty(id.toString(), aUser);
|
||||
_participantsSO.setDirty(id.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the broadcast stream to the server
|
||||
* @param hasStream
|
||||
* @param streamName
|
||||
*
|
||||
*/
|
||||
public function sendBroadcastStream(hasStream : Boolean, streamName : String) : void {
|
||||
var id : Number = _conference.me.userid;
|
||||
var aUser : User = _conference.getParticipant(id);
|
||||
|
||||
if (aUser != null) {
|
||||
// This sets the users stream
|
||||
aUser.hasStream = hasStream;
|
||||
aUser.streamName = streamName;
|
||||
_participantsSO.setProperty(id.toString(), aUser);
|
||||
_participantsSO.setDirty(id.toString());
|
||||
|
||||
//log.debug( "Conference::sendBroadcastStream::found =[" + id + ","
|
||||
// + aUser.hasStream + "," + aUser.streamName + "]");
|
||||
}
|
||||
}
|
||||
|
||||
public function broadcastStream(id : Number, hasStream : Boolean, streamName : String) : void
|
||||
{
|
||||
var aUser : User = _conference.getParticipant(id);
|
||||
if (aUser != null) {
|
||||
aUser.hasStream = hasStream;
|
||||
aUser.streamName = streamName;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Join the server, connect
|
||||
* @param host
|
||||
* @param username
|
||||
* @param password
|
||||
* @param room
|
||||
*
|
||||
*/
|
||||
public function join(host : String, username : String, password : String, room : String) : void
|
||||
{
|
||||
_connection = new NetConnection();
|
||||
_connection.client = this;
|
||||
|
||||
_conference.host = host;
|
||||
_conference.room = room;
|
||||
_conference.me.name = username;
|
||||
|
||||
_ncDelegate = new NetConnectionDelegate(this);
|
||||
_ncDelegate.connect(host, room, username, password);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the NetConnection object which handles the server connection details
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
public function get netConnection() : NetConnection
|
||||
{
|
||||
return _connection;
|
||||
}
|
||||
|
||||
public function disconnected(reason : String) : void
|
||||
{
|
||||
_conference.connected = false;
|
||||
_conference.connectFailReason = reason;
|
||||
}
|
||||
|
||||
public function connected() : void
|
||||
{
|
||||
_conference.connected = true;
|
||||
_conference.connectFailReason = null;
|
||||
|
||||
joinConference();
|
||||
|
||||
sendNotification(ViewersFacade.CONNECT_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* Join a conference room on the server
|
||||
*
|
||||
*/
|
||||
private function joinConference() : void
|
||||
{
|
||||
// Start with a fresh list
|
||||
_conference.removeAllParticipants();
|
||||
|
||||
_participantsSO = SharedObject.getRemote(SO_NAME, _conference.host, false);
|
||||
|
||||
_participantsSO.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
|
||||
_participantsSO.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
|
||||
_participantsSO.addEventListener(SyncEvent.SYNC, sharedObjectSyncHandler);
|
||||
|
||||
_participantsSO.client = this;
|
||||
|
||||
_participantsSO.connect(_connection);
|
||||
}
|
||||
|
||||
/**
|
||||
* Leave the conference
|
||||
*
|
||||
*/
|
||||
public function leave() : void
|
||||
{
|
||||
removeListeners();
|
||||
_participantsSO.close();
|
||||
_ncDelegate.disconnect();
|
||||
|
||||
// Cleanup list of participants
|
||||
_conference.removeAllParticipants();
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the listeners for the participantsSO shared object
|
||||
*
|
||||
*/
|
||||
private function removeListeners() : void
|
||||
{
|
||||
_participantsSO.removeEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
|
||||
_participantsSO.removeEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
|
||||
_participantsSO.removeEventListener(SyncEvent.SYNC, sharedObjectSyncHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a sync_event is received for the SharedObject
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
private function sharedObjectSyncHandler( event : SyncEvent) : void
|
||||
{
|
||||
//log.debug( "Conference::sharedObjectSyncHandler " + event.changeList.length);
|
||||
|
||||
for (var i : uint = 0; i < event.changeList.length; i++)
|
||||
{
|
||||
//log.debug( "Conference::handlingChanges[" + event.changeList[i].name + "][" + i + "]");
|
||||
handleChangesToSharedObject(event.changeList[i].code,
|
||||
event.changeList[i].name, event.changeList[i].oldValue);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* See flash.events.SyncEvent
|
||||
*/
|
||||
private function handleChangesToSharedObject(code : String, name : String, oldValue : Object) : void
|
||||
{
|
||||
switch (code)
|
||||
{
|
||||
case "clear":
|
||||
/** From flash.events.SyncEvent doc
|
||||
*
|
||||
* A value of "clear" means either that you have successfully connected
|
||||
* to a remote shared object that is not persistent on the server or the
|
||||
* client, or that all the properties of the object have been deleted --
|
||||
* for example, when the client and server copies of the object are so
|
||||
* far out of sync that Flash Player resynchronizes the client object
|
||||
* with the server object. In the latter case, SyncEvent.SYNC is dispatched
|
||||
* and the "code" value is set to "change".
|
||||
*/
|
||||
|
||||
_conference.removeAllParticipants();
|
||||
|
||||
break;
|
||||
|
||||
case "success":
|
||||
/** From flash.events.SyncEvent doc
|
||||
* A value of "success" means the client changed the shared object.
|
||||
*/
|
||||
|
||||
// do nothing... just log it
|
||||
//log.debug( "Conference::success =[" + name + ","
|
||||
// + _participantsSO.data[name].status + ","
|
||||
// + _participantsSO.data[name].hasStream
|
||||
// + "]");
|
||||
break;
|
||||
|
||||
case "reject":
|
||||
/** From flash.events.SyncEvent doc
|
||||
* A value of "reject" means the client tried unsuccessfully to change the
|
||||
* object; instead, another client changed the object.
|
||||
*/
|
||||
|
||||
// do nothing... just log it
|
||||
// Or...maybe we should check if the value is the same as what we wanted it
|
||||
// to be..if not...change it?
|
||||
//log.debug( "Conference::reject =[" + code + "," + name + "," + oldValue + "]");
|
||||
break;
|
||||
|
||||
case "change":
|
||||
/** From flash.events.SyncEvent doc
|
||||
* A value of "change" means another client changed the object or the server
|
||||
* resynchronized the object.
|
||||
*/
|
||||
|
||||
if (name != null) {
|
||||
if (_conference.hasParticipant(_participantsSO.data[name].userid)) {
|
||||
var changedUser : User = _conference.getParticipant(Number(name));
|
||||
changedUser.status = _participantsSO.data[name].status;
|
||||
changedUser.hasStream = _participantsSO.data[name].hasStream;
|
||||
changedUser.streamName = _participantsSO.data[name].streamName;
|
||||
|
||||
//log.debug( "Conference::change =[" +
|
||||
// name + "," + changedUser.name + "," + changedUser.hasStream + "]");
|
||||
|
||||
} else {
|
||||
// The server sent us a new user.
|
||||
var user : User = new User();
|
||||
user.userid = _participantsSO.data[name].userid;
|
||||
user.name = _participantsSO.data[name].name;
|
||||
user.status = _participantsSO.data[name].status;
|
||||
user.hasStream = _participantsSO.data[name].hasStream;
|
||||
user.streamName = _participantsSO.data[name].streamName;
|
||||
user.role = _participantsSO.data[name].role;
|
||||
|
||||
//log.debug( "Conference::change::newuser =[" +
|
||||
// name + "," + user.name + "," + user.hasStream + "]");
|
||||
|
||||
_conference.addUser(user);
|
||||
}
|
||||
|
||||
} else {
|
||||
//log.warn( "Conference::SO::change is null");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "delete":
|
||||
/** From flash.events.SyncEvent doc
|
||||
* A value of "delete" means the attribute was deleted.
|
||||
*/
|
||||
|
||||
//log.debug( "Conference::delete =[" + code + "," + name + "," + oldValue + "]");
|
||||
|
||||
// The participant has left. Cast name (string) into a Number.
|
||||
_conference.removeParticipant(Number(name));
|
||||
break;
|
||||
|
||||
default:
|
||||
//log.debug( "Conference::default[" + _participantsSO.data[name].userid
|
||||
// + "," + _participantsSO.data[name].name + "]");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a net_statu_event is received
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
private function netStatusHandler ( event : NetStatusEvent ) : void
|
||||
{
|
||||
//log.debug( "Conference::netStatusHandler " + event.info.code );
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when an async_error_handler is called
|
||||
* @param event
|
||||
*
|
||||
*/
|
||||
private function asyncErrorHandler ( event : AsyncErrorEvent ) : void
|
||||
{
|
||||
//log.debug( "Conference::asyncErrorHandler " + event.error);
|
||||
}
|
||||
|
||||
/**
|
||||
* send a new user status message
|
||||
* @param userid
|
||||
* @param newStatus
|
||||
*
|
||||
*/
|
||||
public function sendNewUserStatusEvent(userid : Number, newStatus : String):void
|
||||
{
|
||||
//var event : StatusChangeEvent =
|
||||
// new StatusChangeEvent(userid, newStatus);
|
||||
//event.dispatch();
|
||||
sendNotification(ViewersFacade.CHANGE_STATUS, new StatusNotifier(userid, newStatus));
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback from server
|
||||
*/
|
||||
public function setUserIdAndRole(id : Number, role : String ) : String
|
||||
{
|
||||
//log.debug( "SOConferenceDelegate::setConnectionId: id=[" + id + "]");
|
||||
if( isNaN( id ) ) return "FAILED";
|
||||
|
||||
_conference.me.userid = id;
|
||||
_conference.me.role = role;
|
||||
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.model.vo
|
||||
{
|
||||
import org.bigbluebutton.common.Role;
|
||||
|
||||
/**
|
||||
* The User class holds the properties of the client user
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
[Bindable]
|
||||
public class User
|
||||
{
|
||||
public var userid : Number;
|
||||
public var name : String;
|
||||
public var status : String = "lowerhand";
|
||||
public var role : String = Role.VIEWER;
|
||||
|
||||
/**
|
||||
* If the user is broadcasting a stream (video and/or audio)
|
||||
*/
|
||||
public var hasStream : Boolean = false;
|
||||
|
||||
/**
|
||||
* The name of the stream the user id broadcasting
|
||||
*/
|
||||
public var streamName : String = null;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<viewer:MDIWindow xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
width="328" height="265" layout="absolute"
|
||||
xmlns:viewer="flexlib.mdi.containers.*">
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.bigbluebutton.modules.viewers.view.mediators.JoinWindowMediator;
|
||||
import mx.managers.PopUpManager;
|
||||
|
||||
public static const TITLE:String = "Join Conference";
|
||||
public var host : String = "localhost";
|
||||
]]>
|
||||
</mx:Script>
|
||||
<mx:Label x="41" y="52" text="Name" id="nameLabel"/>
|
||||
<mx:TextInput id="nameField" x="98" y="50" tabIndex="1"/>
|
||||
<mx:Label x="10" y="91" text="Conference" id="confLabel"/>
|
||||
<mx:TextInput x="98" y="89" id="confField" tabIndex="2"/>
|
||||
<mx:Label x="22" y="132" text="Password" id="passwdLabel"/>
|
||||
<mx:TextInput x="98" y="130" id="passwdField" displayAsPassword="true" tabIndex="3"/>
|
||||
<mx:Button label="Join" x="243" y="169" click="dispatchEvent(new Event(JoinWindowMediator.LOGIN))" tabIndex="4"/>
|
||||
<mx:Label x="21" y="10" text="Complete form to join conference." width="256" id="messageLbl"/>
|
||||
<mx:Label x="22" y="208" width="270" id="lblNote"/>
|
||||
|
||||
</viewer:MDIWindow>
|
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
verticalScrollPolicy="off" horizontalScrollPolicy="off">
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.bigbluebutton.common.Role;
|
||||
import org.bigbluebutton.modules.viewers.ViewersFacade;
|
||||
import org.bigbluebutton.modules.viewers.model.business.Conference;
|
||||
import org.bigbluebutton.common.Images;
|
||||
import mx.events.DragEvent;
|
||||
import flash.events.MouseEvent;
|
||||
import mx.core.DragSource;
|
||||
import mx.controls.Image;
|
||||
import mx.managers.DragManager;
|
||||
|
||||
private var images:Images = new Images();
|
||||
private var conference:Conference =
|
||||
ViewersFacade.getInstance().retrieveMediator(Conference.NAME) as Conference
|
||||
|
||||
public function dragPresenterUser(event:MouseEvent, userid:Number):void
|
||||
{
|
||||
if (conference.me.role == Role.MODERATOR) {
|
||||
var dragInitiator:Label = event.currentTarget as Label;
|
||||
var dragSource:DragSource = new DragSource();
|
||||
dragSource.addData(data.userid , 'presenterUserid');
|
||||
dragSource.addData(data.name , 'presenterUsername');
|
||||
|
||||
var dragProxy:Image = new Image();
|
||||
|
||||
dragProxy.source = images.user_gray;
|
||||
dragProxy.alpha = 1;
|
||||
DragManager.doDrag(dragInitiator, dragSource , event, dragProxy, 0, 0, 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
<mx:Label id="nameLabel" text="{data.name}" mouseDown="dragPresenterUser(event, data.userid)" />
|
||||
|
||||
</mx:HBox>
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
verticalScrollPolicy="off" horizontalScrollPolicy="off">
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.bigbluebutton.common.Images;
|
||||
import org.bigbluebutton.common.Role;
|
||||
|
||||
private var images:Images = new Images();
|
||||
|
||||
[Bindable] private var adminIcon : Object = images.admin;
|
||||
[Bindable] private var viewerIcon : Object = images.participant;
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
<mx:Image id="roleImage" source="{data.role == Role.MODERATOR ? adminIcon : viewerIcon}"/>
|
||||
</mx:HBox>
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
verticalScrollPolicy="off" horizontalScrollPolicy="off">
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.bigbluebutton.modules.viewers.model.vo.User;
|
||||
import org.bigbluebutton.main.view.components.MainApplicationShell;
|
||||
import org.bigbluebutton.main.MainApplicationFacade;
|
||||
import org.bigbluebutton.common.Images;
|
||||
|
||||
private var images:Images = new Images();
|
||||
|
||||
private function viewCamera() : void
|
||||
{
|
||||
//MainApplicationFacade.getInstance(MainApplicationShell.NAME).openViewCamera(data as User);
|
||||
}
|
||||
|
||||
[Bindable] private var webcamIcon : Object = images.webcam;
|
||||
[Bindable] private var handIcon : Object = images.raisehand;
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
<mx:Image id="streamImage" source="{webcamIcon}" visible="{data.hasStream}"
|
||||
toolTip="Double-click to view" doubleClick="viewCamera()"/>
|
||||
</mx:HBox>
|
@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
width="100%"
|
||||
creationComplete="initParticipantItem()">
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.red5.samples.publisher.MediaType;
|
||||
import org.red5.samples.publisher.vo.PlayMedia;
|
||||
import org.red5.samples.publisher.view.ViewCameraWindow;
|
||||
|
||||
import mx.events.FlexEvent;
|
||||
import mx.controls.Image;
|
||||
import mx.events.DragEvent;
|
||||
import flash.events.MouseEvent;
|
||||
import mx.core.DragSource;
|
||||
import mx.managers.DragManager;
|
||||
import com.adobe.cairngorm.control.CairngormEventDispatcher;
|
||||
import mx.binding.utils.BindingUtils;
|
||||
|
||||
private var model : ConferenceModelLocator = ConferenceModelLocator.getInstance();
|
||||
private var modelC : ChatModelLocator = ChatModelLocator.getInstance();
|
||||
private var chat : ChatModel = modelC.chat;
|
||||
private var dispatcher : CairngormEventDispatcher = CairngormEventDispatcher.getInstance();
|
||||
private var log : ILogger = LoggerModelLocator.getInstance().log;
|
||||
private var images : Images = new Images();
|
||||
private var windowOpen : Boolean = false;
|
||||
private var response : Boolean = false;
|
||||
private var tempid : Number;
|
||||
private var tempname : String;
|
||||
private var firstMessage : String ="";
|
||||
|
||||
[Bindable] private var adminIcon : Object = images.admin;
|
||||
[Bindable] private var webcamIcon : Object = images.webcam;
|
||||
[Bindable] private var viewerIcon : Object = images.participant;
|
||||
[Bindable] private var handIcon : Object = images.raisehand;
|
||||
|
||||
private var chatIcon : Object = images.chat_request;
|
||||
private var chatIcon2 : Object = images.chat_request_new;
|
||||
[Bindable] private var statusTooltip : String = "";
|
||||
|
||||
private function initParticipantItem() : void
|
||||
{
|
||||
dispatcher.addEventListener(ChatEvents.NEW_CHAT_REQUEST_EVENT , onNewChatRequestEvent);
|
||||
}
|
||||
|
||||
public function dragPresenterUser(event:MouseEvent, userid:Number):void
|
||||
{
|
||||
if (model.conference.me.role == Role.MODERATOR) {
|
||||
var dragInitiator:Label = event.currentTarget as Label;
|
||||
var dragSource:DragSource = new DragSource();
|
||||
dragSource.addData(data.userid , 'presenterUserid');
|
||||
dragSource.addData(data.name , 'presenterUsername');
|
||||
|
||||
var dragProxy:Image = new Image();
|
||||
|
||||
dragProxy.source = images.user_gray;
|
||||
dragProxy.alpha = 1;
|
||||
DragManager.doDrag(dragInitiator, dragSource , event, dragProxy, 0, 0, 1, true);
|
||||
}
|
||||
}
|
||||
|
||||
public function onNewChatRequestEvent(event : Event):void
|
||||
{
|
||||
var chatRequest : NewChatRequestEvent = NewChatRequestEvent (event)
|
||||
tempid = chatRequest.fromUserid;
|
||||
tempname = chatRequest.fromUsername;
|
||||
|
||||
if((data.userid == chatRequest.fromUserid)&&(! windowOpen ))
|
||||
{
|
||||
if(response)
|
||||
{
|
||||
chatImage.toolTip = "Chatting with " + chatRequest.fromUsername;
|
||||
chatImage.source = images.chat_request;
|
||||
}
|
||||
else
|
||||
{
|
||||
chatImage.source = images.chat_request_new;
|
||||
chatImage.toolTip = "Private chat request from " +
|
||||
chatRequest.fromUsername + ".\n" +
|
||||
"To respond, double click on this icon.";
|
||||
|
||||
firstMessage += chatRequest.message + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function onCloseChatWindowEvent(event : Event):void
|
||||
{
|
||||
var closeChat : CloseChatWindowEvent = CloseChatWindowEvent(event);
|
||||
if (data.userid == closeChat.toUserid) {
|
||||
chatImage.source = "";
|
||||
dispatcher.removeEventListener(ChatEvents.CLOSE_CHAT_WINDOW_EVENT , onCloseChatWindowEvent);
|
||||
response = false;
|
||||
windowOpen = false;
|
||||
}
|
||||
}
|
||||
|
||||
private function privateChatPanel():void
|
||||
{
|
||||
if ( model.conference.me.userid != data.userid )
|
||||
{
|
||||
firstMessage = "";
|
||||
var chatPanel : PrivateChatPanel = new PrivateChatPanel(model.conference.me.userid ,
|
||||
data.userid , model.conference.me.name , data.name);
|
||||
this.parentDocument.parentDocument.addChild(chatPanel);
|
||||
dispatcher.addEventListener(ChatEvents.CLOSE_CHAT_WINDOW_EVENT , onCloseChatWindowEvent);
|
||||
response = true;
|
||||
}
|
||||
}
|
||||
|
||||
private function responseChatPanel():void
|
||||
{
|
||||
var chatPanel : PrivateChatPanel = new PrivateChatPanel(model.conference.me.userid ,
|
||||
tempid , model.conference.me.name , tempname);
|
||||
|
||||
// Open the private chat window as a chile to the main UI
|
||||
// this is the Canvas (this.parentPanel.parentCanvas)
|
||||
this.parentDocument.parentDocument.addChild(chatPanel);
|
||||
|
||||
chatPanel.message ="";
|
||||
chatPanel.message = firstMessage;
|
||||
chatPanel.txtBox.htmlText = chatPanel.message;
|
||||
firstMessage = "";
|
||||
windowOpen = true;
|
||||
chatImage.toolTip = "Chatting with " + tempname;
|
||||
chatImage.source = images.chat_request;
|
||||
dispatcher.addEventListener(ChatEvents.CLOSE_CHAT_WINDOW_EVENT , onCloseChatWindowEvent);
|
||||
response = false;
|
||||
}
|
||||
|
||||
private function viewCamera() : void
|
||||
{
|
||||
var viewCam : ViewCameraWindow = new ViewCameraWindow();
|
||||
viewCam.title = "Viewing " + data.name;
|
||||
viewCam.showCloseButton = true;
|
||||
|
||||
mainApp.publisherApp.createPlayMedia(data.streamName);
|
||||
|
||||
var media : PlayMedia = mainApp.publisherApp.getPlayMedia(data.streamName) as PlayMedia;
|
||||
viewCam.media = media;
|
||||
|
||||
mainApp.publisherApp.setupStream(data.streamName);
|
||||
|
||||
var evt : OpenWindowEvent = new OpenWindowEvent(viewCam);
|
||||
evt.dispatch();
|
||||
}
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
<mx:Image id="roleImage" source="{data.role == Role.MODERATOR ? adminIcon : viewerIcon}"
|
||||
toolTip="Double-click to chat" doubleClick="privateChatPanel()"/>
|
||||
<mx:Label id="nameLabel" text="{data.name}" mouseDown="dragPresenterUser(event, data.userid)" />
|
||||
<mx:Image id="handImage" source="{handIcon}" visible="{data.status == 'raisehand'}"/>
|
||||
<mx:Image id="chatImage" source="" doubleClick="responseChatPanel()"/>
|
||||
<mx:Image id="streamImage" source="{webcamIcon}" visible="{data.hasStream}"
|
||||
toolTip="Double-click to view" doubleClick="viewCamera()"/>
|
||||
</mx:HBox>
|
@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<viewer:MDIWindow xmlns:mx="http://www.adobe.com/2006/mxml"
|
||||
xmlns:viewer="flexlib.mdi.containers.*">
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.bigbluebutton.common.Images;
|
||||
import org.bigbluebutton.modules.viewers.model.business.Conference;
|
||||
import org.bigbluebutton.modules.viewers.ViewersFacade;
|
||||
import org.bigbluebutton.modules.viewers.view.mediators.ViewersWindowMediator;
|
||||
import mx.collections.ArrayCollection;
|
||||
|
||||
public static const TITLE:String = "Viewers";
|
||||
|
||||
[Bindable]
|
||||
public var conference : Conference =
|
||||
ViewersFacade.getInstance().retrieveMediator(Conference.NAME) as Conference;
|
||||
|
||||
public var images:Images = new Images();
|
||||
|
||||
[Bindable]
|
||||
public var toggleIcon : Class = images.raisehand;
|
||||
|
||||
[Bindable]
|
||||
public var toggleTooltip : String = "Click to raise hand.";
|
||||
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
<!--mx:TileList id="participantsList" height="100%" width="100%"
|
||||
itemRenderer="org.blindsideproject.views.conference.UserItem"
|
||||
maxColumns="1" rowHeight="25" columnWidth="200" dataProvider="{conference.users}">
|
||||
</mx:TileList-->
|
||||
|
||||
<mx:DataGrid id="viewersGrid" dataProvider="{conference.users}" editable="false"
|
||||
dragEnabled="false" width="100%" height="100%">
|
||||
<mx:columns>
|
||||
<mx:DataGridColumn dataField="role" headerText="" dataTipField="Role" editable="false" width="20"
|
||||
itemRenderer="org.bigbluebutton.modules.viewers.view.RoleItemRenderer"/>
|
||||
<mx:DataGridColumn dataField="name" headerText="Name" editable="true" width="100"
|
||||
itemRenderer="org.bigbluebutton.modules.viewers.view.NameItemRenderer"/>
|
||||
<mx:DataGridColumn dataField="status" headerText="Status"
|
||||
itemRenderer="org.bigbluebutton.modules.viewers.view.StatusItemRenderer"/>
|
||||
</mx:columns>
|
||||
</mx:DataGrid>
|
||||
|
||||
<!-- <mx:ControlBar width="100%">
|
||||
<mx:Spacer width="100%"/>
|
||||
<mx:Button id="raiseHandImage" icon="{toggleIcon}" toggle="true"
|
||||
width="20" height="20"
|
||||
toolTip="{toggleTooltip}" click="dispatchEvent(new Event(ViewersWindowMediator.CHANGE_STATUS))"/>
|
||||
</mx:ControlBar> -->
|
||||
</viewer:MDIWindow>
|
@ -0,0 +1,128 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.view.mediators
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flash.events.KeyboardEvent;
|
||||
|
||||
import org.bigbluebutton.common.Constants;
|
||||
import org.bigbluebutton.modules.log.LogModule;
|
||||
import org.bigbluebutton.modules.log.LogModuleFacade;
|
||||
import org.bigbluebutton.modules.viewers.ViewersFacade;
|
||||
import org.bigbluebutton.modules.viewers.model.services.SharedObjectConferenceDelegate;
|
||||
import org.bigbluebutton.modules.viewers.view.JoinWindow;
|
||||
import org.puremvc.as3.multicore.interfaces.IMediator;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.mediator.Mediator;
|
||||
|
||||
/**
|
||||
* The JoinWindowMediator is a mediator class for the JoinWindow gui component
|
||||
* @author Denis Zgonjanin
|
||||
*
|
||||
*/
|
||||
public class JoinWindowMediator extends Mediator implements IMediator
|
||||
{
|
||||
public static const NAME:String = "JoinWindowMediator";
|
||||
private var v:JoinWindow;
|
||||
public static const LOGIN:String = "Attempt Login";
|
||||
|
||||
/**
|
||||
* the constructor. registers this mediator with the JoinWindow gui component
|
||||
* @param view
|
||||
*
|
||||
*/
|
||||
public function JoinWindowMediator(view:JoinWindow)
|
||||
{
|
||||
super(NAME);
|
||||
v = view;
|
||||
view.addEventListener(LOGIN, login);
|
||||
view.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists the notifications to which this mediator listens to
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
override public function listNotificationInterests():Array{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles specific notifications upon their reception
|
||||
* @param notification
|
||||
*
|
||||
*/
|
||||
override public function handleNotification(notification:INotification):void{
|
||||
|
||||
}
|
||||
|
||||
protected function keyPressed(event:KeyboardEvent):void{
|
||||
if (event.keyCode == 13) login(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gui component which this class is a mediator of
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
private function get joinWindow():JoinWindow{
|
||||
return viewComponent as JoinWindow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to login.
|
||||
* @param e
|
||||
*
|
||||
*/
|
||||
private function login(e:Event):void{
|
||||
var name : String = v.nameField.text;
|
||||
var room : String = v.confField.text;
|
||||
var password : String = v.passwdField.text
|
||||
|
||||
if ((name.length < 1) || (room.length < 1) || (password.length < 1)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var completeHost:String = "rtmp://" + Constants.red5Host + "/conference/" + room;
|
||||
sendNotification(ViewersFacade.DEBUG, "connecting: " + completeHost);
|
||||
LogModuleFacade.getInstance(LogModule.NAME).debug("Connecting");
|
||||
proxy.join(completeHost,name,password,room);
|
||||
}
|
||||
|
||||
|
||||
private function get proxy():SharedObjectConferenceDelegate{
|
||||
return facade.retrieveProxy(SharedObjectConferenceDelegate.NAME) as SharedObjectConferenceDelegate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the notifier key of this mediator. This method need never be called directly. It is
|
||||
* necessary because in puremvc multicore version we cannot communicate with the facade directly
|
||||
* through the constructor.
|
||||
* @param key
|
||||
*
|
||||
*/
|
||||
override public function initializeNotifier(key:String):void{
|
||||
super.initializeNotifier(key);
|
||||
sendNotification(ViewersFacade.DEBUG, "Started JoinWindowMediator");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
/**
|
||||
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
|
||||
*
|
||||
* Copyright (c) 2008 by respective authors (see below).
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package org.bigbluebutton.modules.viewers.view.mediators
|
||||
{
|
||||
import flash.events.Event;
|
||||
|
||||
import org.bigbluebutton.modules.viewers.ViewersFacade;
|
||||
import org.bigbluebutton.modules.viewers.model.services.SharedObjectConferenceDelegate;
|
||||
import org.bigbluebutton.modules.viewers.view.ViewersWindow;
|
||||
import org.puremvc.as3.multicore.interfaces.IMediator;
|
||||
import org.puremvc.as3.multicore.interfaces.INotification;
|
||||
import org.puremvc.as3.multicore.patterns.mediator.Mediator;
|
||||
|
||||
/**
|
||||
* The ViewersWindowMediator is a mediator class for the ViewersWindow gui component
|
||||
* @author Denis Zgonjanin
|
||||
*
|
||||
*/
|
||||
public class ViewersWindowMediator extends Mediator implements IMediator
|
||||
{
|
||||
public static const NAME:String = "ViewersWindowMediator";
|
||||
public static const CHANGE_STATUS:String = "Change Status";
|
||||
|
||||
/**
|
||||
* The constructor. Registers this mediator with the gui component
|
||||
* @param view
|
||||
*
|
||||
*/
|
||||
public function ViewersWindowMediator(view:ViewersWindow)
|
||||
{
|
||||
super(NAME);
|
||||
view.addEventListener(CHANGE_STATUS, changeStatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists the notifications to which this mediator listens to
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
override public function listNotificationInterests():Array{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the notifications upon reception
|
||||
* @param notification
|
||||
*
|
||||
*/
|
||||
override public function handleNotification(notification:INotification):void{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the ViewersWindow which this class is a mediator to
|
||||
* @return
|
||||
*
|
||||
*/
|
||||
public function get viewersWindow():ViewersWindow{
|
||||
return viewComponent as ViewersWindow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the raisehand/lowerhand status
|
||||
* @param e
|
||||
*
|
||||
*/
|
||||
private function changeStatus(e:Event):void{
|
||||
var newStatus : String;
|
||||
|
||||
if (viewersWindow.conference.me.status == "raisehand") {
|
||||
newStatus = "lowerhand";
|
||||
viewersWindow.toggleTooltip = "Click to raise hand.";
|
||||
viewersWindow.toggleIcon = viewersWindow.images.raisehand;
|
||||
} else {
|
||||
newStatus = "raisehand";
|
||||
viewersWindow.toggleTooltip = "Click to lower hand.";
|
||||
viewersWindow.toggleIcon = viewersWindow.images.participant;
|
||||
}
|
||||
|
||||
proxy.sendNewStatus(newStatus);
|
||||
}
|
||||
|
||||
private function get proxy():SharedObjectConferenceDelegate{
|
||||
return facade.retrieveProxy(SharedObjectConferenceDelegate.NAME) as SharedObjectConferenceDelegate;
|
||||
}
|
||||
|
||||
}
|
||||
}
|