Fix listenOnly status not set
This commit is contained in:
parent
d26225b05d
commit
ad34d73ccc
@ -16,7 +16,7 @@ export default class AudioBridge {
|
||||
|
||||
joinAudio(listenOnly) {
|
||||
if (listenOnly) {
|
||||
callServer('listenOnlyRequestToggle', true);
|
||||
callServer('listenOnlyToggle', true);
|
||||
this.bridge.joinListenOnly();
|
||||
} else {
|
||||
this.bridge.joinMicrophone();
|
||||
|
@ -23,7 +23,7 @@ export default class SIPBridge extends BaseAudioBridge {
|
||||
}
|
||||
|
||||
joinListenOnly() {
|
||||
callServer('listenOnlyRequestToggle', true);
|
||||
callServer('listenOnlyToggle', true);
|
||||
this._joinVoiceCallSIP({ isListenOnly: true });
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ export default class SIPBridge extends BaseAudioBridge {
|
||||
|
||||
// notify BBB-apps we are leaving the call call if we are listen only
|
||||
if (this._amIListenOnly()) {
|
||||
callServer('listenOnlyRequestToggle', false);
|
||||
callServer('listenOnlyToggle', false);
|
||||
}
|
||||
|
||||
window.webrtc_hangup(hangupCallback);
|
||||
|
@ -16,13 +16,15 @@ export default function listenOnlyToggle(credentials, isJoining = true) {
|
||||
check(requesterUserId, String);
|
||||
check(isJoining, Boolean);
|
||||
|
||||
let EVENT_NAME = undefined;
|
||||
|
||||
if (isJoining) {
|
||||
let EVENT_NAME = 'user_connected_to_global_audio';
|
||||
EVENT_NAME = 'user_connected_to_global_audio';
|
||||
if (!isAllowedTo('joinListenOnly', credentials)) {
|
||||
throw new Meteor.Error('not-allowed', `You are not allowed to joinListenOnly`);
|
||||
}
|
||||
} else {
|
||||
let EVENT_NAME = 'user_disconnected_from_global_audio';
|
||||
EVENT_NAME = 'user_disconnected_from_global_audio';
|
||||
if (!isAllowedTo('leaveListenOnly', credentials)) {
|
||||
throw new Meteor.Error('not-allowed', `You are not allowed to leaveListenOnly`);
|
||||
}
|
||||
@ -40,6 +42,7 @@ export default function listenOnlyToggle(credentials, isJoining = true) {
|
||||
meetingId,
|
||||
userId: requesterUserId,
|
||||
});
|
||||
|
||||
if (!User) {
|
||||
throw new Meteor.Error(
|
||||
'user-not-found', `You need a valid user to be able to toggle audio`);
|
||||
|
Loading…
Reference in New Issue
Block a user