Skip to content

Commit

Permalink
revert duration bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Predidit committed Sep 26, 2024
1 parent 1d8ea5d commit 5b2f7f8
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions lib/pages/player/player_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ class _PlayerItemState extends State<PlayerItem>
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: '资源地址: '),
Expand Down Expand Up @@ -907,26 +908,20 @@ class _PlayerItemState extends State<PlayerItem>
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,
),
),
),
],
)
Expand Down

0 comments on commit 5b2f7f8

Please sign in to comment.