+
Lobby
+
diff --git a/client/src/pages/room/[slug].jsx b/client/src/pages/room/[slug].jsx
index ca2ecf8..a36b1e5 100644
--- a/client/src/pages/room/[slug].jsx
+++ b/client/src/pages/room/[slug].jsx
@@ -114,6 +114,10 @@ const RoomPage = () => {
setRemoteSocketId(null);
}
});
+
+ return () => {
+ socket.off("call:end");
+ }
}, [remoteSocketId, myStream, socket]);
//* for disappearing call button
@@ -123,6 +127,10 @@ const RoomPage = () => {
setCallButton(false);
}
});
+
+ return () => {
+ socket.off("call:initiated");
+ }
}, [socket, remoteSocketId]);
@@ -149,9 +157,10 @@ const RoomPage = () => {
// set my stream
setMyStream(stream);
- // hide the call button
+ //* hide the call button
setCallButton(false);
- // Inform the remote user to hide their "CALL" button
+
+ //* Inform the remote user to hide their "CALL" button
socket.emit("call:initiated", { to: remoteSocketId });
}, [remoteSocketId, socket, isAudioMute, isVideoOnHold, callButton]);
@@ -187,12 +196,12 @@ const RoomPage = () => {
RoomPage
{remoteSocketId ? "Connected" : "No One In Room"}
{(myStream || remoteStream) &&
-
{myStream &&
(
-
-
- {isAudioMute ? "Unmute" : "Mute"}
-
-
- {isVideoOnHold ? "Resume Video" : "Hold Video"}
-
-
- End Call
-
+
+
+
+ {isAudioMute ? "Unmute" : "Mute"}
+
+
+ {isVideoOnHold ? "Resume Video" : "Hold Video"}
+
+
+ End Call
+
+
)}
diff --git a/client/src/styles/globals.css b/client/src/styles/globals.css
index 436ad3a..95d0b55 100644
--- a/client/src/styles/globals.css
+++ b/client/src/styles/globals.css
@@ -4,39 +4,37 @@
label{
color: #333;
- margin-right: 0.5rem;
+ margin-bottom: 0.5rem;
+ font-size: 1.125rem;
+ line-height: 1.75rem;
+ font-weight: 500;
}
input{
- border: 1px solid #ccc;
- border-radius: 4px;
- padding: 0.1rem;
- margin-bottom: 0.3rem;
+ margin-bottom: 1rem;
+ padding: 0.5rem;
+ border-radius: 0.25rem;
+ outline: 2px solid transparent;
+ outline-offset: 2px;
+ border-width: 1px;
+ border-color: rgb(170, 170, 170);
+ &:focus{
+ outline: 2px solid transparent;
+ outline-offset: 2px;
+ --tw-border-opacity: 1;
+ border-color: rgb(59 130 246 / var(--tw-border-opacity));
+ }
+
}
button{
- font-weight: 500;
- border-radius: 1rem;
- font-size: 0.875rem;
- padding: 0.5rem 1rem;
- text-align: center;
- margin-bottom: 1rem;
-}
-
-.joinButton{
- color: #fff;
- background-color: #7c3aed;
- &:hover{
- background-color: #6a28b7;
- }
-}
-
-
-.callButton{
- color: #fff;
- background-color: limegreen;
+ color: white;
+ padding: 0.5rem 1rem 0.5rem 1rem;
+ border-radius: 0.25rem;
transition: background-color 250ms ease-in-out;
- &:hover{
- background-color: forestgreen;
+
+ &:focus{
+ outline: 2px solid transparent;
+ outline-offset: 2px;
}
}
\ No newline at end of file