Skip to content

WIP: Make PIP react to camera orientation changes#6951

Draft
jmartinesp wants to merge 1 commit into
developfrom
misc/pip-reacts-to-orientation-changes-from-other-user-in-element-call
Draft

WIP: Make PIP react to camera orientation changes#6951
jmartinesp wants to merge 1 commit into
developfrom
misc/pip-reacts-to-orientation-changes-from-other-user-in-element-call

Conversation

@jmartinesp

Copy link
Copy Markdown
Member

Content

Adds a controls.onPipMediaOrientationUpdate callback for the WebView that will trigger a new pipParamsBuilder.setAspectRatioFromOrientation(orientation) method.

This should be used along with element-hq/element-call#4004, but we can add the code before that's merged, as the callback just won't be used.

Motivation and context

Adapt to Element Call changes.

Tests

Use https://pr4004--element-call.netlify.app/room to test this.

  • In another client, start a video call, reply in one with these changes and the custom EC url.
  • Then go into another app so PiP appears.
  • Rotate the screen in the other device, the PiP window in the current one should follow the same orientation as their camera.

Tested devices

  • Physical
  • Emulator
  • OS version(s): 15

Checklist

  • I am aware of the etiquette.
  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

Adds a `controls.onPipMediaOrientationUpdate` callback for the WebView that will trigger a new `pipParamsBuilder.setAspectRatioFromOrientation(orientation)` method
@jmartinesp jmartinesp added the PR-Wip For anything that isn't ready to ship and will be enabled at a later date label Jun 3, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/z9Zu6y

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 21.42857% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.95%. Comparing base (4812cf9) to head (58a9811).
⚠️ Report is 321 commits behind head on develop.

Files with missing lines Patch % Lines
...d/features/call/impl/utils/WebViewPipController.kt 36.36% 7 Missing ⚠️
...droid/features/call/impl/ui/ElementCallActivity.kt 0.00% 6 Missing ⚠️
...es/androidutils/media/PictureInPictureParamsExt.kt 0.00% 4 Missing ⚠️
...eatures/call/impl/pip/PictureInPicturePresenter.kt 0.00% 2 Missing and 1 partial ⚠️
...id/features/call/impl/pip/PictureInPictureEvent.kt 0.00% 1 Missing ⚠️
...nt/android/features/call/impl/ui/CallScreenView.kt 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6951      +/-   ##
===========================================
- Coverage    80.98%   80.95%   -0.03%     
===========================================
  Files         2672     2673       +1     
  Lines        76125    76151      +26     
  Branches      9976     9983       +7     
===========================================
+ Hits         61647    61651       +4     
- Misses       10828    10848      +20     
- Partials      3650     3652       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

PR-Wip For anything that isn't ready to ship and will be enabled at a later date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant