facebook/fresco

Tell Fresco to use disk cache for thumbnails of local videos

Offen

#2.171 geöffnet am 03.08.2018

 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (3.750 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (17.072 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Description

I'm using version 1.10.0

  • In root application, I call Fresco.initialize(getApplicationContext()).
  • In other UI controls, I pass Uri.fromFile("file://.../sdcard/example-video.mp4") to SimpleDraweeView. The view generates in-memory thumbnail and displays it correctly.
  • I check /data/data/my.app.id/cache/image_cache/ in emulator, no files or directories are in there. Which means for local videos, Fresco does not use disk cache.

Additional Information

  • Fresco version: 1.10.0
  • Platform version: emulator API 23

May I ask if you could consider adding option to tell Fresco to use disk cache for local videos? Normally generating thumbnails takes time, like 1-2 seconds per video (on my real device). So disk cache would help a lot.

Thank you,

====================

P.S: If someone could tell me how to do this hack then it would also help a lot:

Would it be possible to force Fresco to flush the in-memory generated thumbnails to disk cache? Then next time it checks for cache, it can use the cached files.

Contributor Guide