HomePhabricator
Diffusion Comm e62a683b104e

[native] Make `onTranscodingProgress` field of `MediaProcessConfig` optional

Tags
None
Referenced Files
F492657: e76904.png
Apr 18 2023, 7:14 AM
File Not Attached
Subscribers
None

Description

[native] Make onTranscodingProgress field of MediaProcessConfig optional

Summary:
The config argument of processMedia is of type MediaProcessConfig. Until now, the only processMedia callsite has been in InputStateContainer where we've always passed on onTranscodingProgress.

However, we now want to use processMedia(...) in EditAvatar where we DON'T want to set onTranscodingProgress (we don't support video avatars so there's zero use).

Why not just use processImage instead of processMedia?

processMedia doesn't just branch between processImage or processVideo based on type. There's a lot of common logic in processMedia that's required for both images and videos.

Test Plan:
Make sure transcoding progress still displayed properly for video messages:

e76904.png (452×632 px, 192 KB)

Reviewers: ashoat, ginsu

Reviewed By: ashoat

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D7478