0
The video plays right. However I can’t skip the video time.
Example: Skip time from 05:00 to 10:00.
It just keeps spinning, and I can’t skip time.
I searched on the internet and they say you have to do stream or range or buffer. I do not understand very well with this. Link: https://tools.ietf.org/html/rfc7233
Some say to implement byte range requests w3c. I just don’t know where to start.
Follows code:
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 someone help me ?
I’ve already implemented this stuff there, helps lower the load!
– Wallace Maxters