mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-25 09:16:18 -04:00
move logging of rtc message from class Peer class to overwritten method in class RTCPeer
This commit is contained in:
parent
f9f1abef7a
commit
d6ef5887dd
2 changed files with 18 additions and 4 deletions
|
@ -320,7 +320,6 @@ class Peer {
|
|||
return;
|
||||
}
|
||||
message = JSON.parse(message);
|
||||
console.log('RTC:', message);
|
||||
switch (message.type) {
|
||||
case 'request':
|
||||
this._onFilesTransferRequest(message);
|
||||
|
@ -568,6 +567,14 @@ class RTCPeer extends Peer {
|
|||
this._channel = channel;
|
||||
}
|
||||
|
||||
_onMessage(message) {
|
||||
if (typeof message === 'string') {
|
||||
message = JSON.parse(message);
|
||||
console.log('RTC:', message);
|
||||
}
|
||||
super._onMessage(message);
|
||||
}
|
||||
|
||||
getConnectionHash() {
|
||||
const localDescriptionLines = this._conn.localDescription.sdp.split("\r\n");
|
||||
const remoteDescriptionLines = this._conn.remoteDescription.sdp.split("\r\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue