Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

how to get video thumbnail #700

Closed
Symous opened this issue May 10, 2017 · 16 comments
Closed

how to get video thumbnail #700

Symous opened this issue May 10, 2017 · 16 comments

Comments

@Symous
Copy link
Contributor

Symous commented May 10, 2017

Actually,I have sloved this by myself. I leave this issue here to help any other who are looking for the solution. :-)

it's a surprise for me to find that if we put a video uri(such as video generated by react-native-camera) to Image of react-native component, it will show us a thumbnail of the video automatically.

<Image source={{uri : this.state.videoUri}} />
@Symous Symous changed the title how to get video thumnail how to get video thumbnail May 10, 2017
@Symous Symous closed this as completed May 10, 2017
@abologna-r7
Copy link

Nice, never thought about it...

@abologna-r7
Copy link

@Symous Any special styling that needs to be applied to the Image component? Even though I use an image with a URI, ex: 'https://cdn.com/video.mp4') I'm still getting a no thumbnail.

@Symous
Copy link
Contributor Author

Symous commented May 28, 2017

@abologna-r7 nothing special , but if you are trying to load a video on Internet , I guess that it will need time to load thevideo? I am using this way to show thumbnail of a local video.

@checkitoutteam
Copy link

checkitoutteam commented Jul 28, 2017

@abologna-r7 me too, it doesn't work. I got the following error:
Error decoding image data <NSData 0x7fc2cb34dec0; 2516731 bytes> Not a surprise, this is a video!
@Symous How did you manage it? Did you had a prefix or so?
Thanks!

@danielreis1
Copy link

use uri:'file:///path_to_image'

@samanthacampisi
Copy link

I've tried this and found out that this only works in Android for me. No luck in iOS.

@ckalpit
Copy link

ckalpit commented Sep 14, 2017

same here, on android it works fine, but on iOS it doesn't work.

@dinatazy
Copy link

in my case this works only on iOS

@Donhv
Copy link

Donhv commented Jan 5, 2018

not work for me

@timt
Copy link

timt commented Apr 11, 2018

You could use this library to make a thumbnail image: https://github.com/phuochau/react-native-thumbnail

@sibelius
Copy link
Collaborator

do u think we can add this to the docs?

@sibelius
Copy link
Collaborator

@leonyhenn
Copy link

what library did u guys use to get the url? in my case i used React Native CameraRoll on Android which returns file path as content://media/external/video/media/7086, but it doesnt show thumbnail when i plug in the file path as source uri. @Symous

@asimkhan0
Copy link

@leonyhenn did you find any solution ?
CameraRoll returns URIs 'content://media/external/video/media/11' and I need to display an Image/Thumbnail of it.

@n1ru4l
Copy link
Collaborator

n1ru4l commented Aug 8, 2018

@hungdev
Copy link

hungdev commented Feb 18, 2019

@react-native-camera react-native-camera locked as resolved and limited conversation to collaborators Feb 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests