This adds support for thumb hash in modals. Unfortunately, CSS in encrypted media does not know its width and height so had to do measuring magic to get it to work with thumbhash, before actual src is available. Encrypted video support is added in D7900
Details
Details
- Reviewers
ashoat atul ginsu inka - Commits
- rCOMM8baa5f4f243d: [web] Support thumbhash in modals
Throttled network, slowed down decryption. Ensured the loading behavior is the same as for in-chat media (both non-encrypted images and videos). Resized browser window. Ensured the aspect ratio is maintained.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
web/media/multimedia-modal.react.js | ||
---|---|---|
149 ↗ | (On Diff #26900) | Unfortunately, CSS in encrypted media does not know its width and height before its decrypted so we need this to resize the thumbhash image manually. This function does the same as the following CSS: width: auto; height: auto; max-width: 100%; max-height: 100%; display: block; |
web/media/multimedia-modal.react.js | ||
---|---|---|
73–77 ↗ | (On Diff #26900) | Seems like we could move this inside the conditional on line 78, to make it clear it's only used for that case |
149 ↗ | (On Diff #26900) | Thanks for explaining! |
web/media/multimedia.react.js | ||
100–112 ↗ | (On Diff #26900) | I think if you rebase on the latest version of D7902, this change will be gone |
web/media/multimedia-modal.react.js | ||
---|---|---|
53–58 ↗ | (On Diff #26922) | Arguably this way is cleaner, but both work |