mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-20 01:50:24 -05:00
snappier default display options
* 1-hour videos are a bit faster to render server-side and don't
require so much index data to be transferred before play starts
* the timestamp tracks might be causing a lot of excess data transfer
in some cases. They're currently not interleaved by ascending
timestamp, and I wonder if they should be. Chrome might be pulling
all the bytes between the current position in the two tracks, which
can be excessive. I'll have to consider interleaving when I add
audio anyway. But for now, just make the default UI display
snappier. Chrome doesn't display the timestamp track anyway, so
don't let it slow things down.
This commit is contained in:
@@ -13,7 +13,7 @@ import format from "date-fns/format";
|
||||
import React, { useMemo, useState } from "react";
|
||||
import * as api from "../api";
|
||||
import { Camera, Stream } from "../types";
|
||||
import DisplaySelector from "./DisplaySelector";
|
||||
import DisplaySelector, { DEFAULT_DURATION } from "./DisplaySelector";
|
||||
import StreamMultiSelector from "./StreamMultiSelector";
|
||||
import TimerangeSelector from "./TimerangeSelector";
|
||||
import VideoList from "./VideoList";
|
||||
@@ -91,10 +91,10 @@ const Main = ({ cameras, timeZoneName, showMenu }: Props) => {
|
||||
/** Selected time range. */
|
||||
const [range90k, setRange90k] = useState<[number, number] | null>(null);
|
||||
|
||||
const [split90k, setSplit90k] = useState<number | undefined>(undefined);
|
||||
const [split90k, setSplit90k] = useState(DEFAULT_DURATION);
|
||||
|
||||
const [trimStartAndEnd, setTrimStartAndEnd] = useState(true);
|
||||
const [timestampTrack, setTimestampTrack] = useState(true);
|
||||
const [timestampTrack, setTimestampTrack] = useState(false);
|
||||
|
||||
const [activeRecording, setActiveRecording] = useState<
|
||||
[Stream, api.Recording] | null
|
||||
|
||||
Reference in New Issue
Block a user