Beispiel #1
0
        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));
        }
Beispiel #2
0
        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));
        }