Author: solomax
Date: Wed Dec 14 09:57:18 2016
New Revision: 1774157

URL: http://svn.apache.org/viewvc?rev=1774157&view=rev
Log:
[OPENMEETINGS-1454] interview room seems to work

Modified:
    
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
    
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/flexibleConferenceRoom/roomSidebar/baseRoomSidebar.lzx
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/interviewVideoBox.lzx
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/interviewWhiteboard.lzx
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/baseVideoObject.lzx
    
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/editRecordStreamSWF10.lzx
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/CamActivityIcon.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/MicActivityIcon.java
    
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/RoomActivityIcon.java
    
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
    
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/CamActivityIcon.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/MicActivityIcon.java
    
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/RoomActivityIcon.java

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
 Wed Dec 14 09:57:18 2016
@@ -23,6 +23,7 @@ import static org.apache.openmeetings.ut
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_OAUTH_REGISTER_KEY;
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_SOAP_REGISTER_KEY;
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
+import static 
org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter.nextBroadCastId;
 import static org.apache.openmeetings.util.LocaleHelper.getCountryName;
 
 import java.util.ArrayList;
@@ -303,7 +304,7 @@ public class MobileService {
                User u = userDao.get(userId);
                Client c = scopeAdapter.setUsernameReconnect(SID, userId, 
u.getLogin(), u.getFirstname(), u.getLastname(), u.getPictureuri());
                 //TODO check if we need anything here
-               long broadcastId = scopeAdapter.getBroadCastId();
+               long broadcastId = nextBroadCastId();
                c.setSipTransport(true);
                c.setRoomId(Long.parseLong(c.getScope()));
                c.setRoomEnter(new Date());
@@ -333,7 +334,7 @@ public class MobileService {
                hsm.put("message", new String[]{"avsettings", "0", avMode});
                Map<String, Object> result = new Hashtable<String, Object>();
                if (!"n".equals(avMode)) {
-                       result.put("broadcastId", 
scopeAdapter.getBroadCastId());
+                       result.put("broadcastId", nextBroadCastId());
                }
 
                
scopeAdapter.sendMessageToCurrentScope("sendVarsToMessageWithClient", hsm, 
true, false);

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
 Wed Dec 14 09:57:18 2016
@@ -990,27 +990,6 @@ public class ScopeApplicationAdapter ext
        }
 
        /**
-        * there will be set an attribute called "broadCastCounter" this is the 
name
-        * this user will publish his stream
-        * 
-        * @return long broadCastId
-        */
-       public long getBroadCastId() {
-               try {
-                       log.debug("-----------  getBroadCastId");
-                       IConnection current = Red5.getConnectionLocal();
-                       String streamid = current.getClient().getId();
-                       Client client = 
sessionManager.getClientByStreamId(streamid, null);
-                       client.setBroadCastID(nextBroadCastId());
-                       sessionManager.updateClientByStreamId(streamid, client, 
false, null);
-                       return client.getBroadCastID();
-               } catch (Exception err) {
-                       log.error("[getBroadCastId]", err);
-               }
-               return -1;
-       }
-
-       /**
         * this must be set _after_ the Video/Audio-Settings have been chosen 
(see
         * editrecordstream.lzx) but _before_ anything else happens, it cannot 
be
         * applied _after_ the stream has started! 
@@ -1025,32 +1004,29 @@ public class ScopeApplicationAdapter ext
         * @param vWidth
         * @param vHeight
         * 
-        * @return RoomClient being updated in case of no errors, null otherwise
+        * @return BroadcastId in case of no errors, -1 otherwise
         */
-       public Client setUserAVSettings(String avsettings, Integer vWidth, 
Integer vHeight) {
+       public long setUserAVSettings(String avsettings, Integer vWidth, 
Integer vHeight, boolean updateBroadcastId) {
                try {
                        String streamid = 
Red5.getConnectionLocal().getClient().getId();
-                       log.debug("-----------  setUserAVSettings {} {} {}", 
new Object[] {streamid, avsettings});
+                       log.debug("-----------  setUserAVSettings {} {}", 
streamid, avsettings);
                        Client currentClient = 
sessionManager.getClientByStreamId(streamid, null);
                        if (currentClient == null) {
                                log.warn("Failed to find appropriate clients");
-                               return null;
+                               return -1;
                        }
                        currentClient.setAvsettings(avsettings);
                        currentClient.setVWidth(vWidth);
                        currentClient.setVHeight(vHeight);
+                       if (updateBroadcastId) {
+                               currentClient.setBroadCastID(nextBroadCastId());
+                       }
                        sessionManager.updateAVClientByStreamId(streamid, 
currentClient, null);
-
-                       HashMap<String, Object> hsm = new HashMap<>();
-                       hsm.put("client", currentClient);
-                       hsm.put("message", new Object[]{"avsettings", 0, 
avsettings});
-
-                       
sendMessageToCurrentScope("sendVarsToMessageWithClient", hsm, true);
-                       return currentClient;
+                       return currentClient.getBroadCastID();
                } catch (Exception err) {
                        log.error("[setUserAVSettings]", err);
                }
-               return null;
+               return -1;
        }
 
        /*

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
 Wed Dec 14 09:57:18 2016
@@ -504,7 +504,6 @@
                                                        , value.roomId, '', 
value.formatedDate, value.userpos, value.usercolor, value);
                                }
                        }
-                       
canvas.setAttribute('numberofpartners',canvas.numberofpartners+1);
                </method>       
                
                <netRemoteCallHib name="getCurrentModeratorList" 
funcname="getCurrentModeratorList">
@@ -550,25 +549,22 @@
                        }
                        canvas.commonVideoViewContent.startStream(value);
                </method> 
-                  
+
                <method name="closeStream" args="value">
                        //The onResult-Handler will be called be the 
rtmpconnection
-                       if ($debug) Debug.write("**** closeStream: ",value);
+                       if ($debug) Debug.write("**** closeStream: ", value);
                        if (value == null) {
                                return;
                        }
                        if (value.screenClient) {
-                               if ($debug) Debug.write(" ondata closeStream: 
",value.streamPublishName);
+                               if ($debug) Debug.write(" ondata closeStream: 
", value.streamPublishName);
                                
canvas.commonVideoViewContent.closeScreenSharing(value);
                        } else {
                                //free the VideoContainer
-                               
//canvas._videocontainer.closeStreamClient(value.publicSID);
-                               
canvas.commonVideoViewContent.closeStreamClient(value.publicSID);
-                               
canvas.setAttribute('numberofpartners',canvas.numberofpartners-1);
+                               
canvas.commonVideoViewContent.closeStreamclient(value.publicSID);
                        }
-                       //TODO:check first current tab
                </method>
-               
+
                <!---
                        Event is invoked if a red5 stream sharing is closed
                 -->
@@ -585,10 +581,10 @@
                        </handler>
                </netRemoteCallHib>
 
-               <method name="roomDisconnectUser" args="value,id">
-                       canvas._videocontainer.disconnectclient(id);
+               <method name="roomDisconnectUser" args="value, id">
+                       if ($debug) Debug.write("**** roomDisconnectUser ", id, 
value);
                        if (canvas.commonVideoViewContent != null) {
-                               
canvas.commonVideoViewContent.disconnectclient(id);
+                               
canvas.commonVideoViewContent.removeVideoByUser(id);
                                if (canvas.currentModApply != null) 
canvas.currentModApply.rejectUser(value);
                                if (value.isRecording) {
                                        canvas._mymod.recordingUser = null;
@@ -596,10 +592,12 @@
                                if (value.streamPublishStarted) {
                                        canvas._mymod.publishingObj = null;
                                }
-                               canvas._mymod.setMessage();
+                               if (!!canvas._mymod) {
+                                       canvas._mymod.setMessage();
+                               }
                        }
                </method>
-               
+
                <method name="roomDisconnect" args="value">
                <![CDATA[
                        //The onResult-Handler will be called be the 
rtmpconnection
@@ -851,7 +849,7 @@
                                canvas.setAttribute("canVideo", 
client.canVideo);
                                
                                if (client.isBroadcasting) {
-                                       
canvas.commonVideoViewContent.startAvBroadcast();
+                                       
canvas.commonVideoViewContent._startAvBroadcast();
                                        
canvas.setAttribute("lastBroadCastingUser", client);
                                } else {
                                        
canvas.commonVideoViewContent.removeVideoByUser(canvas.publicSID);

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainAttributes.lzx
 Wed Dec 14 09:57:18 2016
@@ -175,10 +175,6 @@ the LAST RoomClient Object that has been
 <attribute name="ismoderator" value="false" type="boolean" />
 <attribute name="isInterview" value="false" type="boolean" />
 <!-- Those values are fixed values of the video positions of the videos from 
the interview room type -->
-<attribute name="interviewPod1_x" value="320" type="number" />
-<attribute name="interviewPod1_y" value="28" type="number" />
-<attribute name="interviewPod2_x" value="644" type="number" />
-<attribute name="interviewPod2_y" value="28" type="number" />
 
 <attribute name="loadingmessage" value="" type="string" />
 <!--- 
@@ -202,9 +198,6 @@ the LAST RoomClient Object that has been
  -->
 <attribute name="numberofallowedpartners" value="0" type="number" />
 
-<!--- Number of currently connected Users -->
-<attribute name="numberofpartners" value="0" type="number" />
-
 <!--- unique ID of this Stream -->
 <attribute name="streamid" value="0" type="string" />
 

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx
 Wed Dec 14 09:57:18 2016
@@ -53,16 +53,16 @@
                        });
        </method>
 
-       <method name="batchCreateVideo" args="selfStreamId, clients">
+       <method name="batchCreateVideo" args="clients">
        <![CDATA[
-               if ($debug) Debug.info("batchCreateVideo: ", selfStreamId, 
clients.length);
+               if ($debug) Debug.info("batchCreateVideo: ", clients.length);
                for (var i = 0; i < clients.length; ++i) {
                        var c = clients[i];
-                       if (c.streamid != selfStreamId) {
+                       if (c.streamid != canvas.streamid) {
                                if (c.isBroadcasting) {
-                                       createVideo(c.publicSID, c.firstname + 
' ' + c.lastname, c.broadCastID, c.avsettings, -1, c);
+                                       createVideo(c);
                                } else {
-                                       createVideoObject(c.publicSID, false, 
-1, c);
+                                       createVideoObject(c.publicSID, false, 
c.interviewPodId, c);
                                }
                        }
                }
@@ -75,27 +75,37 @@
                The method to "play" the stream is invoked later, when the user
                really starts to stream and not only when he just enters the 
room.
         -->
-       <method name="createVideoObject" 
args="publicSID,isBroadcasting,interviewPodId,object">
+       <method name="createVideoObject" args="publicSID, isBroadcasting, 
interviewPodId, object">
                if($debug) Debug.info("createVideoObject, publicSID: 
",publicSID, "isBroadcasting: ", isBroadcasting, "object", object);
                var vidContainer = getVideoObjectByPublicSID(publicSID);
                if(vidContainer == null) {
                        vidContainer = isBroadcasting ? 
this.getNewVideoObject(publicSID) : this.getNewVideoObjectByPos(publicSID);
                        vidContainer.publicSID = publicSID;
                }
-               if ($debug) Debug.write("Is interview ? ",canvas.isInterview);
-               if (canvas.isInterview) {
-                       if ($debug) Debug.write("Is interview 
",interviewPodId,"x",canvas["interviewPod"+interviewPodId+"_x"]);
+               if ($debug) Debug.write("Is interview ? ", canvas.isInterview);
+               placeInterviewPod(vidContainer, interviewPodId);
+               vidContainer.clientVars = object;
+               vidContainer.setAttribute('visible', false);
+               return vidContainer;
+       </method>
+
+       <method name="placeInterviewPod" args="vidContainer, interviewPodId">
+       <![CDATA[
+               if ($debug) Debug.write("placeInterviewPod::Is interview ", 
canvas.isInterview, interviewPodId);
+               if (canvas.isInterview && interviewPodId != null && 
interviewPodId > 0) {
                        if (interviewPodId != null) {
                                vidContainer.setAttribute("interviewPodId", 
interviewPodId);
-                               
vidContainer.setAttribute("x",canvas["interviewPod"+interviewPodId+"_x"]);
-                               
vidContainer.setAttribute("y",canvas["interviewPod"+interviewPodId+"_y"]);
+                               var cont = canvas._drawarea._videoviewcontent;
+                               var box = cont['interviewVideoBox' + 
interviewPodId];
+                               if (!!box) {
+                                       vidContainer.setAttribute("x", cont.x + 
box.x);
+                                       vidContainer.setAttribute("y", box.y);
+                               }
                        }
-                       vidContainer.setAttribute("width",322);
-                       vidContainer.setAttribute("height",281);
+                       vidContainer.setAttribute("width", 322);
+                       vidContainer.setAttribute("height", 281);
                }
-               vidContainer.clientVars = object;
-               vidContainer.setAttribute('visible', false);
-               return vidContainer;
+       ]]>
        </method>
 
        <method name="setPartnerName" args="obj, first, last=null">
@@ -111,49 +121,44 @@
                Method that creates the video views when user(self) initially 
entering a room.
                Creates the video-view AND starts to stream/play the video
         -->
-       <method name="createVideo" 
args="publicSID,displayName,broadcastId,avsettings,interviewPodId,object">
+       <method name="createVideo" args="cl">
        <![CDATA[
-               if ($debug) Debug.info("createVideo, publicSID: 
",publicSID,"broadcastId: ",broadcastId,"AVsettings: ",avsettings);
-               if ($debug) Debug.write(" createVideo ALL vars ",object);
-               var vidContainer = getVideoObjectByPublicSID(publicSID);
-               if(vidContainer == null) {
-                       vidContainer = this.getNewVideoObjectByPos(publicSID);
-                       vidContainer.clientVars = object;
-                       setPartnerName(vidContainer, displayName);
-                       if (avsettings=="n"){
-                               vidContainer.setVideouserProfilePic(object);
-                               
vidContainer.setAttribute("visibility","hidden");
-                       } else if (avsettings=="a"){
-                               vidContainer.setVideouserProfilePic(object);
+               if ($debug) Debug.info("createVideo::: ", cl.publicSID, 
cl.broadCastID, cl.avsettings, cl.interviewPodId);
+               if ($debug) Debug.write(" createVideo ALL vars ", cl);
+               var vidContainer = getVideoObjectByPublicSID(cl.publicSID);
+               if (vidContainer == null) {
+                       vidContainer = getNewVideoObjectByPos(cl.publicSID);
+               }
+               vidContainer.clientVars = cl;
+               setPartnerName(vidContainer, cl.firstname, cl.lastname);
+               switch (cl.avsettings) {
+                       case 'a':
+                               vidContainer.setVideouserProfilePic(cl);
                                if ($debug) Debug.warn("start play");
-                               
vidContainer._chatvideoinner._videostream.playStream(broadcastId,-1);
+                               
vidContainer._chatvideoinner._videostream.playStream(cl.broadCastID, -1);
                                vidContainer.setAttribute("visible", false);
-                       } else if (avsettings=="v" || avsettings=="av") {
+                               break;
+                       case 'v':
+                       case 'av':
                                //this means avsettings is either: "v" or "av"
-                               
vidContainer.setDefaultVideoSize(object.VWidth,object.VHeight);
-                               
vidContainer._chatvideoinner._videostream.playStream(broadcastId,-1);
-                               
vidContainer.setAttribute("visibility","visible");
-                       } else {
-                               //this means user did not select anything yet 
and streaming has not started
-                               
vidContainer.setAttribute("visibility","hidden");
-                       }
-                       vidContainer.setAttribute("interviewPodId", 
interviewPodId);
-                       vidContainer.updateAVSettingsSymbol(object);
-                       if (object.micMuted) {
-                               vidContainer.setMicMuted(object.micMuted);
-                       }
-               }
-
-               if ($debug) Debug.write("Is interview ? ",canvas.isInterview);
-               if (canvas.isInterview && interviewPodId != null && 
interviewPodId > 0) {
-                       if ($debug) Debug.write("Is interview 
",interviewPodId,"x",canvas["interviewPod"+interviewPodId+"_x"]);
-                       vidContainer.setAttribute("interviewPodId", 
interviewPodId);
-                       
vidContainer.setAttribute("x",canvas["interviewPod"+interviewPodId+"_x"]);
-                       
vidContainer.setAttribute("y",canvas["interviewPod"+interviewPodId+"_y"]);
-                       vidContainer.setAttribute("width",322);
-                       vidContainer.setAttribute("height",281);
+                               vidContainer.setDefaultVideoSize(cl.VWidth, 
cl.VHeight);
+                               
vidContainer._chatvideoinner._videostream.playStream(cl.broadCastID, -1);
+                               vidContainer.setAttribute("visible", true);
+                               break;
+                       case 'n':
+                       default:
+                               vidContainer.setVideouserProfilePic(cl);
+                               vidContainer.setAttribute("visible", false);
+                               break;
                }
-               return;
+               vidContainer.updateAVSettingsSymbol(cl);
+               if (cl.micMuted) {
+                       vidContainer.setMicMuted(cl.micMuted);
+               }
+               if ($debug) Debug.write(" createVideo ALL vars ", vidContainer);
+               placeInterviewPod(vidContainer, cl.interviewPodId);
+               enableRecordingButton();
+               return vidContainer;
        ]]>
        </method>
        
@@ -197,19 +202,7 @@
        ]]>
        </method>
 
-       <method name="getVideoObjectByInterviewPodId" args="interviewPodId">
-       <![CDATA[
-               for (var i=0;i<this.subviews.length;i++){
-                       if (this.subviews[i].interviewPodId==interviewPodId){
-                               return this.subviews[i];
-                       }
-               }
-               if ($debug) Debug.warn(" - getVideoObjectByInterviewPodId - DID 
NOT FIND THE USER BY ",interviewPodId);
-               return null;
-       ]]>
-       </method>
-
-       <method name="getVideoObjectCount">
+       <method name="enableRecordingButton">
        <![CDATA[
                var count = 0;
                for (var i = 0; i < this.subviews.length; ++i) {
@@ -217,12 +210,21 @@
                                count++;
                        }
                }
-               return count;
+               if (canvas.isInterview) {
+                       if (count > 0 && 
!canvas._drawarea._interview._stop.enabled) {
+                               
canvas._drawarea._interview._start.setAttribute('enabled', true);
+                       } else if (count == 0 && 
canvas._drawarea._interview._start.enabled) {
+                               
canvas._drawarea._interview._start.setAttribute('enabled', false);
+                       }
+               }
        ]]>
        </method>
 
        <method name="getVideoObjectFreePos" 
args="offsetLength,videoWidth,videoHeight">
        <![CDATA[
+               if (canvas.isInterview) {
+                       return [0, 0];
+               }
                var newx = 20;
                if (canvas.currentRoomObj.hideWhiteboard) {
                        newx += SIDEPANEL_WIDTH;
@@ -263,21 +265,7 @@
                if ((newy + videoHeight) >= canvas.height) {
                        newy = 0;
                }
-
-               var result = [newx, newy];
-               return result;
-       ]]>
-       </method>
-
-       <method name="disconnectclient" args="publicSID">
-       <![CDATA[
-               if ($debug) Debug.write("disconnectclient: ", publicSID);
-               var obj = closeStreamclient(publicSID);
-               if (obj == null) {
-                       if ($debug) Debug.warn("Could Not find this To 
disconnect",publicSID);
-               } else {
-                       obj.destroy();
-               }
+               return [newx, newy];
        ]]>
        </method>
 
@@ -314,11 +302,14 @@
        </method>
 
        <method name="removeVideoByUser" args="publicSID"><![CDATA[
-               var obj = this.closeStreamclient(publicSID);
-               if(obj != null) {
+               if ($debug) Debug.write("removeVideoByUser: ", publicSID);
+               var obj = closeStreamclient(publicSID);
+               if (obj == null) {
+                       if ($debug) Debug.warn("Could Not find this To 
removeVideoByUser", publicSID);
+               } else {
                        obj.destroy();
+                       enableRecordingButton();
                }
-               return;
        ]]></method>
 
        <method name="updateMuteStatusVideoView" args="roomClient">
@@ -373,25 +364,7 @@
                        obj = createVideoObject(value.publicSID, true, -1, 
value);
                        obj.setAttribute('visible', true);
                } else {
-                       obj = getVideoObjectByPublicSID(value.publicSID);
-               }
-               //if ($debug) Debug.write("startStream obj: ",obj);
-               if (obj != null ){
-                       
obj._chatvideoinner._videostream.playStream(value.broadCastID, -1);
-                       obj.setDefaultVideoSize(value.VWidth, value.VHeight);
-                       setPartnerName(obj, value.firstname, value.lastname);
-               }
-               //we have to do this again when the stream starts, the initial 
video 
-               //component does not know the interviewPodId as the user has 
not selected 
-               //which interview video pod he is going to use
-               var interviewPodId = value.interviewPodId;
-               if (canvas.isInterview && interviewPodId != null && 
interviewPodId > 0) {
-                       if ($debug) Debug.write("Is interview ", 
interviewPodId, "x", canvas["interviewPod" + interviewPodId + "_x"]);
-                       obj.setAttribute("interviewPodId", interviewPodId);
-                       obj.setAttribute("x",canvas["interviewPod" + 
interviewPodId + "_x"]);
-                       obj.setAttribute("y",canvas["interviewPod" + 
interviewPodId + "_y"]);
-                       obj.setAttribute("width", 322);
-                       obj.setAttribute("height", 281);
+                       createVideo(value);
                }
        ]]>
        </method>
@@ -760,10 +733,34 @@
                return val != null ? val : def;
        </method>
 
-       <netRemoteCallHib name="restartAvBroadcast" funcname="getBroadCastId" 
remotecontext="$once{ canvas.thishib }">
+       <method name="_startAvBroadcast" args="restart=false">
+               var g = canvas.commonVideoViewContent.loadAVsettings();
+               var settings = getAvSetting('avstored', g, 'av');
+               var vWidth = canvas.isInterview ? 320 : getAvSetting('width', 
g, 120);
+               var vHeight = canvas.isInterview ? 260 : getAvSetting('height', 
g, 90);
+               setUserAVSettings.avsetting = settings;
+               setUserAVSettings.vWidth = vWidth;
+               setUserAVSettings.vHeight = vHeight;
+               setUserAVSettings.vHeight = vHeight;
+               setUserAVSettings.updateBroadcastId = restart;
+               setUserAVSettings.doCall();
+       </method>
+
+       <netRemoteCallHib name="setUserAVSettings" funcname="setUserAVSettings" 
remotecontext="$once{ canvas.thishib }" >
+               <attribute name="avsetting" value="" type="string" />
+               <attribute name="vWidth" value="0" type="number" />
+               <attribute name="vHeight" value="0" type="number" />
+               <attribute name="updateBroadcastId" value="false" 
type="boolean" />
+               <netparam><method name="getValue">return 
parent.avsetting;</method></netparam>
+               <netparam><method name="getValue">return 
parent.vWidth;</method></netparam>
+               <netparam><method name="getValue">return 
parent.vHeight;</method></netparam>
+               <netparam><method name="getValue">return 
parent.updateBroadcastId;</method></netparam>
                <handler name="ondata" args="value">
-                       canvas.currentClient.broadCastID = value;
-                       parent.startAvBroadcast();
+                       if ($debug) Debug.write("setUserAVSettings:: done", 
value);
+                       if (value > -1) {
+                               canvas.currentClient.broadCastID = value;
+                               parent.startAvBroadcast();
+                       }
                </handler>
        </netRemoteCallHib>
 
@@ -773,10 +770,12 @@
                var myvideocontainer = createVideoObject(canvas.publicSID, 
true, canvas.currentClient.interviewPodId, canvas.currentClient);
                if ($debug) Debug.write("doStartConference::doninitalize");
                var settings = getAvSetting('avstored', g, 'av');
+               var vWidth = canvas.isInterview ? 320 : getAvSetting('width', 
g, 120);
+               var vHeight = canvas.isInterview ? 260 : getAvSetting('height', 
g, 90);
                if (!canvas.isInterview) {
-                       
myvideocontainer.setDefaultVideoSize(getAvSetting('width', g, 120), 
getAvSetting('height', g, 90));
+                       myvideocontainer.setDefaultVideoSize(vWidth, vHeight);
                }
-               
+
                var videoview = myvideocontainer._chatvideoinner._videostream;
                if ($debug) Debug.write("myvideocontainer: ", myvideocontainer);
                myvideocontainer.setAttribute('isremote', false);
@@ -824,6 +823,7 @@
                                if ($debug) Debug.warn("no valid device Setup 
chosen");
                                break;
                }
+               enableRecordingButton();
        ]]>
        </method>
 </class>

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/flexibleConferenceRoom/roomSidebar/baseRoomSidebar.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/flexibleConferenceRoom/roomSidebar/baseRoomSidebar.lzx?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/flexibleConferenceRoom/roomSidebar/baseRoomSidebar.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/flexibleConferenceRoom/roomSidebar/baseRoomSidebar.lzx
 Wed Dec 14 09:57:18 2016
@@ -109,8 +109,8 @@
        <method name="batchCreateVideo" args="clients">
        <![CDATA[
                if ($debug) Debug.write("interval 0 :: ", clients.length);
-               canvas.commonVideoViewContent.batchCreateVideo(canvas.streamid, 
clients);
-                       
+               canvas.commonVideoViewContent.batchCreateVideo(clients);
+
                //this content must be inited _after_ setting the default values
                canvas.thishib.getCurrentModeratorList.doCall();
                //FIXME Issue-1076
@@ -151,7 +151,7 @@
                
                //Do init only in case this stream is NOT the same as we are
                if (streamid != canvas.streamid) {
-                       
canvas.commonVideoViewContent.createVideo(object.publicSID, object.firstname+' 
'+object.lastname, object.broadCastID, object.avsettings, -1, object);
+                       canvas.commonVideoViewContent.createVideo(object);
                }
        ]]>
        </method>
@@ -166,14 +166,6 @@
        ]]>
        </method>
                
-       <!--
-               invoked whenever a User starts to Stream Video in this Room, 
-               interviewPodId has only a meaning in the Room Type Interview
-        -->            
-       <method name="startStream" 
args="publicSID,broadcastId,firstname,lastname,interviewPodId,VWidth,VHeight">
-               
canvas.commonVideoViewContent.startStream(publicSID,broadcastId,firstname,lastname,interviewPodId,VWidth,VHeight);
-       </method>
-
        <method name="closeStreamClient" args="publicSID">
                canvas.commonVideoViewContent.closeStreamClient(publicSID);
        </method>
@@ -181,18 +173,6 @@
        <method name="resetAllValues">
                canvas.commonVideoViewContent.resetAllValues();
        </method>
-       
-       <method name="removeVideoByUser" args="userObject">
-               
canvas.commonVideoViewContent.removeVideoByUser(userObject.publicSID);
-       </method>
-       
-       <!--- 
-               stops the streaming but and destroys the view
-               @param int broadcastId broadcastId
-        -->
-       <method name="disconnectclient" args="publicSID">
-               canvas.commonVideoViewContent.disconnectclient(publicSID);
-       </method>
 
        <method name="updateMuteStatusVideoView" args="roomClient">
                
canvas.commonVideoViewContent.updateMuteStatusVideoView(roomClient);

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/interviewVideoBox.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/interviewVideoBox.lzx?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/interviewVideoBox.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/interviewVideoBox.lzx
 Wed Dec 14 09:57:18 2016
@@ -21,14 +21,14 @@
 <library>
 
 <class name="interviewVideoChooseUser" extends="guiPresenter" 
resizeable="false"
-       width="220" height="100" closable="true" labelid="910" y="10" 
minimizable="false">
-       
+               width="220" height="100" closable="true" labelid="910" y="10" 
minimizable="false">
+
        <attribute name="refObj" value="null" />
-       
+
        <handler name="oninit">
                this.getClientListScope.doCall();
        </handler>
-       
+
        <netRemoteCallHib name="getClientListScope" 
funcname="getClientListScope" remotecontext="$once{ canvas.thishib }" >
                <handler name="ondata" args="value">
                <![CDATA[
@@ -41,17 +41,17 @@
                ]]>
                </handler>  
        </netRemoteCallHib>
-       
+
        <labelText labelid="911" x="2" y="22"/>
-       
+
        <resetCombobox name="_users" x="2" y="42" width="$once{ parent.width-4 
}"/>
-       
+
        <simpleLabelButton labelid="61" width="100" x="$once{ parent.width - 
105 }" y="$once{ parent.height - 26 }">
                <handler name="onclick">
                        this.parent.close();
                </handler>
        </simpleLabelButton>
-       
+
        <simpleLabelButton labelid="60" width="100" x="$once{ parent.width - 
210 }" y="$once{ parent.height - 26 }">
                <handler name="onclick">
                        var valueCombobox = parent._users.getValue();
@@ -60,7 +60,6 @@
                        }
                </handler>
        </simpleLabelButton>
-       
 </class>
 
 <class name="interviewVideoBox" extends="view" width="322" height="281" 
bgcolor="0x000000">
@@ -72,47 +71,36 @@
                </when>
        </switch>
        <attribute name="interviewPodId" value="0" type="number" />
-       
-       <method name="startInterView">
-               if ($debug) Debug.write("startInterView :: ");
-               var tx = this.getAttributeRelative("x",canvas);
-               var ty = this.getAttributeRelative("y",canvas);
-               //TODO
-               canvas.commonVideoViewContent.createEditRecordStream(false, 
true, this.interviewPodId);
-       </method>
 
        <method name="sendConfirmation" args="publicSID">
                if ($debug) Debug.write("sendConfirmation :: ", publicSID);
-               
-               ExternalInterface.call("changeRight", 
canvas.currentRoomObj.audioOnly ? 'audio' : 'video', publicSID);
-               
+               ExternalInterface.call("toggleActivity", 
canvas.currentRoomObj.audioOnly ? 'broadcastA' : 'broadcastAV', publicSID, 
this.interviewPodId);
                return true;
        </method>
-       
+
        <netRemoteCallHib name="sendMessageWithClientByPublicSID" 
funcname="sendMessageWithClientByPublicSID"
-                                         remotecontext="$once{ canvas.thishib 
}" >  
+                       remotecontext="$once{ canvas.thishib }" >  
                <attribute name="messageObject" value="null" />
                <attribute name="publicSID" value="" type="string" />
                <netparam><method name="getValue">return 
parent.messageObject;</method></netparam>
                <netparam><method name="getValue">return 
parent.publicSID;</method></netparam>
                <handler name="ondata" args="value">
-                       <![CDATA[
-                               if ($debug) 
Debug.write("+sendMessageWithClientByPublicSID : ",value);
-                               
-                       ]]>
+               <![CDATA[
+                       if ($debug) 
Debug.write("+sendMessageWithClientByPublicSID : ",value);
+               ]]>
                </handler>
        </netRemoteCallHib>
-       
+
        <simpleLabelButton labelid="910" height="30" valign="middle" 
align="center"
-                          visible="${ ((canvas.ismoderator) ? true : 
((canvas.isAllowedToDraw) ? true : false )) }">
+                       visible="${ ((canvas.ismoderator) ? true : 
((canvas.isAllowedToDraw) ? true : false )) }">
                <handler name="onclick" args="refObj">
                        new lz.interviewVideoChooseUser(canvas,{
-                                                       isInterview:true,
-                                                       
x:this.getAttributeRelative("x",canvas)-10,
-                                                       
y:this.getAttributeRelative("y",canvas)-20,
-                                                       width:this.width+20,
-                                                       refObj:parent
-                                               });
+                                       isInterview:true,
+                                       
x:this.getAttributeRelative("x",canvas)-10,
+                                       
y:this.getAttributeRelative("y",canvas)-20,
+                                       width:this.width+20,
+                                       refObj:parent
+                               });
                </handler>
        </simpleLabelButton>
 </class>

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/interviewWhiteboard.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/interviewWhiteboard.lzx?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/interviewWhiteboard.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/interviewWhiteboard.lzx
 Wed Dec 14 09:57:18 2016
@@ -21,57 +21,25 @@
 <library>
 
 <class name="interviewWhiteboard" extends="view" clip="true">
-       <attribute name="checkPodsDelegate" value="null"/>
-       
        <handler name="oninit">
-       <![CDATA[
-       if ($debug) Debug.write(":: interviewWhiteboard :: oninit :: ", 
canvas.commonVideoViewContent);
+               if ($debug) Debug.write(":: interviewWhiteboard :: oninit :: ", 
canvas.commonVideoViewContent);
                canvas._drawarea = this;
-               if (checkPodsDelegate == null && !_recStarted.visible) {
-                       checkPodsDelegate = new LzDelegate(this, "checkPods");
-                       lz.Timer.addTimer(checkPodsDelegate, 1000);
-               }
                this.reloadStatus();
-       ]]>
        </handler>
-       
-       <handler name="ondestroy">
-               stopPodChecks();
-       </handler>
-       
+
        <handler name="onopenWhiteBoard" >
                if ($debug) Debug.write("-- onOpenWhiteBoard --");
        </handler>
-       
-       <method name="newInterviewStarting" args="refObj">
-       <![CDATA[
-               
this._videoviewcontent["interviewVideoBox"+refObj.interviewPodId].startInterView();
-       ]]>
-       </method>
-       
-       <method name="stopPodChecks">
-               if (checkPodsDelegate != null) {
-                       lz.Timer.removeTimer(checkPodsDelegate);
-                       checkPodsDelegate = null;
-               }
-       </method>
 
-       <method name="checkPods" args="ignore=null">
-               var count = canvas.commonVideoViewContent.getVideoObjectCount();
-               //if ($debug) Debug.write(":: Pods :: check :: ", count);
-               _interview._start.setAttribute("enabled", count > 0);
-               lz.Timer.resetTimer(checkPodsDelegate, 1000);
-       </method>
-       
        <method name="reloadStatus">
                this.getInterviewRecordingStatus.doCall();
        </method>
-       
+
        <!--
        getInterviewRecordingStatus()
         -->
        <netRemoteCallHib name="getInterviewRecordingStatus" 
funcname="getInterviewRecordingStatus"
-                                       remotecontext="$once{ canvas.thishib }" 
>  
+                       remotecontext="$once{ canvas.thishib }" >  
                <handler name="ondata" args="value">
                        <![CDATA[
                                if ($debug) 
Debug.write("getInterviewRecordingStatus: ",value);
@@ -83,47 +51,43 @@
                        ]]>
                </handler>
        </netRemoteCallHib>
-       
+
        <simplelayout axis="y" spacing="2" />
-       
+
        <view name="_videoviewcontent" x="40" >
                <simplelayout axis="x" spacing="2" />
                <interviewVideoBox name="interviewVideoBox1" interviewPodId="1" 
/>
                <interviewVideoBox name="interviewVideoBox2" x="324" 
interviewPodId="2" />
        </view>
-       
+
        <view name="_interview" align="center" visible="${ canvas.ismoderator 
}">
                <!--
                   public synchronized Boolean startInterviewRecording()
                 -->
                <netRemoteCallHib name="startInterviewRecording" 
funcname="startInterviewRecording" remotecontext="$once{ canvas.thishib }" >
                        <handler name="ondata" args="value">
-                               <![CDATA[
-                                       if ($debug) 
Debug.write("startInterviewRecording: ",value);
-                                       if (value) {
-                                               
parent._stop.setAttribute('enabled', true);
-                                       } else {
-                                               new 
lz.labelerrorPopup(canvas,{errorlabelid:915});
-                                       }
-                               ]]>
+                               if ($debug) 
Debug.write("startInterviewRecording: ",value);
+                               if (value) {
+                                       parent._stop.setAttribute('enabled', 
true);
+                               } else {
+                                       new 
lz.labelerrorPopup(canvas,{errorlabelid:915});
+                               }
                        </handler>
                </netRemoteCallHib>
-               
+
                <netRemoteCallHib name="stopInterviewRecording" 
funcname="stopInterviewRecording" remotecontext="$once{ canvas.thishib }" >
                        <handler name="ondata" args="value">
-                               <![CDATA[
-                                       if ($debug) 
Debug.write("stopInterviewRecording: ",value);
-                                        if (value) {
-                                               
parent._stop.setAttribute('enabled', false);
-                                       } else {
-                                               new 
lz.labelerrorPopup(canvas,{errorlabelid:916});
-                                       }
-                               ]]>
+                               if ($debug) 
Debug.write("stopInterviewRecording: ",value);
+                               if (value) {
+                                       parent._stop.setAttribute('enabled', 
false);
+                               } else {
+                                       new 
lz.labelerrorPopup(canvas,{errorlabelid:916});
+                               }
                        </handler>
                </netRemoteCallHib>
-               
+
                <simplelayout axis="x" spacing="2" />
-               
+
                <simpleLabelButton name="_start" labelid="913" height="30" 
width="200" enabled="false">
                        <handler name="onclick">
                                if ($debug) Debug.write("Start Recording");
@@ -131,7 +95,7 @@
                        </handler>
                        <view x="2" y="4" resource="interview_record_start" />
                </simpleLabelButton>
-               
+
                <simpleLabelButton name="_stop" labelid="914" height="30" 
width="200" enabled="false">
                        <handler name="onclick">
                                if ($debug) Debug.write("Stop Recording");
@@ -139,13 +103,10 @@
                        </handler>
                        <view x="2" y="4" resource="interview_record_stop" />
                </simpleLabelButton>
-               
        </view>
-       
+
        <view name="_recStarted" align="center" visibility="hidden">
                <labelText labelid="917" />
        </view>
-
 </class>
-
 </library>

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/baseVideoObject.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/baseVideoObject.lzx?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/baseVideoObject.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/baseVideoObject.lzx
 Wed Dec 14 09:57:18 2016
@@ -411,7 +411,7 @@
                                <handler name="onclick">
                                        parent.parent.resetValues();
                                        if (!parent.parent.isremote) {
-                                               
canvas.commonVideoViewContent.restartAvBroadcast.doCall()
+                                               
canvas.commonVideoViewContent._startAvBroadcast(true)
                                        }
                                </handler>
                                <labelTooltip name="_tip" labelid="540" />

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/editRecordStreamSWF10.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/editRecordStreamSWF10.lzx?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/editRecordStreamSWF10.lzx
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/editRecordStreamSWF10.lzx
 Wed Dec 14 09:57:18 2016
@@ -56,7 +56,6 @@
        <attribute name="doDefaultAnimation" value="true" type="boolean" />
        <attribute name="cam_default_width" value="320" type="number" />
        <attribute name="cam_default_height" value="260" type="number" />
-       <attribute name="interviewPodId" value="0" type="number" />
        <attribute name="lastRecorded" value="" type="string" />
        <attribute name="isRunning" value="false" type="boolean" />
        <attribute name="recordingsCounter" value="5" type="number" />
@@ -109,13 +108,6 @@
                }
                this.executeAttachCamera = true;
                this.attachCamera();
-               
-               //TODO check this
-               if (canvas.isInterview) {
-                       if ($debug) Debug.write("Is interview ", 
interviewPodId);
-                       
//this.setAttribute("x",canvas["interviewPod"+interviewPodId+"_x"]);
-                       
//this.setAttribute("y",canvas["interviewPod"+interviewPodId+"_y"]);
-               }
        ]]>
        </handler>
 

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
 Wed Dec 14 09:57:18 2016
@@ -51,6 +51,7 @@ import org.apache.openmeetings.db.entity
 import org.apache.openmeetings.db.entity.user.User.Type;
 import org.apache.openmeetings.util.InitializationContainer;
 import org.apache.openmeetings.web.app.Client.Activity;
+import org.apache.openmeetings.web.app.Client.Pod;
 import org.apache.openmeetings.web.pages.AccessDeniedPage;
 import org.apache.openmeetings.web.pages.ActivatePage;
 import org.apache.openmeetings.web.pages.HashPage;
@@ -231,16 +232,19 @@ public class Application extends Authent
                        
rcl.setIsSuperModerator(client.hasRight(Right.superModerator));
                        rcl.setIsMod(client.hasRight(Right.moderator));
                        rcl.setIsBroadcasting(client.hasRight(Right.audio));
-                       rcl.setCanVideo(client.hasRight(Right.video) && 
client.hasActivity(Activity.broadcastVideo));
+                       rcl.setCanVideo(client.hasRight(Right.video) && 
client.hasActivity(Activity.broadcastV));
                        rcl.setCanDraw(client.hasRight(Right.whiteBoard));
-                       if (client.hasActivity(Activity.broadcastAudio) || 
client.hasActivity(Activity.broadcastVideo)) {
+                       if (client.hasActivity(Activity.broadcastA) || 
client.hasActivity(Activity.broadcastV)) {
+                               if (client.getPod() != Pod.none) {
+                                       rcl.setInterviewPodId(client.getPod() 
== Pod.left ? 1 : 2);
+                               }
                                rcl.setIsBroadcasting(true);
                                
rcl.setBroadCastID(ScopeApplicationAdapter.nextBroadCastId());
                                StringBuilder sb = new StringBuilder();
-                               if 
(client.hasActivity(Activity.broadcastAudio)) {
+                               if (client.hasActivity(Activity.broadcastA)) {
                                        sb.append('a');
                                }
-                               if 
(client.hasActivity(Activity.broadcastVideo)) {
+                               if (client.hasActivity(Activity.broadcastV)) {
                                        sb.append('v');
                                }
                                rcl.setAvsettings(sb.toString());

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
 Wed Dec 14 09:57:18 2016
@@ -40,14 +40,18 @@ public class Client implements IDataProv
        private static final long serialVersionUID = 1L;
 
        public enum Activity {
-               broadcastAudio //sends Audio to the room
-               , broadcastVideo //sends Video to the room
+               broadcastA //sends Audio to the room
+               , broadcastV //sends Video to the room
+               , broadcastAV //sends Audio+Video to the room
                , share
                , record
                , publish //sends A/V to external server
                , muted
                , exclusive
        }
+       public enum Pod {
+               none, left, right;
+       }
        private final String sessionId;
        private int pageId;
        private final User user;
@@ -56,6 +60,7 @@ public class Client implements IDataProv
        private final Set<Right> rights = new HashSet<>();
        private final Set<Activity> activities = new HashSet<>();
        private final Date connectedSince;
+       private Pod pod;
 
        public Client(String sessionId, Long userId) {
                this(sessionId, 0, userId);
@@ -113,8 +118,48 @@ public class Client implements IDataProv
                return activities;
        }
 
-       public boolean hasActivity(Activity activity) {
-               return activities.contains(activity);
+       public boolean hasActivity(Activity a) {
+               return activities.contains(a);
+       }
+
+       public void toggle(Activity a) {
+               if (hasActivity(a)) {
+                       remove(a);
+               } else {
+                       set(a);
+               }
+       }
+
+       public void set(Activity a) {
+               activities.add(a);
+               switch (a) {
+                       case broadcastV:
+                       case broadcastA:
+                               if (hasActivity(Activity.broadcastA) && 
hasActivity(Activity.broadcastV)) {
+                                       activities.add(Activity.broadcastAV);
+                               }
+                               break;
+                       case broadcastAV:
+                               activities.add(Activity.broadcastA);
+                               activities.add(Activity.broadcastV);
+                               break;
+                       default:
+               }
+       }
+
+       public void remove(Activity a) {
+               activities.remove(a);
+               switch (a) {
+                       case broadcastV:
+                       case broadcastA:
+                               activities.remove(Activity.broadcastAV);
+                               break;
+                       case broadcastAV:
+                               activities.remove(Activity.broadcastA);
+                               activities.remove(Activity.broadcastV);
+                               break;
+                       default:
+               }
        }
 
        public Date getConnectedSince() {
@@ -139,6 +184,18 @@ public class Client implements IDataProv
                return this;
        }
 
+       public Pod getPod() {
+               return pod;
+       }
+
+       public void setPod(Integer i) {
+               if (i != null && i.intValue() > 0) {
+                       this.pod = i.intValue() == 1 ? Pod.left : Pod.right;
+               } else {
+                       this.pod = Pod.none;
+               }
+       }
+
        @Override
        public int hashCode() {
                final int prime = 31;
@@ -172,6 +229,6 @@ public class Client implements IDataProv
        @Override
        public String toString() {
                return "Client [uid=" + uid + ", sessionId=" + sessionId + ", 
pageId=" + pageId + ", userId=" + user.getId() + ", roomId=" + roomId
-                               + ", rights=" + rights + ", activities=" + 
activities + ", connectedSince=" + connectedSince + "]";
+                               + ", rights=" + rights + ", activities=" + 
activities + ", connectedSince=" + connectedSince + ", pod = " + pod + "]";
        }
 }

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
 Wed Dec 14 09:57:18 2016
@@ -32,6 +32,7 @@ import org.apache.openmeetings.db.entity
 import org.apache.openmeetings.db.entity.room.Room.RoomElement;
 import org.apache.openmeetings.web.app.Client;
 import org.apache.openmeetings.web.app.Client.Activity;
+import org.apache.openmeetings.web.app.Client.Pod;
 import org.apache.openmeetings.web.common.ConfirmableAjaxBorder;
 import org.apache.openmeetings.web.room.RoomPanel;
 import org.apache.openmeetings.web.room.RoomPanel.Action;
@@ -77,11 +78,6 @@ public class RoomSidebar extends Panel {
        private final ConfirmableAjaxBorder confirmKick;
        private boolean showFiles;
        private Client kickedClient;
-       public enum Pod {
-               none
-               , right
-               , left
-       };
        private final ListView<Client> users = new ListView<Client>("user", new 
ArrayList<Client>()) {
                private static final long serialVersionUID = 1L;
 
@@ -172,11 +168,22 @@ public class RoomSidebar extends Panel {
                                if (c == null) {
                                        return;
                                }
+                               if (!activityAllowed(c, a, room.getRoom()) && 
room.getClient().hasRight(Right.moderator)) {
+                                       if (a == Activity.broadcastA || a == 
Activity.broadcastAV) {
+                                               
c.getRights().add(Room.Right.audio);
+                                       }
+                                       if (!room.getRoom().isAudioOnly() && (a 
== Activity.broadcastV || a == Activity.broadcastAV)) {
+                                               
c.getRights().add(Room.Right.video);
+                                       }
+                               }
                                if (activityAllowed(c, a, room.getRoom())) {
-                                       if (c.hasActivity(a)) {
-                                               c.getActivities().remove(a);
+                                       Pod pod = c.getPod();
+                                       
c.setPod(getRequest().getRequestParameters().getParameterValue(PARAM_POD).toOptionalInteger());
+                                       if (pod != Pod.none && pod != 
c.getPod()) {
+                                               //pod has changed, no need to 
toggle
+                                               c.set(a);
                                        } else {
-                                               c.getActivities().add(a);
+                                               c.toggle(a);
                                        }
                                        room.broadcast(target, c);
                                }
@@ -190,7 +197,7 @@ public class RoomSidebar extends Panel {
                super(id);
                this.room = room;
                updateShowFiles();
-               
+
                userTab = new ITab() {
                        private static final long serialVersionUID = 1L;
 
@@ -300,17 +307,20 @@ public class RoomSidebar extends Panel {
        }
 
        public static boolean activityAllowed(Client c, Activity a, Room room) {
+               boolean r = false;
                switch (a) {
-                       case broadcastAudio:
-                               return c.hasRight(Right.audio);
-                       case broadcastVideo:
-                               {
-                                       if (room.isAudioOnly()) {
-                                               return false;
-                                       }
-                                       return c.hasRight(Right.video);
-                               }
+                       case broadcastA:
+                               r = c.hasRight(Right.audio);
+                               break;
+                       case broadcastV:
+                               r = !room.isAudioOnly() && 
c.hasRight(Right.video);
+                               break;
+                       case broadcastAV:
+                               r = !room.isAudioOnly() && 
c.hasRight(Right.audio) && c.hasRight(Right.video);
+                               break;
+                       default:
+                               break;
                }
-               return false;
+               return r;
        }
 }

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/CamActivityIcon.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/CamActivityIcon.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/CamActivityIcon.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/CamActivityIcon.java
 Wed Dec 14 09:57:18 2016
@@ -27,7 +27,7 @@ public class CamActivityIcon extends Roo
        private static final long serialVersionUID = 1L;
 
        public CamActivityIcon(String id, Client client, RoomPanel room) {
-               super(id, client, Activity.broadcastVideo, room);
+               super(id, client, Activity.broadcastV, room);
                mainCssClass = "activity cam ";
        }
 

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/MicActivityIcon.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/MicActivityIcon.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/MicActivityIcon.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/MicActivityIcon.java
 Wed Dec 14 09:57:18 2016
@@ -27,7 +27,7 @@ public class MicActivityIcon extends Roo
        private static final long serialVersionUID = 1L;
 
        public MicActivityIcon(String id, Client client, RoomPanel room) {
-               super(id, client, Activity.broadcastAudio, room);
+               super(id, client, Activity.broadcastA, room);
                mainCssClass = "activity mic ";
        }
 

Modified: 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/RoomActivityIcon.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/RoomActivityIcon.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/RoomActivityIcon.java
 (original)
+++ 
openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/RoomActivityIcon.java
 Wed Dec 14 09:57:18 2016
@@ -20,11 +20,12 @@ package org.apache.openmeetings.web.room
 
 import static 
org.apache.openmeetings.web.room.sidebar.RoomSidebar.FUNC_TOGGLE_ACTIVITY;
 
+import org.apache.openmeetings.db.entity.room.Room;
 import org.apache.openmeetings.web.app.Client;
 import org.apache.openmeetings.web.app.Client.Activity;
+import org.apache.openmeetings.web.app.Client.Pod;
 import org.apache.openmeetings.web.room.RoomPanel;
 import org.apache.openmeetings.web.room.sidebar.RoomSidebar;
-import org.apache.openmeetings.web.room.sidebar.RoomSidebar.Pod;
 import org.apache.openmeetings.web.room.sidebar.icon.ClientIcon;
 
 public abstract class RoomActivityIcon extends ClientIcon {
@@ -44,7 +45,8 @@ public abstract class RoomActivityIcon e
        }
 
        protected boolean visible() {
-               return RoomSidebar.activityAllowed(client, activity, 
room.getRoom());
+               return Room.Type.interview != room.getRoom().getType()
+                               && RoomSidebar.activityAllowed(client, 
activity, room.getRoom());
        }
 
        @Override

Modified: 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/MobileService.java
 Wed Dec 14 09:57:18 2016
@@ -23,6 +23,7 @@ import static org.apache.openmeetings.ut
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_OAUTH_REGISTER_KEY;
 import static 
org.apache.openmeetings.util.OpenmeetingsVariables.CONFIG_SOAP_REGISTER_KEY;
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
+import static 
org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter.nextBroadCastId;
 import static org.apache.openmeetings.util.LocaleHelper.getCountryName;
 
 import java.util.ArrayList;
@@ -303,7 +304,7 @@ public class MobileService {
                User u = userDao.get(userId);
                Client c = scopeAdapter.setUsernameReconnect(SID, userId, 
u.getLogin(), u.getFirstname(), u.getLastname(), u.getPictureuri());
                 //TODO check if we need anything here
-               long broadcastId = scopeAdapter.getBroadCastId();
+               long broadcastId = nextBroadCastId();
                c.setSipTransport(true);
                c.setRoomId(Long.parseLong(c.getScope()));
                c.setRoomEnter(new Date());
@@ -333,7 +334,7 @@ public class MobileService {
                hsm.put("message", new String[]{"avsettings", "0", avMode});
                Map<String, Object> result = new Hashtable<String, Object>();
                if (!"n".equals(avMode)) {
-                       result.put("broadcastId", 
scopeAdapter.getBroadCastId());
+                       result.put("broadcastId", nextBroadCastId());
                }
 
                
scopeAdapter.sendMessageToCurrentScope("sendVarsToMessageWithClient", hsm, 
true, false);

Modified: 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
 Wed Dec 14 09:57:18 2016
@@ -990,27 +990,6 @@ public class ScopeApplicationAdapter ext
        }
 
        /**
-        * there will be set an attribute called "broadCastCounter" this is the 
name
-        * this user will publish his stream
-        * 
-        * @return long broadCastId
-        */
-       public long getBroadCastId() {
-               try {
-                       log.debug("-----------  getBroadCastId");
-                       IConnection current = Red5.getConnectionLocal();
-                       String streamid = current.getClient().getId();
-                       Client client = 
sessionManager.getClientByStreamId(streamid, null);
-                       client.setBroadCastID(nextBroadCastId());
-                       sessionManager.updateClientByStreamId(streamid, client, 
false, null);
-                       return client.getBroadCastID();
-               } catch (Exception err) {
-                       log.error("[getBroadCastId]", err);
-               }
-               return -1;
-       }
-
-       /**
         * this must be set _after_ the Video/Audio-Settings have been chosen 
(see
         * editrecordstream.lzx) but _before_ anything else happens, it cannot 
be
         * applied _after_ the stream has started! 
@@ -1025,32 +1004,29 @@ public class ScopeApplicationAdapter ext
         * @param vWidth
         * @param vHeight
         * 
-        * @return RoomClient being updated in case of no errors, null otherwise
+        * @return BroadcastId in case of no errors, -1 otherwise
         */
-       public Client setUserAVSettings(String avsettings, Integer vWidth, 
Integer vHeight) {
+       public long setUserAVSettings(String avsettings, Integer vWidth, 
Integer vHeight, boolean updateBroadcastId) {
                try {
                        String streamid = 
Red5.getConnectionLocal().getClient().getId();
-                       log.debug("-----------  setUserAVSettings {} {} {}", 
new Object[] {streamid, avsettings});
+                       log.debug("-----------  setUserAVSettings {} {}", 
streamid, avsettings);
                        Client currentClient = 
sessionManager.getClientByStreamId(streamid, null);
                        if (currentClient == null) {
                                log.warn("Failed to find appropriate clients");
-                               return null;
+                               return -1;
                        }
                        currentClient.setAvsettings(avsettings);
                        currentClient.setVWidth(vWidth);
                        currentClient.setVHeight(vHeight);
+                       if (updateBroadcastId) {
+                               currentClient.setBroadCastID(nextBroadCastId());
+                       }
                        sessionManager.updateAVClientByStreamId(streamid, 
currentClient, null);
-
-                       HashMap<String, Object> hsm = new HashMap<>();
-                       hsm.put("client", currentClient);
-                       hsm.put("message", new Object[]{"avsettings", 0, 
avsettings});
-
-                       
sendMessageToCurrentScope("sendVarsToMessageWithClient", hsm, true);
-                       return currentClient;
+                       return currentClient.getBroadCastID();
                } catch (Exception err) {
                        log.error("[setUserAVSettings]", err);
                }
-               return null;
+               return -1;
        }
 
        /*

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Application.java
 Wed Dec 14 09:57:18 2016
@@ -51,6 +51,7 @@ import org.apache.openmeetings.db.entity
 import org.apache.openmeetings.db.entity.user.User.Type;
 import org.apache.openmeetings.util.InitializationContainer;
 import org.apache.openmeetings.web.app.Client.Activity;
+import org.apache.openmeetings.web.app.Client.Pod;
 import org.apache.openmeetings.web.pages.AccessDeniedPage;
 import org.apache.openmeetings.web.pages.ActivatePage;
 import org.apache.openmeetings.web.pages.HashPage;
@@ -231,16 +232,19 @@ public class Application extends Authent
                        
rcl.setIsSuperModerator(client.hasRight(Right.superModerator));
                        rcl.setIsMod(client.hasRight(Right.moderator));
                        rcl.setIsBroadcasting(client.hasRight(Right.audio));
-                       rcl.setCanVideo(client.hasRight(Right.video) && 
client.hasActivity(Activity.broadcastVideo));
+                       rcl.setCanVideo(client.hasRight(Right.video) && 
client.hasActivity(Activity.broadcastV));
                        rcl.setCanDraw(client.hasRight(Right.whiteBoard));
-                       if (client.hasActivity(Activity.broadcastAudio) || 
client.hasActivity(Activity.broadcastVideo)) {
+                       if (client.hasActivity(Activity.broadcastA) || 
client.hasActivity(Activity.broadcastV)) {
+                               if (client.getPod() != Pod.none) {
+                                       rcl.setInterviewPodId(client.getPod() 
== Pod.left ? 1 : 2);
+                               }
                                rcl.setIsBroadcasting(true);
                                
rcl.setBroadCastID(ScopeApplicationAdapter.nextBroadCastId());
                                StringBuilder sb = new StringBuilder();
-                               if 
(client.hasActivity(Activity.broadcastAudio)) {
+                               if (client.hasActivity(Activity.broadcastA)) {
                                        sb.append('a');
                                }
-                               if 
(client.hasActivity(Activity.broadcastVideo)) {
+                               if (client.hasActivity(Activity.broadcastV)) {
                                        sb.append('v');
                                }
                                rcl.setAvsettings(sb.toString());

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/app/Client.java
 Wed Dec 14 09:57:18 2016
@@ -40,14 +40,18 @@ public class Client implements IDataProv
        private static final long serialVersionUID = 1L;
 
        public enum Activity {
-               broadcastAudio //sends Audio to the room
-               , broadcastVideo //sends Video to the room
+               broadcastA //sends Audio to the room
+               , broadcastV //sends Video to the room
+               , broadcastAV //sends Audio+Video to the room
                , share
                , record
                , publish //sends A/V to external server
                , muted
                , exclusive
        }
+       public enum Pod {
+               none, left, right;
+       }
        private final String sessionId;
        private int pageId;
        private final User user;
@@ -56,6 +60,7 @@ public class Client implements IDataProv
        private final Set<Right> rights = new HashSet<>();
        private final Set<Activity> activities = new HashSet<>();
        private final Date connectedSince;
+       private Pod pod;
 
        public Client(String sessionId, Long userId) {
                this(sessionId, 0, userId);
@@ -113,8 +118,48 @@ public class Client implements IDataProv
                return activities;
        }
 
-       public boolean hasActivity(Activity activity) {
-               return activities.contains(activity);
+       public boolean hasActivity(Activity a) {
+               return activities.contains(a);
+       }
+
+       public void toggle(Activity a) {
+               if (hasActivity(a)) {
+                       remove(a);
+               } else {
+                       set(a);
+               }
+       }
+
+       public void set(Activity a) {
+               activities.add(a);
+               switch (a) {
+                       case broadcastV:
+                       case broadcastA:
+                               if (hasActivity(Activity.broadcastA) && 
hasActivity(Activity.broadcastV)) {
+                                       activities.add(Activity.broadcastAV);
+                               }
+                               break;
+                       case broadcastAV:
+                               activities.add(Activity.broadcastA);
+                               activities.add(Activity.broadcastV);
+                               break;
+                       default:
+               }
+       }
+
+       public void remove(Activity a) {
+               activities.remove(a);
+               switch (a) {
+                       case broadcastV:
+                       case broadcastA:
+                               activities.remove(Activity.broadcastAV);
+                               break;
+                       case broadcastAV:
+                               activities.remove(Activity.broadcastA);
+                               activities.remove(Activity.broadcastV);
+                               break;
+                       default:
+               }
        }
 
        public Date getConnectedSince() {
@@ -139,6 +184,18 @@ public class Client implements IDataProv
                return this;
        }
 
+       public Pod getPod() {
+               return pod;
+       }
+
+       public void setPod(Integer i) {
+               if (i != null && i.intValue() > 0) {
+                       this.pod = i.intValue() == 1 ? Pod.left : Pod.right;
+               } else {
+                       this.pod = Pod.none;
+               }
+       }
+
        @Override
        public int hashCode() {
                final int prime = 31;
@@ -172,6 +229,6 @@ public class Client implements IDataProv
        @Override
        public String toString() {
                return "Client [uid=" + uid + ", sessionId=" + sessionId + ", 
pageId=" + pageId + ", userId=" + user.getId() + ", roomId=" + roomId
-                               + ", rights=" + rights + ", activities=" + 
activities + ", connectedSince=" + connectedSince + "]";
+                               + ", rights=" + rights + ", activities=" + 
activities + ", connectedSince=" + connectedSince + ", pod = " + pod + "]";
        }
 }

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/RoomSidebar.java
 Wed Dec 14 09:57:18 2016
@@ -32,6 +32,7 @@ import org.apache.openmeetings.db.entity
 import org.apache.openmeetings.db.entity.room.Room.RoomElement;
 import org.apache.openmeetings.web.app.Client;
 import org.apache.openmeetings.web.app.Client.Activity;
+import org.apache.openmeetings.web.app.Client.Pod;
 import org.apache.openmeetings.web.common.ConfirmableAjaxBorder;
 import org.apache.openmeetings.web.room.RoomPanel;
 import org.apache.openmeetings.web.room.RoomPanel.Action;
@@ -77,11 +78,6 @@ public class RoomSidebar extends Panel {
        private final ConfirmableAjaxBorder confirmKick;
        private boolean showFiles;
        private Client kickedClient;
-       public enum Pod {
-               none
-               , right
-               , left
-       };
        private final ListView<Client> users = new ListView<Client>("user", new 
ArrayList<Client>()) {
                private static final long serialVersionUID = 1L;
 
@@ -172,11 +168,22 @@ public class RoomSidebar extends Panel {
                                if (c == null) {
                                        return;
                                }
+                               if (!activityAllowed(c, a, room.getRoom()) && 
room.getClient().hasRight(Right.moderator)) {
+                                       if (a == Activity.broadcastA || a == 
Activity.broadcastAV) {
+                                               
c.getRights().add(Room.Right.audio);
+                                       }
+                                       if (!room.getRoom().isAudioOnly() && (a 
== Activity.broadcastV || a == Activity.broadcastAV)) {
+                                               
c.getRights().add(Room.Right.video);
+                                       }
+                               }
                                if (activityAllowed(c, a, room.getRoom())) {
-                                       if (c.hasActivity(a)) {
-                                               c.getActivities().remove(a);
+                                       Pod pod = c.getPod();
+                                       
c.setPod(getRequest().getRequestParameters().getParameterValue(PARAM_POD).toOptionalInteger());
+                                       if (pod != Pod.none && pod != 
c.getPod()) {
+                                               //pod has changed, no need to 
toggle
+                                               c.set(a);
                                        } else {
-                                               c.getActivities().add(a);
+                                               c.toggle(a);
                                        }
                                        room.broadcast(target, c);
                                }
@@ -190,7 +197,7 @@ public class RoomSidebar extends Panel {
                super(id);
                this.room = room;
                updateShowFiles();
-               
+
                userTab = new ITab() {
                        private static final long serialVersionUID = 1L;
 
@@ -300,17 +307,20 @@ public class RoomSidebar extends Panel {
        }
 
        public static boolean activityAllowed(Client c, Activity a, Room room) {
+               boolean r = false;
                switch (a) {
-                       case broadcastAudio:
-                               return c.hasRight(Right.audio);
-                       case broadcastVideo:
-                               {
-                                       if (room.isAudioOnly()) {
-                                               return false;
-                                       }
-                                       return c.hasRight(Right.video);
-                               }
+                       case broadcastA:
+                               r = c.hasRight(Right.audio);
+                               break;
+                       case broadcastV:
+                               r = !room.isAudioOnly() && 
c.hasRight(Right.video);
+                               break;
+                       case broadcastAV:
+                               r = !room.isAudioOnly() && 
c.hasRight(Right.audio) && c.hasRight(Right.video);
+                               break;
+                       default:
+                               break;
                }
-               return false;
+               return r;
        }
 }

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/CamActivityIcon.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/CamActivityIcon.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/CamActivityIcon.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/CamActivityIcon.java
 Wed Dec 14 09:57:18 2016
@@ -27,7 +27,7 @@ public class CamActivityIcon extends Roo
        private static final long serialVersionUID = 1L;
 
        public CamActivityIcon(String id, Client client, RoomPanel room) {
-               super(id, client, Activity.broadcastVideo, room);
+               super(id, client, Activity.broadcastV, room);
                mainCssClass = "activity cam ";
        }
 

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/MicActivityIcon.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/MicActivityIcon.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/MicActivityIcon.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/MicActivityIcon.java
 Wed Dec 14 09:57:18 2016
@@ -27,7 +27,7 @@ public class MicActivityIcon extends Roo
        private static final long serialVersionUID = 1L;
 
        public MicActivityIcon(String id, Client client, RoomPanel room) {
-               super(id, client, Activity.broadcastAudio, room);
+               super(id, client, Activity.broadcastA, room);
                mainCssClass = "activity mic ";
        }
 

Modified: 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/RoomActivityIcon.java
URL: 
http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/RoomActivityIcon.java?rev=1774157&r1=1774156&r2=1774157&view=diff
==============================================================================
--- 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/RoomActivityIcon.java
 (original)
+++ 
openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/icon/activity/RoomActivityIcon.java
 Wed Dec 14 09:57:18 2016
@@ -20,11 +20,12 @@ package org.apache.openmeetings.web.room
 
 import static 
org.apache.openmeetings.web.room.sidebar.RoomSidebar.FUNC_TOGGLE_ACTIVITY;
 
+import org.apache.openmeetings.db.entity.room.Room;
 import org.apache.openmeetings.web.app.Client;
 import org.apache.openmeetings.web.app.Client.Activity;
+import org.apache.openmeetings.web.app.Client.Pod;
 import org.apache.openmeetings.web.room.RoomPanel;
 import org.apache.openmeetings.web.room.sidebar.RoomSidebar;
-import org.apache.openmeetings.web.room.sidebar.RoomSidebar.Pod;
 import org.apache.openmeetings.web.room.sidebar.icon.ClientIcon;
 
 public abstract class RoomActivityIcon extends ClientIcon {
@@ -44,7 +45,8 @@ public abstract class RoomActivityIcon e
        }
 
        protected boolean visible() {
-               return RoomSidebar.activityAllowed(client, activity, 
room.getRoom());
+               return Room.Type.interview != room.getRoom().getType()
+                               && RoomSidebar.activityAllowed(client, 
activity, room.getRoom());
        }
 
        @Override


Reply via email to