Skip to content

Commit

Permalink
Merge pull request #103 from sayyyho/dev
Browse files Browse the repository at this point in the history
Fix: 실시간 커넥션 고유 방번호 로직 추가
  • Loading branch information
sayyyho authored Sep 10, 2024
2 parents 20019cd + 8b65c01 commit cfbf0b2
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 cfbf0b2

Please sign in to comment.