Open ghost opened 8 years ago
Yes its posible you can change this code in ARDAppClient.m ((void)connectToRoomWithId:(NSString *)roomId options:(NSDictionary *)options
)
NSURL *turnRequestURL = [NSURL URLWithString:kARDTurnRequestUrl];
[self requestTURNServersWithURL:turnRequestURL completionHandler:^(NSArray *turnServers) {
ARDAppClient *strongSelf = weakSelf;
[strongSelf.iceServers addObjectsFromArray:turnServers];
strongSelf.isTurnComplete = YES;
[strongSelf startSignalingIfReady];
}];
to:
NSArray *uris = @[
@"your_stun_url1",
@"your_stun_url2"
];
NSString *username = @"";
NSString *password = @"";
NSMutableArray *servers = [NSMutableArray arrayWithCapacity:uris.count];
for (NSString *uri in uris) {
RTCICEServer *server =
[[RTCICEServer alloc] initWithURI:[NSURL URLWithString:uri]
username:username
password:password];
[servers addObject:server];
}
ARDAppClient *strongSelf = weakSelf;
[strongSelf.iceServers addObjectsFromArray:servers];
strongSelf.isTurnComplete = YES;
[strongSelf startSignalingIfReady];
Is it possible to connect with stun server and not turn server ?