mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-09 03:59:58 +02:00
enforce web player seek by seconds when less than 1 (#1993)
This commit is contained in:
@@ -240,10 +240,16 @@ export function WebPlayer() {
|
||||
}
|
||||
}
|
||||
|
||||
let type: 'fraction' | 'seconds' | undefined = undefined;
|
||||
|
||||
if (timestamp < 1) {
|
||||
type = 'seconds';
|
||||
}
|
||||
|
||||
if (num === 1) {
|
||||
playerRef.current?.player1()?.ref?.seekTo(timestamp);
|
||||
playerRef.current?.player1()?.ref?.seekTo(timestamp, type);
|
||||
} else {
|
||||
playerRef.current?.player2()?.ref?.seekTo(timestamp);
|
||||
playerRef.current?.player2()?.ref?.seekTo(timestamp, type);
|
||||
}
|
||||
},
|
||||
onPlayerStatus: async (properties) => {
|
||||
|
||||
Reference in New Issue
Block a user