snapdrop

A Progressive Web App for local file sharing
git clone http://git.hanabi.in/repos/snapdrop.git
Log | Files | Refs | README | LICENSE

commit 07244871328f7b90593086de642f94df91e4a0d8
parent b2e79913aa81f76a83ae163007a13dd45a69562a
Author: RobinLinus <robinlinus@users.noreply.github.com>
Date:   Mon, 11 Jan 2021 02:24:27 +0100

Fix “RTCDataChannel.reliable is obsolete” (Fix #242)

Diffstat:
Mclient/scripts/network.js | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/client/scripts/network.js b/client/scripts/network.js @@ -252,7 +252,10 @@ class RTCPeer extends Peer { } _openChannel() { - const channel = this._conn.createDataChannel('data-channel', { reliable: true }); + const channel = this._conn.createDataChannel('data-channel', { + ordered: true, + reliable: true // Obsolete. See https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/reliable + }); channel.binaryType = 'arraybuffer'; channel.onopen = e => this._onChannelOpened(e); this._conn.createOffer().then(d => this._onDescription(d)).catch(e => this._onError(e));