tap dm when debug

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-10-13 11:37:03 +08:00
parent 897fda875a
commit 8bea09b78a
4 changed files with 14 additions and 14 deletions

View File

@@ -29,13 +29,13 @@ List<SettingsModel> get playSettings => [
setKey: SettingBoxKey.enableShowDanmaku,
defaultVal: true,
),
const SettingsModel(
settingsType: SettingsType.sw1tch,
title: '启用点击弹幕',
leading: Icon(Icons.touch_app_outlined),
setKey: SettingBoxKey.enableTapDm,
defaultVal: true,
),
// const SettingsModel(
// settingsType: SettingsType.sw1tch,
// title: '启用点击弹幕',
// leading: Icon(Icons.touch_app_outlined),
// setKey: SettingBoxKey.enableTapDm,
// defaultVal: false,
// ),
SettingsModel(
settingsType: SettingsType.normal,
onTap: (setState) => Get.toNamed('/playSpeedSet'),

View File

@@ -1064,16 +1064,16 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
plPlayerController.triggerFullScreen(status: !isFullScreen);
}
void onTapUp(TapDownDetails? event) {
switch (event?.kind) {
void onTapUp(TapUpDetails event) {
switch (event.kind) {
case ui.PointerDeviceKind.mouse when (Utils.isDesktop):
onTapDesktop();
break;
default:
if (plPlayerController.enableTapDm && Utils.isMobile) {
if (kDebugMode && Utils.isMobile) {
final ctr = plPlayerController.danmakuController;
if (ctr != null) {
final item = ctr.findSingleDanmaku(event!.localPosition);
final item = ctr.findSingleDanmaku(event.localPosition);
if (item == null) {
if (_suspendedDm.value != null) {
_removeOverlay();
@@ -1254,7 +1254,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
onInteractionEnd: _onInteractionEnd,
flipX: plPlayerController.flipX.value,
flipY: plPlayerController.flipY.value,
onTap: onTapUp,
onTapUp: onTapUp,
onDoubleTapDown: onDoubleTapDown,
onLongPressStart: isLive
? null

View File

@@ -860,5 +860,5 @@ abstract class Pref {
_setting.get(SettingBoxKey.enablePlayAll, defaultValue: true);
static bool get enableTapDm =>
_setting.get(SettingBoxKey.enableTapDm, defaultValue: true);
_setting.get(SettingBoxKey.enableTapDm, defaultValue: false);
}

View File

@@ -1166,7 +1166,7 @@ packages:
description:
path: media_kit_video
ref: "version_1.2.5"
resolved-ref: cd4837c13db556ed4e33b13fdddbb77199f167d8
resolved-ref: "2755671b0263378d216bf2b3fe9bada796e702e9"
url: "https://github.com/bggRGjQaUbCoE/media-kit.git"
source: git
version: "1.2.5"