Android Video View Thumbnail?

六月ゝ 毕业季﹏ 提交于 2019-12-05 02:09:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!