Page MenuHomePhabricator

[web] Display videos correctly in `Multimedia` component
ClosedPublic

Authored by atul on Nov 29 2022, 1:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 19, 9:35 PM
Unknown Object (File)
Thu, Dec 19, 9:35 PM
Unknown Object (File)
Thu, Dec 19, 9:35 PM
Unknown Object (File)
Thu, Dec 19, 9:34 PM
Unknown Object (File)
Thu, Dec 19, 9:21 PM
Unknown Object (File)
Sat, Dec 14, 2:06 PM
Unknown Object (File)
Tue, Dec 10, 12:00 PM
Unknown Object (File)
Wed, Dec 4, 3:48 PM
Subscribers

Details

Summary

Context: https://linear.app/comm/issue/ENG-1512/render-video-messages-inline-on-web

Basically display media with <video> tag instead of <img> tag if mediaType === "video". Also remove any onClick functionality since we don't have any sort of full-screen video playback experience on web.

Test Plan

Here's how it looks in Safari:

8edddc.png (1×1 px, 2 MB)

Here's how it looks in Chrome:

3e73f7.png (1×1 px, 2 MB)

Made sure that images continue to look as expected.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Nov 29 2022, 1:15 PM
atul edited the test plan for this revision. (Show Details)
ashoat added inline comments.
web/media/multimedia.react.js
22 ↗(On Diff #18977)

Should we use MediaType here? Will reduce the amount of refactoring we need to do if we introduce another one

This revision is now accepted and ready to land.Nov 29 2022, 1:37 PM
web/media/multimedia.react.js
22 ↗(On Diff #18977)

Oh yeah definitely, will update

Type type prop of Multimedia as MediaType instead of 'photo' | 'video'

This revision was landed with ongoing or failed builds.Nov 29 2022, 2:14 PM
This revision was automatically updated to reflect the committed changes.