using N_m3u8DL_RE.Common.Enum; using N_m3u8DL_RE.Parser.Processor; using N_m3u8DL_RE.Parser.Processor.DASH; using N_m3u8DL_RE.Parser.Processor.HLS; namespace N_m3u8DL_RE.Parser.Config { public class ParserConfig { public string Url { get; set; } public string BaseUrl { get; set; } public Dictionary Headers { get; set; } = new Dictionary(); /// /// 内容前置处理器. 调用顺序与列表顺序相同 /// public IList ContentProcessors { get; } = new List() { new DefaultHLSContentProcessor(), new DefaultDASHContentProcessor() }; /// /// 添加分片URL前置处理器. 调用顺序与列表顺序相同 /// public IList UrlProcessors { get; } = new List() { new DefaultUrlProcessor() }; /// /// KEY解析器. 调用顺序与列表顺序相同 /// public IList KeyProcessors { get; } = new List() { new DefaultHLSKeyProcessor() }; /// /// 自定义的加密方式 /// public EncryptMethod? CustomMethod { get; set; } /// /// 自定义的解密KEY /// public byte[]? CustomeKey { get; set; } /// /// 自定义的解密IV /// public byte[]? CustomeIV { get; set; } /// /// 组装视频分段的URL时,是否要把原本URL后的参数也加上去 /// 如 Base URL = "http://xxx.com/playlist.m3u8?hmac=xxx&token=xxx" /// 相对路径 = clip_01.ts /// 如果 AppendUrlParams=false,得 http://xxx.com/clip_01.ts /// 如果 AppendUrlParams=true,得 http://xxx.com/clip_01.ts?hmac=xxx&token=xxx /// public bool AppendUrlParams { get; set; } = false; /// /// 此参数将会传递给URL Processor中 /// public string? UrlProcessorArgs { get; set; } } }