mod: 默认直播画质设置

This commit is contained in:
guozhigq
2024-03-13 23:12:34 +08:00
parent 98aaca286b
commit da2bbeedff
5 changed files with 62 additions and 31 deletions

View File

@ -27,7 +27,8 @@ class LiveRoomController extends GetxController {
@override
void onInit() {
super.onInit();
currentQn = 10000;
currentQn = setting.get(SettingBoxKey.defaultLiveQa,
defaultValue: LiveQuality.values.last.code);
roomId = int.parse(Get.parameters['roomid']!);
if (Get.arguments != null) {
liveItem = Get.arguments['liveItem'];
@ -62,7 +63,6 @@ class LiveRoomController extends GetxController {
}
Future queryLiveInfo() async {
/// TODO 默认获取预设质量的直播资源
var res = await LiveHttp.liveRoomInfo(roomId: roomId, qn: currentQn);
if (res['status']) {
List<CodecItem> codec =