@xtr-dev/rondevu-client 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,13 +16,16 @@ export class AnsweringState extends PeerState {
16
16
  type: 'offer',
17
17
  sdp: offerSdp
18
18
  });
19
- // Enable trickle ICE - set up handler before ICE gathering starts
20
- this.setupIceCandidateHandler();
21
19
  // Create answer
22
20
  const answer = await this.peer.pc.createAnswer();
23
- await this.peer.pc.setLocalDescription(answer); // ICE gathering starts here
24
- // Send answer to server immediately (don't wait for ICE)
21
+ // Send answer to server BEFORE setLocalDescription
22
+ // This registers us as the answerer so ICE candidates will be accepted
25
23
  await this.peer.offersApi.answer(offerId, answer.sdp);
24
+ // Enable trickle ICE - set up handler before ICE gathering starts
25
+ this.setupIceCandidateHandler();
26
+ // Set local description - ICE gathering starts here
27
+ // Server already knows we're the answerer, so candidates will be accepted
28
+ await this.peer.pc.setLocalDescription(answer);
26
29
  // Transition to exchanging ICE
27
30
  const { ExchangingIceState } = await import('./exchanging-ice-state.js');
28
31
  this.peer.setState(new ExchangingIceState(this.peer, offerId, options));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xtr-dev/rondevu-client",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "TypeScript client for Rondevu topic-based peer discovery and signaling server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",