Providers

ThemeProvider

The ThemeProvider component that provides theming capabilities to the video player and its children.

Usage

To use the ThemeProvider, you need to wrap your component with it and provide a theme object. This is usually done in the root component of your application.

import { ThemeProvider, defaultTheme } from 'react-native-video-toolkit';

export const App = () => <ThemeProvider theme={defaultTheme}>{/* Your application content */}</ThemeProvider>;

Props

PropTypeDefaultDescription
themeThemerequiredThe theme object.
childrenReactNoderequiredThe children to render.

useTheme

The useTheme hook provides access to the theme object.

Returns

ValueTypeDescription
themeThemeThe theme object.