Browse Source

add comments where to implement the raise hand signaling message

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 2 years ago
parent
commit
2637884a83

+ 16 - 16
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java

@@ -421,6 +421,22 @@ public class CallActivity extends CallBaseActivity {
             } else if (viewState instanceof RaiseHandViewModel.LoweredHandState) {
                 binding.lowerHandButton.setVisibility(View.GONE);
             }
+
+            // TODO: build&send raiseHand message (if not possible in RaiseHandViewModel, just do it here..)
+//        if (isConnectionEstablished() && peerConnectionWrapperList != null) {
+//            if (!hasMCU) {
+//                for (PeerConnectionWrapper peerConnectionWrapper : peerConnectionWrapperList) {
+//                    peerConnectionWrapper.raiseHand(...);
+//                }
+//            } else {
+//                for (PeerConnectionWrapper peerConnectionWrapper : peerConnectionWrapperList) {
+//                    if (peerConnectionWrapper.getSessionId().equals(webSocketClient.getSessionId())) {
+//                        peerConnectionWrapper.raiseHand(...);
+//                        break;
+//                    }
+//                }
+//            }
+//        }
         });
 
         callRecordingViewModel = new ViewModelProvider(this, viewModelFactory).get((CallRecordingViewModel.class));
@@ -1248,22 +1264,6 @@ public class CallActivity extends CallBaseActivity {
 
     public void clickRaiseOrLowerHandButton() {
         raiseHandViewModel.clickHandButton();
-
-        // TODO: fix how to build&send the message
-//        if (isConnectionEstablished() && peerConnectionWrapperList != null) {
-//            if (!hasMCU) {
-//                for (PeerConnectionWrapper peerConnectionWrapper : peerConnectionWrapperList) {
-//                    peerConnectionWrapper.raiseHand(raise);
-//                }
-//            } else {
-//                for (PeerConnectionWrapper peerConnectionWrapper : peerConnectionWrapperList) {
-//                    if (peerConnectionWrapper.getSessionId().equals(webSocketClient.getSessionId())) {
-//                        peerConnectionWrapper.raiseHand(raise);
-//                        break;
-//                    }
-//                }
-//            }
-//        }
     }
 
 

+ 1 - 2
app/src/main/java/com/nextcloud/talk/webrtc/PeerConnectionWrapper.java

@@ -191,8 +191,7 @@ public class PeerConnectionWrapper {
     }
 
     public void raiseHand(Boolean raise) {
-
-        // TODO: fix how to build&send the message
+        // TODO: build&send raiseHand message (either here or via RaiseHandViewModel)
 //        NCMessagePayload ncMessagePayload = new NCMessagePayload();
 //        ncMessagePayload.setState(raise);
 //        ncMessagePayload.setTimestamp(System.currentTimeMillis());