opt: live room

Closes #427

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-11 21:10:32 +08:00
parent 3da64d2641
commit 714f288170
2 changed files with 326 additions and 294 deletions

View File

@@ -57,15 +57,16 @@ class LiveRoomController extends GetxController {
// 硬解
enableHA: true,
autoplay: true,
direction: isPortrait.value ? 'vertical' : 'horizontal',
);
}
bool? isPortrait;
final RxBool isPortrait = false.obs;
Future queryLiveInfo() async {
var res = await LiveHttp.liveRoomInfo(roomId: roomId, qn: currentQn);
if (res['status']) {
isPortrait = res['data'].isPortrait;
isPortrait.value = res['data'].isPortrait ?? false;
List<CodecItem> codec =
res['data'].playurlInfo.playurl.stream.first.format.first.codec;
CodecItem item = codec.first;