facebook / fresco

An Android library for managing images and the memory they use.
https://frescolib.org/
MIT License
17.07k stars 3.75k forks source link

Fresco not working for get .mov file thumb android. #2227

Open prakashmp opened 5 years ago

prakashmp commented 5 years ago
public void image_LoaderForURI(Uri uri, SimpleDraweeView imageView) {
    ImageRequest request =
            ImageRequestBuilder.newBuilderWithSource(uri)
                    .setResizeOptions(new ResizeOptions(150, 150))
                    .build();
    DraweeController controller = Fresco.newDraweeControllerBuilder()
            .setImageRequest(request)

            .setOldController(imageView.getController())
            .build();
    imageView.setController(controller);
}

here only for .mov file fresco not working in lower version device .please suggest your thoughts.

erikandre commented 5 years ago

Hi @prakashmp

Fresco by itself does not support decoding Videos (like .mov), instead we rely on the Android OS to decode the video thumbnail for us using android.media.ThumbnailUtils.createImageThumbnail()

So if the OS does not have native support for .mov files, then thumbnails will also not work using Fresco.

Which lower version is it that this is not working on?

prakashmp commented 5 years ago

thank you for your info @erikandre :) below android version 8.0 all lower version not working.

oprisnik commented 5 years ago

For older Android versions, you can supply a custom decoder that adds this functionality, see https://frescolib.org/docs/customizing-image-formats.html

Pull requests are always welcome. This one should probably be a new custom decoder sample in the Fresco Showcase sample app (see showcase folder)