开发者

Android Video View Thumbnail?

开发者 https://www.devze.com 2023-02-15 17:58 出处:网络
I have the video which is stored u开发者_运维知识库nder 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 retr

I have the video which is stored u开发者_运维知识库nder 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


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);
0

精彩评论

暂无评论...
验证码 换一张
取 消