Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Only clip available, snapshot falls back to thumbnail
Only snapshot available, clip button is disabled