Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show snapshots on events page #3763

Conversation

mellbye
Copy link
Contributor

@mellbye mellbye commented Sep 4, 2022

Add tabs to show snapshot or thumbnail as part of event details, even if event has a clip available. The previous version of the events page (0.10 and previous) showed the snapshot as the poster image for the video element. The new events page autoplays the video when details are shown, removing the opportunity to use the video poster image for the snapshot.

This PR introduces a set of buttons/tabs using the same elements as the experimental Camera UI to select whether to show the clip or snapshot, instead of assuming that clip is preferred over snapshot. The default is still clip if available.

If a snapshot is not available, the thumbnail is shown in its place, in accordance with the previous fallback logic. I opted to keep the UI text "Best Image" from the previous fallback logic, even though this is inconsistent with the "Download Snapshot" action on the right hand side of the card and the name "snapshot" across the rest of Frigate (config, directories and filenames on disk, etc). Please let me know if a different label is preferred.

Finally, the URI for the thumbnail in the snapshot fallback logic was updated to match the URI used in the main part of the event card, as the base64 encoded variant didn't actually seem to work.

Clip and snapshot available, snapshot selected

events-clip-and-snapshot

Only clip available, snapshot falls back to thumbnail

events-clip-only

Only snapshot available, clip button is disabled

events-snapshot-only

web/src/routes/Events.jsx Outdated Show resolved Hide resolved
@NickM-27 NickM-27 linked an issue Sep 4, 2022 that may be closed by this pull request
* Add tabs to show snapshot or thumbnail as part of event details,
  even if event has a clip available.
* Add ability for TextTab to render as disabled.
@mellbye mellbye force-pushed the feature/show-snapshots-for-events branch from 8da0e71 to 99f65f9 Compare September 4, 2022 01:07
@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Sep 4, 2022

Tested on desktop and mobile, looks good to me 👍

@blakeblackshear blakeblackshear merged commit 14faf0b into blakeblackshear:release-0.11.0 Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add bbox area information on the Events page in 11 Beta Version
3 participants