OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2015 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 13 matching lines...) Expand all Loading... |
24 @end | 24 @end |
25 | 25 |
26 @implementation ARDVideoCallViewController { | 26 @implementation ARDVideoCallViewController { |
27 ARDAppClient *_client; | 27 ARDAppClient *_client; |
28 RTCVideoTrack *_remoteVideoTrack; | 28 RTCVideoTrack *_remoteVideoTrack; |
29 RTCVideoTrack *_localVideoTrack; | 29 RTCVideoTrack *_localVideoTrack; |
30 } | 30 } |
31 | 31 |
32 @synthesize videoCallView = _videoCallView; | 32 @synthesize videoCallView = _videoCallView; |
33 | 33 |
34 - (instancetype)initForRoom:(NSString *)room { | 34 - (instancetype)initForRoom:(NSString *)room |
| 35 isLoopback:(BOOL)isLoopback |
| 36 isAudioOnly:(BOOL)isAudioOnly { |
35 if (self = [super init]) { | 37 if (self = [super init]) { |
36 _client = [[ARDAppClient alloc] initWithDelegate:self]; | 38 _client = [[ARDAppClient alloc] initWithDelegate:self]; |
37 [_client connectToRoomWithId:room options:nil]; | 39 [_client connectToRoomWithId:room |
| 40 isLoopback:isLoopback |
| 41 isAudioOnly:isAudioOnly |
| 42 options:nil]; |
38 } | 43 } |
39 return self; | 44 return self; |
40 } | 45 } |
41 | 46 |
42 - (void)loadView { | 47 - (void)loadView { |
43 _videoCallView = [[ARDVideoCallView alloc] initWithFrame:CGRectZero]; | 48 _videoCallView = [[ARDVideoCallView alloc] initWithFrame:CGRectZero]; |
44 _videoCallView.delegate = self; | 49 _videoCallView.delegate = self; |
45 _videoCallView.statusLabel.text = | 50 _videoCallView.statusLabel.text = |
46 [self statusTextForState:RTCICEConnectionNew]; | 51 [self statusTextForState:RTCICEConnectionNew]; |
47 self.view = _videoCallView; | 52 self.view = _videoCallView; |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 - (void)showAlertWithMessage:(NSString*)message { | 185 - (void)showAlertWithMessage:(NSString*)message { |
181 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil | 186 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil |
182 message:message | 187 message:message |
183 delegate:nil | 188 delegate:nil |
184 cancelButtonTitle:@"OK" | 189 cancelButtonTitle:@"OK" |
185 otherButtonTitles:nil]; | 190 otherButtonTitles:nil]; |
186 [alertView show]; | 191 [alertView show]; |
187 } | 192 } |
188 | 193 |
189 @end | 194 @end |
OLD | NEW |