-
Notifications
You must be signed in to change notification settings - Fork 0
Feature(#81,#86) 프로그래스바 음성 출력 구현 #259
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
Conversation
오디오를 불러오고 재생, 일시정지, 시간을 변경할 수 있도록 했습니다.
서버에서 가져온 음성 프롬프트를 확인 할 수 있습니다.
강의가 끝까지 재생되면 강의 재생이 멈추고, 다시 재생버튼을 누르면 처음부터 다시 재생됩니다.
사용하지 않는 코드를 삭제하고 주석과 console.log를 삭제했습니다
…231211-audio-replay
✅ Deploy Preview for boarlog ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
코드 잘 읽었습니다. 오늘도 고생 많으셨습니다 👍🏼
|
||
// 실제 데이터를 불러오는 코드 | ||
axios | ||
.get(`https://boarlog.shop/lecture/record/6576c9dfccd3e23a8e0fe473`) |
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.
이 부분은 env로 따로 빼주는 편이 좋을 것 같습니다. VITE_API_SERVER_URL로 빼두었습니다 :)
.catch((error) => { | ||
console.log("화이트보드 데이터 로딩 실패", error); | ||
.catch(() => { | ||
showToast({ message: "강의 데이터를 불러오는 데 실패했습니다.", type: "alert" }); |
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.
Toast 칭찬해주셔서 감사합니다. :)
여담) 요즘에는 다른 팀 중에서 훨씬 쉽게 사용할 수 있는 Toast를 구성하신 분이 계셔서 그쪽 구현 방식이 탐나기 시작하네요.. ㅎㅎㅎ 나중에 개선할 수 있으면 개선해보고 싶습니다.
@@ -75,17 +75,16 @@ const HeaderInstructorControls = ({ setLectureCode }: HeaderInstructorControlsPr | |||
axios | |||
.get(`${import.meta.env.VITE_API_SERVER_URL}/lecture?code=${roomid}`) | |||
.then((result) => { |
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.
사소하긴하지만 result를 {data}로 구조분해 할당해서 가져오는 것도 좋을 것 같아요.
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.
고생하셨습니다!
작업 개요
close #81
AI 기반으로 생성한 강의 프롬프트 표시한다. 특정 시간대의 프롬프트를 표시할 수 있다.
close #86
강의 시간에 따라 음성을 출력한다.
작업 사항
고민한 점들
강의 프롬프트를 어디서 불러와야 하나 고민했습니다.
현재는 강의 프롬프트, 화이트보드 데이터, 강의 음성이 모두 한번의 API요청으로 불러오게 되어 있어서
기존에 LogContainer에서 강의 프롬프트를 불러오던 방식을 변경해서 Review 컴포넌트에서 모두 불러온 후, LogContainer로 데이터를 넘겨주는 방식으로 개선했습니다.
스크린샷(필수 X)