mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 23:16:13 -04:00
Merge remote-tracking branch 'origin/master' into localhost
This commit is contained in:
commit
e6f3555619
2 changed files with 10 additions and 3 deletions
|
@ -51,7 +51,10 @@ ShareDrop uses WebRTC only and isn't compatible with Safari browsers. Snapdrop u
|
||||||
|
|
||||||
# open a second shell:
|
# open a second shell:
|
||||||
cd snapdrop/client
|
cd snapdrop/client
|
||||||
|
# Python 2
|
||||||
python -m SimpleHTTPServer
|
python -m SimpleHTTPServer
|
||||||
|
# Python 3
|
||||||
|
python3 -m http.server
|
||||||
```
|
```
|
||||||
|
|
||||||
Now point your browser to http://localhost:8000.
|
Now point your browser to http://localhost:8000.
|
||||||
|
|
|
@ -273,8 +273,12 @@ class RTCPeer extends Peer {
|
||||||
|
|
||||||
if (message.sdp) {
|
if (message.sdp) {
|
||||||
this._conn.setRemoteDescription(new RTCSessionDescription(message.sdp))
|
this._conn.setRemoteDescription(new RTCSessionDescription(message.sdp))
|
||||||
.then( _ => this._conn.createAnswer())
|
.then( _ => {
|
||||||
.then(d => this._onDescription(d))
|
if (message.sdp.type === 'offer') {
|
||||||
|
return this._conn.createAnswer()
|
||||||
|
.then(d => this._onDescription(d));
|
||||||
|
}
|
||||||
|
})
|
||||||
.catch(e => this._onError(e));
|
.catch(e => this._onError(e));
|
||||||
} else if (message.ice) {
|
} else if (message.ice) {
|
||||||
this._conn.addIceCandidate(new RTCIceCandidate(message.ice));
|
this._conn.addIceCandidate(new RTCIceCandidate(message.ice));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue