mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-12 20:30:13 +08:00
switch live stream/format/codec/url support
Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -2,24 +2,27 @@ import 'package:PiliPlus/models_new/live/live_room_play_info/url_info.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class CodecItem {
|
||||
int? currentQn;
|
||||
List<int>? acceptQn;
|
||||
String? baseUrl;
|
||||
List<UrlInfo>? urlInfo;
|
||||
String? codecName;
|
||||
int currentQn;
|
||||
List<int> acceptQn;
|
||||
String baseUrl;
|
||||
List<UrlInfo> urlInfo;
|
||||
|
||||
CodecItem({
|
||||
this.currentQn,
|
||||
this.acceptQn,
|
||||
this.baseUrl,
|
||||
this.urlInfo,
|
||||
this.codecName,
|
||||
required this.currentQn,
|
||||
required this.acceptQn,
|
||||
required this.baseUrl,
|
||||
required this.urlInfo,
|
||||
});
|
||||
|
||||
factory CodecItem.fromJson(Map<String, dynamic> json) => CodecItem(
|
||||
currentQn: json['current_qn'] as int?,
|
||||
acceptQn: (json['accept_qn'] as List?)?.fromCast(),
|
||||
baseUrl: json['base_url'] as String?,
|
||||
urlInfo: (json['url_info'] as List<dynamic>?)
|
||||
?.map((e) => UrlInfo.fromJson(e as Map<String, dynamic>))
|
||||
codecName: json['codec_name'],
|
||||
currentQn: json['current_qn'] as int,
|
||||
acceptQn: (json['accept_qn'] as List).fromCast(),
|
||||
baseUrl: json['base_url'] as String,
|
||||
urlInfo: (json['url_info'] as List<dynamic>)
|
||||
.map((e) => UrlInfo.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user