- merge branches/developers/ritzalam/bbb-client-playback
git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@1338 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
parent
c04219d9bd
commit
288fb0e820
@ -33,6 +33,10 @@
|
||||
}
|
||||
|
||||
public function get uri():String {
|
||||
if (_attributes.mode == "PLAYBACK") {
|
||||
return _attributes.uri + "/" + _attributes.playbackRoom;
|
||||
}
|
||||
|
||||
return _attributes.uri + "/" + _attributes.room;
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,10 @@
|
||||
}
|
||||
|
||||
public function get uri():String {
|
||||
if (_attributes.mode == "PLAYBACK") {
|
||||
return _attributes.uri + "/" + _attributes.playbackRoom;
|
||||
}
|
||||
|
||||
return _attributes.uri + "/" + _attributes.room;
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,10 @@
|
||||
}
|
||||
|
||||
public function get uri():String {
|
||||
if (_attributes.mode == "PLAYBACK") {
|
||||
return _attributes.uri + "/" + _attributes.playbackRoom;
|
||||
}
|
||||
|
||||
return _attributes.uri + "/" + _attributes.room;
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,10 @@
|
||||
}
|
||||
|
||||
public function get uri():String {
|
||||
if (_attributes.mode == "PLAYBACK") {
|
||||
return _attributes.uri + "/" + _attributes.playbackRoom;
|
||||
}
|
||||
|
||||
return _attributes.uri + "/" + _attributes.room;
|
||||
}
|
||||
|
||||
|
@ -13,9 +13,10 @@
|
||||
private var _moduleName:String = "Viewers Module";
|
||||
|
||||
private var _attributes:Object;
|
||||
private var _playbackRoom:String;
|
||||
|
||||
private function onCreationComplete():void {
|
||||
LogUtil.debug("ViewersModule Initialized");
|
||||
LogUtil.debug("ViewersModule Initialized");
|
||||
}
|
||||
|
||||
public function acceptRouter(router:Router):void{
|
||||
@ -34,8 +35,21 @@
|
||||
return _moduleName;
|
||||
}
|
||||
|
||||
public function get uri():String {
|
||||
public function get baseUri():String {
|
||||
return _attributes.uri;
|
||||
}
|
||||
|
||||
public function get playbackRoom():String {
|
||||
return _playbackRoom as String;
|
||||
}
|
||||
|
||||
public function get uri():String {
|
||||
if (_attributes.mode == "PLAYBACK") {
|
||||
return _attributes.uri + "/" + _playbackRoom;
|
||||
}
|
||||
|
||||
return _attributes.uri + "/" + _attributes.room;
|
||||
|
||||
}
|
||||
|
||||
public function get role():String {
|
||||
@ -83,6 +97,22 @@
|
||||
return _attributes.room;
|
||||
}
|
||||
|
||||
public function set mode(m:String):void {
|
||||
_attributes.mode = m;
|
||||
}
|
||||
|
||||
public function get mode():String {
|
||||
return _attributes.mode;
|
||||
}
|
||||
|
||||
public function set voicebridge(v:String):void {
|
||||
_attributes.voicebridge = v;
|
||||
}
|
||||
|
||||
public function get voicebridge():String {
|
||||
return _attributes.voicebridge;
|
||||
}
|
||||
|
||||
public function set conference(c:String):void {
|
||||
_attributes.conference = c;
|
||||
}
|
||||
@ -90,19 +120,13 @@
|
||||
public function get conference():String {
|
||||
return _attributes.conference;
|
||||
}
|
||||
|
||||
public function get mode():String {
|
||||
if (_attributes.mode == null) {
|
||||
//_attributes.mode = "PLAYBACK"
|
||||
_attributes.mode = "LIVE"
|
||||
LogUtil.debug('Setting ViewersModule mode: ' + _attributes.mode);
|
||||
}
|
||||
LogUtil.debug('ViewersModule mode: ' + _attributes.mode);
|
||||
return _attributes.mode;
|
||||
}
|
||||
|
||||
|
||||
public function start(attributes:Object):void {
|
||||
_attributes = attributes;
|
||||
|
||||
var now:Date = new Date();
|
||||
_playbackRoom = now.getTime().toString();
|
||||
|
||||
LogUtil.debug('Passed ViewersModule mode: ' + _attributes.mode);
|
||||
ViewersFacade.getInstance().startup(this);
|
||||
}
|
||||
|
9
bigbluebutton-client/src/conf/join-mock.xml
Normal file
9
bigbluebutton-client/src/conf/join-mock.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<join>
|
||||
<returncode>SUCCESS</returncode>
|
||||
<fullname>Richard</fullname>
|
||||
<role>MODERATOR</role>
|
||||
<conference>11e59b6d-fe0a-4ca5-8be4-c07b85d3eff8</conference>
|
||||
<room>c87bead2-d230-4887-aba2-3418fb60e5dc</room>
|
||||
<voicebridge>787493</voicebridge>
|
||||
<mode>LIVE</mode>
|
||||
</join>
|
@ -1,13 +1,22 @@
|
||||
<modules>
|
||||
<module name="LoginModule" url="LoginModule.swf"
|
||||
<!--module name="LoginModule" url="LoginModule.swf"
|
||||
uri="http://localhost:8080/bigbluebutton/join/signIn"
|
||||
onAppInitEvent="LOAD" loadNextModule="ChatModule"
|
||||
onAppStartEvent="START"
|
||||
onUserLogoutEvent="STOP"
|
||||
uri="http://localhost:8080/bigbluebutton/conference-session/enter"
|
||||
/-->
|
||||
<!--
|
||||
<module name="JoinModule" url="JoinModule.swf"
|
||||
uri="conf/join-mock.xml"
|
||||
onAppInitEvent="LOAD"
|
||||
onAppStartEvent="START"
|
||||
onUserLogoutEvent="STOP"
|
||||
/>
|
||||
-->
|
||||
|
||||
<module name="VideoModule" url="VideoModule.swf"
|
||||
uri="rtmp://localhost/oflaDemo"
|
||||
loadNextModule="ViewersModule"
|
||||
onUserJoinedEvent="START"
|
||||
onUserLogoutEvent="STOP"
|
||||
/>
|
||||
@ -17,12 +26,16 @@
|
||||
onUserJoinedEvent="START"
|
||||
onUserLogoutEvent="STOP"
|
||||
/>
|
||||
|
||||
<module name="ViewersModule" url="ViewersModule.swf"
|
||||
uri="rtmp://localhost/bigbluebutton"
|
||||
host="http://localhost:8080/bigbluebutton/join/enter"
|
||||
onUserLoggedInEvent="START"
|
||||
host="http://localhost:8080/bigbluebutton/conference-session/enter"
|
||||
onAppInitEvent="LOAD" loadNextModule="ChatModule"
|
||||
onAppStartEvent="START"
|
||||
onUserLogoutEvent="STOP"
|
||||
/>
|
||||
|
||||
|
||||
<module name="ListenersModule" url="ListenersModule.swf"
|
||||
uri="rtmp://localhost/bigbluebutton"
|
||||
recordingHost="http://134.117.254.226"
|
||||
@ -30,7 +43,6 @@
|
||||
onUserJoinedEvent="START"
|
||||
onUserLogoutEvent="STOP"
|
||||
/>
|
||||
<module name="WhiteboardModule" url="WhiteboardModule.swf" uri="rtmp://localhost/test" />
|
||||
<module name="PresentationModule" url="PresentationModule.swf"
|
||||
uri="rtmp://localhost/bigbluebutton"
|
||||
host="http://localhost:8080"
|
||||
@ -38,4 +50,5 @@
|
||||
onUserJoinedEvent="START"
|
||||
onUserLogoutEvent="STOP"
|
||||
/>
|
||||
|
||||
</modules>
|
@ -92,8 +92,10 @@ package org.bigbluebutton.main.model
|
||||
_user.room = user.room;
|
||||
_user.authToken = user.authToken;
|
||||
_user.userid = user.userid;
|
||||
_user.mode = _mode; // Assign if this is PLAYBACK or LIVE
|
||||
_user.mode = user.mode;
|
||||
_user.voicebridge = user.voicebridge;
|
||||
_user.connection = user.connection;
|
||||
_user.playbackRoom = user.playbackRoom;
|
||||
}
|
||||
|
||||
public function get numberOfModules():int {
|
||||
@ -132,6 +134,8 @@ package org.bigbluebutton.main.model
|
||||
m.addAttribute("userid", _user.userid);
|
||||
m.addAttribute("mode", _user.mode);
|
||||
m.addAttribute("connection", _user.connection);
|
||||
m.addAttribute("voicebridge", _user.voicebridge);
|
||||
m.addAttribute("playbackRoom", _user.playbackRoom);
|
||||
} else {
|
||||
// Pass the mode that we got from the URL query string.
|
||||
m.addAttribute("mode", _mode);
|
||||
|
@ -107,10 +107,12 @@ package org.bigbluebutton.main.view
|
||||
//}
|
||||
break;
|
||||
case MainApplicationConstants.USER_JOINED:
|
||||
/**
|
||||
* Workaround to pass in username for sip registration.
|
||||
*/
|
||||
red5PhoneWindow.sipusername = modulesProxy.username;
|
||||
/**
|
||||
* Workaround to pass in username for sip registration.
|
||||
*/
|
||||
//red5PhoneWindow.sipusername = modulesProxy.username;
|
||||
shell.loadedModules.text = "";
|
||||
shell.loadProgress.text = "";
|
||||
break;
|
||||
case MainApplicationConstants.USER_LOGGED_IN:
|
||||
shell.loadedModules.text = "";
|
||||
|
@ -55,7 +55,7 @@ package org.bigbluebutton.modules.join.model
|
||||
private function joinListener(success:Boolean, result:Object):void {
|
||||
if (success) {
|
||||
LogUtil.debug(NAME + '::Sending JoinModuleConstants.JOIN_SUCCESS');
|
||||
sendNotification(JoinModuleConstants.JOIN_SUCCESS, result);
|
||||
// sendNotification(JoinModuleConstants.JOIN_SUCCESS, result);
|
||||
} else {
|
||||
LogUtil.debug(NAME + '::Sending JoinModuleConstants.JOIN_FAILED');
|
||||
sendNotification(JoinModuleConstants.JOIN_FAILED, result);
|
||||
|
@ -44,9 +44,9 @@ package org.bigbluebutton.modules.join.model.service
|
||||
_resultListener(false, {message:xml.message});
|
||||
} else if (returncode == 'SUCCESS') {
|
||||
LogUtil.debug(xml.returncode + " " + xml.fullname + " " + xml.conference + " " + xml.role
|
||||
+ " " + xml.room);
|
||||
+ " " + xml.room + " " + xml.mode);
|
||||
var user:Object = {username:xml.fullname, conference:xml.conference,
|
||||
userrole:xml.role, room:xml.room, authToken:xml.room};
|
||||
userrole:xml.role, room:xml.room, authToken:xml.room, mode:xml.mode};
|
||||
_resultListener(true, user);
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ package org.bigbluebutton.modules.listeners.model.service
|
||||
|
||||
private function join() : void
|
||||
{
|
||||
trace(_module.uri);
|
||||
trace("ListenertsSOService " + _module.uri);
|
||||
_listenersSO = SharedObject.getRemote(SHARED_OBJECT, _module.uri, false);
|
||||
_listenersSO.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
|
||||
_listenersSO.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
|
||||
|
@ -104,8 +104,8 @@ package org.bigbluebutton.modules.presentation.model.business
|
||||
public function loadPresentation(presentationName:String) : void
|
||||
{
|
||||
LogUtil.debug("PresentProxy::loadPresentation: presentationName=" + presentationName);
|
||||
var fullUri : String = _module.host + "/bigbluebutton/presentation/"+presentationName+"/slides";
|
||||
var slideUri:String = _module.host + "/bigbluebutton/presentation/"+presentationName;
|
||||
var fullUri : String = _module.host + "/bigbluebutton/presentation/" + _module.conference + "/" + _module.room + "/" + presentationName+"/slides";
|
||||
var slideUri:String = _module.host + "/bigbluebutton/presentation/" + _module.conference + "/" + _module.room + "/" + presentationName;
|
||||
|
||||
LogUtil.debug("PresentationApplication::loadPresentation()... " + fullUri);
|
||||
|
||||
|
@ -59,7 +59,7 @@ package org.bigbluebutton.modules.presentation.model.services
|
||||
public function parse(xml:XML):void{
|
||||
var list:XMLList = xml.presentation.slides.slide;
|
||||
var item:XML;
|
||||
//LogUtil.debug("Slides: " + xml);
|
||||
LogUtil.debug("Slides: " + xml);
|
||||
|
||||
var presentationName:String = xml.presentation[0].@name;
|
||||
LogUtil.debug("PresentationService::parse()... presentationName=" + presentationName);
|
||||
|
@ -167,7 +167,7 @@ package org.bigbluebutton.modules.presentation.view.fisheye.controls
|
||||
slideNumber.text = "";
|
||||
} else {
|
||||
slideNumber.text = "";
|
||||
slideNumber.text = String((_data.slideNumber as Number) + 1);
|
||||
slideNumber.text = String(_data.slideNumber as Number);
|
||||
}
|
||||
slideNumber.x = this.width / 2;
|
||||
slideNumber.y = this.height / 2;
|
||||
|
@ -59,7 +59,9 @@ package org.bigbluebutton.modules.viewers
|
||||
case ViewersModuleConstants.LOGGED_IN:
|
||||
var user:Object = {username:_module.username, conference:_module.conference,
|
||||
userrole:_module.role, room:_module.room, authToken:_module.authToken,
|
||||
userid:_module.userid, connection:proxy.connection};
|
||||
userid:_module.userid, connection:proxy.connection,
|
||||
mode:_module.mode, voicebridge:_module.voicebridge,
|
||||
playbackRoom:_module.playbackRoom};
|
||||
_endpoint.sendMessage(EndpointMessageConstants.USER_JOINED,
|
||||
EndpointMessageConstants.TO_MAIN_APP, user);
|
||||
break;
|
||||
|
@ -37,11 +37,11 @@ package org.bigbluebutton.modules.viewers.model
|
||||
}
|
||||
|
||||
public function connect():void {
|
||||
_viewersService = new ViewersSOService(module.uri, _participants);
|
||||
_viewersService = new ViewersSOService(module, _participants);
|
||||
_viewersService.addConnectionStatusListener(connectionStatusListener);
|
||||
_viewersService.addMessageSender(messageSender);
|
||||
LogUtil.debug(NAME + '::' + module.username + "," + module.role);
|
||||
_viewersService.connect(module.uri, module.username, module.role, module.conference, module.mode, module.room);
|
||||
_viewersService.connect(module.username, module.role, module.conference, module.mode, module.room);
|
||||
}
|
||||
|
||||
public function join():void {
|
||||
@ -66,6 +66,8 @@ package org.bigbluebutton.modules.viewers.model
|
||||
module.role = _participants.me.role;
|
||||
module.room = _participants.me.room;
|
||||
module.authToken = _participants.me.authToken;
|
||||
module.mode = result.mode;
|
||||
module.voicebridge = result.voicebridge;
|
||||
|
||||
connect();
|
||||
} else {
|
||||
|
@ -6,7 +6,7 @@ package org.bigbluebutton.modules.viewers.model.services
|
||||
|
||||
public interface IViewersService
|
||||
{
|
||||
function connect(uri:String, username:String, role:String, conference:String, mode:String, room:String):void;
|
||||
function connect(username:String, role:String, conference:String, mode:String, room:String):void;
|
||||
function disconnect():void;
|
||||
function addConnectionStatusListener(connectionListener:Function):void;
|
||||
// function iAmPresenter(userid:Number, presenter:Boolean):void;
|
||||
|
@ -44,9 +44,10 @@ package org.bigbluebutton.modules.viewers.model.services
|
||||
_resultListener(false, {message:xml.message});
|
||||
} else if (returncode == 'SUCCESS') {
|
||||
LogUtil.debug(xml.returncode + " " + xml.fullname + " " + xml.conference + " " + xml.role
|
||||
+ " " + xml.room);
|
||||
+ " " + xml.room + " " + xml.voicebridge + " " + xml.mode);
|
||||
var user:Object = {username:xml.fullname, conference:xml.conference,
|
||||
role:xml.role, room:xml.room, authToken:xml.room};
|
||||
role:xml.role, room:xml.room, authToken:xml.room,
|
||||
voicebridge:xml.voicebridge, mode:xml.mode};
|
||||
_resultListener(true, user);
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,6 @@ package org.bigbluebutton.modules.viewers.model.services
|
||||
public static const CONNECT_REJECTED:String = "NetConnection.Connect.Rejected";
|
||||
|
||||
private var _netConnection:NetConnection;
|
||||
private var _uri:String;
|
||||
private var connectionId:Number;
|
||||
private var connected:Boolean = false;
|
||||
private var _connectionSuccessListener:Function;
|
||||
@ -47,16 +46,17 @@ package org.bigbluebutton.modules.viewers.model.services
|
||||
|
||||
private var _userid:Number = -1;
|
||||
private var _role:String = "unknown";
|
||||
private var _module:ViewersModule;
|
||||
|
||||
// These two are just placeholders. We'll get this from the server later and
|
||||
// then pass to other modules.
|
||||
private var _authToken:String = "AUTHORIZED";
|
||||
private var _room:String;
|
||||
|
||||
public function NetConnectionDelegate(uri:String) : void
|
||||
public function NetConnectionDelegate(m:ViewersModule) : void
|
||||
{
|
||||
_netConnection = new NetConnection();
|
||||
_uri = uri;
|
||||
_module = m;
|
||||
}
|
||||
|
||||
public function get connection():NetConnection {
|
||||
@ -80,7 +80,7 @@ package org.bigbluebutton.modules.viewers.model.services
|
||||
* mode: LIVE/PLAYBACK - Live:when used to collaborate, Playback:when being used to playback a recorded conference.
|
||||
* room: Need the room number when playing back a recorded conference. When LIVE, the room is taken from the URI.
|
||||
*/
|
||||
public function connect(uri:String, username:String, role:String, conference:String, mode:String, room:String):void
|
||||
public function connect(username:String, role:String, conference:String, mode:String, room:String):void
|
||||
{
|
||||
_netConnection.client = this;
|
||||
_netConnection.addEventListener( NetStatusEvent.NET_STATUS, netStatus );
|
||||
@ -88,20 +88,19 @@ package org.bigbluebutton.modules.viewers.model.services
|
||||
_netConnection.addEventListener( SecurityErrorEvent.SECURITY_ERROR, netSecurityError );
|
||||
_netConnection.addEventListener( IOErrorEvent.IO_ERROR, netIOError );
|
||||
|
||||
try {
|
||||
LogUtil.debug(NAME + "::Connecting to " + _uri + " [" + username + "," + role + "," + conference +
|
||||
try {
|
||||
var uri:String = _module.uri;
|
||||
|
||||
LogUtil.debug(NAME + "::Connecting to " + uri + " [" + username + "," + role + "," + conference +
|
||||
"," + mode + "," + room + "]");
|
||||
//if (mode == 'PLAYBACK') {
|
||||
//
|
||||
//}
|
||||
_netConnection.connect(_uri, username, role, conference, mode, room);
|
||||
_netConnection.connect(uri, username, role, conference, mode, room);
|
||||
|
||||
} catch( e : ArgumentError ) {
|
||||
// Invalid parameters.
|
||||
switch ( e.errorID )
|
||||
{
|
||||
case 2004 :
|
||||
LogUtil.debug("Error! Invalid server location: " + _uri);
|
||||
LogUtil.debug("Error! Invalid server location: " + uri);
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
|
@ -7,7 +7,6 @@ package org.bigbluebutton.modules.viewers.model.services
|
||||
import flash.net.SharedObject;
|
||||
|
||||
import org.bigbluebutton.modules.viewers.model.business.IViewers;
|
||||
import org.bigbluebutton.modules.viewers.model.vo.Status;
|
||||
import org.bigbluebutton.modules.viewers.model.vo.User;
|
||||
|
||||
public class ViewersSOService implements IViewersService
|
||||
@ -22,27 +21,28 @@ package org.bigbluebutton.modules.viewers.model.services
|
||||
private var netConnectionDelegate: NetConnectionDelegate;
|
||||
|
||||
private var _participants:IViewers;
|
||||
private var _uri:String;
|
||||
private var _connectionSuccessListener:Function;
|
||||
private var _connectionFailedListener:Function;
|
||||
private var _connectionStatusListener:Function;
|
||||
private var _messageSender:Function;
|
||||
private var _mode:String;
|
||||
private var _room:String;
|
||||
|
||||
private var _module:ViewersModule;
|
||||
|
||||
public function ViewersSOService(uri:String, participants:IViewers)
|
||||
public function ViewersSOService(m:ViewersModule, participants:IViewers)
|
||||
{
|
||||
_uri = uri;
|
||||
_module = m;
|
||||
_participants = participants;
|
||||
netConnectionDelegate = new NetConnectionDelegate(uri);
|
||||
netConnectionDelegate = new NetConnectionDelegate(_module);
|
||||
netConnectionDelegate.addConnectionSuccessListener(connectionSuccessListener);
|
||||
netConnectionDelegate.addConnectionFailedListener(connectionFailedListener);
|
||||
}
|
||||
|
||||
public function connect(uri:String, username:String, role:String, conference:String, mode:String, room:String):void {
|
||||
public function connect(username:String, role:String, conference:String, mode:String, room:String):void {
|
||||
_mode = mode;
|
||||
_room = room;
|
||||
netConnectionDelegate.connect(_uri, username, role, conference, mode, room);
|
||||
netConnectionDelegate.connect(username, role, conference, mode, room);
|
||||
}
|
||||
|
||||
public function disconnect():void {
|
||||
@ -76,7 +76,7 @@ package org.bigbluebutton.modules.viewers.model.services
|
||||
|
||||
private function join() : void
|
||||
{
|
||||
_participantsSO = SharedObject.getRemote(SO_NAME, _uri, false);
|
||||
_participantsSO = SharedObject.getRemote(SO_NAME, _module.uri, false);
|
||||
_participantsSO.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
|
||||
_participantsSO.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
|
||||
_participantsSO.client = this;
|
||||
|
Loading…
Reference in New Issue
Block a user