mirror of
https://github.com/Jellify-Music/App.git
synced 2026-03-17 10:40:38 -05:00
on skip the track should start playing
This commit is contained in:
@@ -37,10 +37,8 @@ export async function previous(): Promise<void> {
|
||||
* @param index The track index to skip to, to skip multiple tracks
|
||||
*/
|
||||
export async function skip(index: number | undefined): Promise<void> {
|
||||
const { state } = await TrackPlayer.getPlaybackState()
|
||||
|
||||
if (!isUndefined(index)) await TrackPlayer.skip(index)
|
||||
else await TrackPlayer.skipToNext()
|
||||
|
||||
if (state === State.Playing) await TrackPlayer.play()
|
||||
await TrackPlayer.play()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user