In my vision, I have an old video, when I upload new video, I want to automatically reload a new video after "upload".
View :
<div id="embed_video" class="embed-responsive embed-responsive-16by9">
<video class="embed-responsive-item" controls>
<source src="/Files/GetVideo?id=2" type="video/mp4">
Seu navegador não suporta vídeo em HTML5.
</video>
</div>
Javascript :
$('#embed_video video').get(0).load();
JavaScript code only works the first time, the second time the video does not update, it stays as old.
Controller :
public ActionResult GetVideo(int id)
{
using (var ctx = new Entities())
{
var result = ctx
.Video
.FirstOrDefault();
byte[] video_byte = result.Video;
return new RangeFileContentResult(video_byte, "video/mp4", "NomeDoArquivo.mp4", date);
}
}
Any solution?
From now on, I'm glad.