mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 23:16:13 -04:00
Fix transferring issue
This commit is contained in:
parent
7bb4c1916a
commit
09da05e700
1 changed files with 1 additions and 1 deletions
|
@ -258,7 +258,6 @@ class RTCPeer extends Peer {
|
||||||
ordered: true,
|
ordered: true,
|
||||||
reliable: true // Obsolete. See https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/reliable
|
reliable: true // Obsolete. See https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/reliable
|
||||||
});
|
});
|
||||||
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));
|
||||||
}
|
}
|
||||||
|
@ -295,6 +294,7 @@ class RTCPeer extends Peer {
|
||||||
_onChannelOpened(event) {
|
_onChannelOpened(event) {
|
||||||
console.log('RTC: channel opened with', this._peerId);
|
console.log('RTC: channel opened with', this._peerId);
|
||||||
const channel = event.channel || event.target;
|
const channel = event.channel || event.target;
|
||||||
|
channel.binaryType = 'arraybuffer';
|
||||||
channel.onmessage = e => this._onMessage(e.data);
|
channel.onmessage = e => this._onMessage(e.data);
|
||||||
channel.onclose = e => this._onChannelClosed();
|
channel.onclose = e => this._onChannelClosed();
|
||||||
this._channel = channel;
|
this._channel = channel;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue