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

[PiP] Use new functions expose by Element Call about PiP #3326

Closed
Tracked by #2386
bmarty opened this issue Aug 22, 2024 · 1 comment · Fixed by #3334
Closed
Tracked by #2386

[PiP] Use new functions expose by Element Call about PiP #3326

bmarty opened this issue Aug 22, 2024 · 1 comment · Fixed by #3334

Comments

@bmarty
Copy link
Member

bmarty commented Aug 22, 2024

Element Call is exposing 3 new functions about PiP:

  • canEnterPip: will return a boolean to let the application if it is possible to enter the PiP mode. If the call is in error state for instance, the application should not enter PiP but rather hang up the call. So if this function return true: enter PiP, else close the call.
  • enablePip to be called when the Activity is entering PiP, and will let Element Call render the PiP mode correctly
  • disablePip to be called when the Activity is exiting PiP, so render in fullscreen, and will let Element Call render the fullscreen mode correctly

Ref: element-hq/element-call#2573

@pixlwave
Copy link
Member

pixlwave commented Aug 22, 2024

For your reference, this is where we're using the API on iOS:

https://github.com/element-hq/element-x-ios/blob/dad9618f59c7494dbc69c150f2d71856c1d97c00/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift#L211-L259

And if that requestPictureInPicture method fails we then decide to navigate back to the previous screen.

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

Successfully merging a pull request may close this issue.

2 participants