mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 05:55:39 +03:00
Fix peer connection
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
d0e85c746b
commit
0ba40ce519
2 changed files with 6 additions and 7 deletions
|
@ -171,7 +171,7 @@ public class CallActivity extends AppCompatActivity {
|
|||
initViews();
|
||||
|
||||
PermissionHelper permissionHelper = new PermissionHelper(this);
|
||||
permissionHelper.check(android.Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO,
|
||||
permissionHelper.check(Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO,
|
||||
Manifest.permission.MODIFY_AUDIO_SETTINGS, Manifest.permission.ACCESS_NETWORK_STATE,
|
||||
Manifest.permission.ACCESS_WIFI_STATE, Manifest.permission.INTERNET)
|
||||
.onSuccess(() -> {
|
||||
|
@ -555,6 +555,7 @@ public class CallActivity extends AppCompatActivity {
|
|||
endPeerConnection(magicPeerConnectionWrapperList.get(i).getSessionId());
|
||||
|
||||
}
|
||||
|
||||
for (MagicPeerConnectionWrapper magicPeerConnectionWrapper : magicPeerConnectionWrapperList) {
|
||||
endPeerConnection(magicPeerConnectionWrapper.getSessionId());
|
||||
}
|
||||
|
@ -716,6 +717,9 @@ public class CallActivity extends AppCompatActivity {
|
|||
if (remoteRenderersLayout.getChildCount() > 0) {
|
||||
for (int i = 0; i < remoteRenderersLayout.getChildCount(); i++) {
|
||||
if (remoteRenderersLayout.getChildAt(i).getTag().equals(sessionId)) {
|
||||
SurfaceViewRenderer surfaceViewRenderer = remoteRenderersLayout.getChildAt(i).findViewById(R.id
|
||||
.surface_view);
|
||||
surfaceViewRenderer.release();
|
||||
remoteRenderersLayout.removeViewAt(i);
|
||||
remoteRenderersLayout.invalidate();
|
||||
break;
|
||||
|
|
|
@ -47,7 +47,7 @@ import java.util.List;
|
|||
|
||||
public class MagicPeerConnectionWrapper {
|
||||
private static String TAG = "MagicPeerConnectionWrapper";
|
||||
private static PeerConnection peerConnection;
|
||||
private PeerConnection peerConnection;
|
||||
List<IceCandidate> iceCandidates = new ArrayList<>();
|
||||
private List<PeerConnection.IceServer> iceServers;
|
||||
private String sessionId;
|
||||
|
@ -120,15 +120,10 @@ public class MagicPeerConnectionWrapper {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public PeerConnection getPeerConnection() {
|
||||
return peerConnection;
|
||||
}
|
||||
|
||||
public static void setPeerConnection(PeerConnection peerConnection) {
|
||||
MagicPeerConnectionWrapper.peerConnection = peerConnection;
|
||||
}
|
||||
|
||||
public String getSessionId() {
|
||||
return sessionId;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue