mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 13:15: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) {
|
seekToTimestamp(time: number, play: boolean = false) {
|
||||||
if (this.playerMode != "playback") {
|
if (this.playerMode != "playback") {
|
||||||
this.playerMode = "playback";
|
this.playerMode = "playback";
|
||||||
|
|||||||
@ -119,7 +119,9 @@ export function DesktopRecordingView({
|
|||||||
const newController = videoPlayersRef.current[newCam];
|
const newController = videoPlayersRef.current[newCam];
|
||||||
lastController.onPlayerTimeUpdate(null);
|
lastController.onPlayerTimeUpdate(null);
|
||||||
lastController.onClipChangedEvent(null);
|
lastController.onClipChangedEvent(null);
|
||||||
|
lastController.autoPlay(false);
|
||||||
lastController.scrubToTimestamp(currentTime);
|
lastController.scrubToTimestamp(currentTime);
|
||||||
|
newController.autoPlay(true);
|
||||||
newController.onCanPlay(() => {
|
newController.onCanPlay(() => {
|
||||||
newController.seekToTimestamp(currentTime, true);
|
newController.seekToTimestamp(currentTime, true);
|
||||||
newController.onCanPlay(null);
|
newController.onCanPlay(null);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user