Skip to content

Instantly share code, notes, and snippets.

@vertonghenb
Created October 30, 2020 16:49
Show Gist options
  • Save vertonghenb/d9ea6b5987d27771af0a489759058342 to your computer and use it in GitHub Desktop.
Save vertonghenb/d9ea6b5987d27771af0a489759058342 to your computer and use it in GitHub Desktop.
Stream from Azure Blob
[Route("api/test")]
[HttpGet]
public async Task<IActionResult> Test() {
var contentType = "multipart/x-mixed-replace;boundary=myboundary";
Stream stream = await client.Value.GetStreamAsync(WebCamUrl);
var result = new FileStreamResult(stream, contentType) {
EnableRangeProcessing = true
};
return result;
}
<video autoplay src="localhost:52867/api/test" controls="true"></video>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment