From 8b65c01a27e6c5cf11d37cbb6bcba36b8b9ae64d Mon Sep 17 00:00:00 2001 From: sayyyho <323psh@naver.com> Date: Tue, 10 Sep 2024 15:19:39 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=EC=8B=A4=EC=8B=9C=EA=B0=84=20=EC=BB=A4?= =?UTF-8?q?=EB=84=A5=EC=85=98=20=EA=B3=A0=EC=9C=A0=20=EB=B0=A9=EB=B2=88?= =?UTF-8?q?=ED=98=B8=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.jsx | 2 +- src/pages/WebRTC/VideoPage.jsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index adbe566..ad91439 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -23,7 +23,7 @@ function App() { }> }> - }> + }> } /> } /> } /> diff --git a/src/pages/WebRTC/VideoPage.jsx b/src/pages/WebRTC/VideoPage.jsx index 2710ae9..6f90f07 100644 --- a/src/pages/WebRTC/VideoPage.jsx +++ b/src/pages/WebRTC/VideoPage.jsx @@ -1,15 +1,17 @@ import React, { useEffect, useRef } from "react"; +import { useParams } from "react-router-dom"; import Layout from "../../components/Common/Layout"; import * as S from "./style"; import { io } from "socket.io-client"; import MiniLayout from "../../components/Common/miniLayout"; const RTCPage = () => { + const params = useParams(); const socketRef = useRef(null); const myVideoRef = useRef(null); const remoteVideoRef = useRef(null); const pcRef = useRef(null); - const roomName = "testRoom"; // You can dynamically generate or pass this + const roomName = params.roomName; // You can dynamically generate or pass this const getMedia = async () => { try {