mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 07:05:05 -04:00
Decrease redundancy by changing the way the websocket fallback is included; Adding new env var SIGNALING_SERVER to host client files but use another server for signaling.
This commit is contained in:
parent
cb72edef20
commit
3439e7f6d4
62 changed files with 439 additions and 10101 deletions
|
@ -17,8 +17,8 @@ export default class Peer {
|
|||
// set peer id
|
||||
this._setPeerId(request);
|
||||
|
||||
// is WebRTC supported ?
|
||||
this.rtcSupported = request.url.indexOf('webrtc') > -1;
|
||||
// is WebRTC supported
|
||||
this._setRtcSupported(request);
|
||||
|
||||
// set name
|
||||
this._setName(request);
|
||||
|
@ -133,6 +133,11 @@ export default class Peer {
|
|||
}
|
||||
}
|
||||
|
||||
_setRtcSupported(request) {
|
||||
const searchParams = new URL(request.url, "http://server").searchParams;
|
||||
this.rtcSupported = searchParams.get("webrtc_supported") === "true";
|
||||
}
|
||||
|
||||
_setName(req) {
|
||||
let ua = parser(req.headers['user-agent']);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue