Merge branch 'master' into view-publish-webcam-stanalone
Conflicts: bigbluebutton-client/src/org/bigbluebutton/core/EventConstants.as bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCallbacks.as bigbluebutton-client/src/org/bigbluebutton/main/api/ExternalApiCalls.as bigbluebutton-client/src/org/bigbluebutton/main/api/maps/ExternalApiEventMap.mxml
This commit is contained in:
commit
30911ef181
@ -61,8 +61,31 @@
|
||||
<button type="button" onclick="lockLayout(false)">Unlock Layout</button>
|
||||
<button type="button" onclick="sendPublicChat()">Send Public Chat</button>
|
||||
<button type="button" onclick="sendPrivateChat()">Send Private Chat</button>
|
||||
<button type="button" onclick="amIPresenterSync()">Am I Presenter Sync</button>
|
||||
<button type="button" onclick="amIPresenterAsync()">Am I Presenter Async</button>
|
||||
</div>
|
||||
|
||||
<div id="webcampreview" style="background-color:#FFD700;height:240px;width:320px;float:left;">
|
||||
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540001" width="320" height="240" id="WebcamPreviewStandalone" name="WebcamPreviewStandalone" align="middle">
|
||||
<param name="movie" value="http://192.168.0.249/client/WebcamPreviewStandalone.swf?v=VERSION" />
|
||||
<param name="quality" value="high" />
|
||||
<param name="allowfullscreen" value="true" />
|
||||
<param name="bgcolor" value="#869ca7" />
|
||||
<param name="wmode" value="window" />
|
||||
<param name="allowScriptAccess" value="always" />
|
||||
<!--[if !IE]>-->
|
||||
<object type="application/x-shockwave-flash" data="http://192.168.0.249/client/WebcamPreviewStandalone.swf?v=VERSION" width="100%" height="90%" align="middle">
|
||||
<param name="quality" value="high" />
|
||||
<param name="bgcolor" value="#869ca7" />
|
||||
<param name="allowScriptAccess" value="always" />
|
||||
<!--<![endif]-->
|
||||
<a href="http://www.adobe.com/go/getflashplayer">
|
||||
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
|
||||
</a>
|
||||
<!--[if !IE]>-->
|
||||
</object>
|
||||
<!--<![endif]-->
|
||||
</object>
|
||||
</div>
|
||||
<div id="flashclient" style="background-color:#EEEEEE;height:900px;width:1200px;float:left;">
|
||||
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="50%" height="50%" id="BigBlueButton" name="BigBlueButton" align="middle">
|
||||
<param name="movie" value="http://192.168.0.249/client/BigBlueButton.swf?v=VERSION" />
|
||||
|
@ -35,6 +35,21 @@ var joinVoiceConference2 = function () {
|
||||
BBB.joinVoiceConference();
|
||||
}
|
||||
|
||||
var amIPresenterAsync = function() {
|
||||
BBB.listen("AmIPresenterQueryResponse", function(bbbEvent) {
|
||||
console.log("Received AmIPresenterQueryResponse event [" + bbbEvent.amIPresenter + "]");
|
||||
});
|
||||
|
||||
BBB.amIPresenter();
|
||||
}
|
||||
|
||||
var amIPresenterSync = function() {
|
||||
BBB.amIPresenter(function(amIPresenter) {
|
||||
console.log("Am I Presenter = " + amIPresenter);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
var getMyRoleAsynch = function() {
|
||||
BBB.listen("GetMyRoleResponse", function(bbbEvent) {
|
||||
console.log("Received GetMyRoleResponse event");
|
||||
|
@ -19,7 +19,26 @@
|
||||
swfObj.switchPresenterRequest(newPresenterUserID);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Query the Flash client if user is presenter.
|
||||
* Params:
|
||||
* callback - function if you want a callback as response. Otherwise, you need to listen
|
||||
* for the response as an event.
|
||||
*/
|
||||
BBB.amIPresenter = function(callback) {
|
||||
var swfObj = getSwfObj();
|
||||
if (swfObj) {
|
||||
if (arguments.length == 0) {
|
||||
swfObj.amIPresenterRequestAsync();
|
||||
} else {
|
||||
if (typeof callback === 'function') {
|
||||
callback(swfObj.amIPresenterRequestSync());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Query the Flash client for the user's role.
|
||||
* Params:
|
||||
|
@ -19,11 +19,10 @@ package org.bigbluebutton.core
|
||||
|
||||
/** Events to External JS **/
|
||||
public static const GET_MY_ROLE_RESP:String = 'GetMyRoleResponse';
|
||||
public static const AM_I_PRESENTER_RESP:String = 'AmIPresenterQueryResponse';
|
||||
public static const AM_I_PRESENTER_RESP:String = 'AmIPresenterQueryResponse';
|
||||
public static const AM_I_SHARING_CAM_RESP:String = 'AmISharingCamQueryResponse';
|
||||
|
||||
public static const I_AM_SHARING_CAM:String = 'IAmSharingCamEvent';
|
||||
public static const CAM_STREAM_SHARED:String = 'CamStreamSharedEvent';
|
||||
public static const CAM_STREAM_SHARED:String = 'CamStreamSharedEvent';
|
||||
public static const USER_JOINED:String = 'UserJoinedEvent';
|
||||
public static const USER_LEFT:String = 'UserLeftEvent';
|
||||
public static const NEW_ROLE:String = 'NewRoleEvent';
|
||||
|
@ -6,8 +6,9 @@ package org.bigbluebutton.main.api
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.core.EventConstants;
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.core.events.AmIPresenterQueryEvent;
|
||||
import org.bigbluebutton.core.events.AmIPresenterQueryEvent;
|
||||
import org.bigbluebutton.core.events.AmISharingWebcamQueryEvent;
|
||||
|
||||
import org.bigbluebutton.core.events.CoreEvent;
|
||||
import org.bigbluebutton.core.managers.UserManager;
|
||||
import org.bigbluebutton.core.vo.CameraSettingsVO;
|
||||
@ -37,9 +38,9 @@ package org.bigbluebutton.main.api
|
||||
ExternalInterface.addCallback("getMyRoleRequestSync", handleGetMyRoleRequestSync);
|
||||
ExternalInterface.addCallback("getMyRoleRequestAsync", handleGetMyRoleRequestAsynch);
|
||||
ExternalInterface.addCallback("amIPresenterRequestSync", handleAmIPresenterRequestSync);
|
||||
ExternalInterface.addCallback("amIPresenterRequestAsync", handleAmIPresenterRequestAsync);
|
||||
ExternalInterface.addCallback("amIPresenterRequestAsync", handleAmIPresenterRequestAsync);
|
||||
ExternalInterface.addCallback("amISharingCameraRequestSync", handleAmISharingCameraRequestSync);
|
||||
ExternalInterface.addCallback("amISharingCameraRequestAsync", handleAmISharingCameraRequestAsync);
|
||||
ExternalInterface.addCallback("amISharingCameraRequestAsync", handleAmISharingCameraRequestAsync);
|
||||
ExternalInterface.addCallback("muteMeRequest", handleMuteMeRequest);
|
||||
ExternalInterface.addCallback("unmuteMeRequest", handleUnmuteMeRequest);
|
||||
ExternalInterface.addCallback("muteAllUsersRequest", handleMuteAllUsersRequest);
|
||||
@ -53,6 +54,7 @@ package org.bigbluebutton.main.api
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function handleAmISharingCameraRequestSync():Object {
|
||||
var obj:Object = new Object();
|
||||
var camSettings:CameraSettingsVO = UsersUtil.amIPublishing();
|
||||
@ -68,6 +70,7 @@ package org.bigbluebutton.main.api
|
||||
_dispatcher.dispatchEvent(new AmISharingWebcamQueryEvent());
|
||||
}
|
||||
|
||||
|
||||
private function handleAmIPresenterRequestSync():Boolean {
|
||||
return UsersUtil.amIPresenter();
|
||||
}
|
||||
@ -75,7 +78,7 @@ package org.bigbluebutton.main.api
|
||||
private function handleAmIPresenterRequestAsync():void {
|
||||
_dispatcher.dispatchEvent(new AmIPresenterQueryEvent());
|
||||
}
|
||||
|
||||
|
||||
private function handleStopShareCameraRequest():void {
|
||||
_dispatcher.dispatchEvent(new ClosePublishWindowEvent());
|
||||
}
|
||||
|
@ -4,8 +4,9 @@ package org.bigbluebutton.main.api
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.core.EventConstants;
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.core.events.AmIPresenterQueryEvent;
|
||||
import org.bigbluebutton.core.events.AmIPresenterQueryEvent;
|
||||
import org.bigbluebutton.core.events.AmISharingWebcamQueryEvent;
|
||||
|
||||
import org.bigbluebutton.core.events.CoreEvent;
|
||||
import org.bigbluebutton.core.managers.UserManager;
|
||||
import org.bigbluebutton.core.vo.CameraSettingsVO;
|
||||
@ -16,6 +17,7 @@ package org.bigbluebutton.main.api
|
||||
import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent;
|
||||
import org.bigbluebutton.main.model.users.events.StreamStartedEvent;
|
||||
|
||||
|
||||
public class ExternalApiCalls {
|
||||
|
||||
public function handleStreamStartedEvent(event:StreamStartedEvent):void {
|
||||
@ -53,6 +55,7 @@ package org.bigbluebutton.main.api
|
||||
broadcastEvent(payload);
|
||||
}
|
||||
|
||||
|
||||
public function handleAmIPresenterQueryEvent(event:AmIPresenterQueryEvent):void {
|
||||
var payload:Object = new Object();
|
||||
payload.eventName = EventConstants.AM_I_PRESENTER_RESP;
|
||||
|
@ -75,6 +75,10 @@
|
||||
<EventHandlers type="{EventConstants.GET_MY_ROLE_RESP}" >
|
||||
<MethodInvoker generator="{ExternalApiCalls}" method="handleGetMyRoleResponse" arguments="{event}"/>
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{AmIPresenterQueryEvent.AM_I_PRESENTER_QUERY}" >
|
||||
<MethodInvoker generator="{ExternalApiCalls}" method="handleAmIPresenterQueryEvent" arguments="{event}"/>
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{UserJoinedEvent.JOINED}" >
|
||||
<MethodInvoker generator="{ExternalApiCalls}" method="handleUserJoinedEvent" arguments="{event}"/>
|
||||
|
Loading…
Reference in New Issue
Block a user