mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
Merge pull request #1114 from nextcloud/fix-own-peer-handling-when-hpb-is-used
Fix own peer handling when HPB is used
This commit is contained in:
commit
23883c582c
@ -1655,8 +1655,16 @@ public class CallController extends BaseController {
|
|||||||
List<String> newSessions = new ArrayList<>();
|
List<String> newSessions = new ArrayList<>();
|
||||||
Set<String> oldSesssions = new HashSet<>();
|
Set<String> oldSesssions = new HashSet<>();
|
||||||
|
|
||||||
|
hasMCU = hasExternalSignalingServer && webSocketClient != null && webSocketClient.hasMCU();
|
||||||
|
|
||||||
|
// The signaling session is the same as the Nextcloud session only when the MCU is not used.
|
||||||
|
String currentSessiondId = callSession;
|
||||||
|
if (hasMCU) {
|
||||||
|
currentSessiondId = webSocketClient.getSessionId();
|
||||||
|
}
|
||||||
|
|
||||||
for (HashMap<String, Object> participant : users) {
|
for (HashMap<String, Object> participant : users) {
|
||||||
if (!participant.get("sessionId").equals(callSession)) {
|
if (!participant.get("sessionId").equals(currentSessiondId)) {
|
||||||
Object inCallObject = participant.get("inCall");
|
Object inCallObject = participant.get("inCall");
|
||||||
boolean isNewSession;
|
boolean isNewSession;
|
||||||
if (inCallObject instanceof Boolean) {
|
if (inCallObject instanceof Boolean) {
|
||||||
@ -1693,10 +1701,13 @@ public class CallController extends BaseController {
|
|||||||
getPeersForCall();
|
getPeersForCall();
|
||||||
}
|
}
|
||||||
|
|
||||||
hasMCU = hasExternalSignalingServer && webSocketClient != null && webSocketClient.hasMCU();
|
if (hasMCU) {
|
||||||
|
// Ensure that own publishing peer is set up.
|
||||||
|
getPeerConnectionWrapperForSessionIdAndType(webSocketClient.getSessionId(), "video", true);
|
||||||
|
}
|
||||||
|
|
||||||
for (String sessionId : newSessions) {
|
for (String sessionId : newSessions) {
|
||||||
getPeerConnectionWrapperForSessionIdAndType(sessionId, "video", hasMCU && sessionId.equals(webSocketClient.getSessionId()));
|
getPeerConnectionWrapperForSessionIdAndType(sessionId, "video", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newSessions.size() > 0 && !currentCallStatus.equals(CallStatus.IN_CONVERSATION)) {
|
if (newSessions.size() > 0 && !currentCallStatus.equals(CallStatus.IN_CONVERSATION)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user