Conversation
- openvidu session 생성 코드 작성
- openvidu 도입하여 미디어 서버 연동 - 공식문서에 권장하는 sdk가 불친절하여 커스텀 제작 중
HerrineKim
approved these changes
Mar 21, 2023
HerrineKim
left a comment
There was a problem hiding this comment.
제 팀 프로젝트에도 썼었던 오픈비두네요~~ 파이팅입니다! 😄
|
sdk를 직접 제작하신다니 신기하고 멋집니다: ) bb! |
SoJeongMun
approved these changes
Mar 22, 2023
cheonkyu0
reviewed
Mar 26, 2023
| if (data.isAudioActive) { | ||
| user.setAudioActive(data.isAudioActive) | ||
| } | ||
| if (data.isVideoActive !== undefined) { |
There was a problem hiding this comment.
저는 다음과 같은 코드를 선호합니다.
null과 undefined를 엄격하계 체크해야 되야 하는 이유가 많지 않거든요.
if (data.isVideoActive != null) {
cheonkyu0
reviewed
Mar 26, 2023
| const connectWebCam = useCallback(async () => { | ||
| if (session) { | ||
| await ov.getUserMedia({ audioSource: undefined, videoSource: undefined }) | ||
| var devices = await ov.getDevices() |
cheonkyu0
reviewed
Mar 26, 2023
Comment on lines
+179
to
+194
| if (session) { | ||
| if (token) { | ||
| connect(token) | ||
| } else { | ||
| try { | ||
| console.log('START!!', roomName) | ||
| getToken({ | ||
| variables: { | ||
| sessionId: roomName, | ||
| }, | ||
| }) | ||
| } catch (error: any) { | ||
| console.error('There was an error getting the token:', error.code, error.message) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
다음과 같은 코드는 어떤가요??
if (session && token) {
connect(token)
return
}
try {
console.log('START!!', roomName)
getToken({
variables: {
sessionId: roomName,
},
})
} catch (error: any) {
console.error('There was an error getting the token:', error.code, error.message)
}
cheonkyu0
reviewed
Mar 26, 2023
| token: null, | ||
| setUser: ({ user, token }) => { | ||
| localStorage.setItem('_PLUG_AUTH_', token) | ||
| localStorage.setItem(import.meta.env.VITE_AUTH_KEY, token) |
There was a problem hiding this comment.
vite에서 환경변수 접근 방법인가 보네요.
기존 process.env과 차이점이 있을까요?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ PR 체크리스트
PR 타입
설명하실 변경 사항은 어떤 종류인가요?
이슈 번호 : #5
해당 PR이 프로젝트에 큰 영향이 있나요?
작업 내용
추가 설명