Skip to content

WebRTC-file-transfer tutorial issues #120

@mclark-ably

Description

@mclark-ably

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,
});
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions