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

@@ -102,7 +102,11 @@ abstract final class LiveHttp {
}),
);
if (res.data['code'] == 0) {
return Success(RoomPlayInfoData.fromJson(res.data['data']));
try {
return Success(RoomPlayInfoData.fromJson(res.data['data']));
} catch (e) {
return Error(e.toString());
}
} else {
return Error(res.data['message']);
}
@@ -163,7 +167,11 @@ abstract final class LiveHttp {
}),
);
if (res.data['code'] == 0) {
return Success(LiveDmInfoData.fromJson(res.data['data']));
try {
return Success(LiveDmInfoData.fromJson(res.data['data']));
} catch (e) {
return Error(e.toString());
}
} else {
return Error(res.data['message']);
}