mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-05-27 06:04:41 +00:00
Fix “RTCDataChannel.reliable is obsolete” (Fix #242)
This commit is contained in:
@@ -252,7 +252,10 @@ class RTCPeer extends Peer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_openChannel() {
|
_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.binaryType = 'arraybuffer';
|
||||||
channel.onopen = e => this._onChannelOpened(e);
|
channel.onopen = e => this._onChannelOpened(e);
|
||||||
this._conn.createOffer().then(d => this._onDescription(d)).catch(e => this._onError(e));
|
this._conn.createOffer().then(d => this._onDescription(d)).catch(e => this._onError(e));
|
||||||
|
|||||||
Reference in New Issue
Block a user