🔧 Connection Debug

WebSocket: {isConnected ? '✅ Connected' : '❌ Disconnected'}

Session ID: {sessionId || 'Not set'}

Is Creator: {isCreator ? 'Yes' : 'No'}

Peer Connected: {peerConnected ? '✅ Yes' : '❌ No'}

Data Channel: {dataChannel ? (dataChannel.readyState || 'Unknown') : 'Not created'}

Peer Connection: {peerConnection ? (peerConnection.connectionState || 'Unknown') : 'Not created'}

Signaling State: {peerConnection ? (peerConnection.signalingState || 'Unknown') : 'Not created'}

ICE Connection: {peerConnection ? (peerConnection.iceConnectionState || 'Unknown') : 'Not created'}

ICE Gathering: {peerConnection ? (peerConnection.iceGatheringState || 'Unknown') : 'Not created'}

{#if dataChannel && dataChannel.readyState === 'open' && !peerConnected} {/if}
{#if dataChannel && dataChannel.readyState === 'connecting'}
⚠️ Data channel stuck in 'connecting' state
  • This usually indicates network connectivity issues
  • Check firewall settings and network restrictions
  • Try restarting the WebRTC connection
{/if}