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,20 +589,30 @@ 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);
|
|
||||||
runOnUiThread(new Runnable() {
|
VideoTrack videoTrack = stream.videoTracks.get(0);
|
||||||
@Override
|
runOnUiThread(new Runnable() {
|
||||||
public void run() {
|
@Override
|
||||||
try {
|
public void run() {
|
||||||
remoteRenderer = new VideoRenderer(fullScreenVideoView);
|
if (stream.videoTracks.size() == 1) {
|
||||||
videoTrack.addRenderer(remoteRenderer);
|
try {
|
||||||
} catch (Exception e) {
|
remoteRenderer = new VideoRenderer(fullScreenVideoView);
|
||||||
e.printStackTrace();
|
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"))) {
|
("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