Skip to content

Commit

Permalink
Fix: 실시간 커넥션 고유 방번호 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sayyyho committed Sep 10, 2024
1 parent 028a383 commit 8b65c01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function App() {
<Routes>
<Route path="/" element={<PeopleListPage />}></Route>
<Route path="/chat" element={<ChatPage />}></Route>
<Route path="/video" element={<RTCPage />}></Route>
<Route path="/video/:roomName" element={<RTCPage />}></Route>
<Route path="/list" element={<PeopleListPage />} />
<Route path="/details" element={<PeopleDetailPage />} />
<Route path="/login" element={<LoginPage />} />
Expand Down
4 changes: 3 additions & 1 deletion src/pages/WebRTC/VideoPage.jsx
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 8b65c01

Please sign in to comment.