зеркало из https://github.com/nextcloud/talk-ios.git
Process "switchto" signaling message.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
55405efc51
Коммит
b6112db73c
|
@ -854,6 +854,11 @@ static NSString * const kNCVideoTrackKind = @"video";
|
|||
}];
|
||||
}
|
||||
|
||||
- (void)externalSignalingController:(NCExternalSignalingController *)externalSignalingController shouldSwitchToCall:(NSString *)roomToken
|
||||
{
|
||||
[self willSwitchToCall:roomToken];
|
||||
}
|
||||
|
||||
#pragma mark - Signaling Controller Delegate
|
||||
|
||||
- (void)signalingController:(NCSignalingController *)signalingController didReceiveSignalingMessage:(NSDictionary *)message
|
||||
|
|
|
@ -39,6 +39,7 @@ typedef enum NCExternalSignalingSendMessageStatus {
|
|||
- (void)externalSignalingController:(NCExternalSignalingController *)externalSignalingController didReceivedParticipantListMessage:(NSDictionary *)participantListMessageDict;
|
||||
- (void)externalSignalingControllerShouldRejoinCall:(NCExternalSignalingController *)externalSignalingController;
|
||||
- (void)externalSignalingControllerWillRejoinCall:(NCExternalSignalingController *)externalSignalingController;
|
||||
- (void)externalSignalingController:(NCExternalSignalingController *)externalSignalingController shouldSwitchToCall:(NSString *)roomToken;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -479,6 +479,8 @@ static NSTimeInterval kWebSocketTimeoutInterval = 15;
|
|||
NSLog(@"Participant left room.");
|
||||
} else if ([eventType isEqualToString:@"message"]) {
|
||||
[self processRoomMessageEvent:[eventDict objectForKey:@"message"]];
|
||||
} else if ([eventType isEqualToString:@"switchto"]) {
|
||||
[self processSwitchToMessageEvent:[eventDict objectForKey:@"switchto"]];
|
||||
} else {
|
||||
NSLog(@"Unknown room event: %@", eventDict);
|
||||
}
|
||||
|
@ -496,6 +498,16 @@ static NSTimeInterval kWebSocketTimeoutInterval = 15;
|
|||
}
|
||||
}
|
||||
|
||||
- (void)processSwitchToMessageEvent:(NSDictionary *)messageDict
|
||||
{
|
||||
NSString *roomToken = [messageDict objectForKey:@"roomId"];
|
||||
if (roomToken.length > 0) {
|
||||
[self.delegate externalSignalingController:self shouldSwitchToCall:roomToken];
|
||||
} else {
|
||||
NSLog(@"Unknown switchTo message: %@", messageDict);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)processRoomListEvent:(NSDictionary *)eventDict
|
||||
{
|
||||
NSLog(@"Refresh room list.");
|
||||
|
|
Загрузка…
Ссылка в новой задаче