API Reference

Complete API documentation for React Native Video Toolkit components, hooks, providers, and utilities

API Reference

Welcome to the complete API documentation for React Native Video Toolkit. This library provides a comprehensive set of components, hooks, providers, and utilities for building powerful video players in React Native applications.

All components are built with TypeScript and support the new React Native architecture (Fabric + TurboModules).

Overview

Quick Start

The main entry point for the library is the VideoPlayer component:

import { VideoPlayer } from 'react-native-video-toolkit';

function MyVideoPlayer() {
  return (
    <VideoPlayer source={{ uri: 'https://example.com/video.mp4' }} style={{ width: '100%', height: 200 }}>
      <VideoPlayer.Controls />
    </VideoPlayer>
  );
}

Architecture

The library is organized into several key areas:

  • Core Components: Essential video functionality (VideoSurface, VideoPlayer)
  • Control Components: Interactive controls (PlayButton, ProgressBar, VolumeControl)
  • Display Components: Visual elements (TimeDisplay, Title, LoadingSpinner)
  • Layout Components: Structural containers and positioning
  • Provider System: State management and theming
  • Hook System: Reusable logic and state management
  • Gesture System: Touch and gesture handling

This library requires React Native 0.76+ and works best with the new architecture enabled.

On this page