Merge branch 'SenecaCDOT-BigBlueButton-chrome-camera-settings'
This commit is contained in:
commit
51cdd5ab42
@ -33,21 +33,22 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
x="20"
|
||||
y="-20">
|
||||
|
||||
<mate:Listener type="{WebRTCWebcamRequestEvent.WEBRTC_WEBCAM_SUCCESS}" method="handleWebRTCWebcamRequestSuccessEvent" />
|
||||
<mate:Listener type="{WebRTCWebcamRequestEvent.WEBRTC_WEBCAM_FAIL}" method="handleWebRTCWebcamRequestFailEvent" />
|
||||
<mate:Listener type="{BBBEvent.CAM_SETTINGS_CLOSED}" method="handleCameraSettingsClosedEvent" />
|
||||
<mate:Listener type="{BroadcastStartedEvent.BROADCAST_STARTED_EVENT}" method="handleBroadcastStartedEvent" />
|
||||
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import mx.managers.PopUpManager;
|
||||
|
||||
import org.bigbluebutton.modules.videoconf.events.WebRTCWebcamRequestEvent;
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
import org.bigbluebutton.main.model.users.events.BroadcastStartedEvent;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
|
||||
private function handleWebRTCWebcamRequestSuccessEvent(e:WebRTCWebcamRequestEvent):void {
|
||||
private function handleBroadcastStartedEvent(e:BroadcastStartedEvent):void {
|
||||
PopUpManager.removePopUp(this);
|
||||
}
|
||||
|
||||
private function handleWebRTCWebcamRequestFailEvent(e:WebRTCWebcamRequestEvent):void {
|
||||
private function handleCameraSettingsClosedEvent(e:BBBEvent):void {
|
||||
PopUpManager.removePopUp(this);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<mate:Listener type="{WebRTCCallEvent.WEBRTC_CALL_ENDED}" method="handleWebRTCCallEndedEvent" />
|
||||
<mate:Listener type="{WebRTCAskUserToChangeMicEvent.WEBRTC_ASK_USER_TO_CHANGE_MIC}" method="handleWebRTCAskUserToChangeMicEvent" />
|
||||
<mate:Listener type="{AudioSelectionWindowEvent.SHOW_AUDIO_SELECTION}" method="handleShowAudioSelectionWindowEvent" />
|
||||
<mate:Listener type="{WebRTCWebcamRequestEvent.WEBRTC_WEBCAM_REQUEST}" method="handleWebRTCWebcamRequestEvent" />
|
||||
<mate:Listener type="{ShareCameraRequestEvent.SHARE_CAMERA_REQUEST}" method="handleShareCameraRequestEvent" />
|
||||
|
||||
<mate:Listener type="{ToolbarButtonEvent.ADD}" method="handleAddToolbarComponent" />
|
||||
<mate:Listener type="{ToolbarButtonEvent.REMOVE}" method="handleRemoveToolbarComponent"/>
|
||||
@ -109,7 +109,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
import org.bigbluebutton.modules.phone.events.WebRTCCallEvent;
|
||||
import org.bigbluebutton.modules.phone.events.WebRTCEchoTestEvent;
|
||||
import org.bigbluebutton.modules.phone.events.WebRTCMediaEvent;
|
||||
import org.bigbluebutton.modules.videoconf.events.WebRTCWebcamRequestEvent;
|
||||
import org.bigbluebutton.modules.videoconf.events.ShareCameraRequestEvent;
|
||||
import org.bigbluebutton.util.i18n.ResourceUtil;
|
||||
import org.bigbluebutton.util.logging.Logger;
|
||||
|
||||
@ -157,6 +157,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
[Bindable] private var isTunneling:Boolean = false;
|
||||
|
||||
private var confirmingLogout:Boolean = false;
|
||||
var chromeBrowser:ChromeWebcamPermissionImage = null;
|
||||
|
||||
public function initOptions(e:Event):void {
|
||||
UserManager.getInstance().getConference().configLockSettings();
|
||||
@ -427,9 +428,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
});
|
||||
}
|
||||
|
||||
private function handleWebRTCWebcamRequestEvent(event:WebRTCWebcamRequestEvent):void {
|
||||
trace("handleWebRTCWebcamRequestEvent called");
|
||||
var chromeBrowser:ChromeWebcamPermissionImage = PopUpManager.createPopUp(mdiCanvas, ChromeWebcamPermissionImage , true) as ChromeWebcamPermissionImage;
|
||||
private function handleShareCameraRequestEvent(event:ShareCameraRequestEvent):void {
|
||||
if (ExternalInterface.call("determineBrowser")[0] == "Chrome" && chromeBrowser == null ) {
|
||||
chromeBrowser = PopUpManager.createPopUp(mdiCanvas, ChromeWebcamPermissionImage , true) as ChromeWebcamPermissionImage;
|
||||
chromeBrowser.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void {
|
||||
var point1:Point = new Point();
|
||||
// Calculate position of TitleWindow in Application's coordinates.
|
||||
@ -443,6 +444,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
chromeBrowser.y = 20;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private function handleMeetingNotFoundEvent(e:MeetingNotFoundEvent):void {
|
||||
|
@ -101,16 +101,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<MethodInvoker generator="{VideoEventMapDelegate}" method="switchToViewer" arguments="{event}"/>
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{WebRTCWebcamRequestEvent.WEBRTC_WEBCAM_FAIL}">
|
||||
<ObjectBuilder generator="{VideoEventMapDelegate}" cache="global" constructorArguments="{scope.dispatcher}"/>
|
||||
<MethodInvoker generator="{VideoEventMapDelegate}" method="handleWebRTCWebcamRequestFailEvent" arguments="{event}"/>
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{WebRTCWebcamRequestEvent.WEBRTC_WEBCAM_SUCCESS}">
|
||||
<ObjectBuilder generator="{VideoEventMapDelegate}" cache="global" constructorArguments="{scope.dispatcher}"/>
|
||||
<MethodInvoker generator="{VideoEventMapDelegate}" method="handleWebRTCWebcamRequestSuccessEvent" arguments="{event}"/>
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{ConnectedEvent.VIDEO_CONNECTED}">
|
||||
<MethodInvoker generator="{VideoEventMapDelegate}" method="connectedToVideoApp" />
|
||||
</EventHandlers>
|
||||
|
@ -398,25 +398,17 @@ package org.bigbluebutton.modules.videoconf.maps
|
||||
_isWaitingActivation = false;
|
||||
}
|
||||
|
||||
public function handleShareCameraRequestEvent(event:ShareCameraRequestEvent):void {
|
||||
if ((ExternalInterface.call("determineBrowser")[0] == "Chrome") && (ExternalInterface.call("isWebRTCAvailable") == true)) {
|
||||
requestWebRTCWebcam();
|
||||
} else {
|
||||
startSharingWebcam(event.publishInClient);
|
||||
}
|
||||
public function handleShareCameraRequestEvent(event:ShareCameraRequestEvent):void {
|
||||
if (options.skipCamSettingsCheck) {
|
||||
skipCameraSettingsCheck();
|
||||
} else {
|
||||
trace("Webcam: "+_isPublishing + " " + _isPreviewWebcamOpen + " " + _isWaitingActivation);
|
||||
if (!_isPublishing && !_isPreviewWebcamOpen && !_isWaitingActivation) {
|
||||
openWebcamPreview(event.publishInClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function startSharingWebcam(publishInClient:Boolean = false):void {
|
||||
if (options.skipCamSettingsCheck) {
|
||||
skipCameraSettingsCheck();
|
||||
} else {
|
||||
trace("Webcam: "+_isPublishing + " " + _isPreviewWebcamOpen + " " + _isWaitingActivation);
|
||||
if (!_isPublishing && !_isPreviewWebcamOpen && !_isWaitingActivation) {
|
||||
openWebcamPreview(publishInClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function handleCamSettingsClosedEvent(event:BBBEvent):void{
|
||||
_isPreviewWebcamOpen = false;
|
||||
}
|
||||
@ -503,23 +495,6 @@ package org.bigbluebutton.modules.videoconf.maps
|
||||
trace("VideoEventMapDelegate::handleStoppedViewingWebcamEvent [" + me + "] Opening avatar for user [" + event.webcamUserID + "]");
|
||||
openAvatarWindowFor(event.webcamUserID);
|
||||
}
|
||||
}
|
||||
|
||||
public function requestWebRTCWebcam():void {
|
||||
ExternalInterface.call("requestWebRTCWebcam");
|
||||
}
|
||||
|
||||
public function handleWebRTCWebcamRequestFailEvent(event:WebRTCWebcamRequestEvent):void {
|
||||
LogUtil.debug("handleWebRTCWebcamRequestFailEvent: " + event.cause);
|
||||
if(event.cause == PERMISSION_DENIED_ERROR)
|
||||
{
|
||||
_chromeWebcamPermissionDenied = true;
|
||||
}
|
||||
startSharingWebcam();
|
||||
}
|
||||
|
||||
public function handleWebRTCWebcamRequestSuccessEvent(event:WebRTCWebcamRequestEvent):void {
|
||||
startSharingWebcam();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user