[MonoTouch] How to get an existing video thumbnail image from MonoTouch?
jkanalakis
jkanalakis at msn.com
Fri Dec 30 19:32:46 EST 2011
I'm trying to get a thumbnail image for a video that I've just chosen (or
recorded) via the UIImagePickerController. In my picker's
FinishedPickingMedia method, I get what I believe to be the path to the
video file and use it to save the recording to album. The newly recorded
video does indeed appear in my album. Now to get the thumbnail…
I've tried using the ALAssetsLibrary in a couple ways. First, I've
enumerated all the videos and tried to find a match from the asset's
UtiToUrlDictionary.Values[0] value, which reveals its file path. No entries
matched the path I obtained from the FinishedPickingMedia method's
mediaUrlKey.
My second attempt was to use the ALAssetsLibrary's AssetForUrl() method.
Again, I tried my FinishedPickingMedia method's mediaUrlKey, but there was
no match.
The UIImagePickerController -> FinishedPickingMedia -> mediaUrlKey returns a
path of:
file://localhost/private/var/mobile/Applications/73037738-C060-4DE6-A1CA-698E6BE083F2/tmp//trim.iRBwWw.MOV
After painful digging and inspecting every video in my library, it the same
video's path from the ALAssetsLibrary is:
assets-library://asset/asset.MOV?id=B073FCF6-83ED-436B-AFD8-42D0A6C70FC6&ext=MOV
Why are the video paths different between UIIMagePickerController and
ALAssetsLibrary? How can I get ALAssetsLibrary to return the same video
picked from UIImagePickerController?
[code for the picker]
Thank you
--
View this message in context: http://monotouch.2284126.n4.nabble.com/How-to-get-an-existing-video-thumbnail-image-from-MonoTouch-tp4247273p4247273.html
Sent from the MonoTouch mailing list archive at Nabble.com.
More information about the MonoTouch
mailing list