diff --git a/lib/pages/setting/models/play_settings.dart b/lib/pages/setting/models/play_settings.dart index 101d19c17..cdd165a01 100644 --- a/lib/pages/setting/models/play_settings.dart +++ b/lib/pages/setting/models/play_settings.dart @@ -29,13 +29,13 @@ List 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'), diff --git a/lib/plugin/pl_player/view.dart b/lib/plugin/pl_player/view.dart index cbdcea52c..c8b52ffb7 100644 --- a/lib/plugin/pl_player/view.dart +++ b/lib/plugin/pl_player/view.dart @@ -1064,16 +1064,16 @@ class _PLVideoPlayerState extends State 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 onInteractionEnd: _onInteractionEnd, flipX: plPlayerController.flipX.value, flipY: plPlayerController.flipY.value, - onTap: onTapUp, + onTapUp: onTapUp, onDoubleTapDown: onDoubleTapDown, onLongPressStart: isLive ? null diff --git a/lib/utils/storage_pref.dart b/lib/utils/storage_pref.dart index dbf9f1e29..f309cefdd 100644 --- a/lib/utils/storage_pref.dart +++ b/lib/utils/storage_pref.dart @@ -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); } diff --git a/pubspec.lock b/pubspec.lock index ac8cee393..766a82b92 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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"