opt: send danmaku

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-05 13:35:35 +08:00
parent 789d8a77dd
commit 1a3f5414c6
2 changed files with 5 additions and 5 deletions

View File

@@ -716,8 +716,8 @@ class _SlideColorPickerState extends State<SlideColorPicker> {
'重置', '重置',
), ),
), ),
const Spacer(),
], ],
const Spacer(),
TextButton( TextButton(
onPressed: Get.back, onPressed: Get.back,
child: Text( child: Text(

View File

@@ -926,7 +926,7 @@ class VideoDetailController extends GetxController
if (isPlaying) { if (isPlaying) {
await plPlayerController.pause(); await plPlayerController.pause();
} }
Navigator.of(Get.context!).push( await Navigator.of(Get.context!).push(
GetDialogRoute( GetDialogRoute(
pageBuilder: (buildContext, animation, secondaryAnimation) { pageBuilder: (buildContext, animation, secondaryAnimation) {
return SendDanmakuPanel( return SendDanmakuPanel(
@@ -937,9 +937,6 @@ class VideoDetailController extends GetxController
onSaveDanmaku: (danmaku) => savedDanmaku = danmaku, onSaveDanmaku: (danmaku) => savedDanmaku = danmaku,
callback: (danmakuModel) async { callback: (danmakuModel) async {
savedDanmaku = null; savedDanmaku = null;
if (isPlaying) {
await plPlayerController.play();
}
plPlayerController.danmakuController?.addDanmaku(danmakuModel); plPlayerController.danmakuController?.addDanmaku(danmakuModel);
}, },
); );
@@ -960,6 +957,9 @@ class VideoDetailController extends GetxController
}, },
), ),
); );
if (isPlaying) {
plPlayerController.play();
}
} }
/// 更新画质、音质 /// 更新画质、音质