Implement pip for video calls

This commit is contained in:
ismailgulek
2021-01-08 03:57:39 +03:00
parent 99d5b03d22
commit e2db97f995
10 changed files with 687 additions and 10 deletions
+26 -1
View File
@@ -4466,7 +4466,6 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
if (activeCallViewController)
{
// TODO: Add timer for active call duration
if (numberOfPausedCalls == 0)
{
// only one active
@@ -4514,6 +4513,32 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
}
}
- (void)callService:(CallService *)service enterPipForCallViewController:(CallViewController *)viewController completion:(void (^)(void))completion
{
// Check whether the call view controller is actually presented
if (viewController.presentingViewController)
{
[viewController dismissViewControllerAnimated:YES completion:completion];
}
else
{
if (completion)
{
completion();
}
}
}
- (void)callService:(CallService *)service exitPipForCallViewController:(CallViewController *)viewController completion:(void (^)(void))completion
{
if (@available(iOS 13.0, *))
{
viewController.modalPresentationStyle = UIModalPresentationFullScreen;
}
[self presentViewController:viewController animated:YES completion:completion];
}
#pragma mark - CallBarDelegate
- (void)callBarDidTapReturnButton:(CallBar *)callBar