ulduldp commited on
Commit
5631958
·
verified ·
1 Parent(s): 64ef238

Update public/index.html

Browse files
Files changed (1) hide show
  1. public/index.html +8 -9
public/index.html CHANGED
@@ -1,10 +1,10 @@
1
  <!DOCTYPE html>
2
  <html>
3
- <head><title>P2P Chat</title></head>
4
  <body>
5
- <h2>P2P Chat (WebRTC)</h2>
6
 
7
- <input id="name" placeholder="Enter name"><br><br>
8
  <input id="room" placeholder="Enter room code"><br><br>
9
 
10
  <button onclick="createRoom()">Create Room</button>
@@ -12,15 +12,14 @@
12
 
13
  <script>
14
  function createRoom() {
15
- const name = nameInput.value;
16
  const room = Math.random().toString(36).substr(2, 6);
17
- window.location = `/room.html?room=${room}&name=${name}`;
18
  }
19
-
20
  function joinRoom() {
21
- const name = nameInput.value;
22
- const room = roomInput.value;
23
- window.location = `/room.html?room=${room}&name=${name}`;
24
  }
25
  </script>
26
  </body>
 
1
  <!DOCTYPE html>
2
  <html>
3
+ <head><title>Voice Chat</title></head>
4
  <body>
5
+ <h2>🎤 Voice Chat</h2>
6
 
7
+ <input id="name" placeholder="Enter your name"><br><br>
8
  <input id="room" placeholder="Enter room code"><br><br>
9
 
10
  <button onclick="createRoom()">Create Room</button>
 
12
 
13
  <script>
14
  function createRoom() {
15
+ const name = document.getElementById("name").value;
16
  const room = Math.random().toString(36).substr(2, 6);
17
+ location.href = `/room.html?room=${room}&name=${name}`;
18
  }
 
19
  function joinRoom() {
20
+ const name = document.getElementById("name").value;
21
+ const room = document.getElementById("room").value;
22
+ location.href = `/room.html?room=${room}&name=${name}`;
23
  }
24
  </script>
25
  </body>