mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 17:08:34 +03:00
Fix a few bugs
This commit is contained in:
parent
8c0050ee3b
commit
54144b1c8c
2 changed files with 15 additions and 7 deletions
|
@ -1390,10 +1390,6 @@ public class CallController extends BaseController {
|
|||
|
||||
@Override
|
||||
public void onNext(GenericOverall genericOverall) {
|
||||
if (externalSignalingServer != null) {
|
||||
webSocketClient.joinRoomWithRoomToken("");
|
||||
}
|
||||
|
||||
if (getActivity() != null) {
|
||||
getActivity().finish();
|
||||
}
|
||||
|
@ -1514,12 +1510,21 @@ public class CallController extends BaseController {
|
|||
} else {
|
||||
hasMCU = webSocketClient != null && webSocketClient.hasMCU();
|
||||
|
||||
MediaConstraints mediaConstraintsToUse;
|
||||
|
||||
if (hasMCU) {
|
||||
mediaConstraintsToUse = sdpConstraintsForMCU;
|
||||
} else {
|
||||
mediaConstraintsToUse = sdpConstraints;
|
||||
|
||||
}
|
||||
|
||||
if (sessionId.equals(callSession)) {
|
||||
magicPeerConnectionWrapper = new MagicPeerConnectionWrapper(peerConnectionFactory,
|
||||
iceServers, sdpConstraintsForMCU, sessionId, callSession, localMediaStream, hasMCU);
|
||||
iceServers, mediaConstraintsToUse, sessionId, callSession, localMediaStream, hasMCU);
|
||||
} else {
|
||||
magicPeerConnectionWrapper = new MagicPeerConnectionWrapper(peerConnectionFactory,
|
||||
iceServers, sdpConstraintsForMCU, sessionId, callSession, null, hasMCU);
|
||||
iceServers, mediaConstraintsToUse, sessionId, callSession, null, hasMCU);
|
||||
}
|
||||
|
||||
magicPeerConnectionWrapperList.add(magicPeerConnectionWrapper);
|
||||
|
|
|
@ -50,6 +50,8 @@ import java.nio.ByteBuffer;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class MagicPeerConnectionWrapper {
|
||||
private static String TAG = "MagicPeerConnectionWrapper";
|
||||
List<IceCandidate> iceCandidates = new ArrayList<>();
|
||||
|
@ -72,7 +74,7 @@ public class MagicPeerConnectionWrapper {
|
|||
public MagicPeerConnectionWrapper(PeerConnectionFactory peerConnectionFactory,
|
||||
List<PeerConnection.IceServer> iceServerList,
|
||||
MediaConstraints mediaConstraints,
|
||||
String sessionId, String localSession, MediaStream mediaStream,
|
||||
String sessionId, String localSession, @Nullable MediaStream mediaStream,
|
||||
boolean hasMCU) {
|
||||
|
||||
this.localMediaStream = mediaStream;
|
||||
|
@ -346,6 +348,7 @@ public class MagicPeerConnectionWrapper {
|
|||
|
||||
EventBus.getDefault().post(new SessionDescriptionSendEvent(sessionDescriptionWithPreferredCodec, sessionId,
|
||||
sessionDescription.type.canonicalForm().toLowerCase(), null));
|
||||
|
||||
if (peerConnection != null) {
|
||||
peerConnection.setLocalDescription(magicSdpObserver, sessionDescriptionWithPreferredCodec);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue