mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-20 01:50:24 -05:00
add live stream viewing to React prototype
It's a start. It can display several streams at once, which is nice.
There are lots of opportunities for improvement:
* it doesn't keep the videos approximately in sync.
* it accumulates extra buffering, drifting behind live. This is
particularly noticeable when it's paused and played again; it can
be several seconds before it jumps to after the break.
* it always uses the sub stream rather main. I'd prefer it support
"auto" (use main if the viewport is larger than the sub stream and
there's sufficient bandwidth), "main", or "sub".
* it has a kludgy heuristic where it throws away everything buffered 5
seconds before the current timestamp. It should throw away
everything before the current GOP instead, but I need to alter the
API so it can easily know when that is.
* it can't tell you when a camera connection is down. This needs an
API change also.
* it'd be nice to quickly double-click on a stream to view only it,
then double-click again to go back to the multi-pane view.
* it doesn't allow you to zoom in on part of the video. This would be
nice particularly when viewing 4k video streams on small screens.
* it has only four preconfigured layouts that subdivide a 16x9
viewport. You have to choose every camera every time. It'd be nice
to both allow more flexibility and have more memory.
React prototype: #111
live stream: #59
This commit is contained in:
@@ -73,10 +73,10 @@ const useStyles = makeStyles((theme: Theme) => ({
|
||||
interface Props {
|
||||
timeZoneName: string;
|
||||
cameras: Camera[];
|
||||
showMenu: boolean;
|
||||
showSelectors: boolean;
|
||||
}
|
||||
|
||||
const Main = ({ cameras, timeZoneName, showMenu }: Props) => {
|
||||
const Main = ({ cameras, timeZoneName, showSelectors }: Props) => {
|
||||
const classes = useStyles();
|
||||
|
||||
/**
|
||||
@@ -134,7 +134,7 @@ const Main = ({ cameras, timeZoneName, showMenu }: Props) => {
|
||||
<div className={classes.root}>
|
||||
<Box
|
||||
className={classes.selectors}
|
||||
sx={{ display: showMenu ? "block" : "none" }}
|
||||
sx={{ display: showSelectors ? "block" : "none" }}
|
||||
>
|
||||
<StreamMultiSelector
|
||||
cameras={cameras}
|
||||
|
||||
Reference in New Issue
Block a user