mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 04:29:45 +01:00
Merge pull request #2503 from nextcloud/fix-remote-participants-display-with-both-video-and-screen-share
Fix remote participants display with both video and screen share
This commit is contained in:
commit
e9aa9f2764
@ -2087,8 +2087,9 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
if (!(peerConnectionWrappers = getPeerConnectionWrapperListForSessionId(sessionId)).isEmpty()) {
|
if (!(peerConnectionWrappers = getPeerConnectionWrapperListForSessionId(sessionId)).isEmpty()) {
|
||||||
for (PeerConnectionWrapper peerConnectionWrapper : peerConnectionWrappers) {
|
for (PeerConnectionWrapper peerConnectionWrapper : peerConnectionWrappers) {
|
||||||
if (peerConnectionWrapper.getSessionId().equals(sessionId)) {
|
if (peerConnectionWrapper.getSessionId().equals(sessionId)) {
|
||||||
if (VIDEO_STREAM_TYPE_SCREEN.equals(peerConnectionWrapper.getVideoStreamType()) || !justScreen) {
|
String videoStreamType = peerConnectionWrapper.getVideoStreamType();
|
||||||
runOnUiThread(() -> removeMediaStream(sessionId));
|
if (VIDEO_STREAM_TYPE_SCREEN.equals(videoStreamType) || !justScreen) {
|
||||||
|
runOnUiThread(() -> removeMediaStream(sessionId, videoStreamType));
|
||||||
deletePeerConnection(peerConnectionWrapper);
|
deletePeerConnection(peerConnectionWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2096,9 +2097,9 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeMediaStream(String sessionId) {
|
private void removeMediaStream(String sessionId, String videoStreamType) {
|
||||||
Log.d(TAG, "removeMediaStream");
|
Log.d(TAG, "removeMediaStream");
|
||||||
participantDisplayItems.remove(sessionId);
|
participantDisplayItems.remove(sessionId + "-" + videoStreamType);
|
||||||
|
|
||||||
if (!isDestroyed()) {
|
if (!isDestroyed()) {
|
||||||
initGridAdapter();
|
initGridAdapter();
|
||||||
@ -2409,7 +2410,7 @@ public class CallActivity extends CallBaseActivity {
|
|||||||
videoStreamType,
|
videoStreamType,
|
||||||
videoStreamEnabled,
|
videoStreamEnabled,
|
||||||
rootEglBase);
|
rootEglBase);
|
||||||
participantDisplayItems.put(session, participantDisplayItem);
|
participantDisplayItems.put(session + "-" + videoStreamType, participantDisplayItem);
|
||||||
|
|
||||||
initGridAdapter();
|
initGridAdapter();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user