Remove meeting inactivity monitor

This commit is contained in:
Pedro Beschorner Marin 2019-12-11 17:00:32 -03:00
parent 771079c8f1
commit b11113c165
33 changed files with 5 additions and 483 deletions

View File

@ -1,43 +0,0 @@
package org.bigbluebutton.core.apps.users
import org.bigbluebutton.common2.domain.DefaultProps
import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.domain.MeetingState2x
import org.bigbluebutton.core.running.{ LiveMeeting, OutMsgRouter }
trait MeetingActivityResponseCmdMsgHdlr {
this: UsersApp =>
val liveMeeting: LiveMeeting
val outGW: OutMsgRouter
def handleMeetingActivityResponseCmdMsg(
msg: MeetingActivityResponseCmdMsg,
state: MeetingState2x
): MeetingState2x = {
processMeetingActivityResponse(liveMeeting.props, outGW, msg)
val tracker = state.inactivityTracker.resetWarningSentAndTimestamp()
state.update(tracker)
}
def processMeetingActivityResponse(
props: DefaultProps,
outGW: OutMsgRouter,
msg: MeetingActivityResponseCmdMsg
): Unit = {
def buildMeetingIsActiveEvtMsg(meetingId: String): BbbCommonEnvCoreMsg = {
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, "not-used")
val envelope = BbbCoreEnvelope(MeetingIsActiveEvtMsg.NAME, routing)
val body = MeetingIsActiveEvtMsgBody(meetingId)
val header = BbbClientMsgHeader(MeetingIsActiveEvtMsg.NAME, meetingId, "not-used")
val event = MeetingIsActiveEvtMsg(header, body)
BbbCommonEnvCoreMsg(envelope, event)
}
val event = buildMeetingIsActiveEvtMsg(props.meetingProp.intId)
outGW.send(event)
}
}

View File

@ -127,7 +127,6 @@ class UsersApp(
with ChangeUserRoleCmdMsgHdlr
with SyncGetUsersMeetingRespMsgHdlr
with LogoutAndEndMeetingCmdMsgHdlr
with MeetingActivityResponseCmdMsgHdlr
with SetRecordingStatusCmdMsgHdlr
with RecordAndClearPreviousMarkersCmdMsgHdlr
with SendRecordingTimerInternalMsgHdlr

View File

@ -12,7 +12,6 @@ case class MeetingState2x(
groupChats: GroupChats,
presentationPodManager: PresentationPodManager,
breakout: Option[BreakoutModel],
inactivityTracker: MeetingInactivityTracker,
expiryTracker: MeetingExpiryTracker,
recordingTracker: MeetingRecordingTracker
) {
@ -21,13 +20,11 @@ case class MeetingState2x(
def update(presPodManager: PresentationPodManager): MeetingState2x = copy(presentationPodManager = presPodManager)
def update(breakout: Option[BreakoutModel]): MeetingState2x = copy(breakout = breakout)
def update(expiry: MeetingExpiryTracker): MeetingState2x = copy(expiryTracker = expiry)
def update(inactivityTracker: MeetingInactivityTracker): MeetingState2x = copy(inactivityTracker = inactivityTracker)
def update(recordingTracker: MeetingRecordingTracker): MeetingState2x = copy(recordingTracker = recordingTracker)
}
object MeetingEndReason {
val ENDED_FROM_API = "ENDED_FROM_API"
val ENDED_DUE_TO_INACTIVITY = "ENDED_DUE_TO_INACTIVITY"
val ENDED_WHEN_NOT_JOINED = "ENDED_WHEN_NOT_JOINED"
val ENDED_WHEN_LAST_USER_LEFT = "ENDED_WHEN_LAST_USER_LEFT"
val ENDED_AFTER_USER_LOGGED_OUT = "ENDED_AFTER_USER_LOGGED_OUT"

View File

@ -1,43 +1,5 @@
package org.bigbluebutton.core.domain
case class MeetingInactivityTracker(
val maxInactivityTimeoutInMs: Long,
val warningBeforeMaxInMs: Long,
lastActivityTimestampInMs: Long,
warningSent: Boolean,
warningSentOnTimestampInMs: Long
) {
def setWarningSentAndTimestamp(nowInMs: Long): MeetingInactivityTracker = {
copy(warningSent = true, warningSentOnTimestampInMs = nowInMs)
}
def resetWarningSentAndTimestamp(): MeetingInactivityTracker = {
copy(warningSent = false, warningSentOnTimestampInMs = 0L)
}
def updateLastActivityTimestamp(nowInMs: Long): MeetingInactivityTracker = {
copy(lastActivityTimestampInMs = nowInMs)
}
def hasRecentActivity(nowInMs: Long): Boolean = {
val left = nowInMs - lastActivityTimestampInMs
val right = maxInactivityTimeoutInMs - warningBeforeMaxInMs
left < right
}
def isMeetingInactive(nowInMs: Long): Boolean = {
if (maxInactivityTimeoutInMs > 0) {
warningSent && (nowInMs - lastActivityTimestampInMs) > maxInactivityTimeoutInMs
} else {
false
}
}
def timeLeftInMs(nowInMs: Long): Long = {
lastActivityTimestampInMs + maxInactivityTimeoutInMs - nowInMs
}
}
case class MeetingExpiryTracker(
startedOnInMs: Long,
userHasJoined: Boolean,

View File

@ -269,8 +269,6 @@ class ReceivedJsonMsgHandlerActor(
// Meeting
case EndMeetingSysCmdMsg.NAME =>
routeGenericMsg[EndMeetingSysCmdMsg](envelope, jsonNode)
case MeetingActivityResponseCmdMsg.NAME =>
routeGenericMsg[MeetingActivityResponseCmdMsg](envelope, jsonNode)
case LogoutAndEndMeetingCmdMsg.NAME =>
routeGenericMsg[LogoutAndEndMeetingCmdMsg](envelope, jsonNode)
case SetRecordingStatusCmdMsg.NAME =>

View File

@ -123,14 +123,6 @@ class MeetingActor(
object ExpiryTrackerHelper extends MeetingExpiryTrackerHelper
val inactivityTracker = new MeetingInactivityTracker(
TimeUtil.minutesToMillis(props.durationProps.maxInactivityTimeoutMinutes),
TimeUtil.minutesToMillis(props.durationProps.warnMinutesBeforeMax),
lastActivityTimestampInMs = TimeUtil.timeNowInMs(),
warningSent = false,
warningSentOnTimestampInMs = 0L
)
val expiryTracker = new MeetingExpiryTracker(
startedOnInMs = TimeUtil.timeNowInMs(),
userHasJoined = false,
@ -150,7 +142,6 @@ class MeetingActor(
new GroupChats(Map.empty),
new PresentationPodManager(Map.empty),
None,
inactivityTracker,
expiryTracker,
recordingTracker
)
@ -270,11 +261,6 @@ class MeetingActor(
}
private def updateInactivityTracker(state: MeetingState2x): MeetingState2x = {
val tracker = state.inactivityTracker.updateLastActivityTimestamp(TimeUtil.timeNowInMs())
state.update(tracker)
}
private def updateVoiceUserLastActivity(userId: String) {
for {
vu <- VoiceUsers.findWithVoiceUserId(liveMeeting.voiceUsers, userId)
@ -317,9 +303,6 @@ class MeetingActor(
case m: UserBroadcastCamStartMsg => handleUserBroadcastCamStartMsg(m)
case m: UserBroadcastCamStopMsg => handleUserBroadcastCamStopMsg(m)
case m: UserJoinedVoiceConfEvtMsg => handleUserJoinedVoiceConfEvtMsg(m)
case m: MeetingActivityResponseCmdMsg =>
state = usersApp.handleMeetingActivityResponseCmdMsg(m, state)
state = updateInactivityTracker(state)
case m: LogoutAndEndMeetingCmdMsg => usersApp.handleLogoutAndEndMeetingCmdMsg(m, state)
case m: SetRecordingStatusCmdMsg =>
state = usersApp.handleSetRecordingStatusCmdMsg(m, state)
@ -381,7 +364,6 @@ class MeetingActor(
case m: UserLeftVoiceConfEvtMsg => handleUserLeftVoiceConfEvtMsg(m)
case m: UserMutedInVoiceConfEvtMsg => handleUserMutedInVoiceConfEvtMsg(m)
case m: UserTalkingInVoiceConfEvtMsg =>
state = updateInactivityTracker(state)
updateVoiceUserLastActivity(m.body.voiceUserId)
handleUserTalkingInVoiceConfEvtMsg(m)
@ -552,12 +534,9 @@ class MeetingActor(
def handleMonitorNumberOfUsers(msg: MonitorNumberOfUsersInternalMsg) {
state = removeUsersWithExpiredUserLeftFlag(liveMeeting, state)
val (newState, expireReason) = ExpiryTrackerHelper.processMeetingInactivityAudit(outGW, eventBus, liveMeeting, state)
val (newState, expireReason) = ExpiryTrackerHelper.processMeetingExpiryAudit(outGW, eventBus, liveMeeting, state)
state = newState
expireReason foreach (reason => log.info("Meeting {} expired with reason {}", props.meetingProp.intId, reason))
val (newState2, expireReason2) = ExpiryTrackerHelper.processMeetingExpiryAudit(outGW, eventBus, liveMeeting, state)
state = newState2
expireReason2 foreach (reason => log.info("Meeting {} expired with reason {}", props.meetingProp.intId, reason))
sendRttTraceTest()
setRecordingChapterBreak()

View File

@ -27,44 +27,4 @@ trait MeetingExpiryTrackerHelper extends HandlerHelpers {
(state, reason)
}
def processMeetingInactivityAudit(
outGW: OutMsgRouter,
eventBus: InternalEventBus,
liveMeeting: LiveMeeting,
state: MeetingState2x
): (MeetingState2x, Option[String]) = {
val nowInMs = TimeUtil.timeNowInMs()
if (!state.inactivityTracker.hasRecentActivity(nowInMs)) {
if (state.inactivityTracker.isMeetingInactive(nowInMs)) {
val expireReason = MeetingEndReason.ENDED_DUE_TO_INACTIVITY
endAllBreakoutRooms(eventBus, liveMeeting, state)
sendEndMeetingDueToExpiry(expireReason, eventBus, outGW, liveMeeting)
(state, Some(expireReason))
} else {
if (!state.inactivityTracker.warningSent) {
val timeLeftSeconds = TimeUtil.millisToSeconds(state.inactivityTracker.timeLeftInMs(nowInMs))
val event = buildMeetingInactivityWarningEvtMsg(liveMeeting.props.meetingProp.intId, timeLeftSeconds)
outGW.send(event)
val tracker = state.inactivityTracker.setWarningSentAndTimestamp(nowInMs)
(state.update(tracker), None)
} else {
(state, None)
}
}
} else {
(state, None)
}
}
def buildMeetingInactivityWarningEvtMsg(meetingId: String, timeLeftInSec: Long): BbbCommonEnvCoreMsg = {
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, "not-used")
val envelope = BbbCoreEnvelope(MeetingInactivityWarningEvtMsg.NAME, routing)
val body = MeetingInactivityWarningEvtMsgBody(timeLeftInSec)
val header = BbbClientMsgHeader(MeetingInactivityWarningEvtMsg.NAME, meetingId, "not-used")
val event = MeetingInactivityWarningEvtMsg(header, body)
BbbCommonEnvCoreMsg(envelope, event)
}
}

View File

@ -47,7 +47,6 @@ class AnalyticsActor extends Actor with ActorLogging {
case m: UserLeftMeetingEvtMsg => logMessage(msg)
case m: PresenterUnassignedEvtMsg => logMessage(msg)
case m: PresenterAssignedEvtMsg => logMessage(msg)
case m: MeetingIsActiveEvtMsg => logMessage(msg)
case m: UserEjectedFromMeetingEvtMsg => logMessage(msg)
case m: EjectUserFromVoiceConfSysMsg => logMessage(msg)
case m: CreateBreakoutRoomSysCmdMsg => logMessage(msg)
@ -74,7 +73,6 @@ class AnalyticsActor extends Actor with ActorLogging {
case m: ScreenshareStopRtmpBroadcastVoiceConfMsg => logMessage(msg)
case m: ScreenshareRtmpBroadcastStartedEvtMsg => logMessage(msg)
case m: ScreenshareRtmpBroadcastStoppedEvtMsg => logMessage(msg)
case m: MeetingInactivityWarningEvtMsg => logMessage(msg)
case m: StartRecordingVoiceConfSysMsg => logMessage(msg)
case m: StopRecordingVoiceConfSysMsg => logMessage(msg)
//case m: UpdateRecordingTimerEvtMsg => logMessage(msg)

View File

@ -18,8 +18,6 @@ trait AppsTestFixtures {
val muteOnStart = true
val deskshareConfId = "85115-DESKSHARE"
val durationInMinutes = 10
val maxInactivityTimeoutMinutes = 120
val warnMinutesBeforeMax = 30
val meetingExpireIfNoUserJoinedInMinutes = 5
val meetingExpireWhenLastUserLeftInMinutes = 10
val userInactivityInspectTimerInMinutes = 60
@ -50,7 +48,7 @@ trait AppsTestFixtures {
val meetingProp = MeetingProp(name = meetingName, extId = externalMeetingId, intId = meetingId,
isBreakout = isBreakout.booleanValue())
val durationProps = DurationProps(duration = durationInMinutes, createdTime = createTime, createdDate = createDate, maxInactivityTimeoutMinutes = maxInactivityTimeoutMinutes, warnMinutesBeforeMax = warnMinutesBeforeMax,
val durationProps = DurationProps(duration = durationInMinutes, createdTime = createTime, createdDate = createDate,
meetingExpireIfNoUserJoinedInMinutes = meetingExpireIfNoUserJoinedInMinutes, meetingExpireWhenLastUserLeftInMinutes = meetingExpireWhenLastUserLeftInMinutes,
userInactivityInspectTimerInMinutes = userInactivityInspectTimerInMinutes, userInactivityThresholdInMinutes = userInactivityInspectTimerInMinutes, userActivitySignResponseDelayInMinutes = userActivitySignResponseDelayInMinutes)
val password = PasswordProp(moderatorPass = moderatorPassword, viewerPass = viewerPassword)

View File

@ -1,37 +0,0 @@
package org.bigbluebutton.core.domain
import org.bigbluebutton.core.UnitSpec
import org.bigbluebutton.core.util.TimeUtil
class MeetingInactivityTrackerTests extends UnitSpec {
"A MeetingInactivityTrackerHelper" should "be return meeting is inactive" in {
val nowInMinutes = TimeUtil.minutesToSeconds(15)
val inactivityTracker = new MeetingInactivityTracker(
maxInactivityTimeoutInMs = 12,
warningBeforeMaxInMs = 2,
lastActivityTimestampInMs = TimeUtil.minutesToSeconds(5),
warningSent = true,
warningSentOnTimestampInMs = 0L
)
val active = inactivityTracker.isMeetingInactive(nowInMinutes)
assert(active == true)
}
"A MeetingInactivityTrackerHelper" should "be return meeting is active" in {
val nowInMinutes = TimeUtil.minutesToSeconds(18)
val inactivityTracker = new MeetingInactivityTracker(
maxInactivityTimeoutInMs = 12,
warningBeforeMaxInMs = 2,
lastActivityTimestampInMs = TimeUtil.minutesToSeconds(5),
warningSent = true,
warningSentOnTimestampInMs = 0L
)
val inactive = inactivityTracker.isMeetingInactive(nowInMinutes)
assert(inactive)
}
}

View File

@ -1,38 +0,0 @@
package org.bigbluebutton.core.running
import org.bigbluebutton.core.UnitSpec
import org.bigbluebutton.core.domain.MeetingInactivityTracker
import org.bigbluebutton.core.util.TimeUtil
class MeetingExpiryTrackerHelperTests extends UnitSpec {
"A MeetingInactivityTrackerHelper" should "be return meeting is inactive" in {
val nowInMinutes = TimeUtil.minutesToSeconds(15)
val inactivityTracker = new MeetingInactivityTracker(
maxInactivityTimeoutInMs = 12,
warningBeforeMaxInMs = 2,
lastActivityTimestampInMs = TimeUtil.minutesToSeconds(5),
warningSent = true,
warningSentOnTimestampInMs = 0L
)
val active = inactivityTracker.isMeetingInactive(nowInMinutes)
assert(active == true)
}
"A MeetingInactivityTrackerHelper" should "be return meeting is active" in {
val nowInMinutes = TimeUtil.minutesToSeconds(18)
val inactivityTracker = new MeetingInactivityTracker(
maxInactivityTimeoutInMs = 12,
warningBeforeMaxInMs = 2,
lastActivityTimestampInMs = TimeUtil.minutesToSeconds(5),
warningSent = true,
warningSentOnTimestampInMs = 0L
)
val inactive = inactivityTracker.isMeetingInactive(nowInMinutes)
assert(inactive)
}
}

View File

@ -22,7 +22,6 @@ object AllowedMessageNames {
UserBroadcastCamStopMsg.NAME,
LogoutAndEndMeetingCmdMsg.NAME,
GetRecordingStatusReqMsg.NAME,
MeetingActivityResponseCmdMsg.NAME,
SetRecordingStatusCmdMsg.NAME,
EjectUserFromMeetingCmdMsg.NAME,
IsMeetingMutedReqMsg.NAME,

View File

@ -3,7 +3,6 @@ package org.bigbluebutton.common2.domain
case class ConfigProps(defaultConfigToken: String, config: String)
case class DurationProps(duration: Int, createdTime: Long, createdDate: String,
maxInactivityTimeoutMinutes: Int, warnMinutesBeforeMax: Int,
meetingExpireIfNoUserJoinedInMinutes: Int, meetingExpireWhenLastUserLeftInMinutes: Int,
userInactivityInspectTimerInMinutes: Int, userInactivityThresholdInMinutes: Int, userActivitySignResponseDelayInMinutes: Int)

View File

@ -138,20 +138,6 @@ case class MeetingTimeRemainingUpdateEvtMsg(
) extends BbbCoreMsg
case class MeetingTimeRemainingUpdateEvtMsgBody(timeLeftInSec: Long)
object MeetingInactivityWarningEvtMsg { val NAME = "MeetingInactivityWarningEvtMsg" }
case class MeetingInactivityWarningEvtMsg(
header: BbbClientMsgHeader,
body: MeetingInactivityWarningEvtMsgBody
) extends BbbCoreMsg
case class MeetingInactivityWarningEvtMsgBody(timeLeftInSec: Long)
object MeetingIsActiveEvtMsg { val NAME = "MeetingIsActiveEvtMsg" }
case class MeetingIsActiveEvtMsg(
header: BbbClientMsgHeader,
body: MeetingIsActiveEvtMsgBody
) extends BbbCoreMsg
case class MeetingIsActiveEvtMsgBody(meetingId: String)
object CheckAlivePingSysMsg { val NAME = "CheckAlivePingSysMsg" }
case class CheckAlivePingSysMsg(
header: BbbCoreBaseHeader,

View File

@ -198,13 +198,6 @@ object AssignPresenterReqMsg { val NAME = "AssignPresenterReqMsg" }
case class AssignPresenterReqMsg(header: BbbClientMsgHeader, body: AssignPresenterReqMsgBody) extends StandardMsg
case class AssignPresenterReqMsgBody(requesterId: String, newPresenterId: String, newPresenterName: String, assignedBy: String)
/**
* Sent from client as a response to inactivity notifaction from server.
*/
object MeetingActivityResponseCmdMsg { val NAME = "MeetingActivityResponseCmdMsg" }
case class MeetingActivityResponseCmdMsg(header: BbbClientMsgHeader, body: MeetingActivityResponseCmdMsgBody) extends StandardMsg
case class MeetingActivityResponseCmdMsgBody(respondedBy: String)
/**
* Sent from client to change the role of the user in the meeting.
*/

View File

@ -12,8 +12,6 @@ trait TestFixtures {
val voiceConfId = "85115"
val durationInMinutes = 10
val maxInactivityTimeoutMinutes = 120
val warnMinutesBeforeMax = 30
val meetingExpireIfNoUserJoinedInMinutes = 5
val meetingExpireWhenLastUserLeftInMinutes = 10
val userInactivityInspectTimerInMinutes = 60
@ -43,7 +41,7 @@ trait TestFixtures {
isBreakout = isBreakout.booleanValue())
val breakoutProps = BreakoutProps(parentId = parentMeetingId, sequence = sequence, freeJoin = false, breakoutRooms = Vector())
val durationProps = DurationProps(duration = durationInMinutes, createdTime = createTime, createdDate = createDate, maxInactivityTimeoutMinutes = maxInactivityTimeoutMinutes, warnMinutesBeforeMax = warnMinutesBeforeMax,
val durationProps = DurationProps(duration = durationInMinutes, createdTime = createTime, createdDate = createDate,
meetingExpireIfNoUserJoinedInMinutes = meetingExpireIfNoUserJoinedInMinutes, meetingExpireWhenLastUserLeftInMinutes = meetingExpireWhenLastUserLeftInMinutes,
userInactivityInspectTimerInMinutes = userInactivityInspectTimerInMinutes, userInactivityThresholdInMinutes = userInactivityInspectTimerInMinutes, userActivitySignResponseDelayInMinutes = userActivitySignResponseDelayInMinutes)
val password = PasswordProp(moderatorPass = moderatorPassword, viewerPass = viewerPassword)

View File

@ -312,7 +312,7 @@ public class MeetingService implements MessageListener {
m.getWebcamsOnlyForModerator(), m.getModeratorPassword(), m.getViewerPassword(), m.getCreateTime(),
formatPrettyDate(m.getCreateTime()), m.isBreakout(), m.getSequence(), m.isFreeJoin(), m.getMetadata(),
m.getGuestPolicy(), m.getWelcomeMessageTemplate(), m.getWelcomeMessage(), m.getModeratorOnlyMessage(),
m.getDialNumber(), m.getMaxUsers(), m.getMaxInactivityTimeoutMinutes(), m.getWarnMinutesBeforeMax(),
m.getDialNumber(), m.getMaxUsers(),
m.getMeetingExpireIfNoUserJoinedInMinutes(), m.getmeetingExpireWhenLastUserLeftInMinutes(),
m.getUserInactivityInspectTimerInMinutes(), m.getUserInactivityThresholdInMinutes(),
m.getUserActivitySignResponseDelayInMinutes(), m.getMuteOnStart(), m.getAllowModsToUnmuteUsers(), keepEvents,

View File

@ -112,9 +112,7 @@ public class ParamsProcessorUtil {
private Long maxPresentationFileUpload = 30000000L; // 30MB
private Integer maxInactivityTimeoutMinutes = 120;
private Integer clientLogoutTimerInMinutes = 0;
private Integer warnMinutesBeforeMax = 5;
private Integer meetingExpireIfNoUserJoinedInMinutes = 5;
private Integer meetingExpireWhenLastUserLeftInMinutes = 1;
private Integer userInactivityInspectTimerInMinutes = 120;
@ -478,8 +476,6 @@ public class ParamsProcessorUtil {
meeting.setModeratorOnlyMessage(moderatorOnlyMessage);
}
meeting.setMaxInactivityTimeoutMinutes(maxInactivityTimeoutMinutes);
meeting.setWarnMinutesBeforeMax(warnMinutesBeforeMax);
meeting.setMeetingExpireIfNoUserJoinedInMinutes(meetingExpireIfNoUserJoinedInMinutes);
meeting.setMeetingExpireWhenLastUserLeftInMinutes(meetingExpireWhenLastUserLeftInMinutes);
meeting.setUserInactivityInspectTimerInMinutes(userInactivityInspectTimerInMinutes);
@ -938,26 +934,10 @@ public class ParamsProcessorUtil {
this.defaultGuestPolicy = guestPolicy;
}
public void setMaxInactivityTimeoutMinutes(Integer value) {
maxInactivityTimeoutMinutes = value;
}
public void setClientLogoutTimerInMinutes(Integer value) {
clientLogoutTimerInMinutes = value;
}
public void setWarnMinutesBeforeMax(Integer value) {
warnMinutesBeforeMax = value;
}
public Integer getMaxInactivityTimeoutMinutes() {
return maxInactivityTimeoutMinutes;
}
public Integer getWarnMinutesBeforeMax() {
return warnMinutesBeforeMax;
}
public void setMeetingExpireWhenLastUserLeftInMinutes(Integer value) {
meetingExpireWhenLastUserLeftInMinutes = value;
}

View File

@ -81,8 +81,6 @@ public class Meeting {
private Boolean muteOnStart = false;
private Boolean allowModsToUnmuteUsers = false;
private Integer maxInactivityTimeoutMinutes = 120;
private Integer warnMinutesBeforeMax = 5;
private Integer meetingExpireIfNoUserJoinedInMinutes = 5;
private Integer meetingExpireWhenLastUserLeftInMinutes = 1;
private Integer userInactivityInspectTimerInMinutes = 120;
@ -517,22 +515,6 @@ public class Meeting {
userCustomData.put(userID, data);
}
public void setMaxInactivityTimeoutMinutes(Integer value) {
maxInactivityTimeoutMinutes = value;
}
public void setWarnMinutesBeforeMax(Integer value) {
warnMinutesBeforeMax = value;
}
public Integer getMaxInactivityTimeoutMinutes() {
return maxInactivityTimeoutMinutes;
}
public Integer getWarnMinutesBeforeMax() {
return warnMinutesBeforeMax;
}
public void setMeetingExpireWhenLastUserLeftInMinutes(Integer value) {
meetingExpireWhenLastUserLeftInMinutes = value;
}

View File

@ -21,7 +21,6 @@ public interface IBbbWebApiGWApp {
String createDate, Boolean isBreakout, Integer sequence, Boolean freejoin, Map<String, String> metadata,
String guestPolicy, String welcomeMsgTemplate, String welcomeMsg, String modOnlyMessage,
String dialNumber, Integer maxUsers,
Integer maxInactivityTimeoutMinutes, Integer warnMinutesBeforeMax,
Integer meetingExpireIfNoUserJoinedInMinutes,
Integer meetingExpireWhenLastUserLeftInMinutes,
Integer userInactivityInspectTimerInMinutes,

View File

@ -129,8 +129,7 @@ class BbbWebApiGWApp(
freeJoin: java.lang.Boolean,
metadata: java.util.Map[String, String], guestPolicy: String,
welcomeMsgTemplate: String, welcomeMsg: String, modOnlyMessage: String,
dialNumber: String, maxUsers: java.lang.Integer, maxInactivityTimeoutMinutes: java.lang.Integer,
warnMinutesBeforeMax: java.lang.Integer,
dialNumber: String, maxUsers: java.lang.Integer,
meetingExpireIfNoUserJoinedInMinutes: java.lang.Integer,
meetingExpireWhenLastUserLeftInMinutes: java.lang.Integer,
userInactivityInspectTimerInMinutes: java.lang.Integer,
@ -147,8 +146,6 @@ class BbbWebApiGWApp(
val durationProps = DurationProps(
duration = duration.intValue(),
createdTime = createTime.longValue(), createDate,
maxInactivityTimeoutMinutes = maxInactivityTimeoutMinutes.intValue(),
warnMinutesBeforeMax = warnMinutesBeforeMax.intValue(),
meetingExpireIfNoUserJoinedInMinutes = meetingExpireIfNoUserJoinedInMinutes.intValue(),
meetingExpireWhenLastUserLeftInMinutes = meetingExpireWhenLastUserLeftInMinutes.intValue(),
userInactivityInspectTimerInMinutes = userInactivityInspectTimerInMinutes.intValue(),

View File

@ -24,9 +24,6 @@ package org.bigbluebutton.main.events {
public static const END_MEETING_EVENT:String = 'END_MEETING_EVENT';
public static const LOGOUT_END_MEETING_EVENT:String = 'LOGOUT_END_MEETING_EVENT';
public static const CONFIRM_LOGOUT_END_MEETING_EVENT:String = 'CONFIRM_LOGOUT_END_MEETING_EVENT';
public static const INACTIVITY_WARNING_EVENT:String = 'INACTIVITY_WARNING_EVENT';
public static const ACTIVITY_RESPONSE_EVENT:String = 'ACTIVITY_RESPONSE_EVENT';
public static const MEETING_IS_ACTIVE_EVENT:String = 'MEETING_IS_ACTIVE_EVENT';
public static const LOGIN_EVENT:String = 'loginEvent';
public static const RECEIVED_PUBLIC_CHAT_MESSAGE_EVENT:String = 'RECEIVED_PUBLIC_CHAT_MESSAGE_EVENT';
public static const SEND_PUBLIC_CHAT_MESSAGE_EVENT:String = 'SEND_PUBLIC_CHAT_MESSAGE_EVENT';

View File

@ -190,10 +190,6 @@ package org.bigbluebutton.main.model.users
}
}
public function activityResponse():void {
sender.activityResponse();
}
public function userActivitySignResponse():void {
sender.userActivitySignResponse();
}

View File

@ -1,109 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
Copyright (c) 2015 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.
You should have received a copy of the GNU Lesser General Public License along
with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
-->
<mx:TitleWindow xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mate="http://mate.asfusion.com/"
xmlns:common="org.bigbluebutton.common.*"
verticalScrollPolicy="off"
horizontalScrollPolicy="off"
horizontalAlign="center"
minWidth="500"
creationComplete="onCreationComplete()">
<fx:Declarations>
<mate:Listener type="{BBBEvent.MEETING_IS_ACTIVE_EVENT}" method="meetingIsActiveFeedback"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import mx.managers.PopUpManager;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.util.i18n.ResourceUtil;
private static const LOGGER:ILogger = getClassLogger(InactivityWarningWindow);
public var duration:Number = 0;
private var tickTimer:Timer;
[Bindable]
private var cancelButtonLabel:String = ResourceUtil.getInstance().getString('bbb.inactivityWarning.cancel');
private function onCreationComplete():void {
tickTimer = new Timer(1000, 0);
tickTimer.addEventListener(TimerEvent.TIMER, tick);
cancelButton.width = cancelButton.measureText(genCancelButtonLabel(duration)).width
+ cancelButton.getStyle("paddingRight")
+ cancelButton.getStyle("paddingLeft")
+ 8; // 8 is magic number
tickTimer.start();
cancelButton.visible = true;
}
private function tick(e:TimerEvent):void {
if (duration > 0) {
cancelButton.label = genCancelButtonLabel(duration);
warningMessage.text = genWarningMessageText(duration);
duration--;
} else {
tickTimer.stop();
cancelButton.visible = false;
cancelButton.includeInLayout = false;
warningMessage.text = ResourceUtil.getInstance().getString('bbb.shuttingDown.message');
}
}
private function genWarningMessageText(timeLeft:Number):String {
return ResourceUtil.getInstance().getString('bbb.inactivityWarning.message', [timeLeft.toString()]);
}
private function genCancelButtonLabel(timeLeft:Number):String {
return cancelButtonLabel; // + " (" + timeLeft.toString() + ")";
}
private function meetingIsActiveFeedback(e:BBBEvent):void {
tickTimer.stop();
PopUpManager.removePopUp(this);
}
private function cancelButtonClicked():void {
var dispatcher:Dispatcher = new Dispatcher();
var bbbEvent:BBBEvent = new BBBEvent(BBBEvent.ACTIVITY_RESPONSE_EVENT);
dispatcher.dispatchEvent(bbbEvent);
}
]]>
</fx:Script>
<mx:VBox width="100%" height="100%" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5" horizontalAlign="center" verticalAlign="middle">
<common:AdvancedLabel text="{ResourceUtil.getInstance().getString('bbb.inactivityWarning.title')}"
styleName="titleWindowStyle"
width="{this.width - 40}" />
<mx:Text id="warningMessage" selectable="false"/>
<mx:Button id="cancelButton" click="cancelButtonClicked()" visible="false" styleName="mainActionButton"/>
</mx:VBox>
</mx:TitleWindow>

View File

@ -61,7 +61,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mate:Listener type="{ToolbarButtonEvent.REMOVE}" method="handleRemoveToolbarComponent"/>
<mate:Listener type="{ShortcutEvent.OPEN_SHORTCUT_WIN}" method="openShortcutHelpWindow" />
<mate:Listener type="{BBBEvent.OPEN_WEBCAM_PREVIEW}" method="openVideoPreviewWindow" />
<mate:Listener type="{BBBEvent.INACTIVITY_WARNING_EVENT}" method="handleInactivityWarningEvent" />
<mate:Listener type="{BBBEvent.USER_INACTIVITY_INSPECT_EVENT}" method="handleUserInactivityInspectEvent" />
<mate:Listener type="{LockControlEvent.OPEN_LOCK_SETTINGS}" method="openLockSettingsWindow" />
<mate:Listener type="{BreakoutRoomEvent.OPEN_BREAKOUT_ROOMS_PANEL}" method="openBreakoutRoomsWindow" />
@ -517,11 +516,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
inactivityWarning.duration = e.payload.responseDelay;
}
private function handleInactivityWarningEvent(e:BBBEvent):void {
var inactivityWarning:InactivityWarningWindow = PopUpUtil.createModalPopUp(FlexGlobals.topLevelApplication as DisplayObject, InactivityWarningWindow, true) as InactivityWarningWindow;
inactivityWarning.duration = e.payload.duration;
}
private function handleFlashMicSettingsEvent(event:FlashMicSettingsEvent):void {
/**
* There is a bug in Flex SDK 4.14 where the screen stays blurry if a

View File

@ -24,10 +24,6 @@
<InlineInvoker method="{MonitoringModule.handleStreamEventStarted}"/>
</EventHandlers>
<EventHandlers type="{BBBEvent.ACTIVITY_RESPONSE_EVENT}" >
<InlineInvoker method="{MonitoringModule.handleAddedListenerEvent}" arguments="{[event]}" />
</EventHandlers>
<EventHandlers type="{BBBEvent.VIDEO_STARTED}" >
<InlineInvoker method="{MonitoringModule.videoHasStarted}" arguments="{[event]}" />
</EventHandlers>

View File

@ -120,10 +120,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<MethodInvoker generator="{UserService}" method="recordAndClearPreviousMarkers" arguments="{event}" />
</EventHandlers>
<EventHandlers type="{BBBEvent.ACTIVITY_RESPONSE_EVENT}">
<MethodInvoker generator="{UserService}" method="activityResponse" />
</EventHandlers>
<EventHandlers type="{BBBEvent.USER_ACTIVITY_SIGN_RESPONSE_EVENT}">
<MethodInvoker generator="{UserService}" method="userActivitySignResponse" />
</EventHandlers>

View File

@ -137,12 +137,6 @@ package org.bigbluebutton.modules.users.services
case "IsMeetingMutedRespMsg":
handleIsMeetingMutedResp(message);
break;
case "MeetingInactivityWarningEvtMsg":
handleInactivityWarning(message);
break;
case "MeetingIsActiveEvtMsg":
handleMeetingIsActive(message);
break;
case "UserEmojiChangedEvtMsg":
handleEmojiStatusHand(message);
break;
@ -757,19 +751,6 @@ package org.bigbluebutton.modules.users.services
}
}
private function handleInactivityWarning(msg:Object):void {
var body:Object = msg.body as Object;
var bbbEvent:BBBEvent = new BBBEvent(BBBEvent.INACTIVITY_WARNING_EVENT);
bbbEvent.payload.duration = body.timeLeftInSec as Number;
globalDispatcher.dispatchEvent(bbbEvent);
}
private function handleMeetingIsActive(msg:Object):void {
var bbbEvent:BBBEvent = new BBBEvent(BBBEvent.MEETING_IS_ACTIVE_EVENT);
globalDispatcher.dispatchEvent(bbbEvent);
}
private function handleGetRecordingStatusReply(msg: Object):void {
var body:Object = msg.body as Object;
var recording: Boolean = body.recording as Boolean;

View File

@ -306,27 +306,6 @@ package org.bigbluebutton.modules.users.services
}, message);
}
public function activityResponse():void {
var message:Object = {
header: {name: "MeetingActivityResponseCmdMsg", meetingId: UsersUtil.getInternalMeetingID(),
userId: UsersUtil.getMyUserID()},
body: {respondedBy: UsersUtil.getMyUserID()}
};
var _nc:ConnectionManager = BBB.initConnectionManager();
_nc.sendMessage2x(
function(result:String):void { // On successful result
},
function(status:String):void { // status - On error occurred
var logData:Object = UsersUtil.initLogData();
logData.tags = ["apps"];
logData.logCode = "error_sending_meeting_activity_response";
LOGGER.info(JSON.stringify(logData));
},
message
); //_netConnection.call
}
public function userActivitySignResponse():void {
var message:Object = {
header: {name: "UserActivitySignCmdMsg", meetingId: UsersUtil.getInternalMeetingID(),

View File

@ -40,8 +40,6 @@ export default function addMeeting(meeting) {
createdTime: Number,
duration: Number,
createdDate: String,
maxInactivityTimeoutMinutes: Number,
warnMinutesBeforeMax: Number,
meetingExpireIfNoUserJoinedInMinutes: Number,
meetingExpireWhenLastUserLeftInMinutes: Number,
userInactivityInspectTimerInMinutes: Number,

View File

@ -147,19 +147,10 @@ defaultMaxUsers=0
# Current default is 0 (meeting doesn't end).
defaultMeetingDuration=0
# Number of minutes elapse of no activity before
# ending the meeting. Default zero (0) to disable
# check.
maxInactivityTimeoutMinutes=0
# Number of minutes to logout client if user
# isn't responsive
clientLogoutTimerInMinutes=0
# Send warning to moderators to warn that
# meeting would be ended due to inactivity
warnMinutesBeforeMax=5
# End meeting if no user joined within
# a period of time after meeting created.
meetingExpireIfNoUserJoinedInMinutes=5

View File

@ -128,8 +128,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<property name="defaultAvatarURL" value="${defaultAvatarURL}"/>
<property name="defaultConfigURL" value="${defaultConfigURL}"/>
<property name="defaultGuestPolicy" value="${defaultGuestPolicy}"/>
<property name="maxInactivityTimeoutMinutes" value="${maxInactivityTimeoutMinutes}"/>
<property name="warnMinutesBeforeMax" value="${warnMinutesBeforeMax}"/>
<property name="meetingExpireIfNoUserJoinedInMinutes" value="${meetingExpireIfNoUserJoinedInMinutes}"/>
<property name="meetingExpireWhenLastUserLeftInMinutes" value="${meetingExpireWhenLastUserLeftInMinutes}"/>
<property name="userInactivityInspectTimerInMinutes" value="${userInactivityInspectTimerInMinutes}"/>

View File

@ -22,7 +22,6 @@ object AllowedMessageNames {
UserBroadcastCamStopMsg.NAME,
LogoutAndEndMeetingCmdMsg.NAME,
GetRecordingStatusReqMsg.NAME,
MeetingActivityResponseCmdMsg.NAME,
SetRecordingStatusCmdMsg.NAME,
EjectUserFromMeetingCmdMsg.NAME,
IsMeetingMutedReqMsg.NAME,