This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.

Expo VideoThumbnails

A library that allows you to generate an image to serve as a thumbnail from a video file.

Android
iOS
tvOS
Included in Expo Go
Recommended version:
~56.0.3

expo-video-thumbnails allows you to generate an image to serve as a thumbnail from a video file.

Installation

Terminal
- npx expo install expo-video-thumbnails
- yarn expo install expo-video-thumbnails
- pnpm expo install expo-video-thumbnails
- bun expo install expo-video-thumbnails

If you are installing this in an existing React Native app, make sure to install expo in your project.

Usage

Video Thumbnails
import { useState } from 'react'; import { StyleSheet, Button, View, Image, Text } from 'react-native'; import * as VideoThumbnails from 'expo-video-thumbnails'; export default function App() { const [image, setImage] = useState(null); const generateThumbnail = async () => { try { const { uri } = await VideoThumbnails.getThumbnailAsync( 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4', { time: 15000, } ); setImage(uri); } catch (e) { console.warn(e); } }; return ( <View style={styles.container}> <Button onPress={generateThumbnail} title="Generate thumbnail" /> {image && <Image source={{ uri: image }} style={styles.image} />} <Text>{image}</Text> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, image: { width: 200, height: 200, }, });

API

import * as VideoThumbnails from 'expo-video-thumbnails';

No API data file found, sorry!