Conversation
| } | ||
| } | ||
|
|
||
| window.callsClient?.on('mute', () => { |
There was a problem hiding this comment.
This is an inconsistency I found when testing video on desktop. On the web side we do this to keep the redux state in sync with the local client. This avoids the issue of a perceivable lag between pressing mute/unmute and getting the UX to react, since otherwise we'd be waiting for a server side websocket event.
| frameRate: { | ||
| ideal: 30, | ||
| }, | ||
| aspectRatio: { | ||
| ideal: 4 / 3, | ||
| }, | ||
| width: { | ||
| ideal: 640, | ||
| }, |
There was a problem hiding this comment.
This is temporary, for testing things. In the absence of user preferences, we should respect the device's default aspect ratio.
There was a problem hiding this comment.
Did you get the aspect ratio fixed (from the test we did)? (is that issue actually these settings)
There was a problem hiding this comment.
Most likely, although this is just about the source.
I still need to review aspect ratios in general in the UI, was waiting for some designs to understand what we want to do with them. I see a few options:
- Clipping to cover all the available space without stretching (what we do today through
object-fit: cover). - Show the full video content but add bands (lateral or vertical) to maintain the original ratio.
- Dynamically modify widget dimensions (either height or width) to match the original ratio.
- Stretch to cover the entire space (I wouldn't do this).
| onToggle={noVideoInputDevices ? undefined : this.onVideoToggle} | ||
| ariaLabel={videoTooltipText} | ||
|
|
||
| //shortcut={} TODO: add shortcut |
There was a problem hiding this comment.
TBD, waiting for UX input.
There was a problem hiding this comment.
@streamer45 is @asaadmahmood looking at this for you?
There was a problem hiding this comment.
@matthewbirtch I haven't explicitly asked for it as I had to park this effort for a few weeks. It would be great to get a more formal UX pass on #1008, which is the tip of this work and should include most UX improvements to match against the designs you guys provided.
There was a problem hiding this comment.
Sounds good. I'll add @asaadmahmood to that PR then
| const onAnimationEnd = () => { | ||
| setAnimationEnded(true); | ||
| }; |
There was a problem hiding this comment.
This would never fire and leave the component mounted for the whole duration of the call, still spinning but not visible (zero opacity). I am fixing it as part of this PR.
| tooltipText={videoTooltipText} | ||
| tooltipSubtext={videoTooltipSubtext} | ||
| // eslint-disable-next-line no-undefined | ||
| // shortcut={noVideoInputDevices || noVideoPermissions ? undefined : reverseKeyMappings.popout[MUTE_UNMUTE][0]} |
There was a problem hiding this comment.
Same as for widget, TBD.
| /> | ||
| <label htmlFor='mirror'>{formatMessage({defaultMessage: 'Mirror video'})}</label> | ||
| </CheckBoxContainer> | ||
| {!isFirefox() && |
There was a problem hiding this comment.
Unfortunately, GPU acceleration isn't working yet on Firefox (see google-ai-edge/mediapipe#5879). I tested CPU only but it's just not going to work. Anyhow, this is experimental on top of an already experimental feature.
| const theme = getTheme(store.getState()); | ||
| setCallsGlobalCSSVars(theme.sidebarBg); |
There was a problem hiding this comment.
Another small bug I found when testing on Desktop.
There was a problem hiding this comment.
ah, that's why it was up above. What was the bug?
There was a problem hiding this comment.
--calls-bg CSS variable wouldn't be defined when running widget on desktop.
|
/cc @matthewbirtch for visibility. |
@streamer45 do you want me to review this from a UX standpoint, or are you just keeping me in the loop? |
@matthewbirtch The latter, for the time being. Of course early feedback is always welcome, but ideally I'd be waiting to have some Figma designs ready before asking for UX review because I've mostly improvised so far :) |
cpoile
left a comment
There was a problem hiding this comment.
🎉 Amazing work.
Just lots of questions. 🧑🎓
| frameRate: { | ||
| ideal: 30, | ||
| }, | ||
| aspectRatio: { | ||
| ideal: 4 / 3, | ||
| }, | ||
| width: { | ||
| ideal: 640, | ||
| }, |
There was a problem hiding this comment.
Did you get the aspect ratio fixed (from the test we did)? (is that issue actually these settings)
| }} | ||
| ref={videoInputsRef} | ||
| /> | ||
| <VideoPreview |
There was a problem hiding this comment.
is there a way to reuse components, or is it not worth the trouble?
There was a problem hiding this comment.
From the widget you mean? They serve very different purposes. Maybe a shared subcomponent but I am not sure.
| const theme = getTheme(store.getState()); | ||
| setCallsGlobalCSSVars(theme.sidebarBg); |
There was a problem hiding this comment.
ah, that's why it was up above. What was the bug?
|
This PR has been automatically labelled "stale" because it hasn't had recent activity. |
Summary
PR implements initial video support in DMs. The functionality is expected to be behind a new experimental
EnableVideoconfig setting, which defaults to false.The only slightly more involved logic is the image segmentation that powers the background blur functionality. This required adding an external dependency (
@mediapipe/tasks-vision) plus some WASM assets and a model file (see underpublic/). We can consider removing this from the initial MVP if we think it's too much.UX is a real work in progress, so don't focus too much on it. It will most certainly change before we merge as we are waiting for some designs.
Screenshots
Widget view

Popout view

Screen sharing
User settings
Related PRs
mattermost/rtcd#173
mattermost/calls-common#47
mattermost/mattermost-mobile#8716
Ticket Link
https://mattermost.atlassian.net/browse/MM-63430