mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-02 14:16:59 +02:00
Call: Check permissions before accessing to the camera and the microphone.
It is particularly useful when a perm has been denied.
This commit is contained in:
@@ -1823,7 +1823,23 @@
|
||||
|
||||
- (void)roomInputToolbarView:(MXKRoomInputToolbarView*)toolbarView placeCallWithVideo:(BOOL)video
|
||||
{
|
||||
[self.mainSession.callManager placeCallInRoom:self.roomDataSource.roomId withVideo:video];
|
||||
NSString *appDisplayName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"];
|
||||
|
||||
// Check app permissions before placing the call
|
||||
[MXKTools checkAccessForCall:video
|
||||
manualChangeMessageForAudio:[NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"microphone_access_not_granted_for_call"], appDisplayName]
|
||||
manualChangeMessageForVideo:[NSString stringWithFormat:[NSBundle mxk_localizedStringForKey:@"camera_access_not_granted_for_call"], appDisplayName]
|
||||
showPopUpInViewController:self completionHandler:^(BOOL granted) {
|
||||
|
||||
if (granted)
|
||||
{
|
||||
[self.mainSession.callManager placeCallInRoom:self.roomDataSource.roomId withVideo:video];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"RoomViewController: Warning: The application does not have the perssion to place the call");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)roomInputToolbarView:(MXKRoomInputToolbarView*)toolbarView heightDidChanged:(CGFloat)height completion:(void (^)(BOOL finished))completion
|
||||
|
||||
Reference in New Issue
Block a user