namespace VideoDownloader.Core.Models;
public enum PlaylistType { Master, Media }
/// 마스터 재생목록의 변환(화질) 항목
public record Variant(Uri Url, int Bandwidth, string Resolution, string Codecs);
/// HLS AES-128 키 정보 (EXT-X-KEY)
public record KeyInfo(Uri? KeyUri, string? Iv);
/// 미디어 세그먼트
public record Segment(Uri Url, int Index, long Sequence, KeyInfo? Key);
/// m3u8 파싱 결과
public record ParsedPlaylist
{
public PlaylistType Type { get; init; }
public IReadOnlyList Variants { get; init; } = Array.Empty();
public IReadOnlyList Segments { get; init; } = Array.Empty();
public Uri? InitSegment { get; init; } // #EXT-X-MAP (fMP4 초기화 세그먼트)
}