--- url: /1.x/ko/guide/getting-started/overview.md --- # 1.x 개요 ![react-native-youtube-bridge 데모](https://raw.githubusercontent.com/react-native-bridges/react-native-youtube-bridge/main/assets/example.gif) 1.x는 `YoutubePlayer` 컴포넌트, callback props, imperative ref를 중심으로 한 레거시 API입니다. `react-native-youtube-bridge`는 [YouTube IFrame Player API](https://developers.google.com/youtube/iframe_api_reference)를 React Native 앱에서 쉽게 사용할 수 있게 감싼 라이브러리입니다. ## 주요 특징 - TypeScript 지원 - iOS, Android, Web 지원 - New Architecture 지원 - 네이티브 YouTube 플레이어 모듈 불필요 - YouTube IFrame Player API 기능 지원 - Expo 친화적 구성 - Inline HTML / 외부 WebView 렌더링 모드 기존 1.x 통합을 유지보수할 때 이 버전 문서를 사용하세요. 새 작업에는 2.x Hook 기반 API를 권장합니다. --- url: /1.x/ko/guide/getting-started/installation.md --- # 설치 :::warning 레거시 버전 1.x는 레거시 API입니다. 기존 1.x 통합을 유지보수하는 경우가 아니라면 최신 2.x 설치를 권장합니다. ::: 1.x 패키지를 설치합니다. ```sh [npm] npm install react-native-youtube-bridge@1.x ``` ```sh [yarn] yarn add react-native-youtube-bridge@1.x ``` ```sh [pnpm] pnpm add react-native-youtube-bridge@1.x ``` ```sh [bun] bun add react-native-youtube-bridge@1.x ``` ```sh [deno] deno add npm:react-native-youtube-bridge@1.x ``` ## peer dependency iOS와 Android에서는 `react-native-webview`가 필요합니다. ```sh [npm] npm install react-native-webview ``` ```sh [yarn] yarn add react-native-webview ``` ```sh [pnpm] pnpm add react-native-webview ``` ```sh [bun] bun add react-native-webview ``` ```sh [deno] deno add npm:react-native-webview ``` ## 최소 조건 | 패키지 | 버전 | | ---------------------- | ---------- | | `react` | `>=16.8.0` | | `react-native` | `>=0.60.0` | | `react-native-webview` | `>=11.0.0` | --- url: /1.x/ko/guide/getting-started/quick-start.md --- # 빠른 시작 ## 설치 ```sh [npm] npm install react-native-youtube-bridge@1.x ``` ```sh [yarn] yarn add react-native-youtube-bridge@1.x ``` ```sh [pnpm] pnpm add react-native-youtube-bridge@1.x ``` ```sh [bun] bun add react-native-youtube-bridge@1.x ``` ```sh [deno] deno add npm:react-native-youtube-bridge@1.x ``` ## 기본 플레이어 ```tsx import { YoutubePlayer } from 'react-native-youtube-bridge'; function App() { return ; } ``` ## source 입력 형태 ```tsx ``` ## 다음 단계 - 컴포넌트 API는 [기본 사용법](/1.x/ko/guide/usage/basic-usage.md)에서 확인하세요. - 플레이어 제어는 [플레이어 제어](/1.x/ko/guide/usage/player-controls.md)에서 확인하세요. - 2.x로 이동하려면 [마이그레이션 가이드](/1.x/ko/guide/migration-from-1.x.md)를 참고하세요. --- url: /1.x/ko/guide/getting-started/ai.md --- # AI AI가 이 라이브러리의 `1.x` 동작, 문서, 프로젝트 규칙을 더 잘 이해해서 개발이나 트러블슈팅 과정에서 더 정확한 도움을 줄 수 있도록, 이 프로젝트는 다음 기능들을 제공합니다. ## llms.txt [`llms.txt`](https://llmstxt.org/)는 LLM이 프로젝트 문서를 더 쉽게 탐색하고 활용할 수 있도록 돕는 표준입니다. `1.x` 문서는 아래 파일을 사용하면 됩니다. - [1.x/llms.txt](https://react-native-youtube-bridge-docs.pages.dev/1.x/ko/llms.txt): `1.x` 문서용 구조화된 인덱스 파일 ```txt https://react-native-youtube-bridge-docs.pages.dev/1.x/ko/llms.txt ``` - [1.x/llms-full.txt](https://react-native-youtube-bridge-docs.pages.dev/1.x/ko/llms-full.txt): `1.x` 문서 전체를 하나로 합친 파일 ```txt https://react-native-youtube-bridge-docs.pages.dev/1.x/ko/llms-full.txt ``` ## Markdown docs 모든 문서 페이지는 AI에게 직접 전달할 수 있는 Markdown 버전도 함께 제공합니다. 예시: ```txt https://react-native-youtube-bridge-docs.pages.dev/1.x/ko/guide/getting-started/overview.md https://react-native-youtube-bridge-docs.pages.dev/1.x/ko/guide/getting-started/quick-start.md https://react-native-youtube-bridge-docs.pages.dev/1.x/ko/guide/usage/player-controls.md ``` 특정 기능만 물어볼 때는 전체 문서보다 관련 Markdown 페이지 하나를 제공하는 편이 더 효율적입니다. --- url: /1.x/ko/guide/usage/basic-usage.md --- # 기본 사용법 1.x는 `YoutubePlayer` 컴포넌트를 중심으로 사용합니다. ```tsx import { YoutubePlayer } from 'react-native-youtube-bridge'; function App() { return ; } ``` ## source 입력 `source`는 비디오 ID, `{ videoId }`, `{ url }` 형태를 받을 수 있습니다. ```tsx ``` --- url: /1.x/ko/guide/usage/player-controls.md --- # 플레이어 제어 1.x는 `ref`를 통해 플레이어를 제어합니다. ```tsx import { useRef } from 'react'; import { Button, View } from 'react-native'; import { YoutubePlayer, type PlayerControls } from 'react-native-youtube-bridge'; function App() { const playerRef = useRef(null); return (