mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-04 17:49:57 +02:00
enforce web player seek by seconds when less than 1 (#1993)
This commit is contained in:
@@ -140,9 +140,15 @@ export const WebPlayerEngine = (props: WebPlayerEngineProps) => {
|
||||
};
|
||||
},
|
||||
seekTo(seekTo: number) {
|
||||
let type: 'fraction' | 'seconds' | undefined = undefined;
|
||||
|
||||
if (seekTo < 1) {
|
||||
type = 'seconds';
|
||||
}
|
||||
|
||||
playerNum === 1
|
||||
? player1Ref.current?.seekTo(seekTo)
|
||||
: player2Ref.current?.seekTo(seekTo);
|
||||
? player1Ref.current?.seekTo(seekTo, type)
|
||||
: player2Ref.current?.seekTo(seekTo, type);
|
||||
},
|
||||
setVolume(volume: number) {
|
||||
setInternalVolume1(volume / 100 || 0);
|
||||
|
||||
Reference in New Issue
Block a user