Skip to content

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

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

Jw705
Copy link
Collaborator

@Jw705 Jw705 commented Dec 11, 2023

작업 개요

close #81 AI 기반으로 생성한 강의 프롬프트 표시한다. 특정 시간대의 프롬프트를 표시할 수 있다.
close #86 강의 시간에 따라 음성을 출력한다.

작업 사항

  • 강의 음성을 불러와 재생할 수 있다.
  • 강의 일시정지 및 시간 변경을 할 수 있다.
  • 강의가 끝까지 재생되면 강의 재생을 멈추고, 다시 재생 버튼을 눌러 처음부터 재생한다.

고민한 점들

강의 프롬프트를 어디서 불러와야 하나 고민했습니다.
현재는 강의 프롬프트, 화이트보드 데이터, 강의 음성이 모두 한번의 API요청으로 불러오게 되어 있어서
기존에 LogContainer에서 강의 프롬프트를 불러오던 방식을 변경해서 Review 컴포넌트에서 모두 불러온 후, LogContainer로 데이터를 넘겨주는 방식으로 개선했습니다.

스크린샷(필수 X)

오디오를 불러오고 재생, 일시정지, 시간을 변경할 수 있도록 했습니다.
서버에서 가져온 음성 프롬프트를 확인 할 수 있습니다.
강의가 끝까지 재생되면 강의 재생이 멈추고, 다시 재생버튼을 누르면
처음부터 다시 재생됩니다.
사용하지 않는 코드를 삭제하고 주석과 console.log를 삭제했습니다
@Jw705 Jw705 added ✨ Feat 기능 개발 FE 프론트엔드 작업 labels Dec 11, 2023
@Jw705 Jw705 added this to the 6주차 milestone Dec 11, 2023
@Jw705 Jw705 self-assigned this Dec 11, 2023
Copy link

netlify bot commented Dec 11, 2023

Deploy Preview for boarlog ready!

Name Link
🔨 Latest commit 96d80ab
🔍 Latest deploy log https://app.netlify.com/sites/boarlog/deploys/657707add4f7fc000877cbf6
😎 Deploy Preview https://deploy-preview-259--boarlog.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@LellowMellow LellowMellow left a 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`)
Copy link
Collaborator

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" });
Copy link
Collaborator

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) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사소하긴하지만 result를 {data}로 구조분해 할당해서 가져오는 것도 좋을 것 같아요.

Copy link
Collaborator

@Byeonjin Byeonjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

@Jw705 Jw705 merged commit c2e76b7 into boostcampwm2023:dev Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE 프론트엔드 작업 ✨ Feat 기능 개발
Projects
None yet
3 participants