Easily show thumbnails for videos
npm install react-native-thumbnail-video
Easily show thumbnails for videos using React Native.
![]()
> See the demo on Expo: @lucasbento/react-native-thumbnail-video-example
``sh`
yarn add react-native-thumbnail-video
`jsx
import { Thumbnail } from 'react-native-thumbnail-video';
// ...
render() {
return (
)
}
// ...
`
##### Extends Image prop-types
##### url (string)
URL of the video
##### type ([string])default
Can be either , high, medium, standard or maximum.
##### imageWidth (number/string)
Width of the image. Defaults to the device width.
##### imageHeight (number/string)200
Height of the image. Defaults to .
##### containerStyle (ViewPropTypes.style)TouchableOpacity
Style of the container using .
##### iconStyle (ImagePropTypes.style)
Style of the icon image.
##### showPlayIcon (boolean)
Show play icon. Defaults to true.
##### onPress (function)
Function to be called when the user presses the thumbnail. Defaults to opening the video URL.
##### onError (function)onPress
Function to be called when there's an error on the default function.
##### children` (component)
Custom component to render inside of the thumbnail.
MIT © Lucas Bento