Skip to content

feat(tauri): cacheable media responses and Range streaming for video/audio#1157

Merged
7w1 merged 5 commits into
SableClient:devfrom
eleboucher:feat/tauri-media-caching-streaming
Jul 20, 2026
Merged

feat(tauri): cacheable media responses and Range streaming for video/audio#1157
7w1 merged 5 commits into
SableClient:devfrom
eleboucher:feat/tauri-media-caching-streaming

Conversation

@eleboucher

@eleboucher eleboucher commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

@eleboucher
eleboucher requested review from 7w1 and hazre as code owners July 20, 2026 12:21
Update rewriteAuthenticatedMediaUrl expectations to account for the
__sable_media_session query param, mocking getCurrentMediaSessionScope
for deterministic results. Add a changeset for the Tauri media caching
and Range streaming feature.
Comment thread src-tauri/src/network/media_protocol.rs
@eleboucher
eleboucher force-pushed the feat/tauri-media-caching-streaming branch from bb2457a to fb97340 Compare July 20, 2026 19:03
…udget

A media file larger than MAX_CACHE_BYTES was written to disk and then
immediately evicted by evict_if_needed (it alone exceeded the budget, so
everything — including itself — got dropped), so it was never servable
from disk on a hit.

ensure_cached now skips the write for bodies larger than the budget and
returns them in-memory for that request; handle_request serves a Range
request off the in-memory buffer via the new serve_range_memory. Cache
hits and all files within the budget are unchanged.
@eleboucher
eleboucher force-pushed the feat/tauri-media-caching-streaming branch from 990e1af to c66f7fa Compare July 20, 2026 19:11
@7w1
7w1 enabled auto-merge July 20, 2026 20:14
@7w1 7w1 added the internal label Jul 20, 2026
@7w1
7w1 added this pull request to the merge queue Jul 20, 2026
Merged via the queue into SableClient:dev with commit 3f221da Jul 20, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants