mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 18:08:50 +00:00
Can request offers
This commit is contained in:
parent
3ec29e534d
commit
0efd15deaa
@ -362,10 +362,9 @@ class CallWindow extends CustomEvents {
|
||||
*/
|
||||
async PeerReady(peerID) {
|
||||
const peer = new SimplePeer({
|
||||
initiator: true,
|
||||
initiator: false,
|
||||
trickle: true, // Allow exchange of multiple ice candidates
|
||||
config: this.callConfig(),
|
||||
stream: await navigator.mediaDevices.getUserMedia({audio: true, video: true}) // TODO : find a way to use fake strem
|
||||
})
|
||||
this.peersEls.set(peerID, peer)
|
||||
|
||||
@ -389,6 +388,12 @@ class CallWindow extends CustomEvents {
|
||||
|
||||
this.addVideoStream(peerID, false, stream)
|
||||
});
|
||||
|
||||
// Request an offer from proxy
|
||||
await ws("calls/request_offer", {
|
||||
callID: this.callID,
|
||||
peerID: peerID,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user