hd-camera
A camera: its latest snapshot as the picture, live video over it while the tile is on screen (the host signals WebRTC with its own session, so the template never sees a token), a status pill (Live, Connecting…, Paused, Snapshot with its age, Unavailable) and, when asked, the camera’s name, a motion badge and an expand mark, over soft scrims. It streams only while visible, while the page is visible and the host allows it, never on e-ink (the snapshot only, refreshed), at most four at a time per page, and retries with backoff when a stream can’t start, showing the snapshot meanwhile. A video a browser can’t play (RTSP) isn’t tried: it shows the snapshot with a note saying so. It fills its parent and sets data-state on itself: connecting, live, paused, failed, snapshot or unavailable.
| Attribute | What it is |
|---|---|
video | The device’s video by name.Default snapshot. |
image | The device’s snapshot image by name, shown until the video plays and instead of it.Default snapshot. |
device | Device id; defaults to the widget’s own device. |
live | Stream live video; without it, snapshots only.Default false. |
label | The camera’s name, top left; left out without it. |
room | Small text after the name, e.g. the room. |
motion-now | Motion right now: the badge says so.Default false. |
motion-at | When motion was last seen (ISO); the badge says how long ago, kept up to date. |
detected | What was seen, when the camera says (Person, Vehicle). |
bare | No name and no expand mark, for the big view that has them.Default false. |
big | The big view: it streams even when other cameras use all the places.Default false. |
sound | Play the camera’s sound (it is muted otherwise).Default false. |
unavailable | The camera is unavailable: no streaming, greyed snapshot.Default false. |
snapshot-every | Seconds between snapshots while there is no live video (at least 1; a minute at least on e-ink); the snapshot is never fetched more often, however often the camera renews it.Default 10. |
<hd-camera label="{{ device.name }}" room="{{ device.zoneName }}" live></hd-camera>