tutorials
tutorials copied to clipboard
WebRTC-file-transfer tutorial issues
The following tutorial does not work as expected and the following needs to be updated for it to work
- 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.
- 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,
});
}