Refactoring how we are creating the answer so we don't need to wait for the client gathering all ice candidates.

This commit is contained in:
Filipi Fuchter
2025-03-24 11:12:41 -03:00
parent fee0409f63
commit fcb8b9a5b3
4 changed files with 35 additions and 15 deletions

View File

@@ -157,7 +157,7 @@ export class SmallWebRTCTransport {
await this.pc.setLocalDescription(offer);
// Wait for ICE gathering to complete
await new Promise<void>((resolve) => {
/*await new Promise<void>((resolve) => {
if (this.pc!.iceGatheringState === 'complete') {
resolve();
} else {
@@ -169,7 +169,7 @@ export class SmallWebRTCTransport {
};
this.pc!.addEventListener('icegatheringstatechange', checkState);
}
});
});*/
let offerSdp = this.pc!.localDescription!;
let codec: string;