--- url: /1.x/guide/getting-started/overview.md --- # 1.x Overview ![Demo of react-native-youtube-bridge](https://raw.githubusercontent.com/react-native-bridges/react-native-youtube-bridge/main/assets/example.gif) Version 1.x is the legacy component-based API for `react-native-youtube-bridge`. It wraps the [YouTube IFrame Player API](https://developers.google.com/youtube/iframe_api_reference) for React Native apps and uses a single `YoutubePlayer` component with callback props and an imperative ref. ## Key features - TypeScript support - iOS, Android, and Web support - New Architecture support - No native YouTube player module dependency - YouTube IFrame Player API feature support - Expo-friendly setup - Inline HTML and external WebView rendering modes Use this version lane when maintaining an existing 1.x integration. For new work, prefer the 2.x hook-based docs. --- url: /1.x/guide/getting-started/installation.md --- # Installation :::warning Legacy version Version 1.x is the legacy API. New projects should install the latest 2.x version unless they specifically need to maintain an existing 1.x integration. ::: Install the 1.x package: ```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 `react-native-youtube-bridge` uses `react-native-webview` on iOS and Android. ```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 ``` ## Minimum expectations | Package | Version | | ---------------------- | ---------- | | `react` | `>=16.8.0` | | `react-native` | `>=0.60.0` | | `react-native-webview` | `>=11.0.0` | --- url: /1.x/guide/getting-started/quick-start.md --- # Quick Start ## Install ```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 ``` ## Basic player ```tsx import { YoutubePlayer } from 'react-native-youtube-bridge'; function App() { return ; } ``` ## Accepted source forms ```tsx ``` ## Next steps - Learn the component API in [Basic Usage](/1.x/guide/usage/basic-usage.md) - Control the player in [Player Controls](/1.x/guide/usage/player-controls.md) - Move to 2.x with the [Migration Guide](/1.x/guide/migration-from-1.x.md) --- url: /1.x/guide/getting-started/ai.md --- # AI To help AI better understand this library's `1.x` behavior, documentation, and project conventions so it can provide more accurate help during development and troubleshooting, this project provides the following capabilities: ## llms.txt [`llms.txt`](https://llmstxt.org/) helps LLMs discover and use project documentation. For `1.x`, use the following files. - [1.x/llms.txt](https://react-native-youtube-bridge-docs.pages.dev/1.x/llms.txt): The structured index file for the `1.x` docs. ```txt https://react-native-youtube-bridge-docs.pages.dev/1.x/llms.txt ``` - [1.x/llms-full.txt](https://react-native-youtube-bridge-docs.pages.dev/1.x/llms-full.txt): The full-content file that concatenates the complete `1.x` documentation into a single file. ```txt https://react-native-youtube-bridge-docs.pages.dev/1.x/llms-full.txt ``` ## Markdown docs Every documentation page also has a corresponding Markdown version that can be passed directly to AI. Examples: ```txt https://react-native-youtube-bridge-docs.pages.dev/1.x/guide/getting-started/overview.md https://react-native-youtube-bridge-docs.pages.dev/1.x/guide/getting-started/quick-start.md https://react-native-youtube-bridge-docs.pages.dev/1.x/guide/usage/player-controls.md ``` Providing a single Markdown page is often the most efficient option when you want help with one specific feature. --- url: /1.x/guide/usage/basic-usage.md --- # Basic Usage Version 1.x centers on the `YoutubePlayer` component. ```tsx import { YoutubePlayer } from 'react-native-youtube-bridge'; function App() { return ; } ``` ## Source input `source` can be a video ID, a `{ videoId }` object, or a `{ url }` object. ```tsx ``` --- url: /1.x/guide/usage/player-controls.md --- # Player Controls Version 1.x exposes player controls through a `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 (