-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
The comment mentioned in the codelab was missing. See #3 for details
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,10 @@ async function createRoom() { | |
|
||
registerPeerConnectionListeners(); | ||
|
||
// Add code for creating a room here | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Huy12qwa
|
||
|
||
This comment has been minimized.
Sorry, something went wrong.
r3think
|
||
// Code for creating room above | ||
This comment has been minimized.
Sorry, something went wrong.
Huy12qwa
|
||
|
||
localStream.getTracks().forEach(track => { | ||
peerConnection.addTrack(track, localStream); | ||
}); | ||
|
2 comments
on commit c8d9431
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const offer = roomSnapshot.data().offer;
await peerConnection.setRemoteDescription(offer);
const answer = await peerConnection.createAnswer();
await peerConnection.setLocalDescription(answer);
const roomWithAnswer = {
answer: {
type: answer.type,
sdp: answer.sdp
}
}
await roomRef.update(roomWithAnswer);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Huy12qwa!!!
const offer = roomSnapshot.data().offer;
await peerConnection.setRemoteDescription(offer);
const answer = await peerConnection.createAnswer();
await peerConnection.setLocalDescription(answer);
const roomWithAnswer = {
answer: {
type: answer.type,
sdp: answer.sdp
}
}
await roomRef.update(roomWithAnswer);