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

Not working on iOS with react-native-audio-toolkit framework #392

Closed
2 of 4 tasks
futureinapps opened this issue Jul 22, 2021 · 3 comments
Closed
2 of 4 tasks

Not working on iOS with react-native-audio-toolkit framework #392

futureinapps opened this issue Jul 22, 2021 · 3 comments

Comments

@futureinapps
Copy link

futureinapps commented Jul 22, 2021

Description

  1. Sample code (provide repo url or sample code)

in componentDidMount i call this:

RNMS.enableBackgroundMode(true);
RNMS.handleAudioInterruptions(true);
RNMS.enableControl('play', true);
RNMS.enableControl('pause', false);
RNMS.enableControl('nextTrack', false);
RNMS.enableControl('previousTrack', false);
RNMS.on(Command.play, () => {
  dispatch(startPractice() as any);
});
RNMS.on(Command.pause, () => {
  dispatch(pausePractice() as any);
});

onPlay i call setNowPlaying

  1. Platform ?

    • iOS
    • Android
  1. Device
  • Simulator
  • Real device
@futureinapps futureinapps changed the title Not working on iOS with react native audio toolkit framework Not working on iOS with react-native-audio-toolkit framework Jul 22, 2021
@bradfloodx
Copy link
Collaborator

Hi @futureinapps, I'm happy to look into this but you'll need to provide a reproducible project or bigger code sample. I need to be able to simulate your issue, but I can't with the above info. Thanks :)

@futureinapps
Copy link
Author

Yesterday, I spent the tones of time to investigate this issue and found out that it was a bug with the @react-native-community/audio-toolkit framework. I solved the problem by adding this changes

@bradfloodx
Copy link
Collaborator

Ok sweet thanks @futureinapps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants