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/metadata-with-oembed.md.
  • English
  • 1.x
  • Metadata with oEmbed

    useYoutubeOEmbed fetches optional YouTube metadata for richer UI.

    import { useYoutubeOEmbed } from 'react-native-youtube-bridge';
    
    function App() {
      const { oEmbed, isLoading, error } = useYoutubeOEmbed(
        'https://www.youtube.com/watch?v=AbZH7XWDW_k',
      );
    
      if (isLoading) return null;
      if (error) return null;
    
      return <Text>{oEmbed?.title}</Text>;
    }