Skip to content
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

[DESIGN] : 유튜브 반응형 #85

Merged
merged 1 commit into from
Oct 7, 2024
Merged

[DESIGN] : 유튜브 반응형 #85

merged 1 commit into from
Oct 7, 2024

Conversation

minzziPark
Copy link
Member

@minzziPark minzziPark commented Oct 7, 2024

상세 구현

  • 유튜브 플레이어가 반응형 적용이 안되어 이를 구현해주었음
  • Youtube를 감싸는 div 박스를 만들고 div에 relative와 pb-[56.25%] 를 해주고 youtube에 absolute 를 넣어주면 반응형으로 구현된다.
<div className={`w-full relative pb-[56.25%]`}>
            <YouTube
              className={`absolute w-full h-full`}
              videoId={item.src} //동영상 주소
              opts={{
                width: "100%",
                height: "100%",
                playerVars: {
                  autoplay: 0,
                  modestbranding: 0, //컨트롤 바에 유튜브 로고 표시 여부
                  loop: 1, //반복 재생
                  playlist: `${item.src}`, //반복 재생으로 재생할 플레이 리스트
                },
              }}
            />
          </div>

close #84

@minzziPark minzziPark added the UI 컴포넌트/UI 개발 label Oct 7, 2024
@minzziPark minzziPark merged commit 3f34168 into main Oct 7, 2024
0 of 3 checks passed
@minzziPark minzziPark deleted the issue84 branch October 7, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI 컴포넌트/UI 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

유튜브 반응형 구현
1 participant