Page MenuHomePhabricator

[web] Modify MultimediaModal to support encrypted media
ClosedPublic

Authored by bartek on Apr 3 2023, 3:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 14, 4:49 PM
Unknown Object (File)
Sat, Dec 14, 4:49 PM
Unknown Object (File)
Sat, Dec 14, 4:49 PM
Unknown Object (File)
Sat, Dec 14, 4:48 PM
Unknown Object (File)
Sat, Dec 14, 4:43 PM
Unknown Object (File)
Fri, Dec 6, 9:55 PM
Unknown Object (File)
Thu, Dec 5, 8:41 PM
Unknown Object (File)
Thu, Dec 5, 8:41 PM
Subscribers

Details

Summary

This diff modifies the <MultimediaModal> component to be able to display encrypted media.
The type and uri props are replaced by a single object representing an encrypted or non-encrypted media.

Depends on D7279

Test Plan

Clicking on both encrypted and non-encrypted photo (the latter one possible together with the child diff) opens a modal and displays media.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Apr 3 2023, 4:56 AM

Looks great!

web/media/multimedia-modal.react.js
19 ↗(On Diff #24558)

I think this was mentioned somewhere else, but did we conclude that EncryptedMediaType isn't "sensitive" and doesn't leak anything?

53–55 ↗(On Diff #24558)

This is to be removed in the future, right?

web/modals/threads/gallery/thread-settings-media-gallery.react.js
51 ↗(On Diff #24558)

Thanks for flagging this!

Nit: I think we typically try to keep comments sentence-like. There are quite a few places where we omit ending punctuation (period, question mark, etc), but might be worth at least capitalizing "this".

This revision is now accepted and ready to land.Apr 4 2023, 9:23 AM
web/media/multimedia-modal.react.js
19 ↗(On Diff #24558)

Yeah, it's just a subset of MediaType enum

53–55 ↗(On Diff #24558)

We support only 4 vaiues for now: photo, video and encrypted_{photo,video}. If it isn't any of them, then it's illegal value.
If we ever add any other type, then this will be changed