Skip to main content
Glama
video-thumbnails.md1.13 kB
--- title: VideoThumbnails description: A library that allows you to generate an image to serve as a thumbnail from a video file. sourceCodeUrl: https://github.com/expo/expo/tree/sdk-51/packages/expo-video-thumbnails packageName: expo-video-thumbnails platforms: ["android", "ios"] --- `expo-video-thumbnails` allows you to generate an image to serve as a thumbnail from a video file. ## Installation ## Usage ```jsx const [image, setImage] = useState(null); const generateThumbnail = async () => { try { const { uri } = await VideoThumbnails.getThumbnailAsync( 'https://d23dyxeqlo5psv.cloudfront.net/big_buck_bunny.mp4', { time: 15000, } ); setImage(uri); } catch (e) { console.warn(e); } }; return ( <View style={styles.container}> {image && } <Text>{image}</Text> </View> ); } const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF', }, image: { width: 200, height: 200, }, }); ``` ## API ```js ```

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jaksm/expo-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server