Repository navigation
feat(preview): backport animated WebP preview updates (#2734) - #2817
Merged
Merged
Conversation
Backport the remaining changes from main PR #2734 (56dc379) onto strata-next, where #2758 already implemented animated WebP playback via the pure-Rust sandboxed WebP decoder: - Remove any pending live-change flush timer when LiveChanges drops so dropped browsers do not leave thread-bound GLib sources attached to the default main context, with regression coverage. - Broaden the Rune media viewer's animation check to any image/* MIME type reaching the media player, and verify animated WebP and misnamed image animations ignore preview_video_start and start at 0:00. - Cover misnamed local animated WebP resolution (loop.png -> Media). - Document animated WebP behavior in docs/preferences.md and docs/preview-sandbox.md for strata-next's built-in sandboxed decoder.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Backports the remaining deltas from
mainPR #2734 (56dc379c7) ontostrata-next, reconciled with #2758 (da737d310), which already implemented animated WebP playback onstrata-nextusing the pure-Rust sandboxedimage::codecs::webp::WebPDecoder(without requiring FFmpeg 9.0'swebp_animdemuxer and with remote animated WebP support).Changes included:
LiveChangestimer cleanup (crates/strata-fs/src/app/browser/live_changes.rs): implementsDropforLiveChangesto remove any pending GLib flush timer when aBrowserdrops, preventing leaked thread-bound timers from firing on another thread iterating the defaultMainContext, with regression testdropping_a_browser_removes_its_pending_flush.crates/strata-app/src/preview/media/mod.rs,tests/media.rs): broadensis_animationtocontent_type.starts_with("image/")so any image MIME type reaching the media player loops from0:00with play/pause only, and verifies that animated WebP and misnamed image animations ignorepreview_video_start.crates/strata-fs/src/adapters/local_preview/tests/resolution.rs): adds a misnamedloop.pnganimated WebP case toPREVIEW_FAMILY_CASES.docs/preferences.md,docs/preview-sandbox.md): documents animated WebP behavior underPreview autoplay,Video preview start, and the sandboxed media playback section (accurately describingstrata-next's built-in sandboxed WebP decoder).Visual evidence
N/A: no visual changes beyond existing #2758 animated WebP playback. Selecting an animated WebP (including one with a mismatched extension) opens it in the animation player starting at 0:00 with only a play/pause toggle and continuous looping, while static WebP files keep the still-image viewer.
How to test
.webp, an animated.webp, and a copy of the animated WebP renamed to.png..webpand open Quick Preview: it opens in the still image viewer..webpand the renamed.pngcopy: both open in the animation player at0:00(ignoring the configured video start percentage), show only the play/pause control, and loop continuously.Related issue
Backports #2734.