For AI agents: the complete documentation index is available at /1.x/llms.txt, the full documentation bundle is available at /1.x/llms-full.txt, and this page is available as Markdown at /1.x/guide/usage/basic-usage.md.
  • English
  • 1.x
  • Basic Usage

    Version 1.x centers on the YoutubePlayer component.

    import { YoutubePlayer } from 'react-native-youtube-bridge';
    
    function App() {
      return <YoutubePlayer source="AbZH7XWDW_k" height={240} width="100%" />;
    }

    Source input

    source can be a video ID, a { videoId } object, or a { url } object.

    <YoutubePlayer source="AbZH7XWDW_k" />
    <YoutubePlayer source={{ videoId: 'AbZH7XWDW_k' }} />
    <YoutubePlayer source={{ url: 'https://youtube.com/watch?v=AbZH7XWDW_k' }} />