added seeking to now playing/notification

This commit is contained in:
austinried
2021-08-10 15:27:20 +09:00
parent 9705a95aaa
commit 2d2efe3dcf
7 changed files with 78 additions and 20 deletions

View File

@@ -60,6 +60,13 @@ export const useSkipTo = () => {
})
}
export const useSeekTo = () => {
return (position: number) =>
trackPlayerCommands.enqueue(async () => {
await TrackPlayer.seekTo(position)
})
}
export const useToggleRepeat = () => {
const setRepeatMode = useStore(selectTrackPlayer.setRepeatMode)