mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-28 12:08:40 +00:00
@@ -133,9 +133,10 @@ class LiveRoomController extends GetxController {
|
||||
Future<void> queryLiveInfoH5() async {
|
||||
var res = await LiveHttp.liveRoomInfoH5(roomId: roomId);
|
||||
if (res['status']) {
|
||||
roomInfoH5.value = res['data'];
|
||||
RoomInfoH5Data data = res['data'];
|
||||
roomInfoH5.value = data;
|
||||
videoPlayerServiceHandler.onVideoDetailChange(
|
||||
roomInfoH5.value,
|
||||
data,
|
||||
roomId,
|
||||
heroTag,
|
||||
);
|
||||
|
||||
@@ -244,27 +244,29 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Obx(
|
||||
() => isFullScreen
|
||||
? const SizedBox.shrink()
|
||||
: Positioned.fill(
|
||||
child: Opacity(
|
||||
opacity: 0.6,
|
||||
child: _liveRoomController.roomInfoH5.value?.roomInfo
|
||||
?.appBackground?.isNotEmpty ==
|
||||
true
|
||||
? CachedNetworkImage(
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
imageUrl: _liveRoomController.roomInfoH5.value!
|
||||
.roomInfo!.appBackground!.http2https,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/live/default_bg.webp',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
() {
|
||||
if (isFullScreen) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
final appBackground = _liveRoomController
|
||||
.roomInfoH5.value?.roomInfo?.appBackground;
|
||||
return Positioned.fill(
|
||||
child: Opacity(
|
||||
opacity: 0.6,
|
||||
child: appBackground?.isNotEmpty == true
|
||||
? CachedNetworkImage(
|
||||
fit: BoxFit.cover,
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
imageUrl: appBackground!.http2https,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/live/default_bg.webp',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
SafeArea(
|
||||
top: !isFullScreen,
|
||||
@@ -564,20 +566,24 @@ class _LiveRoomPageState extends State<LiveRoomPage>
|
||||
child: Row(
|
||||
children: [
|
||||
Obx(
|
||||
() => IconButton(
|
||||
onPressed: () {
|
||||
plPlayerController.enableShowDanmaku.value =
|
||||
!plPlayerController.enableShowDanmaku.value;
|
||||
GStorage.setting.put(SettingBoxKey.enableShowDanmaku,
|
||||
plPlayerController.enableShowDanmaku.value);
|
||||
},
|
||||
icon: Icon(
|
||||
plPlayerController.enableShowDanmaku.value
|
||||
? Icons.subtitles_outlined
|
||||
: Icons.subtitles_off_outlined,
|
||||
color: _color,
|
||||
),
|
||||
),
|
||||
() {
|
||||
final enableShowDanmaku =
|
||||
plPlayerController.enableShowDanmaku.value;
|
||||
return IconButton(
|
||||
onPressed: () {
|
||||
final newVal = !enableShowDanmaku;
|
||||
plPlayerController.enableShowDanmaku.value = newVal;
|
||||
GStorage.setting
|
||||
.put(SettingBoxKey.enableShowDanmaku, newVal);
|
||||
},
|
||||
icon: Icon(
|
||||
enableShowDanmaku
|
||||
? Icons.subtitles_outlined
|
||||
: Icons.subtitles_off_outlined,
|
||||
color: _color,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
|
||||
@@ -77,29 +77,33 @@ class BottomControl extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Obx(
|
||||
() => SizedBox(
|
||||
width: 35,
|
||||
height: 35,
|
||||
child: IconButton(
|
||||
tooltip: '弹幕开关',
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
() {
|
||||
final enableShowDanmaku =
|
||||
plPlayerController.enableShowDanmaku.value;
|
||||
return SizedBox(
|
||||
width: 35,
|
||||
height: 35,
|
||||
child: IconButton(
|
||||
tooltip: '弹幕开关',
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
),
|
||||
onPressed: () {
|
||||
final newVal = !enableShowDanmaku;
|
||||
plPlayerController.enableShowDanmaku.value = newVal;
|
||||
GStorage.setting
|
||||
.put(SettingBoxKey.enableShowDanmaku, newVal);
|
||||
},
|
||||
icon: Icon(
|
||||
size: 18,
|
||||
enableShowDanmaku
|
||||
? Icons.subtitles_outlined
|
||||
: Icons.subtitles_off_outlined,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
onPressed: () {
|
||||
plPlayerController.enableShowDanmaku.value =
|
||||
!plPlayerController.enableShowDanmaku.value;
|
||||
GStorage.setting.put(SettingBoxKey.enableShowDanmaku,
|
||||
plPlayerController.enableShowDanmaku.value);
|
||||
},
|
||||
icon: Icon(
|
||||
size: 18,
|
||||
plPlayerController.enableShowDanmaku.value
|
||||
? Icons.subtitles_outlined
|
||||
: Icons.subtitles_off_outlined,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
Obx(
|
||||
() => Container(
|
||||
|
||||
@@ -26,6 +26,7 @@ class LiveHeaderControl extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isFullScreen = plPlayerController.isFullScreen.value;
|
||||
return AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
foregroundColor: Colors.white,
|
||||
@@ -35,7 +36,7 @@ class LiveHeaderControl extends StatelessWidget {
|
||||
title: Row(
|
||||
spacing: 10,
|
||||
children: [
|
||||
if (plPlayerController.isFullScreen.value)
|
||||
if (isFullScreen)
|
||||
SizedBox(
|
||||
width: 35,
|
||||
height: 35,
|
||||
@@ -64,7 +65,7 @@ class LiveHeaderControl extends StatelessWidget {
|
||||
style: const TextStyle(
|
||||
fontSize: 15, height: 1, color: Colors.white),
|
||||
),
|
||||
if (plPlayerController.isFullScreen.value && upName != null)
|
||||
if (isFullScreen && upName != null)
|
||||
Text(
|
||||
upName!,
|
||||
maxLines: 1,
|
||||
@@ -93,31 +94,33 @@ class LiveHeaderControl extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Obx(
|
||||
() => SizedBox(
|
||||
width: 35,
|
||||
height: 35,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
plPlayerController.onlyPlayAudio.value =
|
||||
!plPlayerController.onlyPlayAudio.value;
|
||||
onPlayAudio();
|
||||
},
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
() {
|
||||
final onlyPlayAudio = plPlayerController.onlyPlayAudio.value;
|
||||
return SizedBox(
|
||||
width: 35,
|
||||
height: 35,
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
plPlayerController.onlyPlayAudio.value = !onlyPlayAudio;
|
||||
onPlayAudio();
|
||||
},
|
||||
style: ButtonStyle(
|
||||
padding: WidgetStateProperty.all(EdgeInsets.zero),
|
||||
),
|
||||
icon: onlyPlayAudio
|
||||
? const Icon(
|
||||
size: 18,
|
||||
MdiIcons.musicCircle,
|
||||
color: Colors.white,
|
||||
)
|
||||
: const Icon(
|
||||
size: 18,
|
||||
MdiIcons.musicCircleOutline,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
icon: plPlayerController.onlyPlayAudio.value
|
||||
? const Icon(
|
||||
size: 18,
|
||||
MdiIcons.musicCircle,
|
||||
color: Colors.white,
|
||||
)
|
||||
: const Icon(
|
||||
size: 18,
|
||||
MdiIcons.musicCircleOutline,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
if (Platform.isAndroid)
|
||||
SizedBox(
|
||||
|
||||
Reference in New Issue
Block a user