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)
Fri, May 17, 10:55 AM
Unknown Object (File)
Sat, May 11, 11:12 PM
Unknown Object (File)
Sat, May 11, 3:33 PM
Unknown Object (File)
Wed, May 8, 1:20 AM
Unknown Object (File)
Sat, May 4, 1:07 PM
Unknown Object (File)
Thu, May 2, 10:33 AM
Unknown Object (File)
Sat, Apr 27, 10:30 PM
Unknown Object (File)
Sat, Apr 27, 10:30 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
Lint Not Applicable
Unit
Tests Not Applicable

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