New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add blob() method to JS side of Blazor DotNetStreamReference #47685
Comments
Thanks for reaching out. If this is something that you're interested in contributing, please feel free to open a PR. The feature would most likely need to be implemented here. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Hi sorry for late response I just got some time to take a look at it today. I do not know how to test a Blazor project from async setStreamAsync(netStream, mime) {
const stream = await netStream.stream();
const res = new Response(stream, {
status: 200,
statusText: "OK",
headers: {
"Content-Type": mime,
}
});
const blob = await res.blob();
this.#vid.src = URL.createObjectURL(blob);
} However, at |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Right now the Streams passed from .NET to Javascript through
DotNetStreamReference
expose two methods:stream()
andarrayBuffer()
. The former doesn't read the whole stream into memory but there's not much support for it (for example in my case, playing video without knowing the codec, see question on StackOverflow). The latter would load the entire stream/file into memory which is not possible for large files like videos.I am also not aware of any method to convert a
ReadableStream
intoBlob
.Describe the solution you'd like
Add a
blob([mimeType: string])
method to the Javascript stream reference object that returns a Blob. This Blob should not load all the data into memory.Additional context
No response
The text was updated successfully, but these errors were encountered: