On network reconnection, we are trying to create an offer with a parameter : iceRestart : true. But, at the receiver user its throwing an error -> InvalidStateError: Failed to set remote offer sdp: Called in wrong state: kHaveLocalOffer. Basically, its trying to create a new offer instead of restarting the existing connection. What is the correct way to implement iceRestart in createOffer method?
usage :
self.constraints = [[RTCMediaConstraints alloc] initWithMandatoryConstraints:
@[
[[RTCPair alloc] initWithKey:@"OfferToReceiveAudio" value:@"true"],
[[RTCPair alloc] initWithKey:@"OfferToReceiveVideo" value:@"true"],
[[RTCPair alloc] initWithKey:@"iceRestart" value:@"true"]
] optionalConstraints:nil];
[_peerConnection createOfferWithDelegate:self constraints:self.constraints];
On network reconnection, we are trying to create an offer with a parameter : iceRestart : true. But, at the receiver user its throwing an error -> InvalidStateError: Failed to set remote offer sdp: Called in wrong state: kHaveLocalOffer. Basically, its trying to create a new offer instead of restarting the existing connection. What is the correct way to implement iceRestart in createOffer method?
usage :
self.constraints = [[RTCMediaConstraints alloc] initWithMandatoryConstraints:
@[
[[RTCPair alloc] initWithKey:@"OfferToReceiveAudio" value:@"true"],
[[RTCPair alloc] initWithKey:@"OfferToReceiveVideo" value:@"true"],
[[RTCPair alloc] initWithKey:@"iceRestart" value:@"true"]
] optionalConstraints:nil];