Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/pages/live_room/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ class _LiveRoomPageState extends State<LiveRoomPage>
child = PlayerFocus(
plPlayerController: plPlayerController,
onSendDanmaku: _liveRoomController.onSendDanmaku,
onShowMenu: () {
if (isFullScreen) {
(_liveRoomController.headerKey.currentState as LiveHeaderControlState?)
?.showSettingSheet();
}
},
child: child,
);
}
Expand Down
130 changes: 0 additions & 130 deletions lib/pages/live_room/widgets/bottom_control.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,136 +61,6 @@ class _BottomControlState extends State<BottomControl> with HeaderMixin {
onTap: widget.onRefresh,
),
const Spacer(),
ComBtn(
height: 30,
tooltip: '屏蔽',
icon: const Icon(
size: 18,
Icons.block,
color: Colors.white,
),
onTap: () {
if (liveRoomCtr.isLogin) {
Get.toNamed(
'/liveDmBlockPage',
parameters: {
'roomId': liveRoomCtr.roomId.toString(),
},
);
} else {
SmartDialog.showToast('账号未登录');
}
},
),
const SizedBox(width: 3),
Obx(
() {
final enableShowLiveDanmaku =
plPlayerController.enableShowDanmaku.value;
return ComBtn(
height: 30,
tooltip: "${enableShowLiveDanmaku ? '关闭' : '开启'}弹幕",
icon: enableShowLiveDanmaku
? const Icon(
size: 18,
CustomIcons.dm_on,
color: Colors.white,
)
: const Icon(
size: 18,
CustomIcons.dm_off,
color: Colors.white,
),
onTap: () {
final newVal = !enableShowLiveDanmaku;
plPlayerController.enableShowDanmaku.value = newVal;
if (!plPlayerController.tempPlayerConf) {
GStorage.setting.put(
SettingBoxKey.enableShowLiveDanmaku,
newVal,
);
}
},
);
},
),
ComBtn(
height: 30,
tooltip: '弹幕设置',
icon: const Icon(
size: 18,
CustomIcons.dm_settings,
color: Colors.white,
),
onTap: () => showSetDanmaku(isLive: true),
),
Obx(
() => PopupMenuButton<VideoFitType>(
tooltip: '画面比例',
initialValue: plPlayerController.videoFit.value,
color: Colors.black.withValues(alpha: 0.8),
itemBuilder: (context) {
return VideoFitType.values
.map(
(boxFit) => PopupMenuItem<VideoFitType>(
height: 35,
padding: const EdgeInsets.only(left: 30),
value: boxFit,
onTap: () => plPlayerController.toggleVideoFit(boxFit),
child: Text(
boxFit.desc,
style: const TextStyle(
color: Colors.white,
fontSize: 13,
),
),
),
)
.toList();
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Text(
plPlayerController.videoFit.value.desc,
style: const TextStyle(color: Colors.white, fontSize: 13),
),
),
),
),
Obx(
() => PopupMenuButton<int>(
tooltip: '画质',
padding: EdgeInsets.zero,
initialValue: liveRoomCtr.currentQn,
color: Colors.black.withValues(alpha: 0.8),
itemBuilder: (context) {
return liveRoomCtr.acceptQnList
.map(
(e) => PopupMenuItem<int>(
height: 35,
padding: const EdgeInsets.only(left: 30),
value: e.code,
onTap: () => liveRoomCtr.changeQn(e.code),
child: Text(
e.desc,
style: const TextStyle(
color: Colors.white,
fontSize: 13,
),
),
),
)
.toList();
},
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Text(
liveRoomCtr.currentQnDesc.value,
style: const TextStyle(color: Colors.white, fontSize: 13),
),
),
),
),
if (!plPlayerController.isDesktopPip)
ComBtn(
height: 30,
Expand Down
Loading