diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java index 45ea484540e9bf0f54d7367432b6d777abc035e4..503fdda77f33495d7b645583954795657e0919f6 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonApplication.java @@ -114,42 +114,37 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter { log.debug("***** " + APP + " [ " + " roomStop [ " + scope.getName() + "] *********"); participantsApplication.destroyRoom(room.getName()); - BigBlueButtonSession bbbSession = getBbbSession(); - - recorderApplication.destroyRecordSession(bbbSession.getSessionName()); + recorderApplication.destroyRecordSession(room.getName()); connInvokerService.removeScope(room.getName()); super.roomStop(room); } - + @Override public boolean roomConnect(IConnection connection, Object[] params) { log.debug("***** " + APP + " [ " + " roomConnect [ " + connection.getScope().getName() + "] *********"); String username = ((String) params[0]).toString(); String role = ((String) params[1]).toString(); - String conference = ((String)params[2]).toString(); - - String sessionName = ((String)params[3]).toString(); + String room = ((String)params[2]).toString(); - String voiceBridge = ((String) params[4]).toString(); - String room = sessionName; + String voiceBridge = ((String) params[3]).toString(); - boolean record = (Boolean)params[5]; + boolean record = (Boolean)params[4]; - String externalUserID = ((String) params[6]).toString(); - String internalUserID = ((String) params[7]).toString(); + String externalUserID = ((String) params[5]).toString(); + String internalUserID = ((String) params[6]).toString(); if (record == true) { - recorderApplication.createRecordSession(sessionName); + recorderApplication.createRecordSession(room); } - BigBlueButtonSession bbbSession = new BigBlueButtonSession(sessionName, internalUserID, username, role, - conference, room, voiceBridge, record, externalUserID); + BigBlueButtonSession bbbSession = new BigBlueButtonSession(room, internalUserID, username, role, + voiceBridge, record, externalUserID); connection.setAttribute(Constants.SESSION, bbbSession); - String debugInfo = "internalUserID=" + internalUserID + ",username=" + username + ",role=" + role + ",conference=" + conference + "," + - "session=" + sessionName + ",voiceConf=" + voiceBridge + ",room=" + room + ",externalUserid=" + externalUserID; + String debugInfo = "internalUserID=" + internalUserID + ",username=" + username + ",role=" + role + "," + + ",voiceConf=" + voiceBridge + ",room=" + room + ",externalUserid=" + externalUserID; log.debug("User [{}] connected to room [{}]", debugInfo, room); participantsApplication.createRoom(room); @@ -178,7 +173,6 @@ public class BigBlueButtonApplication extends MultiThreadedApplicationAdapter { public String getMyUserId() { BigBlueButtonSession bbbSession = (BigBlueButtonSession) Red5.getConnectionLocal().getAttribute(Constants.SESSION); assert bbbSession != null; - //return Long.toString(bbbSession.getClientID()); return bbbSession.getInternalUserID(); } diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonSession.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonSession.java index 2b2ff4d5933317ccd31a85692e2d47b172aa4a47..e1b7140a15f07f2c1023096c65a947864b995d8c 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonSession.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/BigBlueButtonSession.java @@ -22,22 +22,18 @@ package org.bigbluebutton.conference; public class BigBlueButtonSession { private final String username; private final String role; - private final String conference; private final String room; private final String internalUserID; - private final String sessionName; private final String voiceBridge; private final Boolean record; private final String externalUserID; - public BigBlueButtonSession(String sessionName, String internalUserID, String username, - String role, String conference, String room, String voiceBridge, Boolean record, + public BigBlueButtonSession(String room, String internalUserID, String username, + String role, String voiceBridge, Boolean record, String externalUserID){ this.internalUserID = internalUserID; - this.sessionName = sessionName; this.username = username; this.role = role; - this.conference = conference; this.room = room; this.voiceBridge = voiceBridge; this.record = record; @@ -52,10 +48,6 @@ public class BigBlueButtonSession { return role; } - public String getConference() { - return conference; - } - public String getRoom() { return room; } @@ -64,10 +56,6 @@ public class BigBlueButtonSession { return internalUserID; } - public String getSessionName() { - return sessionName; - } - public String getVoiceBridge() { return voiceBridge; } diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/participants/ParticipantsHandler.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/participants/ParticipantsHandler.java index 40866227f22bd7a260835ae30f751c0e5509c849..0ad87eda02c9f1c8e6d7be2e3c734bf45cbfaf73 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/participants/ParticipantsHandler.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/participants/ParticipantsHandler.java @@ -115,7 +115,7 @@ public class ParticipantsHandler extends ApplicationAdapter implements IApplicat if (bbbSession == null) { log.debug("roomLeave - session is null"); } else { - participantsApplication.participantLeft(bbbSession.getSessionName(), bbbSession.getInternalUserID()); + participantsApplication.participantLeft(scope.getName(), bbbSession.getInternalUserID()); } } diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/voice/VoiceHandler.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/voice/VoiceHandler.java index 13b22a0523d6b3cbf778356912dd3b695025406f..ef1eaba56f67e602c9714ad4af1aa892fc7f5e89 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/voice/VoiceHandler.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/voice/VoiceHandler.java @@ -31,7 +31,6 @@ import org.bigbluebutton.webconference.red5.voice.ClientNotifier; public class VoiceHandler extends ApplicationAdapter implements IApplication{ private static Logger log = Red5LoggerFactory.getLogger(VoiceHandler.class, "bigbluebutton"); - private static final String VOICE = "VOICE"; private static final String VOICE_SO = "meetMeUsersSO"; private static final String APP = "VOICE"; @@ -91,9 +90,12 @@ public class VoiceHandler extends ApplicationAdapter implements IApplication{ @Override public boolean roomStart(IScope scope) { log.debug("***** " + APP + " [ " + " roomStart [ " + scope.getName() + "] *********"); + return true; } + private static final String VOICE_BRIDGE = "VOICE_BRIDGE"; + @Override public boolean roomConnect(IConnection connection, Object[] params) { log.debug("***** " + APP + " [ " + " roomConnect [ " + connection.getScope().getName() + "] *********"); @@ -101,9 +103,13 @@ public class VoiceHandler extends ApplicationAdapter implements IApplication{ ISharedObject so = getSharedObject(connection.getScope(), VOICE_SO, false); String voiceBridge = getBbbSession().getVoiceBridge(); - String meetingid = getBbbSession().getConference(); + String meetingid = getBbbSession().getRoom(); Boolean record = getBbbSession().getRecord(); - + + if (!connection.getScope().hasAttribute(VOICE_BRIDGE)) { + connection.getScope().setAttribute(VOICE_BRIDGE, getBbbSession().getVoiceBridge()); + } + log.debug("Setting up voiceBridge " + voiceBridge); clientManager.addSharedObject(connection.getScope().getName(), voiceBridge, so); conferenceService.createConference(voiceBridge, meetingid, record); @@ -120,7 +126,7 @@ public class VoiceHandler extends ApplicationAdapter implements IApplication{ * Remove the voicebridge from the list of running * voice conference. */ - String voiceBridge = getBbbSession().getVoiceBridge(); + String voiceBridge = (String) scope.getAttribute(VOICE_BRIDGE); conferenceService.destroyConference(voiceBridge); clientManager.removeSharedObject(scope.getName()); if (hasSharedObject(scope, VOICE_SO)) { diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as index 8119bb08daa104fb642367f329e92780f2cfc0ab..fc0640b2e1e3c8fce40500c3dd480c7df0708851 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as +++ b/bigbluebutton-client/src/org/bigbluebutton/main/model/users/NetConnectionDelegate.as @@ -142,7 +142,7 @@ package org.bigbluebutton.main.model.users LogUtil.debug(NAME + "::Connecting to " + uri + " [" + _conferenceParameters.username + "," + _conferenceParameters.role + "," + _conferenceParameters.conference + "," + _conferenceParameters.record + "," + _conferenceParameters.room + "]"); - _netConnection.connect(uri, _conferenceParameters.username, _conferenceParameters.role, _conferenceParameters.conference, + _netConnection.connect(uri, _conferenceParameters.username, _conferenceParameters.role, _conferenceParameters.room, _conferenceParameters.voicebridge, _conferenceParameters.record, _conferenceParameters.externUserID, _conferenceParameters.internalUserID); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml index bfd7c30705e794f9485d731a97f22d69d85d8da2..fd2dbb15b03d9d8eece97d77ab5fbdb1e2610bff 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/views/MediaItemRenderer.mxml @@ -65,8 +65,10 @@ muteBtn.enabled = kickUserBtn.enabled = moderator = UserManager.getInstance().getConference().amIModerator(); if (moderator) { BindingUtils.bindProperty(muteBtn, "visible", voiceJoinedInd, "visible"); + muteBtn.includeInLayout = true; } else { BindingUtils.bindProperty(muteImg, "visible", voiceJoinedInd, "visible"); + muteImg.includeInLayout = true; } this.addEventListener(FlexEvent.DATA_CHANGE, dataChangeHandler); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/business/VideoProxy.as b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/business/VideoProxy.as index fb7ee873ac7ac8e1c010f9e8349bbd83bb6a8961..487c6b4ce8ae3bf0ff695be3f846187433681463 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/business/VideoProxy.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/business/VideoProxy.as @@ -119,40 +119,42 @@ package org.bigbluebutton.modules.videoconf.business h264profile = H264Profile.BASELINE; } var h264Level:String = H264Level.LEVEL_4_1; - if (videoOptions.h264Level != "1") { + if (videoOptions.h264Level == "1") { h264Level = H264Level.LEVEL_1; - } else if (videoOptions.h264Level != "1.1") { + } else if (videoOptions.h264Level == "1.1") { h264Level = H264Level.LEVEL_1_1; - } else if (videoOptions.h264Level != "1.2") { + } else if (videoOptions.h264Level == "1.2") { h264Level = H264Level.LEVEL_1_2; - } else if (videoOptions.h264Level != "1.3") { + } else if (videoOptions.h264Level == "1.3") { h264Level = H264Level.LEVEL_1_3; - } else if (videoOptions.h264Level != "1b") { + } else if (videoOptions.h264Level == "1b") { h264Level = H264Level.LEVEL_1B; - } else if (videoOptions.h264Level != "2") { + } else if (videoOptions.h264Level == "2") { h264Level = H264Level.LEVEL_2; - } else if (videoOptions.h264Level != "2.1") { + } else if (videoOptions.h264Level == "2.1") { h264Level = H264Level.LEVEL_2_1; - } else if (videoOptions.h264Level != "2.2") { + } else if (videoOptions.h264Level == "2.2") { h264Level = H264Level.LEVEL_2_2; - } else if (videoOptions.h264Level != "3") { + } else if (videoOptions.h264Level == "3") { h264Level = H264Level.LEVEL_3; - } else if (videoOptions.h264Level != "3.1") { + } else if (videoOptions.h264Level == "3.1") { h264Level = H264Level.LEVEL_3_1; - } else if (videoOptions.h264Level != "3.2") { + } else if (videoOptions.h264Level == "3.2") { h264Level = H264Level.LEVEL_3_2; - } else if (videoOptions.h264Level != "4") { + } else if (videoOptions.h264Level == "4") { h264Level = H264Level.LEVEL_4; - } else if (videoOptions.h264Level != "4.1") { + } else if (videoOptions.h264Level == "4.1") { h264Level = H264Level.LEVEL_4_1; - } else if (videoOptions.h264Level != "4.2") { + } else if (videoOptions.h264Level == "4.2") { h264Level = H264Level.LEVEL_4_2; - } else if (videoOptions.h264Level != "5") { + } else if (videoOptions.h264Level == "5") { h264Level = H264Level.LEVEL_5; - } else if (videoOptions.h264Level != "5.1") { + } else if (videoOptions.h264Level == "5.1") { h264Level = H264Level.LEVEL_5_1; } + LogUtil.info("Codec used: " + h264Level); + h264.setProfileLevel(h264profile, h264Level); ns.videoStreamSettings = h264; }