Skip to content

Commit 49245de

Browse files
committed
fix: schedule polling on main queue
1 parent 6988cd3 commit 49245de

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/audiodocs/docs/system/audio-manager.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ function App() {
3232
});
3333

3434
useEffect(() => {
35-
3635
// enabling emission of events
3736
AudioManager.enableRemoteCommand('remotePlay', true);
3837
AudioManager.enableRemoteCommand('remotePause', true);

packages/react-native-audio-api/ios/audioapi/ios/system/NotificationManager.mm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ - (void)activelyReclaimSession:(BOOL)enabled
4646
name:AVAudioSessionSilenceSecondaryAudioHintNotification
4747
object:nil];
4848

49-
[self startPollingSecondaryAudioHint];
49+
dispatch_async(dispatch_get_main_queue(), ^{
50+
[self startPollingSecondaryAudioHint];
51+
});
5052
}
5153

5254
// WARNING: this does not work in a simulator environment, test it on a real device

0 commit comments

Comments
 (0)