-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/#5 openvidu #5
base: master
Are you sure you want to change the base?
Conversation
- openvidu session 생성 코드 작성
- openvidu 도입하여 미디어 서버 연동 - 공식문서에 권장하는 sdk가 불친절하여 커스텀 제작 중
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제 팀 프로젝트에도 썼었던 오픈비두네요~~ 파이팅입니다! 😄
sdk를 직접 제작하신다니 신기하고 멋집니다: ) bb! |
if (data.isAudioActive) { | ||
user.setAudioActive(data.isAudioActive) | ||
} | ||
if (data.isVideoActive !== undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 다음과 같은 코드를 선호합니다.
null
과 undefined
를 엄격하계 체크해야 되야 하는 이유가 많지 않거든요.
if (data.isVideoActive != null) {
const connectWebCam = useCallback(async () => { | ||
if (session) { | ||
await ov.getUserMedia({ audioSource: undefined, videoSource: undefined }) | ||
var devices = await ov.getDevices() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var...
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다음과 같은 코드는 어떤가요??
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)
}
@@ -16,7 +16,7 @@ const store = create( | |||
user: null, | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vite에서 환경변수 접근 방법인가 보네요.
기존 process.env과 차이점이 있을까요?
✅ PR 체크리스트
PR 타입
설명하실 변경 사항은 어떤 종류인가요?
이슈 번호 : #5
해당 PR이 프로젝트에 큰 영향이 있나요?
작업 내용
추가 설명