Describe the problem
I'd like to make an application that can play videos from the filesystem. In some cases, the videos might be larger than the available system memory, so we don't want to load them as a Uint8Array, Blob or anything like that.
My reading of the code first introduced in #2104 AFAICT and now living at https://github.com/tauri-apps/tauri/blob/3e702cf8b15762cdca43c8d7ff6f6e8ee9670244/core/tauri/src/manager.rs#L640-L651= suggests that, when using the asset:// protocol (e.g. through convertFileSrc) the entire file will be read into memory as a Vec<u8> upon request (unless there's a Range header, in which case it will read part of the file).
Describe the solution you'd like
Naïvely, I'd like the asset:// protocol to stream the file from disk rather than buffer it all into memory.
It doesn't have to be the asset protocol; any mechanism where the Rust backend can expose a single file on the filesystem and have it streamed into a video tag on the page would be sufficient for my needs.
Alternatives considered
A workaround might be to expose the file over HTTP and stream it using a http:// URI. This kind of entirely bypasses Tauri though?
Additional context
No response
Describe the problem
I'd like to make an application that can play videos from the filesystem. In some cases, the videos might be larger than the available system memory, so we don't want to load them as a
Uint8Array,Blobor anything like that.My reading of the code first introduced in #2104 AFAICT and now living at https://github.com/tauri-apps/tauri/blob/3e702cf8b15762cdca43c8d7ff6f6e8ee9670244/core/tauri/src/manager.rs#L640-L651= suggests that, when using the
asset://protocol (e.g. throughconvertFileSrc) the entire file will be read into memory as aVec<u8>upon request (unless there's aRangeheader, in which case it will read part of the file).Describe the solution you'd like
Naïvely, I'd like the
asset://protocol to stream the file from disk rather than buffer it all into memory.It doesn't have to be the asset protocol; any mechanism where the Rust backend can expose a single file on the filesystem and have it streamed into a video tag on the page would be sufficient for my needs.
Alternatives considered
A workaround might be to expose the file over HTTP and stream it using a
http://URI. This kind of entirely bypasses Tauri though?Additional context
No response