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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 [self configureAudioSession]; | 50 [self configureAudioSession]; |
51 [self setupAudioPlayer]; | 51 [self setupAudioPlayer]; |
52 } | 52 } |
53 | 53 |
54 #pragma mark - ARDMainViewDelegate | 54 #pragma mark - ARDMainViewDelegate |
55 | 55 |
56 - (void)mainView:(ARDMainView *)mainView | 56 - (void)mainView:(ARDMainView *)mainView |
57 didInputRoom:(NSString *)room | 57 didInputRoom:(NSString *)room |
58 isLoopback:(BOOL)isLoopback | 58 isLoopback:(BOOL)isLoopback |
59 isAudioOnly:(BOOL)isAudioOnly | 59 isAudioOnly:(BOOL)isAudioOnly |
60 shouldMakeAecDump:(BOOL)shouldMakeAecDump | |
tkchin_webrtc
2016/08/24 00:42:20
nit: align
peah-webrtc
2016/08/25 09:25:08
Done.
| |
60 useManualAudio:(BOOL)useManualAudio { | 61 useManualAudio:(BOOL)useManualAudio { |
61 if (!room.length) { | 62 if (!room.length) { |
62 [self showAlertWithMessage:@"Missing room name."]; | 63 [self showAlertWithMessage:@"Missing room name."]; |
63 return; | 64 return; |
64 } | 65 } |
65 // Trim whitespaces. | 66 // Trim whitespaces. |
66 NSCharacterSet *whitespaceSet = [NSCharacterSet whitespaceCharacterSet]; | 67 NSCharacterSet *whitespaceSet = [NSCharacterSet whitespaceCharacterSet]; |
67 NSString *trimmedRoom = [room stringByTrimmingCharactersInSet:whitespaceSet]; | 68 NSString *trimmedRoom = [room stringByTrimmingCharactersInSet:whitespaceSet]; |
68 | 69 |
69 // Check that room name is valid. | 70 // Check that room name is valid. |
(...skipping 19 matching lines...) Expand all Loading... | |
89 | 90 |
90 RTCAudioSession *session = [RTCAudioSession sharedInstance]; | 91 RTCAudioSession *session = [RTCAudioSession sharedInstance]; |
91 session.useManualAudio = useManualAudio; | 92 session.useManualAudio = useManualAudio; |
92 session.isAudioEnabled = NO; | 93 session.isAudioEnabled = NO; |
93 | 94 |
94 // Kick off the video call. | 95 // Kick off the video call. |
95 ARDVideoCallViewController *videoCallViewController = | 96 ARDVideoCallViewController *videoCallViewController = |
96 [[ARDVideoCallViewController alloc] initForRoom:trimmedRoom | 97 [[ARDVideoCallViewController alloc] initForRoom:trimmedRoom |
97 isLoopback:isLoopback | 98 isLoopback:isLoopback |
98 isAudioOnly:isAudioOnly | 99 isAudioOnly:isAudioOnly |
100 shouldMakeAecDump:shouldMakeAecDump | |
tkchin_webrtc
2016/08/24 00:42:20
nit: align
peah-webrtc
2016/08/25 09:25:08
Done.
| |
99 delegate:self]; | 101 delegate:self]; |
100 videoCallViewController.modalTransitionStyle = | 102 videoCallViewController.modalTransitionStyle = |
101 UIModalTransitionStyleCrossDissolve; | 103 UIModalTransitionStyleCrossDissolve; |
102 [self presentViewController:videoCallViewController | 104 [self presentViewController:videoCallViewController |
103 animated:YES | 105 animated:YES |
104 completion:nil]; | 106 completion:nil]; |
105 } | 107 } |
106 | 108 |
107 - (void)mainViewDidToggleAudioLoop:(ARDMainView *)mainView { | 109 - (void)mainViewDidToggleAudioLoop:(ARDMainView *)mainView { |
108 if (mainView.isAudioLoopPlaying) { | 110 if (mainView.isAudioLoopPlaying) { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
198 - (void)showAlertWithMessage:(NSString*)message { | 200 - (void)showAlertWithMessage:(NSString*)message { |
199 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil | 201 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil |
200 message:message | 202 message:message |
201 delegate:nil | 203 delegate:nil |
202 cancelButtonTitle:@"OK" | 204 cancelButtonTitle:@"OK" |
203 otherButtonTitles:nil]; | 205 otherButtonTitles:nil]; |
204 [alertView show]; | 206 [alertView show]; |
205 } | 207 } |
206 | 208 |
207 @end | 209 @end |
OLD | NEW |