replacedBy method
Implementation
void replacedBy(CallSession newCall) {
if (state == CallState.kWaitLocalMedia) {
Logs().v('Telling new call to wait for local media');
newCall.waitForLocalAVStream = true;
} else if (state == CallState.kCreateOffer ||
state == CallState.kInviteSent) {
Logs().v('Handing local stream to new call');
newCall.gotCallFeedsForAnswer(getLocalStreams);
}
successor = newCall;
onCallReplaced.add(newCall);
hangup(CallErrorCode.Replaced, true);
}