The video plays right. But I can not skip the video time.
Example: Skip time from 05:00 to 10:00.
It just keeps running, and I can not seem to skip the time.
I searched the internet and said that it has to make flow or range or buffer. I do not quite understand that. Link: link
Some say to implement w3c byte range requests. I just do not know where to start.
Follow the code below:
Controller:
[HttpGet]
public EmptyResult StreamUploadedVideo(int num)
{
byte[] teste = null;
using (var ctx = new Entities())
{
var result = ctx.Table.Where(x => x.Campo == 1).FirstOrDefault();
teste = result.Movie;
HttpContext.Response.AddHeader("Content-Disposition", "attachment; filename=nome.mp4"); //add header to httpcontext > response.
HttpContext.Response.BinaryWrite(teste); //write bytes to httpcontext response
return new EmptyResult();
}
}
View:
<video width="400" controls>
<source src="@Url.Action("StreamUploadedVideo","Controller" })" type="video/mp4">
<p>This browser does not support the video element.</p>
</video>
Can anyone help me?