Always reset the audio session configuration after a call.
After returning from the call the AVAudioSession was configured to use the receiver instead of the speaker for audio output. The configuration was only restored if the sound loop was previously playing, this change makes sure that the configuration is always reset so the sound can be played audibly after a call has been finished. Bug: webrtc:7792 Change-Id: Idabf6fadc8041b18722cb8f5e89e0c8c36b1b74d Reviewed-on: https://chromium-review.googlesource.com/544819 Reviewed-by: Magnus Jedvert <magjed@webrtc.org> Commit-Queue: Anders Carlsson <andersc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#18754}
This commit is contained in:
parent
7941fc6e09
commit
3059378f7d
@ -271,10 +271,6 @@ if (is_ios || (is_mac && target_cpu != "x86")) {
|
||||
":AppRTCMobile_ios_frameworks",
|
||||
":apprtc_common",
|
||||
":apprtc_signaling",
|
||||
|
||||
# TODO(kthelgason): Remove this dep when audio_device has been
|
||||
# moved to sdk.
|
||||
"//webrtc/modules/audio_device:audio_device",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@ -235,9 +235,9 @@ static NSString *const loopbackLaunchProcessArgument = @"loopback";
|
||||
}
|
||||
|
||||
- (void)restartAudioPlayerIfNeeded {
|
||||
[self configureAudioSession];
|
||||
if (_mainView.isAudioLoopPlaying && !self.presentedViewController) {
|
||||
RTCLog(@"Starting audio loop due to WebRTC end.");
|
||||
[self configureAudioSession];
|
||||
[_audioPlayer play];
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user