Files
rondevu-demo/test-connect.js
Bas van den Aakster 7747f59060 Fix: Use ondatachannel instead of createDataChannel for answerer
CRITICAL BUG FIX: As the answerer, we should NOT create our own data channel.
The host (offerer) creates the channel, and we receive it via ondatachannel event.

This was causing messages to be sent on a different channel than the one
the host was listening to, so no messages were being received.

Changes:
- Remove pc.createDataChannel() call
- Add pc.ondatachannel event handler
- Wrap data channel setup in setupDataChannel() function
- Called when channel is received from host
2025-12-12 21:35:34 +01:00

8.0 KiB