---
id: bd7150d8c442eddfafb5bd1c
title: P2P Video Chat Application
challengeType: 4
forumTopicId: 302366
dashedName: p2p-video-chat-application
---

# --description--

**Objective:** Build a [Repl.it](https://repl.it/) app that is functionally similar to this: <https://p2p-video-chat-application.freecodecamp.rocks/>.

Fulfill the below [user stories](https://en.wikipedia.org/wiki/User_story). Use whichever libraries or APIs you need. Give it your own personal style.

**User Story:** Upon arriving, the browser will prompt me to access my camera and microphone.

**User Story:** After I give it permission, I am prompted to type in a room name.

**User Story:** Once I type in the room name, a room will be created if no room of that name existed before.

**User Story:** A friend of mine can subsequently go to the same website, type in the same room I entered, and join the same room, then enter into a video chat with me.

**User Story:** If I type in a room name, and there are already two people in that room, I get a notification that the room is full.

**User Story:** Anyone can create or join any room. And there can be any number of rooms, but all of them must have unique names.

**User Story:** I can choose to not permit the site to access my microphone and webcam. If I choose not to do this, or if some other driver problem occurs, I see an error message saying these are required.

**User Story:** When I choose to cancel the room name input step, or if I type in no name, or just spaces, it should again ask me again to type in a valid room name.

**User Story:** If one of the two people in the room get disconnected, they can reconnect to the same room and continue chatting.

Once you've finished implementing these user stories, enter the URL to your live app and, optionally, your GitHub repository. Then click the "I've completed this challenge" button.

You can get feedback on your project by sharing it on the [freeCodeCamp forum](https://forum.freecodecamp.org/c/project-feedback/409).

# --solutions--

```js
// solution required
```
