OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 - (void)appClient:(ARDAppClient *)client | 277 - (void)appClient:(ARDAppClient *)client |
278 didGetStats:(NSArray *)stats { | 278 didGetStats:(NSArray *)stats { |
279 } | 279 } |
280 | 280 |
281 #pragma mark - APPRTCMainViewDelegate | 281 #pragma mark - APPRTCMainViewDelegate |
282 | 282 |
283 - (void)appRTCMainView:(APPRTCMainView*)mainView | 283 - (void)appRTCMainView:(APPRTCMainView*)mainView |
284 didEnterRoomId:(NSString*)roomId { | 284 didEnterRoomId:(NSString*)roomId { |
285 [_client disconnect]; | 285 [_client disconnect]; |
286 ARDAppClient *client = [[ARDAppClient alloc] initWithDelegate:self]; | 286 ARDAppClient *client = [[ARDAppClient alloc] initWithDelegate:self]; |
287 [client connectToRoomWithId:roomId isLoopback:NO isAudioOnly:NO]; | 287 [client connectToRoomWithId:roomId isLoopback:NO isAudioOnly:NO shouldMakeAecD
ump:NO]; |
288 _client = client; | 288 _client = client; |
289 } | 289 } |
290 | 290 |
291 #pragma mark - Private | 291 #pragma mark - Private |
292 | 292 |
293 - (APPRTCMainView*)mainView { | 293 - (APPRTCMainView*)mainView { |
294 return (APPRTCMainView*)self.view; | 294 return (APPRTCMainView*)self.view; |
295 } | 295 } |
296 | 296 |
297 - (void)showAlertWithMessage:(NSString*)message { | 297 - (void)showAlertWithMessage:(NSString*)message { |
298 NSAlert* alert = [[NSAlert alloc] init]; | 298 NSAlert* alert = [[NSAlert alloc] init]; |
299 [alert setMessageText:message]; | 299 [alert setMessageText:message]; |
300 [alert runModal]; | 300 [alert runModal]; |
301 } | 301 } |
302 | 302 |
303 - (void)resetUI { | 303 - (void)resetUI { |
304 [_remoteVideoTrack removeRenderer:self.mainView.remoteVideoView]; | 304 [_remoteVideoTrack removeRenderer:self.mainView.remoteVideoView]; |
305 _remoteVideoTrack = nil; | 305 _remoteVideoTrack = nil; |
306 [self.mainView.remoteVideoView renderFrame:nil]; | 306 [self.mainView.remoteVideoView renderFrame:nil]; |
307 } | 307 } |
308 | 308 |
309 - (void)disconnect { | 309 - (void)disconnect { |
310 [self resetUI]; | 310 [self resetUI]; |
311 [_client disconnect]; | 311 [_client disconnect]; |
312 } | 312 } |
313 | 313 |
314 @end | 314 @end |
OLD | NEW |