gotCallFeedsForInvite method
Implementation
Future<void> gotCallFeedsForInvite(List<WrappedMediaStream> callFeeds,
[bool requestScreenshareFeed = false]) async {
if (successor != null) {
await successor!.gotCallFeedsForAnswer(callFeeds);
return;
}
if (state == CallState.kEnded) {
await cleanUp();
return;
}
for (final element in callFeeds) {
await addLocalStream(await element.stream!.clone(), element.purpose);
}
if (requestScreenshareFeed) {
await pc!.addTransceiver(
kind: RTCRtpMediaType.RTCRtpMediaTypeVideo,
init:
RTCRtpTransceiverInit(direction: TransceiverDirection.RecvOnly));
}
setCallState(CallState.kCreateOffer);
Logs().d('gotUserMediaForInvite');
// Now we wait for the negotiationneeded event
}