- remove commented out code.

This commit is contained in:
Richard Alam 2016-08-19 15:19:09 +00:00
parent f42af1565a
commit 46a7723f68

View File

@ -57,9 +57,6 @@ class Screenshare(val sessionManager: ScreenshareManager,
private var sessionToken = "" private var sessionToken = ""
// private var currentStreamId:Option[String] = None
// private var currentPresenterId:Option[String] = None
def receive = { def receive = {
case msg: RestartShareRequestMessage => handleRestartShareRequestMessage(msg) case msg: RestartShareRequestMessage => handleRestartShareRequestMessage(msg)
@ -130,26 +127,6 @@ class Screenshare(val sessionManager: ScreenshareManager,
log.debug("Received UserDisconnected for meetingId=[" + msg.meetingId + "] userId=[" + msg.userId + "]") log.debug("Received UserDisconnected for meetingId=[" + msg.meetingId + "] userId=[" + msg.userId + "]")
} }
/*
val userIdStringOps = new StringOps(msg.userId)
val userIdArray = userIdStringOps.split('_')
if (userIdArray.length == 2) {
val userId = userIdArray(0)
currentPresenterId foreach { presId =>
if (log.isDebugEnabled) {
log.debug("UserDisconnected. curPresId=[" + presId + "] userId=[" + msg.userId + "]")
}
if (presId == userId) {
// The user sharing the screen got disconnected. Stop the
// screen sharing.
currentStreamId foreach { curStreamId =>
handleStopShareRequestMessage(new StopShareRequestMessage(meetingId, curStreamId))
}
}
}
}
*/
trimUserId(msg.userId) foreach {userId => trimUserId(msg.userId) foreach {userId =>
sessions.values foreach { session => sessions.values foreach { session =>
@ -165,25 +142,6 @@ class Screenshare(val sessionManager: ScreenshareManager,
if (log.isDebugEnabled) { if (log.isDebugEnabled) {
log.debug("Received UserConnected for meetingId=[" + msg.meetingId + "]") log.debug("Received UserConnected for meetingId=[" + msg.meetingId + "]")
} }
/*
val userIdStringOps = new StringOps(msg.userId)
val userIdArray = userIdStringOps.split('_')
if (userIdArray.length == 2) {
val userId = userIdArray(0)
currentPresenterId foreach { presId =>
if (presId == userId) {
// The user sharing the screen got disconnected. Stop the
// screen sharing.
currentStreamId foreach { curStreamId =>
handleStopShareRequestMessage(new StopShareRequestMessage(meetingId, curStreamId))
}
}
}
}
*/
trimUserId(msg.userId) foreach {userId => trimUserId(msg.userId) foreach {userId =>
sessions.values foreach { session => sessions.values foreach { session =>
if (session.userId == userId) { if (session.userId == userId) {
@ -197,16 +155,7 @@ class Screenshare(val sessionManager: ScreenshareManager,
if (log.isDebugEnabled) { if (log.isDebugEnabled) {
log.debug("Received IsScreenSharing for meetingId=[" + msg.meetingId + "]") log.debug("Received IsScreenSharing for meetingId=[" + msg.meetingId + "]")
} }
/*
if (activeSession.isEmpty) {
val info = new StreamInfo(false, "", 0, 0, "")
bus.send(new IsScreenSharingResponse(meetingId, msg.userId, info))
} else {
activeSession foreach { session =>
session.actorRef forward msg
}
}
*/
activeSession match { activeSession match {
case Some(as) => case Some(as) =>
as.actorRef forward msg as.actorRef forward msg
@ -288,9 +237,6 @@ class Screenshare(val sessionManager: ScreenshareManager,
log.debug("Received StreamStoppedMessage for streamId=[" + msg.streamId + "]") log.debug("Received StreamStoppedMessage for streamId=[" + msg.streamId + "]")
} }
// currentStreamId = None
// currentPresenterId = None
sessions.get(msg.streamId) match { sessions.get(msg.streamId) match {
case Some(session) => case Some(session) =>
session.actorRef ! msg session.actorRef ! msg
@ -324,8 +270,6 @@ class Screenshare(val sessionManager: ScreenshareManager,
sessions.get(msg.streamId) match { sessions.get(msg.streamId) match {
case Some(session) => case Some(session) =>
status = STOP status = STOP
// currentPresenterId = None
// currentStreamId = None
session.actorRef ! msg session.actorRef ! msg
case None => case None =>
@ -341,8 +285,6 @@ class Screenshare(val sessionManager: ScreenshareManager,
sessions.get(msg.streamId) match { sessions.get(msg.streamId) match {
case Some(session) => case Some(session) =>
status = PAUSE status = PAUSE
// currentPresenterId = None
// currentStreamId = None
session.actorRef ! msg session.actorRef ! msg
case None => case None =>
@ -365,8 +307,6 @@ class Screenshare(val sessionManager: ScreenshareManager,
val streamId = generateStreamId val streamId = generateStreamId
val token = streamId val token = streamId
// currentPresenterId = Some(msg.userId)
// currentStreamId = Some(streamId)
val userId = trimUserId(msg.userId).getOrElse(msg.userId) val userId = trimUserId(msg.userId).getOrElse(msg.userId)
@ -392,16 +332,6 @@ class Screenshare(val sessionManager: ScreenshareManager,
val streamId = generateStreamId val streamId = generateStreamId
val token = streamId val token = streamId
/*
val userIdStringOps = new StringOps(msg.userId)
val userIdArray = userIdStringOps.split('_')
if (userIdArray.length == 2) {
val userId = userIdArray(0)
currentPresenterId = Some(userId)
}
currentStreamId = Some(streamId)
*/
val userId = trimUserId(msg.userId).getOrElse(msg.userId) val userId = trimUserId(msg.userId).getOrElse(msg.userId)
val session = ActiveSession(this, bus, meetingId, streamId, token, msg.record, userId) val session = ActiveSession(this, bus, meetingId, streamId, token, msg.record, userId)