Skip to content

Commit

Permalink
Make sure stream resumes at current song
Browse files Browse the repository at this point in the history
  • Loading branch information
romeovs committed May 10, 2021
1 parent 7ad5713 commit e2b4dbe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ export function Player(props: Props) {
return
}

ref.current?.load()
ref.current?.play()
},
[playing, src],
)

return <audio src={src} ref={ref} />
return <audio src={playing ? src : ""} ref={ref} />
}

0 comments on commit e2b4dbe

Please sign in to comment.