mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 16:26:43 +00:00
Mute stream outside of more info (#6959)
This commit is contained in:
parent
99d0a0a6fd
commit
5480e54185
@ -26,7 +26,11 @@ class HaCameraStream extends LitElement {
|
|||||||
|
|
||||||
@property({ attribute: false }) public stateObj?: CameraEntity;
|
@property({ attribute: false }) public stateObj?: CameraEntity;
|
||||||
|
|
||||||
@property({ type: Boolean }) public showControls = false;
|
@property({ type: Boolean, attribute: "controls" })
|
||||||
|
public controls = false;
|
||||||
|
|
||||||
|
@property({ type: Boolean, attribute: "muted" })
|
||||||
|
public muted = false;
|
||||||
|
|
||||||
// We keep track if we should force MJPEG with a string
|
// We keep track if we should force MJPEG with a string
|
||||||
// that way it automatically resets if we change entity.
|
// that way it automatically resets if we change entity.
|
||||||
@ -56,9 +60,9 @@ class HaCameraStream extends LitElement {
|
|||||||
? html`
|
? html`
|
||||||
<ha-hls-player
|
<ha-hls-player
|
||||||
autoplay
|
autoplay
|
||||||
muted
|
|
||||||
playsinline
|
playsinline
|
||||||
?controls=${this.showControls}
|
.muted=${this.muted}
|
||||||
|
.controls=${this.controls}
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.url=${this._url}
|
.url=${this._url}
|
||||||
></ha-hls-player>
|
></ha-hls-player>
|
||||||
|
@ -48,7 +48,7 @@ class MoreInfoCamera extends LitElement {
|
|||||||
<ha-camera-stream
|
<ha-camera-stream
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.stateObj=${this.stateObj}
|
.stateObj=${this.stateObj}
|
||||||
showcontrols
|
controls
|
||||||
></ha-camera-stream>
|
></ha-camera-stream>
|
||||||
${this._cameraPrefs
|
${this._cameraPrefs
|
||||||
? html`
|
? html`
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import "@material/mwc-fab";
|
||||||
|
import { mdiPlus } from "@mdi/js";
|
||||||
import {
|
import {
|
||||||
customElement,
|
customElement,
|
||||||
LitElement,
|
LitElement,
|
||||||
@ -11,7 +13,7 @@ import {
|
|||||||
DataTableColumnContainer,
|
DataTableColumnContainer,
|
||||||
RowClickedEvent,
|
RowClickedEvent,
|
||||||
} from "../../../components/data-table/ha-data-table";
|
} from "../../../components/data-table/ha-data-table";
|
||||||
import "@material/mwc-fab";
|
import "../../../components/ha-svg-icon";
|
||||||
import { deleteUser, fetchUsers, updateUser, User } from "../../../data/user";
|
import { deleteUser, fetchUsers, updateUser, User } from "../../../data/user";
|
||||||
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
|
||||||
import "../../../layouts/hass-tabs-subpage-data-table";
|
import "../../../layouts/hass-tabs-subpage-data-table";
|
||||||
@ -19,8 +21,6 @@ import { HomeAssistant, Route } from "../../../types";
|
|||||||
import { configSections } from "../ha-panel-config";
|
import { configSections } from "../ha-panel-config";
|
||||||
import { showAddUserDialog } from "./show-dialog-add-user";
|
import { showAddUserDialog } from "./show-dialog-add-user";
|
||||||
import { showUserDetailDialog } from "./show-dialog-user-detail";
|
import { showUserDetailDialog } from "./show-dialog-user-detail";
|
||||||
import "../../../components/ha-svg-icon";
|
|
||||||
import { mdiPlus } from "@mdi/js";
|
|
||||||
|
|
||||||
@customElement("ha-config-users")
|
@customElement("ha-config-users")
|
||||||
export class HaConfigUsers extends LitElement {
|
export class HaConfigUsers extends LitElement {
|
||||||
@ -56,7 +56,7 @@ export class HaConfigUsers extends LitElement {
|
|||||||
),
|
),
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
width: "25%",
|
width: "30%",
|
||||||
template: (groupIds) => html`
|
template: (groupIds) => html`
|
||||||
${this.hass.localize(`groups.${groupIds[0]}`)}
|
${this.hass.localize(`groups.${groupIds[0]}`)}
|
||||||
`,
|
`,
|
||||||
@ -66,6 +66,7 @@ export class HaConfigUsers extends LitElement {
|
|||||||
"ui.panel.config.users.picker.headers.system"
|
"ui.panel.config.users.picker.headers.system"
|
||||||
),
|
),
|
||||||
type: "icon",
|
type: "icon",
|
||||||
|
width: "80px",
|
||||||
sortable: true,
|
sortable: true,
|
||||||
filterable: true,
|
filterable: true,
|
||||||
template: (generated) => html`
|
template: (generated) => html`
|
||||||
|
@ -3,9 +3,9 @@ import {
|
|||||||
CSSResult,
|
CSSResult,
|
||||||
customElement,
|
customElement,
|
||||||
html,
|
html,
|
||||||
|
internalProperty,
|
||||||
LitElement,
|
LitElement,
|
||||||
property,
|
property,
|
||||||
internalProperty,
|
|
||||||
PropertyValues,
|
PropertyValues,
|
||||||
query,
|
query,
|
||||||
TemplateResult,
|
TemplateResult,
|
||||||
@ -16,8 +16,8 @@ import { STATES_OFF } from "../../../common/const";
|
|||||||
import parseAspectRatio from "../../../common/util/parse-aspect-ratio";
|
import parseAspectRatio from "../../../common/util/parse-aspect-ratio";
|
||||||
import "../../../components/ha-camera-stream";
|
import "../../../components/ha-camera-stream";
|
||||||
import { fetchThumbnailUrlWithCache } from "../../../data/camera";
|
import { fetchThumbnailUrlWithCache } from "../../../data/camera";
|
||||||
import { CameraEntity, HomeAssistant } from "../../../types";
|
|
||||||
import { UNAVAILABLE } from "../../../data/entity";
|
import { UNAVAILABLE } from "../../../data/entity";
|
||||||
|
import { CameraEntity, HomeAssistant } from "../../../types";
|
||||||
|
|
||||||
const UPDATE_INTERVAL = 10000;
|
const UPDATE_INTERVAL = 10000;
|
||||||
const DEFAULT_FILTER = "grayscale(100%)";
|
const DEFAULT_FILTER = "grayscale(100%)";
|
||||||
@ -132,8 +132,9 @@ export class HuiImage extends LitElement {
|
|||||||
${this.cameraImage && this.cameraView === "live"
|
${this.cameraImage && this.cameraView === "live"
|
||||||
? html`
|
? html`
|
||||||
<ha-camera-stream
|
<ha-camera-stream
|
||||||
|
muted
|
||||||
.hass=${this.hass}
|
.hass=${this.hass}
|
||||||
.stateObj="${cameraObj}"
|
.stateObj=${cameraObj}
|
||||||
></ha-camera-stream>
|
></ha-camera-stream>
|
||||||
`
|
`
|
||||||
: html`
|
: html`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user