mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-08 20:25:26 +03:00
Fix android mobile scrub logic
This commit is contained in:
parent
a14198be7e
commit
66b2b72614
@ -276,9 +276,15 @@ class PreviewVideoController extends PreviewController {
|
||||
if (isAndroid) {
|
||||
const currentTs =
|
||||
this.previewRef.current.currentTime + this.preview.start;
|
||||
this.previewRef.current.currentTime =
|
||||
this.previewRef.current.currentTime +
|
||||
(this.timeToSeek - currentTs) / 2;
|
||||
const diff = this.timeToSeek - currentTs;
|
||||
|
||||
if (diff < 30) {
|
||||
this.previewRef.current.currentTime =
|
||||
this.previewRef.current.currentTime + diff / 2;
|
||||
} else {
|
||||
this.previewRef.current.currentTime =
|
||||
this.timeToSeek - this.preview.start;
|
||||
}
|
||||
} else {
|
||||
this.previewRef.current.currentTime =
|
||||
this.timeToSeek - this.preview.start;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user