Skip to content

Commit d0f0568

Browse files
schumanndzmxv
authored andcommitted
removed auto play on AVAudioSessionRouteChangeReasonNewDeviceAvailable event (zmxv#425)
1 parent 97136c0 commit d0f0568

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

RNSound/RNSound.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ - (void)audioSessionChangeObserver:(NSNotification *)notification{
1818
AVAudioSessionRouteChangeReason audioSessionRouteChangeReason = [userInfo[@"AVAudioSessionRouteChangeReasonKey"] longValue];
1919
AVAudioSessionInterruptionType audioSessionInterruptionType = [userInfo[@"AVAudioSessionInterruptionTypeKey"] longValue];
2020
AVAudioPlayer* player = [self playerForKey:self._key];
21-
if (audioSessionRouteChangeReason == AVAudioSessionRouteChangeReasonNewDeviceAvailable){
22-
if (player) {
23-
[player play];
24-
}
25-
}
2621
if (audioSessionInterruptionType == AVAudioSessionInterruptionTypeEnded){
2722
if (player && player.isPlaying) {
2823
[player play];

0 commit comments

Comments
 (0)