Page MenuHomePhabricator

[native] Cache decrypted media
ClosedPublic

Authored by bartek on Mar 30 2023, 7:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 5, 10:08 PM
Unknown Object (File)
Sun, May 5, 8:52 PM
Unknown Object (File)
Fri, May 3, 3:44 PM
Unknown Object (File)
Fri, May 3, 2:30 PM
Unknown Object (File)
Sat, Apr 27, 8:58 PM
Unknown Object (File)
Sat, Apr 27, 8:58 PM
Unknown Object (File)
Sat, Apr 27, 8:58 PM
Unknown Object (File)
Sat, Apr 27, 8:58 PM
Subscribers

Details

Summary

This diff integrates media cache into app logic.

Depends on D7252, D7228

Test Plan

Sent some encrypted messages, then wiped state. Reopened the app - media are loading slowly. Exit and re-enter thread. The media should be displayed almost immediately

Diff Detail

Repository
rCOMM Comm
Branch
barthap/encrypted-media/js
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Mar 30 2023, 9:30 AM
bartek added inline comments.
native/data/sqlite-data-handler.js
73

I had no better idea where to put this. @kamil suggested that I can use this place but it looks like very SQLite specific

ashoat added inline comments.
native/data/sqlite-data-handler.js
73

I think this is a good option

native/media/video-playback-modal.react.js
113

Shorthand

This revision is now accepted and ready to land.Mar 30 2023, 4:40 PM

Rebase, address feedback. Minor fix on video disposal when unmounted

As a result of discussion in D7251, added a call to mediaCacheContext.evictCache() before merging sqlite data.

native/data/sqlite-data-handler.js
149–150 ↗(On Diff #24591)

Do these really need to be awaited in sequence?

This revision was automatically updated to reflect the committed changes.