From 3109b4a9d679b9556e30f382124ec2402e5bd19c Mon Sep 17 00:00:00 2001 From: ajay-dhangar Date: Mon, 20 May 2024 17:05:53 +0530 Subject: [PATCH] update navbar --- docusaurus.config.js | 5 + .../VirtualMeetingComponent.css | 120 ----------------- src/pages/VirtualMeeting/index.tsx | 123 ------------------ 3 files changed, 5 insertions(+), 243 deletions(-) delete mode 100644 src/pages/VirtualMeeting/VirtualMeetingComponent.css delete mode 100644 src/pages/VirtualMeeting/index.tsx diff --git a/docusaurus.config.js b/docusaurus.config.js index d495ea7a5..6420732f6 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -176,6 +176,11 @@ const config = { html: ' 📊 Quiz', to: "https://quiz-app-ajay-dhangar.vercel.app/", }, + { + html: ' 📺 Broadcast', + to: "https://codeharborhub-broadcast-web.vercel.app/", + }, + { to: "/blog", html: '📰 Blog', diff --git a/src/pages/VirtualMeeting/VirtualMeetingComponent.css b/src/pages/VirtualMeeting/VirtualMeetingComponent.css deleted file mode 100644 index b179dcb1d..000000000 --- a/src/pages/VirtualMeeting/VirtualMeetingComponent.css +++ /dev/null @@ -1,120 +0,0 @@ -.virtual-meeting-container { - display: flex; - flex-wrap: wrap; - justify-content: space-evenly; - padding: 20px; -} - -.video-conference { - position: relative; - align-items: center; - border: 1px solid #ccc; - border-radius: 10px; - overflow: hidden; -} - -.video-conference video { - border-radius: 10px; - width: 100%; -} - -.controls { - position: absolute; - bottom: 20px; - left: 20%; - transform: translateX(-50%); - display: flex; - gap: 20px; -} - -.controls .mic-on, .video-on { - background-color: #fff; - color: #666; - border: none; - border-radius: 50%; - padding: 10px; - cursor: pointer; - transition: background-color 0.3s ease; -} - -.controls .mic-on:hover, .video-on:hover { - /* background-color: #ed3636; */ - color: #333; - background-color: #e0e0e0; -} - -.controls .mic-off, .video-off { - background-color: #ed3636; - color: #fff; - border: none; - border-radius: 50%; - padding: 10px; - cursor: pointer; - transition: background-color 0.3s ease; -} - -.controls .mic-off:hover, .video-off:hover { - background-color: #c62828; -} - -.sidebar { - padding: 20px; - border: 1px solid #ccc; - border-radius: 10px; - width: auto; - overflow-y: auto; -} - -.participants-list, -.chat { - padding: 20px; -} - -.participants-list h2, -.chat h2 { - font-size: 18px; - margin-bottom: 10px; -} - -.participants-list ul, -.chat-messages { - list-style: none; -} - -.participants-list li, -.chat-messages div { - margin-bottom: 10px; -} - -.message-input { - display: flex; - margin-top: 20px; -} - -.message-input input { - flex: 1; - padding: 10px; - border: 1px solid #ccc; - border-radius: 5px; - margin-right: 10px; -} - -.message-input button { - background-color: #007bff; - color: #fff; - border: none; - padding: 10px 20px; - border-radius: 5px; - cursor: pointer; -} - -.message-input button:hover { - background-color: #0056b3; -} - -@media (max-width: 1024px) { - .sidebar { - /* display: none; */ - width: 100%; - } -} \ No newline at end of file diff --git a/src/pages/VirtualMeeting/index.tsx b/src/pages/VirtualMeeting/index.tsx deleted file mode 100644 index 7d64a703b..000000000 --- a/src/pages/VirtualMeeting/index.tsx +++ /dev/null @@ -1,123 +0,0 @@ -import React, { useState, useEffect } from "react"; -import Layout from "@theme/Layout"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faVideo, faMicrophone, faVideoSlash, faMicrophoneSlash } from '@fortawesome/free-solid-svg-icons'; - -import "./VirtualMeetingComponent.css"; - -const VirtualMeeting: React.FC = () => { - const [participants, setParticipants] = useState([]); - const [chatMessages, setChatMessages] = useState([]); - const [messageInput, setMessageInput] = useState(""); - const [isCameraOn, setIsCameraOn] = useState(true); - const [isMicOn, setIsMicOn] = useState(true); - const [videoBtn, setVideoBtn] = useState("video-on"); - const [micBtn, setMicBtn] = useState("mic-on"); - - useEffect(() => { - // Initialize media devices - initializeMediaDevices(); - }, []); - - const initializeMediaDevices = async () => { - try { - const stream = await navigator.mediaDevices.getUserMedia({ - audio: true, - video: true, - }); - // Logic to add user's video to the meeting - const localVideo = document.getElementById( - "localVideo" - ) as HTMLVideoElement; - if (localVideo) { - localVideo.srcObject = stream; - } - } catch (error) { - console.error("Error accessing media devices:", error); - } - }; - - const handleToggleCamera = () => { - // Toggle camera state - setIsCameraOn(!isCameraOn); - setVideoBtn(isCameraOn ? "video-off" : "video-on"); - // Logic to turn on/off camera - const localVideo = document.getElementById( - "localVideo" - ) as HTMLVideoElement; - if (localVideo.srcObject) { - const tracks = (localVideo.srcObject as MediaStream).getVideoTracks(); - tracks.forEach((track) => (track.enabled = !isCameraOn)); - } - }; - - const handleToggleMic = () => { - // Toggle microphone state - setIsMicOn(!isMicOn); - setMicBtn(isMicOn ? "mic-off" : "mic-on"); - // Logic to mute/unmute microphone - const localVideo = document.getElementById( - "localVideo" - ) as HTMLVideoElement; - if (localVideo.srcObject) { - const tracks = (localVideo.srcObject as MediaStream).getAudioTracks(); - tracks.forEach((track) => (track.enabled = !isMicOn)); - } - }; - - const handleSendMessage = () => { - // Logic to send message to all participants - setChatMessages([...chatMessages, messageInput]); - setMessageInput(""); - }; - - return ( - -
-
-
-
-
-

Participants

-
    - {participants.map((participant, index) => ( -
  • {participant}
  • - ))} -
-
-
-

Chat

-
- {chatMessages.map((message, index) => ( -
{message}
- ))} -
-
- setMessageInput(e.target.value)} - placeholder="Type your message..." - /> - -
-
-
-
-
- ); -}; - -export default VirtualMeeting;