зеркало из https://github.com/nextcloud/talk-ios.git
Get audio and video state before stopping call controller.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
20e5f7149e
Коммит
cfb43ba6a8
|
@ -1769,7 +1769,7 @@ typedef void (^UpdateCallParticipantViewCellBlock)(CallParticipantViewCell *cell
|
|||
});
|
||||
}
|
||||
|
||||
- (void)callController:(NCCallController *)callController isSwitchingToCall:(NSString *)token
|
||||
- (void)callController:(NCCallController *)callController isSwitchingToCall:(NSString *)token withAudioEnabled:(BOOL)audioEnabled andVideoEnabled:(BOOL)videoEnabled
|
||||
{
|
||||
[self setCallState:CallStateSwitchingToAnotherRoom];
|
||||
|
||||
|
@ -1794,8 +1794,8 @@ typedef void (^UpdateCallParticipantViewCellBlock)(CallParticipantViewCell *cell
|
|||
// Asign new room as current room
|
||||
self->_room = [NCRoom roomWithDictionary:roomDict andAccountId:activeAccount.accountId];
|
||||
// Save current audio and video state
|
||||
self->_audioDisabledAtStart = !self->_callController.isAudioEnabled;
|
||||
self->_videoDisabledAtStart = !self->_callController.isVideoEnabled;
|
||||
self->_audioDisabledAtStart = !audioEnabled;
|
||||
self->_videoDisabledAtStart = !videoEnabled;
|
||||
// Forget current call controller
|
||||
self->_callController = nil;
|
||||
// Join new room
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
- (void)callControllerIsReconnectingCall:(NCCallController *)callController;
|
||||
- (void)callControllerWantsToHangUpCall:(NCCallController *)callController;
|
||||
- (void)callControllerDidChangeRecording:(NCCallController *)callController;
|
||||
- (void)callController:(NCCallController *)callController isSwitchingToCall:(NSString *)token;
|
||||
- (void)callController:(NCCallController *)callController isSwitchingToCall:(NSString *)token withAudioEnabled:(BOOL)audioEnabled andVideoEnabled:(BOOL)videoEnabled;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -262,9 +262,11 @@ static NSString * const kNCVideoTrackKind = @"video";
|
|||
- (void)willSwitchToCall:(NSString *)token
|
||||
{
|
||||
NSLog(@"willSwitchToCall");
|
||||
BOOL isAudioEnabled = [self isAudioEnabled];
|
||||
BOOL isVideoEnabled = [self isVideoEnabled];
|
||||
_userInCall = 0;
|
||||
[self stopCallController];
|
||||
[self.delegate callController:self isSwitchingToCall:token];
|
||||
[self.delegate callController:self isSwitchingToCall:token withAudioEnabled:isAudioEnabled andVideoEnabled:isVideoEnabled];
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче