mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-24 19:16:44 +08:00
opt opus item
opt live dm add audio qa type Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
enum AudioQuality {
|
||||
u_100010(100010, '100010'),
|
||||
u_100009(100009, '100009'),
|
||||
u_100008(100008, '100008'),
|
||||
hiRes(30251, 'Hi-Res无损'),
|
||||
dolby(30250, '杜比全景声'),
|
||||
k192(30280, '192K'),
|
||||
|
||||
@@ -21,6 +21,7 @@ import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:PiliPlus/utils/video_utils.dart';
|
||||
import 'package:canvas_danmaku/canvas_danmaku.dart';
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:easy_debounce/easy_throttle.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
@@ -323,9 +324,13 @@ class LiveRoomController extends GetxController {
|
||||
selfSend: isLogin && uid == mid,
|
||||
),
|
||||
);
|
||||
if (!isFullScreen && !disableAutoScroll.value) {
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
scrollToBottom,
|
||||
if (!disableAutoScroll.value) {
|
||||
EasyThrottle.throttle(
|
||||
'liveDm',
|
||||
const Duration(milliseconds: 500),
|
||||
() => WidgetsBinding.instance.addPostFrameCallback(
|
||||
scrollToBottom,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ class _MemberOpusState extends State<MemberOpus>
|
||||
tag: widget.heroTag,
|
||||
);
|
||||
|
||||
late double _maxWidth;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
@@ -121,6 +123,7 @@ class _MemberOpusState extends State<MemberOpus>
|
||||
maxCrossAxisExtent: Grid.smallCardWidth,
|
||||
mainAxisSpacing: StyleString.safeSpace,
|
||||
crossAxisSpacing: StyleString.safeSpace,
|
||||
callback: (value) => _maxWidth = value,
|
||||
);
|
||||
|
||||
Widget _buildBody(LoadingState<List<SpaceOpusItemModel>?> loadingState) {
|
||||
@@ -143,6 +146,7 @@ class _MemberOpusState extends State<MemberOpus>
|
||||
}
|
||||
return SpaceOpusItem(
|
||||
item: response[index],
|
||||
maxWidth: _maxWidth,
|
||||
);
|
||||
},
|
||||
childCount: response!.length,
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
import 'package:PiliPlus/common/widgets/dyn/ink_well.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/common/widgets/stat/stat.dart';
|
||||
import 'package:PiliPlus/models/common/image_type.dart';
|
||||
import 'package:PiliPlus/models/common/stat_type.dart';
|
||||
import 'package:PiliPlus/models_new/space/space_opus/item.dart';
|
||||
import 'package:PiliPlus/utils/page_utils.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/material.dart' hide InkWell;
|
||||
|
||||
class SpaceOpusItem extends StatelessWidget {
|
||||
const SpaceOpusItem({
|
||||
super.key,
|
||||
required this.item,
|
||||
required this.maxWidth,
|
||||
});
|
||||
|
||||
final SpaceOpusItemModel item;
|
||||
final double maxWidth;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -31,16 +34,12 @@ class SpaceOpusItem extends StatelessWidget {
|
||||
if (hasPic)
|
||||
Stack(
|
||||
children: [
|
||||
LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return NetworkImgLayer(
|
||||
width: constraints.maxWidth,
|
||||
height: constraints.maxWidth * item.cover!.ratio,
|
||||
src: item.cover!.url,
|
||||
type: ImageType.emote,
|
||||
quality: 60,
|
||||
);
|
||||
},
|
||||
NetworkImgLayer(
|
||||
width: maxWidth,
|
||||
height: maxWidth * item.cover!.ratio,
|
||||
src: item.cover!.url,
|
||||
type: ImageType.emote,
|
||||
quality: 60,
|
||||
),
|
||||
Positioned(
|
||||
left: 0,
|
||||
|
||||
@@ -1226,7 +1226,8 @@ class VideoDetailController extends GetxController
|
||||
int currentHighVideoQa = allVideosList.first.quality.code;
|
||||
// 预设的画质为null,则当前可用的最高质量
|
||||
int resVideoQa = currentHighVideoQa;
|
||||
if (plPlayerController.cacheVideoQa! <= currentHighVideoQa) {
|
||||
if (data.acceptQuality?.isNotEmpty == true &&
|
||||
plPlayerController.cacheVideoQa! <= currentHighVideoQa) {
|
||||
// 如果预设的画质低于当前最高
|
||||
final List<int> numbers = data.acceptQuality!
|
||||
.where((e) => e <= currentHighVideoQa)
|
||||
|
||||
Reference in New Issue
Block a user