From ed54b9f03aecd64ee56823a1aec436b3ecb06cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Tue, 15 Nov 2022 21:48:48 +0100 Subject: [PATCH] Fix video stream type not included in PeerConnectionEvent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- .../nextcloud/talk/webrtc/PeerConnectionWrapper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/webrtc/PeerConnectionWrapper.java b/app/src/main/java/com/nextcloud/talk/webrtc/PeerConnectionWrapper.java index b1d1ff8d0..f0597f5a7 100644 --- a/app/src/main/java/com/nextcloud/talk/webrtc/PeerConnectionWrapper.java +++ b/app/src/main/java/com/nextcloud/talk/webrtc/PeerConnectionWrapper.java @@ -345,7 +345,7 @@ public class PeerConnectionWrapper { Log.d("iceConnectionChangeTo: ", iceConnectionState.name() + " over " + peerConnection.hashCode() + " " + sessionId); if (iceConnectionState == PeerConnection.IceConnectionState.CONNECTED) { EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType.PEER_CONNECTED, - sessionId, null, null, null)); + sessionId, null, null, videoStreamType)); if (!isMCUPublisher) { EventBus.getDefault().post(new MediaStreamEvent(remoteStream, sessionId, videoStreamType)); @@ -356,7 +356,7 @@ public class PeerConnectionWrapper { } } else if (iceConnectionState == PeerConnection.IceConnectionState.COMPLETED) { EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType.PEER_CONNECTED, - sessionId, null, null, null)); + sessionId, null, null, videoStreamType)); } else if (iceConnectionState == PeerConnection.IceConnectionState.CLOSED) { EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType .PEER_CLOSED, sessionId, null, null, videoStreamType)); @@ -364,12 +364,12 @@ public class PeerConnectionWrapper { iceConnectionState == PeerConnection.IceConnectionState.NEW || iceConnectionState == PeerConnection.IceConnectionState.CHECKING) { EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType.PEER_DISCONNECTED, - sessionId, null, null, null)); + sessionId, null, null, videoStreamType)); } else if (iceConnectionState == PeerConnection.IceConnectionState.FAILED) { EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType.PEER_DISCONNECTED, - sessionId, null, null, null)); + sessionId, null, null, videoStreamType)); if (isMCUPublisher) { - EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType.PUBLISHER_FAILED, sessionId, null, null, null)); + EventBus.getDefault().post(new PeerConnectionEvent(PeerConnectionEvent.PeerConnectionEventType.PUBLISHER_FAILED, sessionId, null, null, videoStreamType)); } } }