public ActionResult Video(Guid id) { var videoinfo = _dbContext.Videos.FirstOrDefault(v => v.Id == id); var byteArray = _fileRepository.GetVideo(videoinfo); return(File(new MemoryStream(byteArray), videoinfo.MediaType, true)); }
public FileStreamResult GetVideoStream(Guid id) { var videoinfo = _dbContext.Videos.FirstOrDefault(v => v.Id == id); var video = _streamCache.GetVideo(videoinfo); return(new FileStreamResult(new MemoryStream(video), videoinfo.MediaType)); }