public HttpContent AudioContent(FileInfo audio, long start, long end) { return(new PushStreamContent((outputStream, httpContent, transpContext) => { using (outputStream) // copy file stream vào outputstream theo range trong header using (Stream inputStream = audio.Open(FileMode.Open, FileAccess.Read, FileShare.Read)) MediaUtilities.CreatePartialContent(inputStream, outputStream, start, end); //inputStream.CopyTo(outputStream, MediaUtilities.BufferSize); }, MediaUtilities.GetMimeType(audio.Extension))); }