New option to logout user when he stops the recording.

This commit is contained in:
Ghazi Triki 2016-10-24 12:15:34 +01:00
parent a1407c71d1
commit 6103151edd
3 changed files with 86 additions and 51 deletions

View File

@ -14,7 +14,7 @@
<layout showLogButton="false" defaultLayout="bbb.layout.name.defaultlayout"
showToolbar="true" showFooter="true" showMeetingName="true" showHelpButton="true"
showLogoutWindow="true" showLayoutTools="true" confirmLogout="true"
showRecordingNotification="true"/>
showRecordingNotification="true" logoutOnStopRecording="false"/>
<meeting muteOnStart="false" />
<logging enabled="true" target="trace" level="info" format="{dateUTC} {time} :: {name} :: [{logLevel}] {message}" uri="http://HOST" logPattern=".*"/>
<lock disableCamForLockedUsers="false" disableMicForLockedUsers="false" disablePrivateChatForLockedUsers="false"

View File

@ -1,13 +1,13 @@
/**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
*
*
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
*
*
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
@ -16,33 +16,54 @@
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
*
*/
package org.bigbluebutton.main.model
{
package org.bigbluebutton.main.model {
import org.bigbluebutton.core.BBB;
public class LayoutOptions
{
[Bindable] public var showDebugWindow:Boolean = true;
[Bindable] public var showLogButton:Boolean = true;
[Bindable] public var showToolbar:Boolean = true;
[Bindable] public var showFooter:Boolean = true;
[Bindable] public var showMeetingName:Boolean = true;
[Bindable] public var showHelpButton:Boolean = true;
[Bindable] public var showLogoutWindow:Boolean = true;
[Bindable] public var showLayoutTools:Boolean = true;
[Bindable] public var confirmLogout:Boolean = true;
[Bindable] public var showRecordingNotification:Boolean = true;
public class LayoutOptions {
[Bindable]
public var showDebugWindow:Boolean = true;
[Bindable]
public var showLogButton:Boolean = true;
[Bindable]
public var showToolbar:Boolean = true;
[Bindable]
public var showFooter:Boolean = true;
[Bindable]
public var showMeetingName:Boolean = true;
[Bindable]
public var showHelpButton:Boolean = true;
[Bindable]
public var showLogoutWindow:Boolean = true;
[Bindable]
public var showLayoutTools:Boolean = true;
[Bindable]
public var confirmLogout:Boolean = true;
[Bindable]
public var showRecordingNotification:Boolean = true;
[Bindable]
public var logoutOnStopRecording:Boolean = false;
public var defaultLayout:String = "Default";
public var defaultLayout:String = "Default";
public function parseOptions():void {
var vxml:XML = BBB.getConfigManager().config.layout;
if (vxml != null) {
if (vxml.@showDebugWindow != undefined) {
showDebugWindow = (vxml.@showDebugWindow.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showLogButton != undefined) {
showLogButton = (vxml.@showLogButton.toString().toUpperCase() == "TRUE") ? true : false;
}
@ -54,15 +75,15 @@ package org.bigbluebutton.main.model
if (vxml.@confirmLogout != undefined) {
confirmLogout = (vxml.@confirmLogout.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showFooter != undefined) {
showFooter = (vxml.@showFooter.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showMeetingName != undefined) {
showMeetingName = (vxml.@showMeetingName.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showFooter != undefined) {
showFooter = (vxml.@showFooter.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showMeetingName != undefined) {
showMeetingName = (vxml.@showMeetingName.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showHelpButton != undefined) {
showHelpButton = (vxml.@showHelpButton.toString().toUpperCase() == "TRUE") ? true : false;
}
@ -70,20 +91,24 @@ package org.bigbluebutton.main.model
if (vxml.@showLogoutWindow != undefined) {
showLogoutWindow = (vxml.@showLogoutWindow.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@defaultLayout != undefined) {
defaultLayout = vxml.@defaultLayout.toString();
}
if(vxml.@showLayoutTools != undefined){
showLayoutTools = (vxml.@showLayoutTools.toString().toUpperCase() == "TRUE") ? true : false;
}
if(vxml.@showRecordingNotification != undefined){
showRecordingNotification = (vxml.@showRecordingNotification.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@defaultLayout != undefined) {
defaultLayout = vxml.@defaultLayout.toString();
}
if (vxml.@showLayoutTools != undefined) {
showLayoutTools = (vxml.@showLayoutTools.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@showRecordingNotification != undefined) {
showRecordingNotification = (vxml.@showRecordingNotification.toString().toUpperCase() == "TRUE") ? true : false;
}
if (vxml.@logoutOnStopRecording != undefined) {
logoutOnStopRecording = (vxml.@logoutOnStopRecording.toString().toUpperCase() == "TRUE") ? true : false;
}
}
}
}
}
}

View File

@ -43,11 +43,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import flash.net.navigateToURL;
import mx.controls.Alert;
import mx.events.CloseEvent;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.core.model.MeetingModel;
import org.bigbluebutton.main.events.BBBEvent;
@ -110,8 +113,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
d.dispatchEvent(event);
this.enabled = false;
LOGGER.debug("RecordButton:doChangeRecordingStatus changing record status to {0}", [event.payload.recording]);
if (!recordingFlag && getLayoutOptions().logoutOnStopRecording) {
LOGGER.debug("Using 'logoutOnStopRecording' option to logout user after stopping recording");
navigateToURL(new URLRequest(BBB.getLogoutURL()), "_self");
}
}
private function onRecordingStatusChanged(event:BBBEvent):void {
@ -137,13 +144,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
private function showRecordingNotification():void {
if (layoutOptions == null) {
layoutOptions = new LayoutOptions();
layoutOptions.parseOptions();
}
if (firstAudioJoin && this.visible && !this.selected
&& layoutOptions.showRecordingNotification
&& getLayoutOptions().showRecordingNotification
&& UserManager.getInstance().getConference().amIModerator()
&& MeetingModel.getInstance().meeting.allowStartStopRecording) {
var alert:Alert = Alert.show(ResourceUtil.getInstance().getString("bbb.mainToolbar.recordBtn..notification.message1") + "\n\n" + ResourceUtil.getInstance().getString("bbb.mainToolbar.recordBtn..notification.message2"), ResourceUtil.getInstance().getString("bbb.mainToolbar.recordBtn..notification.title"), Alert.OK, this);
@ -159,6 +161,14 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
}
private function getLayoutOptions() : LayoutOptions {
if (layoutOptions == null) {
layoutOptions = new LayoutOptions();
layoutOptions.parseOptions();
}
return layoutOptions;
}
private function onRecordButtonMouseOver(event:MouseEvent):void {
if (UserManager.getInstance().getConference().amIModerator()) {
this.styleName = this.selected? "recordButtonStyleStop": "recordButtonStyleStart";