UNPKG

@react-native-youtube-bridge/react

Version:
33 lines (32 loc) 951 B
import { PlayerEvents, YoutubeSource } from "@react-native-youtube-bridge/core"; //#region src/hooks/useYoutubeVideoId.d.ts declare const useYouTubeVideoId: (source: YoutubeSource, onError?: PlayerEvents["onError"]) => string | null | undefined; //#endregion //#region src/hooks/useYoutubeOEmbed.d.ts type OEmbed = { author_name: string; author_url: string; height: number; html: string; provider_name: string; provider_url: string; thumbnail_height: number; thumbnail_url: string; thumbnail_width: number; title: string; type: string; version: string; width: number; }; /** * Hook to fetch the oEmbed data for a YouTube video. * @param url - The URL of the YouTube video. * @returns The oEmbed data, loading state, and error. */ declare const useYoutubeOEmbed: (url?: string) => { oEmbed: OEmbed | undefined; isLoading: boolean; error: Error | null; }; //#endregion export { useYouTubeVideoId, useYoutubeOEmbed };