Enable background controls for iOS

This commit is contained in:
Lei Nelissen
2020-06-16 21:41:02 +02:00
parent 50dd06a473
commit 2b35362272
7 changed files with 63 additions and 9 deletions

View File

@@ -14,6 +14,15 @@ export default class App extends Component<State> {
async componentDidMount() {
await TrackPlayer.setupPlayer();
await TrackPlayer.updateOptions({
capabilities: [
TrackPlayer.CAPABILITY_PLAY,
TrackPlayer.CAPABILITY_PAUSE,
TrackPlayer.CAPABILITY_SKIP_TO_NEXT,
TrackPlayer.CAPABILITY_SKIP_TO_PREVIOUS,
TrackPlayer.CAPABILITY_STOP,
]
});
this.setState({ isReady: true });
}