nextcloud / talk-ios

📱😀 Video & audio calls through Nextcloud on iOS
GNU General Public License v3.0
148 stars 91 forks source link

Enable Picture in Picture feature #364

Open AndyXheli opened 4 years ago

AndyXheli commented 4 years ago

It would be nice to have Picture in Picture feature so if your leave the talk app you can see see the user and they can see you while you're looking at emails or other things on the phone.

https://developer.apple.com/documentation/avkit/adopting_picture_in_picture_in_a_standard_player

AndyXheli commented 2 years ago

@SystemKeeper what do you think about this?

SystemKeeper commented 2 years ago

Hey @andyxheli I'm all for it 😉 It's not that easy to implement, though. I tried to add pip to talk-ios last year, but didn't succeed (I have to admit, that it was just a quick try and I didn't invest that much time). There is a open question about this over at stackoverflow: https://stackoverflow.com/questions/62875203/picture-in-picture-feature-for-webrtc but without a solution, so not sure if more time would've helped.

The other part of the problem is having the camera enabled while the app is in the background. iOS does not allow to access the camera while the app is in the background. With one of the latest updates (iOS 15.1?) Apple added support for this, but the app needs a special entitlement by Apple (granted on request and review). I don't know what requirements are needed to receive this entitlement or if talk-ios qualifies for this.

I'm not aware that someone is working on this (but I don't have insights), so if you ask me if this will be implemented shortly, my answer would be "I don't think so".

SystemKeeper commented 2 years ago

Some interesting details can be found at https://stackoverflow.com/questions/71419635/how-to-add-picture-in-picture-pip-for-webrtc-video-calls-in-ios-swift

Also with iOS 16 there's no longer the need to have a dedicated multitasking-camera-access-entitlement, see https://developer.apple.com/documentation/avkit/accessing_the_camera_while_multitasking?changes=__8&language=objc (note that it depends on the deployment target. We're currently targeting iOS 12, so this won't change anything for as for the next years)

swoosher76 commented 5 months ago

I would like to watch videos stored in NextCloud while I do other tasks. Picture in Picture support for this would be a great addition.