diff --git a/client/src/components/VideoPlayer.jsx b/client/src/components/VideoPlayer.jsx
new file mode 100644
index 0000000..7433e6f
--- /dev/null
+++ b/client/src/components/VideoPlayer.jsx
@@ -0,0 +1,23 @@
+import ReactPlayer from 'react-player';
+
+const VideoPlayer = ({ stream, isAudioMute, name }) => (
+
+
+
+ {name === 'My Stream' ? 'My Stream' : 'Remote Stream'}
+
+
+
+
+
+
+);
+
+export default VideoPlayer;
\ No newline at end of file
diff --git a/client/src/pages/index.js b/client/src/pages/index.js
index d0594ab..a501f19 100644
--- a/client/src/pages/index.js
+++ b/client/src/pages/index.js
@@ -1,5 +1,4 @@
import LobbyScreen from '@/components/Lobby';
-import SocketProvider from '@/context/SocketProvider';
export default function Home() {
return (
diff --git a/client/src/pages/room/[slug].jsx b/client/src/pages/room/[slug].jsx
index 2b1e38f..8a015c9 100644
--- a/client/src/pages/room/[slug].jsx
+++ b/client/src/pages/room/[slug].jsx
@@ -2,6 +2,10 @@ 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';
+import VideoPlayer from '@/components/VideoPlayer';
+import CallHandleButtons from '@/components/CallHandleButtons';
const RoomPage = () => {
const socket = useSocket();
@@ -194,66 +198,50 @@ const RoomPage = () => {
}, [myStream, remoteSocketId, socket]);
return (
-
-
RoomPage
-
{remoteSocketId ? "Connected" : "No One In Room"}
+
+
Video
+
+ Peers
+
+
+ {remoteSocketId ? "Connected With Remote User!" : "No One In Room"}
+
{(remoteStream && remoteSocketId && isSendButtonVisible) &&
}
{(remoteSocketId && callButton) &&
-
+ (
+
+ )
}
-
+
+
{
myStream &&
-
-
- My Stream
-
-
-
+
}
{
remoteStream &&
-
-
- Remote Stream
-
-
-
+
}
{myStream &&
(
-
-
-
-
-
-
-
+
)}
)
diff --git a/client/src/styles/globals.css b/client/src/styles/globals.css
index 95d0b55..7e18f0c 100644
--- a/client/src/styles/globals.css
+++ b/client/src/styles/globals.css
@@ -1,3 +1,5 @@
+@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
+@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@500&display=swap');
@tailwind base;
@tailwind components;
@tailwind utilities;
@@ -37,4 +39,29 @@ button{
outline: 2px solid transparent;
outline-offset: 2px;
}
+}
+
+.callButtons{
+ border-width: 1px;
+ font-weight: 500;
+ border-radius: 9999px;
+ font-size: 0.875rem;
+ line-height: 1.25rem;
+ padding: 0.625rem;
+ text-align: center;
+ display: inline-flex;
+ align-items: center;
+
+ &:hover{
+ color: white;
+ }
+
+ &:focus{
+ outline: 2px solid transparent;
+ outline-offset: 2px;
+ }
+}
+
+video{
+ object-fit: cover;
}
\ No newline at end of file