pub fn media_local_url(
server: State<'_, MediaServerWrapper>,
path: String,
) -> Result<String, String>Expand description
A playable URL for a downloaded file on disk.
Local media is served over a loopback HTTP server rather than handed to the
webview as a file:///asset URL, because the asset protocol cannot stream a
large file — it answers a range-less request with the whole thing, which
Chromium abandons. See media_server for why real HTTP is used.
The returned URL carries the server’s per-session token, so it is only valid for this run of the app and must not be persisted.
TRACES: UR-071 | DR-137