switch live stream/format/codec/url support

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-11 12:16:24 +08:00
parent aa35569ebe
commit ea5d7593ff
11 changed files with 318 additions and 99 deletions

View File

@@ -1,13 +1,15 @@
import 'package:PiliPlus/models_new/live/live_room_play_info/format.dart';
class Stream {
List<Format>? format;
String? protocolName;
List<Format> format;
Stream({this.format});
Stream({this.protocolName, required this.format});
factory Stream.fromJson(Map<String, dynamic> json) => Stream(
format: (json['format'] as List<dynamic>?)
?.map((e) => Format.fromJson(e as Map<String, dynamic>))
protocolName: json['protocol_name'],
format: (json['format'] as List<dynamic>)
.map((e) => Format.fromJson(e as Map<String, dynamic>))
.toList(),
);
}