OptiView Ads SDK for React Native
    Preparing search index...

    Function useReactVideoHandle

    • React hook that captures the react-native-video view tag from an event payload and exposes it as a ready-to-use NativePlayerHandleOwner:

      const { player, onVideoEvent } = useReactVideoHandle();
      // <Video source={...} onLoad={onVideoEvent} />
      useEffect(() => {
      if (!player) return;
      const connector = createOptiViewAds(player, config);
      return () => void connector.destroy();
      }, [player]);

      Returns UseReactVideoHandleResult

      The player handle (once known) and the event callback that captures it.