opt video header

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-30 18:40:02 +08:00
parent 0df637fb73
commit ed6353e6d5
8 changed files with 244 additions and 216 deletions

View File

@@ -486,7 +486,7 @@ class LiveRoomController extends GetxController {
void addDm(dynamic msg, [DanmakuContentItem<DanmakuExtra>? item]) {
if (plPlayerController.showDanmaku) {
if (item != null) {
if (item != null && plPlayerController.enableShowLiveDanmaku.value) {
danmakuController?.addDanmaku(item);
}
if (autoScroll && !disableAutoScroll.value) {

View File

@@ -151,7 +151,6 @@ class _LiveRoomPageState extends State<LiveRoomPage>
plPlayerController.removeStatusLister(playerListener);
_liveRoomController
..danmakuController?.clear()
..danmakuController?.pause()
..cancelLiveTimer()
..closeLiveMsg()
..isPlaying = plPlayerController.playerStatus.isPlaying;
@@ -809,7 +808,7 @@ class _LiveRoomPageState extends State<LiveRoomPage>
Obx(
() {
final enableShowLiveDanmaku =
plPlayerController.enableShowDanmaku.value;
plPlayerController.enableShowLiveDanmaku.value;
return SizedBox(
width: 34,
height: 34,
@@ -817,7 +816,8 @@ class _LiveRoomPageState extends State<LiveRoomPage>
style: IconButton.styleFrom(padding: .zero),
onPressed: () {
final newVal = !enableShowLiveDanmaku;
plPlayerController.enableShowDanmaku.value = newVal;
plPlayerController.enableShowLiveDanmaku.value =
newVal;
if (!plPlayerController.tempPlayerConf) {
GStorage.setting.put(
SettingBoxKey.enableShowLiveDanmaku,
@@ -1091,7 +1091,7 @@ class _LiveDanmakuState extends State<LiveDanmaku> {
final option = DanmakuOptions.get(notFullscreen: widget.notFullscreen);
return Obx(
() => AnimatedOpacity(
opacity: plPlayerController.enableShowDanmaku.value
opacity: plPlayerController.enableShowLiveDanmaku.value
? plPlayerController.danmakuOpacity.value
: 0,
duration: const Duration(milliseconds: 100),

View File

@@ -88,7 +88,7 @@ class _BottomControlState extends State<BottomControl> with HeaderMixin {
Obx(
() {
final enableShowLiveDanmaku =
plPlayerController.enableShowDanmaku.value;
plPlayerController.enableShowLiveDanmaku.value;
return ComBtn(
height: 30,
tooltip: "${enableShowLiveDanmaku ? '关闭' : '开启'}弹幕",
@@ -105,7 +105,7 @@ class _BottomControlState extends State<BottomControl> with HeaderMixin {
),
onTap: () {
final newVal = !enableShowLiveDanmaku;
plPlayerController.enableShowDanmaku.value = newVal;
plPlayerController.enableShowLiveDanmaku.value = newVal;
if (!plPlayerController.tempPlayerConf) {
GStorage.setting.put(
SettingBoxKey.enableShowLiveDanmaku,