To the new room object in Cloud Firestore. This is then set as the local description, and finally written The first line creates an RTCSessionDescription that will represent the offerįrom the caller. Open public/app.js and find the comment //Īdd code for creating a room here and add the following code: const offer = await peerConnection.createOffer() Īwait tLocalDescription(offer) Ĭonst roomRef = await db.collection('rooms').add(roomWithOffer) ĭocument.querySelector('#currentRoom').innerText = `Current room is $ - You are the caller!` Your first task is to implement the missing code for creating a new room with The ID is used as the keyĮach room will contain the RTCSessionDescriptions for both the offer and theĪnswer, as well as two separate collections with ICE candidates from each party. That the remote party can use to join the same room. A user can createĪ new room by clicking a button in their application. In this application, each video chat session is called a room. The app has automatically connected to your Firebase project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |