Enable background controls for iOS
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user