mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 12:10:33 +08:00
@@ -1,5 +1,5 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/url_info.dart';
|
||||
import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/extension/iterable_ext.dart';
|
||||
|
||||
class CodecItem {
|
||||
String? codecName;
|
||||
|
||||
@@ -4,47 +4,19 @@ class RoomPlayInfoData {
|
||||
int? roomId;
|
||||
int? shortId;
|
||||
int? uid;
|
||||
bool? isHidden;
|
||||
bool? isLocked;
|
||||
bool? isPortrait;
|
||||
int? liveStatus;
|
||||
int? hiddenTill;
|
||||
int? lockTill;
|
||||
bool? encrypted;
|
||||
bool? pwdVerified;
|
||||
int? liveTime;
|
||||
int? roomShield;
|
||||
List<dynamic>? allSpecialTypes;
|
||||
PlayurlInfo? playurlInfo;
|
||||
int? officialType;
|
||||
int? officialRoomId;
|
||||
int? riskWithDelay;
|
||||
String? multiScreenInfo;
|
||||
dynamic pureControlFunction;
|
||||
dynamic degradedPlayurl;
|
||||
|
||||
RoomPlayInfoData({
|
||||
this.roomId,
|
||||
this.shortId,
|
||||
this.uid,
|
||||
this.isHidden,
|
||||
this.isLocked,
|
||||
this.isPortrait,
|
||||
this.liveStatus,
|
||||
this.hiddenTill,
|
||||
this.lockTill,
|
||||
this.encrypted,
|
||||
this.pwdVerified,
|
||||
this.liveTime,
|
||||
this.roomShield,
|
||||
this.allSpecialTypes,
|
||||
this.playurlInfo,
|
||||
this.officialType,
|
||||
this.officialRoomId,
|
||||
this.riskWithDelay,
|
||||
this.multiScreenInfo,
|
||||
this.pureControlFunction,
|
||||
this.degradedPlayurl,
|
||||
});
|
||||
|
||||
factory RoomPlayInfoData.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -52,27 +24,13 @@ class RoomPlayInfoData {
|
||||
roomId: json['room_id'] as int?,
|
||||
shortId: json['short_id'] as int?,
|
||||
uid: json['uid'] as int?,
|
||||
isHidden: json['is_hidden'] as bool?,
|
||||
isLocked: json['is_locked'] as bool?,
|
||||
isPortrait: json['is_portrait'] as bool?,
|
||||
liveStatus: json['live_status'] as int?,
|
||||
hiddenTill: json['hidden_till'] as int?,
|
||||
lockTill: json['lock_till'] as int?,
|
||||
encrypted: json['encrypted'] as bool?,
|
||||
pwdVerified: json['pwd_verified'] as bool?,
|
||||
liveTime: json['live_time'] as int?,
|
||||
roomShield: json['room_shield'] as int?,
|
||||
allSpecialTypes: json['all_special_types'] as List<dynamic>?,
|
||||
playurlInfo: json['playurl_info'] == null
|
||||
? null
|
||||
: PlayurlInfo.fromJson(
|
||||
json['playurl_info'] as Map<String, dynamic>,
|
||||
),
|
||||
officialType: json['official_type'] as int?,
|
||||
officialRoomId: json['official_room_id'] as int?,
|
||||
riskWithDelay: json['risk_with_delay'] as int?,
|
||||
multiScreenInfo: json['multi_screen_info'] as String?,
|
||||
pureControlFunction: json['pure_control_function'] as dynamic,
|
||||
degradedPlayurl: json['degraded_playurl'] as dynamic,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
class ExpectedQuality {
|
||||
int? qn;
|
||||
int? hdrType;
|
||||
|
||||
ExpectedQuality({this.qn, this.hdrType});
|
||||
|
||||
factory ExpectedQuality.fromJson(Map<String, dynamic> json) {
|
||||
return ExpectedQuality(
|
||||
qn: json['qn'] as int?,
|
||||
hdrType: json['hdr_type'] as int?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
class GQnDesc {
|
||||
int? qn;
|
||||
String? desc;
|
||||
String? hdrDesc;
|
||||
dynamic attrDesc;
|
||||
int? hdrType;
|
||||
dynamic mediaBaseDesc;
|
||||
|
||||
GQnDesc({
|
||||
this.qn,
|
||||
this.desc,
|
||||
this.hdrDesc,
|
||||
this.attrDesc,
|
||||
this.hdrType,
|
||||
this.mediaBaseDesc,
|
||||
});
|
||||
|
||||
factory GQnDesc.fromJson(Map<String, dynamic> json) => GQnDesc(
|
||||
qn: json['qn'] as int?,
|
||||
desc: json['desc'] as String?,
|
||||
hdrDesc: json['hdr_desc'] as String?,
|
||||
attrDesc: json['attr_desc'] as dynamic,
|
||||
hdrType: json['hdr_type'] as int?,
|
||||
mediaBaseDesc: json['media_base_desc'] as dynamic,
|
||||
);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
class P2pData {
|
||||
bool? p2p;
|
||||
int? p2pType;
|
||||
bool? mP2p;
|
||||
dynamic mServers;
|
||||
|
||||
P2pData({this.p2p, this.p2pType, this.mP2p, this.mServers});
|
||||
|
||||
factory P2pData.fromJson(Map<String, dynamic> json) => P2pData(
|
||||
p2p: json['p2p'] as bool?,
|
||||
p2pType: json['p2p_type'] as int?,
|
||||
mP2p: json['m_p2p'] as bool?,
|
||||
mServers: json['m_servers'] as dynamic,
|
||||
);
|
||||
}
|
||||
@@ -1,33 +1,18 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/g_qn_desc.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/p2p_data.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/stream.dart';
|
||||
|
||||
class Playurl {
|
||||
int? cid;
|
||||
List<GQnDesc>? gQnDesc;
|
||||
List<Stream>? stream;
|
||||
P2pData? p2pData;
|
||||
dynamic dolbyQn;
|
||||
|
||||
Playurl({
|
||||
this.cid,
|
||||
this.gQnDesc,
|
||||
this.stream,
|
||||
this.p2pData,
|
||||
this.dolbyQn,
|
||||
});
|
||||
|
||||
factory Playurl.fromJson(Map<String, dynamic> json) => Playurl(
|
||||
cid: json['cid'] as int?,
|
||||
gQnDesc: (json['g_qn_desc'] as List<dynamic>?)
|
||||
?.map((e) => GQnDesc.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
stream: (json['stream'] as List<dynamic>?)
|
||||
?.map((e) => Stream.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
p2pData: json['p2p_data'] == null
|
||||
? null
|
||||
: P2pData.fromJson(json['p2p_data'] as Map<String, dynamic>),
|
||||
dolbyQn: json['dolby_qn'] as dynamic,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,29 +1,15 @@
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/expected_quality.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_room_play_info/playurl.dart';
|
||||
|
||||
class PlayurlInfo {
|
||||
String? confJson;
|
||||
Playurl? playurl;
|
||||
ExpectedQuality? expectedQuality;
|
||||
int? qnDescMoreAb;
|
||||
|
||||
PlayurlInfo({
|
||||
this.confJson,
|
||||
this.playurl,
|
||||
this.expectedQuality,
|
||||
this.qnDescMoreAb,
|
||||
});
|
||||
|
||||
factory PlayurlInfo.fromJson(Map<String, dynamic> json) => PlayurlInfo(
|
||||
confJson: json['conf_json'] as String?,
|
||||
playurl: json['playurl'] == null
|
||||
? null
|
||||
: Playurl.fromJson(json['playurl'] as Map<String, dynamic>),
|
||||
expectedQuality: json['expected_quality'] == null
|
||||
? null
|
||||
: ExpectedQuality.fromJson(
|
||||
json['expected_quality'] as Map<String, dynamic>,
|
||||
),
|
||||
qnDescMoreAb: json['qn_desc_more_ab'] as int?,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user