mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-30 23:58:13 +08:00
tap dm when debug
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -29,13 +29,13 @@ List<SettingsModel> get playSettings => [
|
|||||||
setKey: SettingBoxKey.enableShowDanmaku,
|
setKey: SettingBoxKey.enableShowDanmaku,
|
||||||
defaultVal: true,
|
defaultVal: true,
|
||||||
),
|
),
|
||||||
const SettingsModel(
|
// const SettingsModel(
|
||||||
settingsType: SettingsType.sw1tch,
|
// settingsType: SettingsType.sw1tch,
|
||||||
title: '启用点击弹幕',
|
// title: '启用点击弹幕',
|
||||||
leading: Icon(Icons.touch_app_outlined),
|
// leading: Icon(Icons.touch_app_outlined),
|
||||||
setKey: SettingBoxKey.enableTapDm,
|
// setKey: SettingBoxKey.enableTapDm,
|
||||||
defaultVal: true,
|
// defaultVal: false,
|
||||||
),
|
// ),
|
||||||
SettingsModel(
|
SettingsModel(
|
||||||
settingsType: SettingsType.normal,
|
settingsType: SettingsType.normal,
|
||||||
onTap: (setState) => Get.toNamed('/playSpeedSet'),
|
onTap: (setState) => Get.toNamed('/playSpeedSet'),
|
||||||
|
|||||||
@@ -1064,16 +1064,16 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
plPlayerController.triggerFullScreen(status: !isFullScreen);
|
plPlayerController.triggerFullScreen(status: !isFullScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
void onTapUp(TapDownDetails? event) {
|
void onTapUp(TapUpDetails event) {
|
||||||
switch (event?.kind) {
|
switch (event.kind) {
|
||||||
case ui.PointerDeviceKind.mouse when (Utils.isDesktop):
|
case ui.PointerDeviceKind.mouse when (Utils.isDesktop):
|
||||||
onTapDesktop();
|
onTapDesktop();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (plPlayerController.enableTapDm && Utils.isMobile) {
|
if (kDebugMode && Utils.isMobile) {
|
||||||
final ctr = plPlayerController.danmakuController;
|
final ctr = plPlayerController.danmakuController;
|
||||||
if (ctr != null) {
|
if (ctr != null) {
|
||||||
final item = ctr.findSingleDanmaku(event!.localPosition);
|
final item = ctr.findSingleDanmaku(event.localPosition);
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
if (_suspendedDm.value != null) {
|
if (_suspendedDm.value != null) {
|
||||||
_removeOverlay();
|
_removeOverlay();
|
||||||
@@ -1254,7 +1254,7 @@ class _PLVideoPlayerState extends State<PLVideoPlayer>
|
|||||||
onInteractionEnd: _onInteractionEnd,
|
onInteractionEnd: _onInteractionEnd,
|
||||||
flipX: plPlayerController.flipX.value,
|
flipX: plPlayerController.flipX.value,
|
||||||
flipY: plPlayerController.flipY.value,
|
flipY: plPlayerController.flipY.value,
|
||||||
onTap: onTapUp,
|
onTapUp: onTapUp,
|
||||||
onDoubleTapDown: onDoubleTapDown,
|
onDoubleTapDown: onDoubleTapDown,
|
||||||
onLongPressStart: isLive
|
onLongPressStart: isLive
|
||||||
? null
|
? null
|
||||||
|
|||||||
@@ -860,5 +860,5 @@ abstract class Pref {
|
|||||||
_setting.get(SettingBoxKey.enablePlayAll, defaultValue: true);
|
_setting.get(SettingBoxKey.enablePlayAll, defaultValue: true);
|
||||||
|
|
||||||
static bool get enableTapDm =>
|
static bool get enableTapDm =>
|
||||||
_setting.get(SettingBoxKey.enableTapDm, defaultValue: true);
|
_setting.get(SettingBoxKey.enableTapDm, defaultValue: false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1166,7 +1166,7 @@ packages:
|
|||||||
description:
|
description:
|
||||||
path: media_kit_video
|
path: media_kit_video
|
||||||
ref: "version_1.2.5"
|
ref: "version_1.2.5"
|
||||||
resolved-ref: cd4837c13db556ed4e33b13fdddbb77199f167d8
|
resolved-ref: "2755671b0263378d216bf2b3fe9bada796e702e9"
|
||||||
url: "https://github.com/bggRGjQaUbCoE/media-kit.git"
|
url: "https://github.com/bggRGjQaUbCoE/media-kit.git"
|
||||||
source: git
|
source: git
|
||||||
version: "1.2.5"
|
version: "1.2.5"
|
||||||
|
|||||||
Reference in New Issue
Block a user