diff --git a/public/scripts/utils.js b/public/scripts/utils.js
index cde0707..a74c272 100644
--- a/public/scripts/utils.js
+++ b/public/scripts/utils.js
@@ -70,7 +70,7 @@ export const addVideoStream = (videoContainer, username, stream, isYours) => {
const video = videoContainer.querySelector("video")
video.srcObject = stream
- if (CSS.supports("::-webkit-media-controls-panel"))
+ if (CSS.supports("video::-webkit-media-controls-panel"))
video.controls = "controls"
video.addEventListener("loadedmetadata", async () => {
if (isYours) {
diff --git a/public/scripts/video.js b/public/scripts/video.js
index 5b7cd21..8eb6c1f 100644
--- a/public/scripts/video.js
+++ b/public/scripts/video.js
@@ -42,6 +42,7 @@ myPeer.on("open", async (id) => {
connectToNewUser(userId, username, stream, myPeer)
)
} catch (error) {
+ console.log(error)
if (error instanceof DOMException) return showNoVideoPrompt()
throw error
diff --git a/public/style.css b/public/style.css
index deb58b2..c9c16ff 100644
--- a/public/style.css
+++ b/public/style.css
@@ -106,25 +106,24 @@ video::-webkit-media-controls-current-time-display {
}
button,
-#stop-call {
+.button {
border: none;
border-radius: 2em;
color: #f5f0f0;
background-color: transparent;
font-size: 1em;
- padding: 10px 12px;
text-decoration: none;
}
-#stop-call:hover {
- color: #ff0000;
+:is(button, .button):not(.icon) {
+ padding: 8px 12px;
}
#stop-call {
- margin-right: 5px;
- margin-top: 2px;
- color: #cf2f2f;
- text-decoration: underline;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ background-color: #cf2f2f;
}
.button-primary {
@@ -150,14 +149,22 @@ video.your-video {
#options {
position: absolute;
top: 10px;
+ align-items: center;
+ gap: 15px;
right: 10px;
display: flex;
}
+#change-name {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+}
+
.card {
background-color: #00000050;
color: white;
- padding: 0 10px;
+ padding: 10px;
z-index: 2;
border-radius: 10px;
}
@@ -182,11 +189,10 @@ hr {
.video .name {
position: absolute;
- bottom: 2vw;
- left: 2vw;
+ bottom: 10px;
+ left: 10px;
display: flex;
- font-size: 1.5vw;
- padding: 1vw;
+ font-size: 1em;
}
.video.your-video .name {
@@ -334,9 +340,6 @@ hr {
text-decoration: underline;
}
-.stop-call {
-}
-
:is(textarea, input[type="text"]) {
border: none;
color: white;
diff --git a/views/room.ejs b/views/room.ejs
index 3c1acb0..f285b1c 100644
--- a/views/room.ejs
+++ b/views/room.ejs
@@ -46,10 +46,10 @@