mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
set dm for live
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
import 'package:PiliPlus/common/widgets/custom_icon.dart';
|
import 'package:PiliPlus/common/widgets/custom_icon.dart';
|
||||||
import 'package:PiliPlus/pages/live_room/controller.dart';
|
import 'package:PiliPlus/pages/live_room/controller.dart';
|
||||||
|
import 'package:PiliPlus/pages/video/widgets/header_control.dart'
|
||||||
|
show HeaderMixin;
|
||||||
import 'package:PiliPlus/plugin/pl_player/controller.dart';
|
import 'package:PiliPlus/plugin/pl_player/controller.dart';
|
||||||
import 'package:PiliPlus/plugin/pl_player/models/video_fit_type.dart';
|
import 'package:PiliPlus/plugin/pl_player/models/video_fit_type.dart';
|
||||||
import 'package:PiliPlus/plugin/pl_player/widgets/common_btn.dart';
|
import 'package:PiliPlus/plugin/pl_player/widgets/common_btn.dart';
|
||||||
@@ -10,7 +12,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
class BottomControl extends StatelessWidget {
|
class BottomControl extends StatefulWidget {
|
||||||
const BottomControl({
|
const BottomControl({
|
||||||
super.key,
|
super.key,
|
||||||
required this.plPlayerController,
|
required this.plPlayerController,
|
||||||
@@ -27,6 +29,15 @@ class BottomControl extends StatelessWidget {
|
|||||||
final TextStyle subTitleStyle;
|
final TextStyle subTitleStyle;
|
||||||
final TextStyle titleStyle;
|
final TextStyle titleStyle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<BottomControl> createState() => _BottomControlState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _BottomControlState extends State<BottomControl> with HeaderMixin {
|
||||||
|
late final LiveRoomController liveRoomCtr = widget.liveRoomCtr;
|
||||||
|
@override
|
||||||
|
late final PlPlayerController plPlayerController = widget.plPlayerController;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final isFullScreen = plPlayerController.isFullScreen.value;
|
final isFullScreen = plPlayerController.isFullScreen.value;
|
||||||
@@ -47,7 +58,7 @@ class BottomControl extends StatelessWidget {
|
|||||||
size: 18,
|
size: 18,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
onTap: onRefresh,
|
onTap: widget.onRefresh,
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
ComBtn(
|
ComBtn(
|
||||||
@@ -102,6 +113,15 @@ class BottomControl extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
ComBtn(
|
||||||
|
tooltip: '弹幕设置',
|
||||||
|
icon: const Icon(
|
||||||
|
size: 18,
|
||||||
|
CustomIcons.dm_settings,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
onTap: showSetDanmaku,
|
||||||
|
),
|
||||||
Obx(
|
Obx(
|
||||||
() => PopupMenuButton<VideoFitType>(
|
() => PopupMenuButton<VideoFitType>(
|
||||||
tooltip: '画面比例',
|
tooltip: '画面比例',
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:PiliPlus/pages/video/widgets/header_control.dart';
|
||||||
import 'package:PiliPlus/plugin/pl_player/controller.dart';
|
import 'package:PiliPlus/plugin/pl_player/controller.dart';
|
||||||
import 'package:PiliPlus/plugin/pl_player/widgets/common_btn.dart';
|
import 'package:PiliPlus/plugin/pl_player/widgets/common_btn.dart';
|
||||||
import 'package:PiliPlus/utils/page_utils.dart';
|
import 'package:PiliPlus/utils/page_utils.dart';
|
||||||
@@ -145,6 +146,18 @@ class LiveHeaderControl extends StatelessWidget {
|
|||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
ComBtn(
|
||||||
|
tooltip: '播放信息',
|
||||||
|
onTap: () => HeaderControlState.showPlayerInfo(
|
||||||
|
context,
|
||||||
|
plPlayerController: plPlayerController,
|
||||||
|
),
|
||||||
|
icon: const Icon(
|
||||||
|
size: 18,
|
||||||
|
Icons.info_outline,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -186,7 +186,13 @@ class _SendDanmakuPanelState extends CommonTextPubPageState<SendDanmakuPanel> {
|
|||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Text('弹幕字号', style: TextStyle(fontSize: 15)),
|
Text(
|
||||||
|
'弹幕字号',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15,
|
||||||
|
color: themeData.colorScheme.onSurface,
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
_buildFontSizeItem(18, '小'),
|
_buildFontSizeItem(18, '小'),
|
||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
@@ -196,7 +202,13 @@ class _SendDanmakuPanelState extends CommonTextPubPageState<SendDanmakuPanel> {
|
|||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Text('弹幕样式', style: TextStyle(fontSize: 15)),
|
Text(
|
||||||
|
'弹幕样式',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15,
|
||||||
|
color: themeData.colorScheme.onSurface,
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
_buildPositionItem(1, '滚动'),
|
_buildPositionItem(1, '滚动'),
|
||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
@@ -209,7 +221,13 @@ class _SendDanmakuPanelState extends CommonTextPubPageState<SendDanmakuPanel> {
|
|||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const Text('弹幕颜色', style: TextStyle(fontSize: 15)),
|
Text(
|
||||||
|
'弹幕颜色',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15,
|
||||||
|
color: themeData.colorScheme.onSurface,
|
||||||
|
),
|
||||||
|
),
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
_buildColorPanel,
|
_buildColorPanel,
|
||||||
],
|
],
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -644,7 +644,7 @@ abstract class PageUtils {
|
|||||||
static void showVideoBottomSheet(
|
static void showVideoBottomSheet(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
required Widget child,
|
required Widget child,
|
||||||
required Function isFullScreen,
|
required bool Function() isFullScreen,
|
||||||
double? padding,
|
double? padding,
|
||||||
}) {
|
}) {
|
||||||
if (!context.mounted) {
|
if (!context.mounted) {
|
||||||
|
|||||||
Reference in New Issue
Block a user