Skip to content

基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。

danmaku debug

Predidit3809d0e901a5
diff --git a/lib/pages/player/player_item.dart b/lib/pages/player/player_item.dart
index ba6b82fc..3aceb7fc 100644
--- a/lib/pages/player/player_item.dart
+++ b/lib/pages/player/player_item.dart
@@ -45,6 +45,7 @@ class _PlayerItemState extends State<PlayerItem> with WindowListener {
late DanmakuController danmakuController;
late NavigationBarState navigationBarState;
late bool isFavorite;
+ bool isPopping = false;
// 弹幕
final _danmuKey = GlobalKey();
@@ -129,9 +130,6 @@ class _PlayerItemState extends State<PlayerItem> with WindowListener {
void onBackPressed(BuildContext context) {
if (videoPageController.androidFullscreen) {
debugPrint('当前播放器全屏');
- try {
- // danmakuController.onClear();
- } catch (_) {}
try {
playerController.exitFullScreen();
videoPageController.androidFullscreen = false;
@@ -142,7 +140,12 @@ class _PlayerItemState extends State<PlayerItem> with WindowListener {
}
}
debugPrint('当前播放器非全屏');
- Navigator.of(context).pop();
+ // workaround on flutter 3.22.1
+ if (!isPopping) {
+ isPopping = true;
+ Navigator.of(context).pop();
+ }
+ // Navigator.of(context).pop();
}
// 选择倍速
@@ -656,20 +659,7 @@ class _PlayerItemState extends State<PlayerItem> with WindowListener {
icon:
const Icon(Icons.arrow_back),
onPressed: () {
- if (videoPageController
- .androidFullscreen ==
- true) {
- try {
- danmakuController.onClear();
- } catch (_) {}
- playerController
- .exitFullScreen();
- videoPageController
- .androidFullscreen =
- false;
- return;
- }
- Navigator.of(context).pop();
+ onBackPressed(context);
},
),
// 拖动条
diff --git a/pubspec.lock b/pubspec.lock
index b0b3755f..6a38db48 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -778,10 +778,10 @@ packages:
description:
path: "."
ref: master
- resolved-ref: "3caac264792c10a260272a95fc3ee64cc7a83467"
+ resolved-ref: "513081ee857cb557362d24f1548d53861ee5421d"
url: "https://github.com/Predidit/flutter_ns_danmaku"
source: git
- version: "0.0.6"
+ version: "0.0.7"
octo_image:
dependency: transitive
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index e7f4d81e..6f421ed4 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -75,8 +75,8 @@ dependencies:
webview_flutter: ^4.7.0
ns_danmaku:
git:
- url: https://github.com/Predidit/flutter_ns_danmaku
- ref: master
+ url: https://github.com/Predidit/flutter_ns_danmaku
+ ref: master
webview_windows:
git:
url: https://github.com/Predidit/flutter-webview-windows.git