Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
bora-it
Commits
9b414a1a
Commit
9b414a1a
authored
Aug 11, 2021
by
Kim, Chaerin
Browse files
시연2
parent
8ae18a67
Changes
3
Hide whitespace changes
Inline
Side-by-side
client/src/components/Room/Screen.js
View file @
9b414a1a
...
...
@@ -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
);
...
...
client/src/context/auth.js
View file @
9b414a1a
...
...
@@ -2,6 +2,7 @@ import axios from 'axios'
export
function
handleLogin
(
userId
)
{
sessionStorage
.
setItem
(
"
user
"
,
userId
)
localStorage
.
setItem
(
"
user
"
,
userId
)
}
export
async
function
handleLogout
()
{
...
...
client/src/pages/InvitePage.js
View file @
9b414a1a
...
...
@@ -14,7 +14,7 @@ const INIT_PROFILE = {
const
InvitePage
=
()
=>
{
const
[
profile
,
setProfile
]
=
useState
([
INIT_PROFILE
]);
const
[
error
,
setError
]
=
useState
(
""
);
const
usercheck
=
session
Storage
.
getItem
(
"
user
"
);
const
usercheck
=
local
Storage
.
getItem
(
"
user
"
);
const
{
roomId
}
=
useParams
();
async
function
getProfile
(
userID
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment