hold back candidates until after content-add
This commit is contained in:
parent
7e9980d997
commit
17856a47db
|
@ -729,6 +729,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
|
||||||
+ ContentAddition.summary(contentAcceptMap));
|
+ ContentAddition.summary(contentAcceptMap));
|
||||||
modifyLocalContentMap(rtpContentMap);
|
modifyLocalContentMap(rtpContentMap);
|
||||||
sendContentAccept(contentAcceptMap);
|
sendContentAccept(contentAcceptMap);
|
||||||
|
this.webRTCWrapper.setIsReadyToReceiveIceCandidates(true);
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
Log.d(Config.LOGTAG, "unable to accept content add", Throwables.getRootCause(e));
|
Log.d(Config.LOGTAG, "unable to accept content add", Throwables.getRootCause(e));
|
||||||
webRTCWrapper.close();
|
webRTCWrapper.close();
|
||||||
|
@ -862,7 +863,6 @@ public class JingleRtpConnection extends AbstractJingleConnection
|
||||||
webRTCWrapper.setRemoteDescription(sdp).get();
|
webRTCWrapper.setRemoteDescription(sdp).get();
|
||||||
setRemoteContentMap(restartContentMap);
|
setRemoteContentMap(restartContentMap);
|
||||||
if (isOffer) {
|
if (isOffer) {
|
||||||
webRTCWrapper.setIsReadyToReceiveIceCandidates(false);
|
|
||||||
final SessionDescription localSessionDescription = setLocalSessionDescription();
|
final SessionDescription localSessionDescription = setLocalSessionDescription();
|
||||||
setLocalContentMap(RtpContentMap.of(localSessionDescription, isInitiator()));
|
setLocalContentMap(RtpContentMap.of(localSessionDescription, isInitiator()));
|
||||||
// We need to respond OK before sending any candidates
|
// We need to respond OK before sending any candidates
|
||||||
|
@ -2473,6 +2473,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
|
||||||
handleIqTimeoutResponse(response);
|
handleIqTimeoutResponse(response);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.webRTCWrapper.setIsReadyToReceiveIceCandidates(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setLocalContentMap(final RtpContentMap rtpContentMap) {
|
private void setLocalContentMap(final RtpContentMap rtpContentMap) {
|
||||||
|
|
|
@ -561,6 +561,7 @@ public class WebRTCWrapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
synchronized ListenableFuture<SessionDescription> setLocalDescription() {
|
synchronized ListenableFuture<SessionDescription> setLocalDescription() {
|
||||||
|
this.setIsReadyToReceiveIceCandidates(false);
|
||||||
return Futures.transformAsync(
|
return Futures.transformAsync(
|
||||||
getPeerConnectionFuture(),
|
getPeerConnectionFuture(),
|
||||||
peerConnection -> {
|
peerConnection -> {
|
||||||
|
|
Loading…
Reference in a new issue