From 5b2f7f84e874c6c9f40642470103b0720b11f70f Mon Sep 17 00:00:00 2001 From: Predidit <34627277+Predidit@users.noreply.github.com> Date: Thu, 26 Sep 2024 17:54:36 +0800 Subject: [PATCH] revert duration bar --- lib/pages/player/player_item.dart | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/lib/pages/player/player_item.dart b/lib/pages/player/player_item.dart index d0692262..1981cc6f 100644 --- a/lib/pages/player/player_item.dart +++ b/lib/pages/player/player_item.dart @@ -177,7 +177,8 @@ class _PlayerItemState extends State content: SelectableText.rich( TextSpan( children: [ - TextSpan(text: '规则: ${videoPageController.currentPlugin.name}\n'), + TextSpan( + text: '规则: ${videoPageController.currentPlugin.name}\n'), TextSpan(text: '硬件解码: ${haEnable ? '启用' : '禁用'}\n'), TextSpan(text: '解复用器: $currentDemux\n'), const TextSpan(text: '资源地址: '), @@ -907,26 +908,20 @@ class _PlayerItemState extends State borderRadius: BorderRadius.circular( 8.0), // 圆角 ), - child: Row(children: [ - (playerController.currentPosition + child: Text( + playerController.currentPosition .compareTo( playerController .mediaPlayer .value .position) > 0 - ? const Icon(Icons.fast_forward, - color: Colors.white) - : const Icon( - Icons.fast_rewind, - color: Colors.white, - )), - Text( - ' ${Utils.formatTime(playerController.currentPosition.inSeconds.toDouble())} / ${Utils.formatTime(playerController.mediaPlayer.value.duration.inSeconds.toDouble())}', - style: const TextStyle( - color: Colors.white, - )), - ]), + ? '快进 ${playerController.currentPosition.inSeconds - playerController.mediaPlayer.value.position.inSeconds} 秒' + : '快退 ${playerController.mediaPlayer.value.position.inSeconds - playerController.currentPosition.inSeconds} 秒', + style: const TextStyle( + color: Colors.white, + ), + ), ), ], )