Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Commit

Permalink
fix(ios): call beginReceivingRemoteControlEvents
Browse files Browse the repository at this point in the history
This ensures remote events are received.
It's a universal function for the audio session.
At least one audio app needs to call this, but
all of them should.
  • Loading branch information
timmywil authored and tanguyantoine committed Apr 26, 2019
1 parent b2b1acc commit 442b77b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ios/MusicControlManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ - (void) toggleHandler:(MPRemoteCommand *) command withSelector:(SEL) selector e
- (id)init {
self = [super init];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(audioHardwareRouteChanged:) name:AVAudioSessionRouteChangeNotification object:nil];
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
self.audioInterruptionsObserved = false;
return self;
}
Expand Down

0 comments on commit 442b77b

Please sign in to comment.