Commit 9b414a1a authored by Kim, Chaerin's avatar Kim, Chaerin
Browse files

시연2

parent 8ae18a67
......@@ -9,6 +9,7 @@ const Screen = () => {
const [socket, setSocket] = useState(null);
const [users, setUsers] = useState([]);
const { roomId, channelId } = useParams();
const url = `${roomId}/${channelId}`;
const user = "00";
let localVideoRef = useRef(null);
......@@ -118,7 +119,7 @@ const Screen = () => {
newSocket.emit("joinRoom", {
id: newSocket.id,
roomID: roomId,
roomID: url,
});
})
.catch((error) => {
......@@ -148,7 +149,7 @@ const Screen = () => {
newSocket.emit("senderOffer", {
sdp,
senderSocketID: newSocket.id,
roomID: roomId,
roomID: url,
});
} catch (error) {
console.log(error);
......@@ -168,7 +169,7 @@ const Screen = () => {
sdp,
receiverSocketID: newSocket.id,
senderSocketID,
roomID: roomId,
roomID: url,
});
} catch (error) {
console.log(error);
......
......@@ -2,6 +2,7 @@ import axios from 'axios'
export function handleLogin(userId) {
sessionStorage.setItem("user", userId)
localStorage.setItem("user", userId)
}
export async function handleLogout() {
......
......@@ -14,7 +14,7 @@ const INIT_PROFILE = {
const InvitePage = () => {
const [profile, setProfile] = useState([INIT_PROFILE]);
const [error, setError] = useState("");
const usercheck = sessionStorage.getItem("user");
const usercheck = localStorage.getItem("user");
const { roomId } = useParams();
async function getProfile(userID) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment