From 1907e6e65ea55b09ddccda15627590ed711fee32 Mon Sep 17 00:00:00 2001 From: heyhiru Date: Wed, 15 Nov 2023 11:48:55 +0530 Subject: [PATCH] enhanced styling made responsible Signed-off-by: heyhiru --- client/src/components/CallHandleButtons.jsx | 14 +++++------ client/src/components/Lobby.jsx | 2 +- client/src/components/VideoPlayer.jsx | 15 ++++++----- client/src/pages/room/[slug].jsx | 28 ++++++++++----------- client/src/styles/globals.css | 19 +++++++------- client/tailwind.config.js | 2 +- 6 files changed, 41 insertions(+), 39 deletions(-) diff --git a/client/src/components/CallHandleButtons.jsx b/client/src/components/CallHandleButtons.jsx index 00073d1..844c86f 100644 --- a/client/src/components/CallHandleButtons.jsx +++ b/client/src/components/CallHandleButtons.jsx @@ -6,20 +6,20 @@ import VideocamOffIcon from '@mui/icons-material/VideocamOff'; import CallEndIcon from '@mui/icons-material/CallEnd'; const CallHandleButtons = ({ isAudioMute, isVideoOnHold, onToggleAudio, onToggleVideo, onEndCall }) => ( -
-
- - -
diff --git a/client/src/components/Lobby.jsx b/client/src/components/Lobby.jsx index 8e85097..6c43458 100644 --- a/client/src/components/Lobby.jsx +++ b/client/src/components/Lobby.jsx @@ -30,7 +30,7 @@ const LobbyScreen = () => { return (
-

VideoPeers

+

VideoPeers

Peer-to-Peer video calls, powered by WebRTC!
diff --git a/client/src/components/VideoPlayer.jsx b/client/src/components/VideoPlayer.jsx index 7433e6f..6cceb68 100644 --- a/client/src/components/VideoPlayer.jsx +++ b/client/src/components/VideoPlayer.jsx @@ -1,19 +1,22 @@ import ReactPlayer from 'react-player'; const VideoPlayer = ({ stream, isAudioMute, name }) => ( -

-
-

+
+
+

{name === 'My Stream' ? 'My Stream' : 'Remote Stream'}

+ ${name === "My Stream" ? " mxs:w-[80px] mxs:h-[120px] msm:w-[100px] msm:rounded-md msm:h-[140px] mmd:w-[140px] md:w-[200px] lg:w-[280px]" + : "mxs:h-[450px] mss:h-[500px] mmd:h-[600px] md:w-[800px] md:h-[500px]"}`} + >
diff --git a/client/src/pages/room/[slug].jsx b/client/src/pages/room/[slug].jsx index 8a015c9..9f5e9d4 100644 --- a/client/src/pages/room/[slug].jsx +++ b/client/src/pages/room/[slug].jsx @@ -1,6 +1,5 @@ import { useSocket } from '@/context/SocketProvider'; import React, { useCallback, useEffect, useState } from 'react' -import ReactPlayer from 'react-player'; import peer from '@/service/peer'; import CallIcon from '@mui/icons-material/Call'; import VideoCallIcon from '@mui/icons-material/VideoCall'; @@ -198,16 +197,16 @@ const RoomPage = () => { }, [myStream, remoteSocketId, socket]); return ( -
-

Video +
+

Video Peers

-

- {remoteSocketId ? "Connected With Remote User!" : "No One In Room"} -

+

+ {remoteSocketId ? "Connected With Remote User!" : "No One In Room"} +

{(remoteStream && remoteSocketId && isSendButtonVisible) && ) } -
- +
{ myStream && @@ -233,7 +231,7 @@ const RoomPage = () => { }
- {myStream && + {myStream && remoteStream && ( { onToggleVideo={handleToggleVideo} onEndCall={handleEndCall} /> - )} + ) + }
+ ) } diff --git a/client/src/styles/globals.css b/client/src/styles/globals.css index 7e18f0c..0a9746d 100644 --- a/client/src/styles/globals.css +++ b/client/src/styles/globals.css @@ -4,12 +4,18 @@ @tailwind components; @tailwind utilities; + +body{ + overflow: hidden; +} + label{ color: #333; margin-bottom: 0.5rem; font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; + font-family: 'Poppins', sans-serif; } input{ @@ -34,6 +40,7 @@ button{ padding: 0.5rem 1rem 0.5rem 1rem; border-radius: 0.25rem; transition: background-color 250ms ease-in-out; + font-family: "Poppins", sans-serif; &:focus{ outline: 2px solid transparent; @@ -42,7 +49,6 @@ button{ } .callButtons{ - border-width: 1px; font-weight: 500; border-radius: 9999px; font-size: 0.875rem; @@ -51,17 +57,10 @@ button{ text-align: center; display: inline-flex; align-items: center; - - &:hover{ - color: white; - } - - &:focus{ - outline: 2px solid transparent; - outline-offset: 2px; - } } video{ + width: 100%; + height: 100%; object-fit: cover; } \ No newline at end of file diff --git a/client/tailwind.config.js b/client/tailwind.config.js index 38cfeb6..eaf5dd2 100644 --- a/client/tailwind.config.js +++ b/client/tailwind.config.js @@ -23,7 +23,7 @@ module.exports = { } }, animation: { - 'pulse': 'pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite', + 'pulse': 'pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite', }, screens: { mxxl: { 'max': '1535px' },