Allow for seeking outside of the app
This commit is contained in:
@@ -24,6 +24,7 @@ export default class App extends Component<State> {
|
||||
TrackPlayer.CAPABILITY_SKIP_TO_NEXT,
|
||||
TrackPlayer.CAPABILITY_SKIP_TO_PREVIOUS,
|
||||
TrackPlayer.CAPABILITY_STOP,
|
||||
TrackPlayer.CAPABILITY_SEEK_TO,
|
||||
]
|
||||
});
|
||||
this.setState({ isReady: true });
|
||||
|
||||
@@ -29,4 +29,9 @@ export default async function() {
|
||||
TrackPlayer.addEventListener('remote-stop', () => {
|
||||
TrackPlayer.destroy();
|
||||
});
|
||||
|
||||
TrackPlayer.addEventListener('remote-seek', (event) => {
|
||||
TrackPlayer.seekTo(event.position);
|
||||
});
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user