mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-09 04:35:25 +03:00
Get autoplay working right
This commit is contained in:
parent
c4a6c31fe3
commit
431774d044
@ -328,6 +328,10 @@ export class DynamicVideoController {
|
||||
}
|
||||
}
|
||||
|
||||
autoPlay(play: boolean) {
|
||||
this.playerController.autoplay(play);
|
||||
}
|
||||
|
||||
seekToTimestamp(time: number, play: boolean = false) {
|
||||
if (this.playerMode != "playback") {
|
||||
this.playerMode = "playback";
|
||||
|
||||
@ -119,7 +119,9 @@ export function DesktopRecordingView({
|
||||
const newController = videoPlayersRef.current[newCam];
|
||||
lastController.onPlayerTimeUpdate(null);
|
||||
lastController.onClipChangedEvent(null);
|
||||
lastController.autoPlay(false);
|
||||
lastController.scrubToTimestamp(currentTime);
|
||||
newController.autoPlay(true);
|
||||
newController.onCanPlay(() => {
|
||||
newController.seekToTimestamp(currentTime, true);
|
||||
newController.onCanPlay(null);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user