mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-31 11:32:00 +00: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);
|
||||
break;
|
||||
case "endOfCandidates":
|
||||
//peerConnectionWrapper.drainIceCandidates();
|
||||
peerConnectionWrapper.drainIceCandidates();
|
||||
peerConnectionWrapper.sendLocalCandidates();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -588,20 +589,30 @@ public class CallActivity extends AppCompatActivity {
|
||||
|
||||
private void gotRemoteStream(MediaStream stream) {
|
||||
//we have remote video stream. add to the renderer.
|
||||
if (stream.videoTracks.size() == 1 && stream.audioTracks.size() == 1) {
|
||||
final VideoTrack videoTrack = stream.videoTracks.get(0);
|
||||
AudioTrack audioTrack = stream.audioTracks.get(0);
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
remoteRenderer = new VideoRenderer(fullScreenVideoView);
|
||||
videoTrack.addRenderer(remoteRenderer);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (stream.videoTracks.size() < 2 && stream.audioTracks.size() < 2) {
|
||||
if (stream.videoTracks.size() == 1) {
|
||||
|
||||
VideoTrack videoTrack = stream.videoTracks.get(0);
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (stream.videoTracks.size() == 1) {
|
||||
try {
|
||||
remoteRenderer = new VideoRenderer(fullScreenVideoView);
|
||||
videoTrack.addRenderer(remoteRenderer);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (stream.audioTracks.size() == 1) {
|
||||
AudioTrack audioTrack = stream.audioTracks.get(0);
|
||||
Log.d("MARIO", "BL");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -152,11 +152,9 @@ public class PeerConnectionWrapper {
|
||||
("offer"))) {
|
||||
EventBus.getDefault().post(new SessionDescriptionSendEvent(peerConnection.getLocalDescription(), sessionId,
|
||||
peerConnection.getLocalDescription().type.canonicalForm(), null));
|
||||
} else {
|
||||
if (peerConnection.getRemoteDescription() != null) {
|
||||
drainIceCandidates();
|
||||
sendLocalCandidates();
|
||||
}
|
||||
} else if (peerConnection.getRemoteDescription() != null) {
|
||||
drainIceCandidates();
|
||||
sendLocalCandidates();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user