0

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.

Rajesh
  • 937
  • 1
  • 8
  • 14

1 Answers1

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.

}
Jules
  • 14,200
  • 13
  • 56
  • 101
Kedar
  • 1,298
  • 10
  • 20
  • 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