diff --git a/public/scripts/utils.js b/public/scripts/utils.js index a74c272..5f8a2d6 100644 --- a/public/scripts/utils.js +++ b/public/scripts/utils.js @@ -75,7 +75,11 @@ export const addVideoStream = (videoContainer, username, stream, isYours) => { video.addEventListener("loadedmetadata", async () => { if (isYours) { video.muted = true + //videoContainer.style.width = video.videoWidth + //videoContainer.style.height = video.videoHeight + console.log(video.videoWidth) } + try { await video.play() } catch (error) { diff --git a/public/style.css b/public/style.css index 4124db4..3fb48e0 100644 --- a/public/style.css +++ b/public/style.css @@ -67,10 +67,9 @@ video { .your-video { position: absolute; - width: 25vw; - height: 25vh; cursor: grab; z-index: 1; + width: 250px; } .your-video:active { @@ -86,7 +85,7 @@ video { height: 15px; background: var(--primary); position: absolute; - right: 0; + right: -7.5px; border-radius: 5px; bottom: 0; cursor: se-resize; @@ -144,10 +143,6 @@ button:not(:disabled) { filter: brightness(0.9); } -video.your-video { - display: none; -} - #options { position: absolute; top: 10px; diff --git a/views/room.ejs b/views/room.ejs index f285b1c..3d20c72 100644 --- a/views/room.ejs +++ b/views/room.ejs @@ -4,6 +4,7 @@ + @@ -15,7 +16,6 @@ - Video Chat