using Azaion.Video; using Microsoft.AspNetCore.Mvc; namespace Azaion.WebService.Controllers; [Route("/controller")] [ApiController] public class VideoController(IVideoManager videoManager) : Controller { [HttpGet("{guid}")] public IActionResult GetVideo(Guid guid) { var media = videoManager.Get(guid); var fileStream = new FileStream(media.M3U8File, FileMode.Open); var fileSize = new FileInfo(media.Path).Length; Response.ContentLength = fileSize; return File(fileStream, "application/x-mpegURL", true); } }