mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 06:13:42 +00:00
feat(hls): add native HLS (m3u8) download protocol (#1515)
This commit is contained in:
56 files changed
+4536
-6
No files matched your search
@@ -56,6 +56,7 @@ class ProtocolConfig {
|
||||
HttpConfig http = HttpConfig();
|
||||
BtConfig bt = BtConfig();
|
||||
Ed2kConfig ed2k = Ed2kConfig();
|
||||
HlsConfig hls = HlsConfig();
|
||||
|
||||
ProtocolConfig();
|
||||
|
||||
@@ -65,6 +66,25 @@ class ProtocolConfig {
|
||||
Map<String, dynamic> toJson() => _$ProtocolConfigToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class HlsConfig {
|
||||
int segmentConnections;
|
||||
int maxRetries;
|
||||
int timeoutSeconds;
|
||||
bool prefetchContentLength;
|
||||
|
||||
HlsConfig({
|
||||
this.segmentConnections = 0,
|
||||
this.maxRetries = 0,
|
||||
this.timeoutSeconds = 0,
|
||||
this.prefetchContentLength = false,
|
||||
});
|
||||
|
||||
factory HlsConfig.fromJson(Map<String, dynamic> json) => _$HlsConfigFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$HlsConfigToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class HttpConfig {
|
||||
String userAgent;
|
||||
|
||||
Reference in new issue
Block a user