Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- firebaseui
- css
- mac
- 다리놓기
- 타입스크립트
- 리액트
- react-firebaseui
- 구조분해할당
- Python
- 커스텀알림
- 파이어베이스로그인
- leetcode189
- youtube iframe
- 파이썬
- iP
- nvmrc
- leetcode977
- yarn-berry
- Rest
- Next.js
- JS
- react-native
- 백준
- 기초
- 자바스크립트
- React
- 커스텀알락
- nvm
- 프로토타입
- Spread
Archives
- Today
- Total
목록iframe (1)
JadeCode

프로젝트를 하던 중 유튜브 링크를 입력하고 불러와야하는 작업이 있었다. 처음에는 iframe을 사용하여 유튜브 링크를 넣었다. src 에 유튜브 링크 주소를 그대로 넣었더니 이런 메세지가 떴다. 검색을 해 보니 "https://www.youtube.com/watch?v=????" 형태로 된 주소는 허용하지 않는 것이다. 해결 방법은 단순하다. ????부분은 영상의 ID로 그 ID를 토대로 불러오면 된다. "http://www.youtube.com/embed/????" 형태로 src에 집어 넣으면 된다. function extractVideoID(url: string) { var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=..
개발/오류해결
2023. 3. 23. 17:30