-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Milestone
Description
Description
Validate that the existing audio proxy pattern (proxy.rs β axum on localhost serving audio to HTML5 Audio) works correctly on iOS before building playback features on top of it.
The desktop app uses a localhost axum HTTP server to proxy audio streams because WKWebView's AVFoundation doesn't handle Range requests via custom URI schemes. This same pattern should work on iOS in theory (localhost is ATS-exempt), but has never been tested. Multiple failure modes need early validation.
Scope:
- Basic proxy test: Start axum on
127.0.0.1:0in a Tauri iOS app, serve a static audio file, play via HTML5 Audio element in WKWebView - Range request test: Verify that iOS WKWebView sends Range requests to the proxy and receives correct partial content responses
- Memory behavior: Test under iOS memory pressure β the proxy holds up to 3 cached audio files in memory (
Arc<CachedAudio>). Does iOS kill the process or just the cache? - Background behavior: When the app is backgrounded, does the Tokio runtime (and thus the axum server) keep running? Or does iOS suspend the process and kill the proxy?
- YouTube n-param test: Validate that
n_transform.rsWebView eval works on iOS WKWebView β the YouTube de-throttling mechanism injects JavaScript viaWebview::eval(). Confirm Tauri v2's iOS WebView supports this. - Document findings: Create a brief report of what works, what doesn't, and any workarounds needed
Note: If the proxy doesn't work on iOS, an alternative audio approach would be needed (e.g., native AVPlayer, different caching strategy), which would significantly impact #54 (preview playback).
Key files:
src-tauri/src/proxy.rsβ existing proxy implementationsrc-tauri/src/services/discovery/n_transform.rsβ YouTube de-throttling via WebView eval
Open questions
- If Tokio is suspended during background, can we use iOS background task APIs to keep it alive briefly?
- If
n_transform.rsWebView eval doesn't work on iOS, what's the fallback for YouTube stream de-throttling? - Should the memory cache size (3 entries) be reduced on iOS to avoid memory pressure kills?
Acceptance criteria
- Proxy starts and binds to localhost on iOS simulator and physical device
- HTML5 Audio in WKWebView can play audio served by the proxy
- Range requests work correctly (seeking within audio works)
- Background behavior is documented (works or documented workaround)
- YouTube n-param WebView eval is validated (works or documented limitation)
- Findings documented with any needed workarounds
Tasks
TBD
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels