问题
I have the video which is stored under specific folder in sdcard. Currently i have the path as only parameter(Ex:"sdcard/test/sample.mp4"), by using url alone is it possible to retrieve the thumbnail of the image.
I also want to show the video preview display in android ,any one provide some example to do this thing.
Thanks
回答1:
ThumbnailUtils is an easy-to use API for generating thumbnails from arbitrary filesystem paths. It is available in API level 8.
Check out ThumbnailUtils.createVideoThumbnail:
Bitmap thumb = ThumbnailUtils.createVideoThumbnail(path,
MediaStore.Images.Thumbnails.MINI_KIND);
来源:https://stackoverflow.com/questions/5233317/android-video-view-thumbnail