Skip to content

Improve the look of voice calls and group calls on mobile#4067

Open
robintown wants to merge 7 commits into
livekitfrom
mobile-gradient
Open

Improve the look of voice calls and group calls on mobile#4067
robintown wants to merge 7 commits into
livekitfrom
mobile-gradient

Conversation

@robintown

Copy link
Copy Markdown
Member

This improves the look of calls on mobile by adding a new gradient background and adjusting various visual elements (footer and spotlight tiles) to let the background "shine through" when appropriate.

It also applies a new "sound wave" design to the other participant's avatar when they are speaking. If desired I can split that change out.

Before After
Screen Shot 2026-06-25 at 19 00 29 Screen Shot 2026-06-25 at 18 59 40
Screen Shot 2026-06-25 at 19 08 18 Screen Shot 2026-06-25 at 19 11 35

You can review this commit-by-commit.

I've marked this as a breaking change because it now applies a gradient background by default even in widget mode, which consumers of the embedded package will need to adapt to. (Element Web will want to disable the gradient, and Element X mobile clients will want to make it look best by forcing a dark theme.)

Closes https://github.com/element-hq/voip-internal/issues/526

});
});

describe("videoEnabled", () => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed these tests because they rested on the assumption that display: none was set directly in the video's style attribute rather than in a style sheet.

Comment thread src/graphics/mobile-gradient.svg Outdated
To indicate when the user is speaking.
By visually separating it from other page content with an additional gradient background only when necessary.
Comment thread playwright/widget/test-helpers.ts Outdated
Comment thread src/state/TileStore.ts
this.maximised$.next(value);
}

private readonly bgStyle$: BehaviorSubject<"solid" | "transparent">;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Maybe worth extracting a type given that "solid" | "transparent" occurs in multiple places?

Comment thread src/tile/MediaView.tsx
ref={ref}
data-testid="videoTile"
data-video-fit={videoFit}
data-bg-style={bgStyle}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't help but notice the imparity between bgStyle / data-bg-style and background / data-background (used for the page background) which both set the style of the background. This doesn't really matter much; so you may do with this comment whatever you want. 🙈😅

/>
<div
class="footer"
class="footer footer"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This struck me as odd at first but looks like these are in fact two different classes that just end up using the same string in tests due to our classNameStrategy setting. I guess classNameStrategy == stable would call this out a little nice but I assume there's no real downsides with the duplicate class names in just tests either?

@Johennes Johennes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me code-wise. Thanks a ton for breaking it up into commits. That really simplified the review.

I only tested Android. Is this how it is supposed to look without further changes?

Before After
Image Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Breaking-Change A Pull request that changes EC in a way that is incompatible to the previous version. PR-Improvement Release note category. A PR that improves EC's performance or stability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants