Skip to content

Commit

Permalink
better error message for live view on iOS (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottlamb committed Aug 13, 2021
1 parent 900cb92 commit b388aab
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Each release is tagged in Git and on the Docker repository
workaround, so anamorphic videos looked correct on Chrome but slightly
stretched on Firefox. Now both live streams and playback are fully correct
on all browsers.
* UI: better error message on browsers where live view is unsupported.

## `v0.6.4` (2021-06-28)

Expand Down
17 changes: 17 additions & 0 deletions ui/src/Live/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Copyright (C) 2021 The Moonfire NVR Authors; see AUTHORS and LICENSE.txt.
// SPDX-License-Identifier: GPL-v3.0-or-later WITH GPL-3.0-linking-exception

import Container from "@material-ui/core/Container";
import ErrorIcon from "@material-ui/icons/Error";
import { Camera } from "../types";
import LiveCamera from "./LiveCamera";
import Multiview from "./Multiview";
Expand All @@ -12,6 +14,21 @@ export interface LiveProps {
}

const Live = ({ cameras, layoutIndex }: LiveProps) => {
if ("MediaSource" in window === false) {
return (
<Container>
<ErrorIcon
sx={{
float: "left",
color: "secondary.main",
marginRight: "1em",
}}
/>
Live view doesn't work yet on your browser. See{" "}
<a href="https://github.com/scottlamb/moonfire-nvr/issues/121">#121</a>.
</Container>
);
}
return (
<Multiview
layoutIndex={layoutIndex}
Expand Down

0 comments on commit b388aab

Please sign in to comment.