Merge branch 'master' of github.com:bigbluebutton/bigbluebutton into mobile-lock-settings

This commit is contained in:
Richard Alam 2018-04-04 13:17:51 -07:00
commit 4baec2c7df
37 changed files with 245 additions and 25 deletions

View File

@ -34,9 +34,9 @@ trait MuteUserCmdMsgHdlr extends RightsManagementTrait {
requester <- Users2x.findWithIntId(liveMeeting.users2x, msg.header.userId)
u <- VoiceUsers.findWithIntId(liveMeeting.voiceUsers, msg.body.userId)
} yield {
if (requester.role != Roles.MODERATOR_ROLE && permissions.disableMic &&
if (requester.role != Roles.MODERATOR_ROLE && permissions.disableMic && u.muted &&
msg.body.userId == msg.header.userId) {
// muting/unmuting self while not moderator and mic disabled. Do not allow.
// unmuting self while not moderator and mic disabled. Do not allow.
} else {
if (u.muted != msg.body.mute) {
log.info("Send mute user request. meetingId=" + meetingId + " userId=" + u.intId + " user=" + u)

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

View File

@ -90,7 +90,12 @@ s|Application {
}
s|Button {
fontFamily : SourceSansProMX;
fontFamily : SourceSansPro;
color : PropertyReference("white");
backgroundColor : PropertyReference("blue500");
borderColor : PropertyReference("white");
selectedBackgroundColor : PropertyReference("blue900");
skinClass : ClassReference("org.bigbluebutton.air.main.views.skins.ActionButtonSkin");
}
s|Callout
@ -335,7 +340,7 @@ settings|SettingsItemRenderer {
}
.userDetailsButton {
color : PropertyReference("bbbBlack");
color : PropertyReference("white");
}
.audioButtonStyle {

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/23.0">
<application xmlns="http://ns.adobe.com/air/application/28.0">
<!-- Adobe AIR Application Descriptor File Template.
@ -50,7 +50,7 @@
<initialWindow>
<!-- The main SWF or HTML file of the application. Required. -->
<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
<content>Main.swf</content>
<!-- The title of the main window. Optional. -->
<!-- <title></title> -->
@ -341,6 +341,9 @@
</manifestAdditions>
</android>
<iPhone>
<assetsCar>Assets.car</assetsCar>
<InfoAdditions>
<![CDATA[
<key>UIDeviceFamily</key>
@ -348,7 +351,16 @@
<string>1</string>
<string>2</string>
</array>
<key>NSCameraUsageDescription</key>
<string>Share your webcam to join video conference</string>
<key>NSMicrophoneUsageDescription</key>
<string>Share your microphone to join audio conference</string>
<key>CFBundleIconName</key>
<string>AppIcon</string>
<key>CFBundleURLTypes</key>
<array>
<dict>

View File

@ -23,6 +23,8 @@
<![CDATA[
import mx.events.FlexEvent;
import spark.components.Alert;
import org.bigbluebutton.air.AppConfig;
import org.bigbluebutton.air.chat.ChatConfig;
import org.bigbluebutton.air.main.MainConfig;
@ -43,6 +45,8 @@
import robotlegs.bender.framework.api.IContext;
import robotlegs.bender.framework.api.LogLevel;
import robotlegs.bender.framework.impl.Context;
include "css/ColorPalette.as"
@ -53,6 +57,8 @@
public var currentOrientation:String;
protected function preinitializeHandler(event:FlexEvent):void {
Alert.buttonHeight = 80;
Alert.buttonWidth = 200;
setupContext();
resizeForSoftKeyboard = true;
//ResourceManager.getInstance().localeChain = LocaleUtil.sortLanguagesByPreference(['en_US'], Capabilities.languages, "en_US");

View File

@ -24,9 +24,11 @@ package org.bigbluebutton.air {
import org.bigbluebutton.air.main.commands.PresenterSignal;
import org.bigbluebutton.air.main.models.ConferenceParameters;
import org.bigbluebutton.air.main.models.IConferenceParameters;
import org.bigbluebutton.air.main.models.IMedia;
import org.bigbluebutton.air.main.models.IMeetingData;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.air.main.models.IUserSession;
import org.bigbluebutton.air.main.models.Media;
import org.bigbluebutton.air.main.models.MeetingData;
import org.bigbluebutton.air.main.models.UISession;
import org.bigbluebutton.air.main.models.UserSession;
@ -53,7 +55,7 @@ package org.bigbluebutton.air {
import robotlegs.bender.extensions.signalCommandMap.api.ISignalCommandMap;
import robotlegs.bender.framework.api.IConfig;
import robotlegs.bender.framework.api.IInjector;
import robotlegs.bender.framework.api.IInjector;
public class AppConfig implements IConfig {
@ -77,6 +79,7 @@ package org.bigbluebutton.air {
injector.map(IChatMessageService).toSingleton(ChatMessageService);
injector.map(IChatMessagesSession).toSingleton(ChatMessagesSession);
injector.map(ISaveData).toSingleton(SaveData);
injector.map(IMedia).toSingleton(Media);
// Type mapping
injector.map(IBaseConnection).toType(BaseConnection);
injector.map(IVoiceConnection).toType(VoiceConnection);
@ -92,6 +95,7 @@ package org.bigbluebutton.air {
signalCommandMap.map(PresenterSignal).toCommand(PresenterCommand);
signalCommandMap.map(LockUserSignal).toCommand(LockUserCommand);
signalCommandMap.map(ChangeUserRoleSignal).toCommand(ChangeUserRoleCommand);
signalCommandMap.map(KickUserSignal).toCommand(KickUserCommand); }
signalCommandMap.map(KickUserSignal).toCommand(KickUserCommand);
}
}
}

View File

@ -0,0 +1,14 @@
package org.bigbluebutton.air.main.models {
import org.osflash.signals.ISignal;
public interface IMedia {
function get cameraAvailable():Boolean;
function get cameraPermissionGranted():Boolean;
function get microphoneAvailable():Boolean;
function get microphonePermissionGranted():Boolean;
function get cameraPermissionSignal():ISignal;
function get microphonePermissionSignal():ISignal;
function requestCameraPermission():void;
function requestMicrophonePermission():void;
}
}

View File

@ -1,6 +1,4 @@
package org.bigbluebutton.air.main.models {
import org.bigbluebutton.air.main.services.IBigBlueButtonConnection;
import org.bigbluebutton.air.presentation.models.PresentationList;
import org.bigbluebutton.air.screenshare.services.IScreenshareConnection;
@ -10,7 +8,7 @@ package org.bigbluebutton.air.main.models {
import org.bigbluebutton.air.voice.services.IVoiceConnection;
import org.bigbluebutton.air.voice.services.VoiceStreamManager;
import org.osflash.signals.ISignal;
import org.osflash.signals.Signal;
import org.osflash.signals.Signal;
public interface IUserSession {
function get videoAutoStart():Boolean;

View File

@ -0,0 +1,79 @@
package org.bigbluebutton.air.main.models {
import flash.events.PermissionEvent;
import flash.media.Camera;
import flash.media.Microphone;
import flash.permissions.PermissionStatus;
import org.osflash.signals.ISignal;
import org.osflash.signals.Signal;
public class Media implements IMedia {
private var _cameraPermissionSignal:Signal = new Signal();
public function get cameraPermissionSignal():ISignal {
return _cameraPermissionSignal;
}
private var _microphonePermissionSignal:Signal = new Signal();
public function get microphonePermissionSignal():ISignal {
return _microphonePermissionSignal;
}
public function get cameraAvailable():Boolean {
return Camera.isSupported;
}
public function get cameraPermissionGranted():Boolean {
return Camera.permissionStatus == PermissionStatus.GRANTED;
}
public function get microphoneAvailable():Boolean {
return Microphone.isSupported;
}
public function get microphonePermissionGranted():Boolean {
return Microphone.permissionStatus == PermissionStatus.GRANTED;
}
public function requestCameraPermission():void {
if (cameraAvailable && Camera.names.length > 0 && !cameraPermissionGranted) {
var camera:Camera = Camera.getCamera(Camera.names[0]);
if (camera == null) {
camera = Camera.getCamera();
}
if (camera != null) {
camera.addEventListener(PermissionEvent.PERMISSION_STATUS, function(event:PermissionEvent):void {
cameraPermissionSignal.dispatch(event.status);
});
try {
camera.requestPermission();
} catch (error:Error) {
// Handle permission request impossible
}
}
}
}
public function requestMicrophonePermission():void {
if (microphoneAvailable && !microphonePermissionGranted) {
var selectedMicrophone:Microphone = Microphone.getMicrophone();
if (selectedMicrophone) {
selectedMicrophone.addEventListener(PermissionEvent.PERMISSION_STATUS, function(event:PermissionEvent):void {
microphonePermissionSignal.dispatch(event.status);
});
try {
selectedMicrophone.requestPermission();
} catch (error:Error) {
// Handle permission request impossible
}
}
}
}
}
}

View File

@ -9,7 +9,7 @@ package org.bigbluebutton.air.main.models {
import org.bigbluebutton.air.voice.services.IVoiceConnection;
import org.bigbluebutton.air.voice.services.VoiceStreamManager;
import org.osflash.signals.ISignal;
import org.osflash.signals.Signal;
import org.osflash.signals.Signal;
public class UserSession implements IUserSession {
protected var _config:Config;
@ -27,7 +27,7 @@ package org.bigbluebutton.air.main.models {
protected var _screenshareConnection:IScreenshareConnection;
protected var _presentationList:PresentationList;
protected var _phoneOptions:PhoneOptions;
protected var _videoAutoStart:Boolean;
@ -179,5 +179,6 @@ package org.bigbluebutton.air.main.models {
public function get authTokenSignal():ISignal {
return _authTokenSignal;
}
}
}

View File

@ -2,8 +2,11 @@ package org.bigbluebutton.air.main.views {
import flash.events.MouseEvent;
import spark.components.CalloutPosition;
import spark.components.Alert;
import spark.components.CalloutPosition;
import org.bigbluebutton.air.common.PageEnum;
import org.bigbluebutton.air.main.models.IConferenceParameters;
import org.bigbluebutton.air.main.models.IMedia;
import org.bigbluebutton.air.main.models.IMeetingData;
import org.bigbluebutton.air.main.models.IUISession;
import org.bigbluebutton.air.main.models.LockSettings2x;
@ -37,6 +40,9 @@ package org.bigbluebutton.air.main.views {
[Inject]
public var meetingData:IMeetingData;
[Inject]
public var media:IMedia;
[Inject]
public var conferenceParameters:IConferenceParameters;
@ -47,6 +53,10 @@ package org.bigbluebutton.air.main.views {
meetingData.voiceUsers.userChangeSignal.add(onVoiceUserChanged);
meetingData.webcams.webcamChangeSignal.add(onWebcamChange);
meetingData.meetingStatus.lockSettingsChangeSignal.add(onLockSettingsChange);
media.cameraPermissionSignal.add(onCameraPermission);
media.microphonePermissionSignal.add(onMicrophonePermission);
view.audioButton.addEventListener(MouseEvent.CLICK, audioOnOff);
view.camButton.addEventListener(MouseEvent.CLICK, camOnOff);
view.micButton.addEventListener(MouseEvent.CLICK, micOnOff);
@ -56,7 +66,7 @@ package org.bigbluebutton.air.main.views {
}
private function onLockSettingsChange(lockSettings:LockSettings2x):void {
lockCamButtonBasedOnSetting();
lockCamButtonBasedOnSetting();
}
private function lockCamButtonBasedOnSetting():void {
@ -77,18 +87,63 @@ package org.bigbluebutton.air.main.views {
}
protected function micOnOff(e:MouseEvent):void {
microphoneMuteSignal.dispatch(meetingData.users.me.intId);
muteUnmuteUser();
}
private function muteUnmuteUser():void {
if (meetingData.voiceUsers.me != null) {
if (meetingData.users.me.locked && meetingData.users.me.role != UserRole.MODERATOR) {
var vu:VoiceUser = meetingData.voiceUsers.getUser(meetingData.users.me.intId);
if (vu != null) {
if (meetingData.meetingStatus.lockSettings.disableMic && vu.muted) {
Alert.show("You do not have permission to unmute.");
} else {
microphoneMuteSignal.dispatch(meetingData.users.me.intId);
}
}
} else {
microphoneMuteSignal.dispatch(meetingData.users.me.intId);
}
}
}
protected function audioOnOff(e:MouseEvent):void {
if (media.microphoneAvailable) {
if (!media.microphonePermissionGranted) {
media.requestMicrophonePermission();
} else {
joinOrLeaveAudio();
}
}
}
private function joinOrLeaveAudio():void {
if (meetingData.voiceUsers.me == null) {
uiSession.pushPage(PageEnum.AUDIO);
if (meetingData.users.me.locked && meetingData.users.me.role != UserRole.MODERATOR) {
if (meetingData.meetingStatus.lockSettings.disableMic) {
shareMicrophoneSignal.dispatch(AudioTypeEnum.LISTEN_ONLY, conferenceParameters.webvoiceconf);
} else {
uiSession.pushPage(PageEnum.AUDIO);
}
} else {
uiSession.pushPage(PageEnum.AUDIO);
}
} else {
shareMicrophoneSignal.dispatch(AudioTypeEnum.LEAVE, "");
}
}
private function camOnOff(e:MouseEvent):void {
if (media.cameraAvailable) {
if (!media.cameraPermissionGranted) {
media.requestCameraPermission();
} else {
enableDisableWebcam();
}
}
}
private function enableDisableWebcam():void {
var noActiveWebcam:Boolean = meetingData.webcams.findWebcamsByUserId(conferenceParameters.internalUserID).length == 0;
shareCameraSignal.dispatch(noActiveWebcam);
}
@ -138,10 +193,28 @@ package org.bigbluebutton.air.main.views {
}
}
private function onCameraPermission(status:String):void {
if (media.cameraPermissionGranted) {
enableDisableWebcam();
} else {
Alert.show("Cannot share camera because access is disabled");
}
}
private function onMicrophonePermission(status:String):void {
if (media.microphonePermissionGranted) {
joinOrLeaveAudio();
} else {
Alert.show("Cannot share microphone because access is disabled");
}
}
public override function destroy():void {
meetingData.voiceUsers.userChangeSignal.remove(onVoiceUserChanged);
meetingData.webcams.webcamChangeSignal.remove(onWebcamChange);
meetingData.meetingStatus.lockSettingsChangeSignal.remove(onLockSettingsChange);
media.cameraPermissionSignal.remove(onCameraPermission);
media.microphonePermissionSignal.remove(onMicrophonePermission);
view.audioButton.removeEventListener(MouseEvent.CLICK, audioOnOff);
view.camButton.removeEventListener(MouseEvent.CLICK, camOnOff);
view.micButton.removeEventListener(MouseEvent.CLICK, micOnOff);

View File

@ -9,7 +9,7 @@ package org.bigbluebutton.air.video {
import robotlegs.bender.extensions.mediatorMap.api.IMediatorMap;
import robotlegs.bender.extensions.signalCommandMap.api.ISignalCommandMap;
import robotlegs.bender.framework.api.IConfig;
import robotlegs.bender.framework.api.IConfig;
public class VideoConfig implements IConfig {

View File

@ -3,13 +3,14 @@ package org.bigbluebutton.air.video.commands {
import flash.media.Camera;
import org.bigbluebutton.air.main.models.IConferenceParameters;
import org.bigbluebutton.air.main.models.IMedia;
import org.bigbluebutton.air.main.models.IMeetingData;
import org.bigbluebutton.air.main.models.IUserSession;
import org.bigbluebutton.air.user.services.IUsersService;
import org.bigbluebutton.air.video.models.VideoProfile;
import org.bigbluebutton.air.video.models.WebcamStreamInfo;
import robotlegs.bender.bundles.mvcs.Command;
import robotlegs.bender.bundles.mvcs.Command;
public class ShareCameraCommand extends Command {
@ -25,10 +26,24 @@ package org.bigbluebutton.air.video.commands {
[Inject]
public var conferenceParameters:IConferenceParameters;
[Inject]
public var media:IMedia;
[Inject]
public var enabled:Boolean;
override public function execute():void {
if (media.cameraAvailable) {
if (!media.cameraPermissionGranted) {
media.requestCameraPermission();
}
else {
enableDisableWebcam();
}
}
}
private function enableDisableWebcam():void {
if (enabled) {
enableCamera(userSession.videoConnection.cameraPosition);
} else {
@ -65,9 +80,6 @@ package org.bigbluebutton.air.video.commands {
}
private function findCamera(position:String):Camera {
if (!Camera.isSupported) {
return null;
}
var cam:Camera = this.getCamera(position);
/*
cam.setMode(160, 120, 5, false);

View File

@ -2,12 +2,13 @@ package org.bigbluebutton.air.voice.commands {
import org.bigbluebutton.air.common.models.ISaveData;
import org.bigbluebutton.air.main.models.IConferenceParameters;
import org.bigbluebutton.air.main.models.IMedia;
import org.bigbluebutton.air.main.models.IUserSession;
import org.bigbluebutton.air.voice.models.AudioTypeEnum;
import org.bigbluebutton.air.voice.services.IVoiceConnection;
import org.bigbluebutton.air.voice.services.VoiceStreamManager;
import robotlegs.bender.bundles.mvcs.Command;
import robotlegs.bender.bundles.mvcs.Command;
public class ShareMicrophoneCommand extends Command {
private const LOG:String = "ShareMicrophoneCommand::";
@ -27,9 +28,22 @@ package org.bigbluebutton.air.voice.commands {
[Inject]
public var dialStr:String;
[Inject]
public var media:IMedia;
private var voiceConnection:IVoiceConnection;
override public function execute():void {
if (media.microphoneAvailable) {
if (!media.microphonePermissionGranted) {
media.requestMicrophonePermission();
} else {
enableDisableMicrophone();
}
}
}
private function enableDisableMicrophone():void {
if (audioType == AudioTypeEnum.LEAVE) {
disableAudio();
} else {

View File

@ -36,13 +36,14 @@ package org.bigbluebutton.air.voice.views {
addElement(echoButtonGroup);
micLevelProgressBar = new ProgressBar();
micLevelProgressBar.percentWidth = 80;
micLevelProgressBar.percentWidth = 100;
micLevelProgressBar.height = 40;
micLevelProgressBar.styleName = "micLevelProgressBar";
echoButtonGroup.addElement(micLevelProgressBar);
echoTestButton = new Button();
echoTestButton.label = "Start Echo Test";
echoTestButton.percentWidth = 100;
echoButtonGroup.addElement(echoTestButton);
// Echo Validation Group
@ -55,7 +56,6 @@ package org.bigbluebutton.air.voice.views {
echoLabel = new Label();
echoLabel.maxDisplayedLines = 5;
echoLabel.percentWidth = 80;
echoLabel.styleName = "echoTestLabel";
echoLabel.text = "This is a private echo test. Speak a few words. Did you hear audio?";
//echoLabel.maxWidth = echoValidationGroup.width - 40;
@ -63,10 +63,12 @@ package org.bigbluebutton.air.voice.views {
yesButton = new Button();
yesButton.label = "Yes";
yesButton.percentWidth = 100;
echoValidationGroup.addElement(yesButton);
noButton = new Button();
noButton.label = "No";
noButton.percentWidth = 100;
echoValidationGroup.addElement(noButton);
}