Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use native video call picture in picture! #3190

Merged
merged 6 commits into from
Aug 21, 2024
Merged

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Aug 21, 2024

This PR uses an AVPictureInPictureVideoCallController to PiP the whole EC web view instead of the previous solution where EC would request the web view to PiP the speaker's video. I've made the feature flag user configurable now as it no longer requires a specific EC deployment*.

This PR doesn't handle responses from the web view about whether PiP is possible so it is possible to get stuck in a call when an error occurs.

The second and third commits improves the handling of whether or not the we should start the PiP or dismiss the screen.

The fourth commit hides the call button when you're already joined to the call in that room.

* It subsequently does now, however when using an unsupported deployment it will simply navigate back which isn't the case with the old implementation on develop. The user can enter https://pr2573--element-call.netlify.app/ as the base URL above the flag for testing purposes.

@pixlwave pixlwave added the pr-wip for anything that isn't ready to ship and will be enabled at a later date label Aug 21, 2024
@pixlwave pixlwave requested a review from a team as a code owner August 21, 2024 11:19
@pixlwave pixlwave requested review from Velin92 and removed request for a team August 21, 2024 11:19
Copy link

github-actions bot commented Aug 21, 2024

Warnings
⚠️ Some of the commits are missing ticket numbers. Please consider squashing all commits that don't have a tracking number.
⚠️ You seem to have made changes to views. Please consider adding screenshots.

Generated by 🚫 Danger Swift against dad9618

@pixlwave pixlwave added the Trigger-PR-Build Uses to trigger alpha builds for PRs label Aug 21, 2024
Copy link

github-actions bot commented Aug 21, 2024

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/tpVBfA

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 36.74699% with 105 lines in your changes missing coverage. Please review.

Project coverage is 77.82%. Comparing base (e281a3f) to head (1a2a86f).
Report is 2 commits behind head on develop.

Files Patch % Lines
...X/Sources/Screens/CallScreen/View/CallScreen.swift 0.00% 67 Missing ⚠️
...urces/Screens/CallScreen/CallScreenViewModel.swift 0.00% 16 Missing ⚠️
ElementX/Sources/Other/Extensions/UIView.swift 0.00% 10 Missing ⚠️
...perOptionsScreen/View/DeveloperOptionsScreen.swift 0.00% 5 Missing ⚠️
...rces/Services/ElementCall/ElementCallService.swift 0.00% 5 Missing ⚠️
.../FlowCoordinators/UserSessionFlowCoordinator.swift 50.00% 1 Missing ⚠️
...ervices/ElementCall/ElementCallConfiguration.swift 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3190      +/-   ##
===========================================
+ Coverage    77.71%   77.82%   +0.11%     
===========================================
  Files          717      718       +1     
  Lines        56478    56655     +177     
===========================================
+ Hits         43893    44093     +200     
+ Misses       12585    12562      -23     
Flag Coverage Δ
unittests 68.39% <36.74%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@pixlwave pixlwave force-pushed the doug/video-call-pip branch from ae1facc to 833ba53 Compare August 21, 2024 15:37
Copy link
Member

@Velin92 Velin92 left a comment

Choose a reason for hiding this comment

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

LGTM, just a few suggestions/nits

Copy link

@pixlwave pixlwave merged commit 304070e into develop Aug 21, 2024
6 checks passed
@pixlwave pixlwave deleted the doug/video-call-pip branch August 21, 2024 16:48
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 Trigger-PR-Build Uses to trigger alpha builds for PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants