I am building a camera based app. In this app I am able to display the latest captured image thumbnail beside the capture button. Now how to do the same with the video thumbnail, I mean how to display the latest captured video thumbnail beside my capture button in camera ios. Thanks in advance.
Asked
Active
Viewed 226 times
1 Answers
0
Assuming that you are enumerating the assets using an enumeration block -
For the assets that you are enumerating, check the property key ALAssetPropertyType
in your enumeration block like this:
if([asset valueForProperty: ALAssetPropertyType] == ALAssetTypeVideo){
CGImageRef thumbnailVidoeImageRef = [asset thumbnail];
// Do what you want with this CGImageRef. Convert to UIImage etc.
}
-
for this I need the video url. how to get the recent captured video url.... Thank you so very much for your response – Rajesh May 27 '13 at 06:02
-
If you need the video url, can just add this in the same block - `NSURL *url= (NSURL*) [[asset defaultRepresentation]url];` – Kedar May 27 '13 at 19:07