mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
Fix stuff
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
c09e08c7fd
commit
f00f01c175
@ -446,7 +446,8 @@ public class CallActivity extends AppCompatActivity {
|
|||||||
peerConnectionWrapper.addCandidate(iceCandidate);
|
peerConnectionWrapper.addCandidate(iceCandidate);
|
||||||
break;
|
break;
|
||||||
case "endOfCandidates":
|
case "endOfCandidates":
|
||||||
//peerConnectionWrapper.drainIceCandidates();
|
peerConnectionWrapper.drainIceCandidates();
|
||||||
|
peerConnectionWrapper.sendLocalCandidates();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -588,12 +589,14 @@ public class CallActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
private void gotRemoteStream(MediaStream stream) {
|
private void gotRemoteStream(MediaStream stream) {
|
||||||
//we have remote video stream. add to the renderer.
|
//we have remote video stream. add to the renderer.
|
||||||
if (stream.videoTracks.size() == 1 && stream.audioTracks.size() == 1) {
|
if (stream.videoTracks.size() < 2 && stream.audioTracks.size() < 2) {
|
||||||
final VideoTrack videoTrack = stream.videoTracks.get(0);
|
if (stream.videoTracks.size() == 1) {
|
||||||
AudioTrack audioTrack = stream.audioTracks.get(0);
|
|
||||||
|
VideoTrack videoTrack = stream.videoTracks.get(0);
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
if (stream.videoTracks.size() == 1) {
|
||||||
try {
|
try {
|
||||||
remoteRenderer = new VideoRenderer(fullScreenVideoView);
|
remoteRenderer = new VideoRenderer(fullScreenVideoView);
|
||||||
videoTrack.addRenderer(remoteRenderer);
|
videoTrack.addRenderer(remoteRenderer);
|
||||||
@ -601,7 +604,15 @@ public class CallActivity extends AppCompatActivity {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stream.audioTracks.size() == 1) {
|
||||||
|
AudioTrack audioTrack = stream.audioTracks.get(0);
|
||||||
|
Log.d("MARIO", "BL");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -152,13 +152,11 @@ public class PeerConnectionWrapper {
|
|||||||
("offer"))) {
|
("offer"))) {
|
||||||
EventBus.getDefault().post(new SessionDescriptionSendEvent(peerConnection.getLocalDescription(), sessionId,
|
EventBus.getDefault().post(new SessionDescriptionSendEvent(peerConnection.getLocalDescription(), sessionId,
|
||||||
peerConnection.getLocalDescription().type.canonicalForm(), null));
|
peerConnection.getLocalDescription().type.canonicalForm(), null));
|
||||||
} else {
|
} else if (peerConnection.getRemoteDescription() != null) {
|
||||||
if (peerConnection.getRemoteDescription() != null) {
|
|
||||||
drainIceCandidates();
|
drainIceCandidates();
|
||||||
sendLocalCandidates();
|
sendLocalCandidates();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user