mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-06 20:10:12 +02:00
Set current time on local state for prev
This commit is contained in:
@@ -203,6 +203,7 @@ export const useCenterControls = (args: { playersRef: any }) => {
|
|||||||
|
|
||||||
const handleNextTrack = useCallback(() => {
|
const handleNextTrack = useCallback(() => {
|
||||||
const isLastTrack = checkIsLastTrack();
|
const isLastTrack = checkIsLastTrack();
|
||||||
|
setCurrentTime(0);
|
||||||
|
|
||||||
const handleRepeatAll = {
|
const handleRepeatAll = {
|
||||||
local: () => {
|
local: () => {
|
||||||
@@ -287,6 +288,8 @@ export const useCenterControls = (args: { playersRef: any }) => {
|
|||||||
|
|
||||||
// Reset the current track more than 10 seconds have elapsed
|
// Reset the current track more than 10 seconds have elapsed
|
||||||
if (currentTime >= 10) {
|
if (currentTime >= 10) {
|
||||||
|
setCurrentTime(0);
|
||||||
|
|
||||||
if (isMpvPlayer) {
|
if (isMpvPlayer) {
|
||||||
return mpvPlayer.seekTo(0);
|
return mpvPlayer.seekTo(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user