- handle voice lock settings
This commit is contained in:
parent
4baec2c7df
commit
94cd0c66a7
@ -18,13 +18,12 @@ package org.bigbluebutton.air.voice.commands {
|
|||||||
public var userId:String;
|
public var userId:String;
|
||||||
|
|
||||||
override public function execute():void {
|
override public function execute():void {
|
||||||
trace("MicrophoneMuteCommand.execute() - userId = " + userId);
|
|
||||||
var vu:VoiceUser = meetingData.voiceUsers.getUser(userId);
|
var vu:VoiceUser = meetingData.voiceUsers.getUser(userId);
|
||||||
if (vu != null) {
|
if (vu != null) {
|
||||||
if (vu.muted) {
|
if (!vu.muted || meetingData.meetingStatus.lockSettings.disableMic) {
|
||||||
voiceService.unmute(userId);
|
|
||||||
} else {
|
|
||||||
voiceService.mute(userId);
|
voiceService.mute(userId);
|
||||||
|
} else {
|
||||||
|
voiceService.unmute(userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ package org.bigbluebutton.air.voice.models {
|
|||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
var removedUser:VoiceUser = _users.removeItemAt(index) as VoiceUser;
|
var removedUser:VoiceUser = _users.removeItemAt(index) as VoiceUser;
|
||||||
|
|
||||||
if (_me == removedUser) {
|
if (_me.intId == removedUser.intId) {
|
||||||
_me = null;
|
_me = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,6 +77,7 @@ package org.bigbluebutton.air.voice.models {
|
|||||||
// Force user to not talking if muted.
|
// Force user to not talking if muted.
|
||||||
user.talking = false;
|
user.talking = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_userChangeSignal.dispatch(user, VoiceUserChangeEnum.MUTE);
|
_userChangeSignal.dispatch(user, VoiceUserChangeEnum.MUTE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,9 @@ package org.bigbluebutton.air.voice.services {
|
|||||||
import org.bigbluebutton.air.main.models.IUserSession;
|
import org.bigbluebutton.air.main.models.IUserSession;
|
||||||
import org.bigbluebutton.air.main.models.LockSettings2x;
|
import org.bigbluebutton.air.main.models.LockSettings2x;
|
||||||
import org.bigbluebutton.air.user.models.UserRole;
|
import org.bigbluebutton.air.user.models.UserRole;
|
||||||
|
import org.bigbluebutton.air.voice.commands.MicrophoneMuteSignal;
|
||||||
import org.bigbluebutton.air.voice.commands.ShareMicrophoneSignal;
|
import org.bigbluebutton.air.voice.commands.ShareMicrophoneSignal;
|
||||||
|
import org.bigbluebutton.air.voice.models.VoiceUser;
|
||||||
import org.osflash.signals.ISignal;
|
import org.osflash.signals.ISignal;
|
||||||
import org.osflash.signals.Signal;
|
import org.osflash.signals.Signal;
|
||||||
|
|
||||||
@ -30,9 +32,9 @@ package org.bigbluebutton.air.voice.services {
|
|||||||
public var meetingData:IMeetingData;
|
public var meetingData:IMeetingData;
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
public var shareMicrophoneSignal:ShareMicrophoneSignal;
|
public var microphoneMuteSignal:MicrophoneMuteSignal;
|
||||||
|
|
||||||
public var _callActive:Boolean = false;
|
private var _callActive:Boolean = false;
|
||||||
|
|
||||||
protected var _connectionSuccessSignal:ISignal = new Signal();
|
protected var _connectionSuccessSignal:ISignal = new Signal();
|
||||||
|
|
||||||
@ -61,8 +63,12 @@ package org.bigbluebutton.air.voice.services {
|
|||||||
|
|
||||||
private function lockSettingsChange(lockSettings:LockSettings2x):void {
|
private function lockSettingsChange(lockSettings:LockSettings2x):void {
|
||||||
if (lockSettings.disableMic && meetingData.users.me.locked && meetingData.users.me.role != UserRole.MODERATOR) {
|
if (lockSettings.disableMic && meetingData.users.me.locked && meetingData.users.me.role != UserRole.MODERATOR) {
|
||||||
trace("TODO: Disabling the mic still needs to be finished");
|
if (meetingData.voiceUsers.me != null) {
|
||||||
//shareMicrophoneSignal.dispatch(audioOptions);
|
var vu:VoiceUser = meetingData.voiceUsers.getUser(meetingData.users.me.intId);
|
||||||
|
if (!vu.muted && meetingData.meetingStatus.lockSettings.disableMic) {
|
||||||
|
microphoneMuteSignal.dispatch(meetingData.users.me.intId);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,12 +68,11 @@ package org.bigbluebutton.air.voice.services {
|
|||||||
meetingData.voiceUsers.remove(intId);
|
meetingData.voiceUsers.remove(intId);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function handleUserMutedEvtMsg(msg:Object):void {
|
private function handleUserMutedEvtMsg(msg:Object):void {
|
||||||
var header:Object = msg.header as Object;
|
var header:Object = msg.header as Object;
|
||||||
var body:Object = msg.body as Object;
|
var body:Object = msg.body as Object;
|
||||||
var intId:String = body.intId as String;
|
var intId:String = body.intId as String;
|
||||||
var muted:Boolean = body.muted as Boolean;
|
var muted:Boolean = body.muted as Boolean;
|
||||||
|
|
||||||
meetingData.voiceUsers.changeUserMute(intId, muted);
|
meetingData.voiceUsers.changeUserMute(intId, muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user