tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

WebRTC-file-transfer tutorial issues

Open mclark-ably opened this issue 1 year ago • 0 comments

The following tutorial does not work as expected and the following needs to be updated for it to work

  1. Update script tag to latest version of simple peer in index.html

<script src="https://cdnjs.cloudflare.com/ajax/libs/simple-peer/9.11.1/simplepeer.min.js"></script>

as it fails to connect to the STUN servers using what is currently there

<script src="https://cdnjs.cloudflare.com/ajax/libs/simple-peer/9.1.2/simplepeer.min.js"></script>

Failed to construct 'RTCPeerConnection': 'stun:global.stun.twilio.com:3478?transport=udp' is not a valid stun or turn URL.

  1. After point 1 a new error Failed to execute 'send' on 'RTCDataChannel': RTCDataChannel.readyState is not 'open' occurs and so in connection-helper.js the _onSignal method needs to be updated
_onSignal(signal) {
AblyRealtime.publish(`rtc-signal/${this._remoteClient}`, {
user: clientId,
signal: signal,
});
}

mclark-ably avatar Jan 24 '24 12:01 mclark-ably