64 |
65 | {!connected ? (
66 |
67 |
68 |
69 | RTC Terminal
70 |
71 |
72 |
73 |
74 |
75 | setUsername(e.target.value)}
81 | />
82 |
83 |
84 | setRoom(e.target.value)}
89 | />
90 |
97 |
98 |
99 |
100 |
or
101 |
102 |
103 |
111 |
112 |
113 | ) : (
114 |
115 |
116 |
117 |
118 |
Room ID: {localStorage.getItem("roomid")}
119 |
131 |
132 |
133 |
134 |
135 |
136 | {msgs.map((e, index) => {
137 | const isUserMessage = localStorage.getItem("name") === e.name;
138 | return (
139 |
143 |
{e.name}
144 |
148 | {e.message}
149 |
150 |
151 | );
152 | })}
153 |
154 |
155 |
156 | setCMsg(e.target.value)}
162 | onKeyDown={(e) => handleKeyPress(e, ws, currentMsg, username, setCMsg)}
163 | />
164 |
171 |
172 |
173 | )}
174 |
175 | );
176 | }
177 |
178 | export default App;
179 |
--------------------------------------------------------------------------------
/public/rtc-icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |