fix(player): 收敛播放入口缓冲提示

This commit is contained in:
Zhou Weidong committed 2026-10-22 10:47:16 +08:00
1 parent f302b396b7
commit 7ad4681049
12 files changed
+218 -42

No files matched your search

@@ -114,7 +114,7 @@ class _SeekProgressBarState extends State<SeekProgressBar> {
if (!value.isInitialized) {
_bufferTimer?.cancel();
_bufferTimer = null;
_setBuffering(true, notify: notify);
_setBuffering(false, notify: notify);
return;
}
if (!value.isBuffering) {
@@ -181,8 +181,7 @@ class _SeekProgressBarState extends State<SeekProgressBar> {
Widget _buildTrack(BuildContext context, VideoPlayerValue video) {
final total = video.duration.inMilliseconds;
final scrubbing = _previewFraction.value != null;
final loading =
!widget.locked && !scrubbing && (!video.isInitialized || _buffering);
final loading = !widget.locked && !scrubbing && _buffering;
final enabled =
!widget.locked &&
video.isInitialized &&
@@ -223,7 +222,7 @@ class _SeekProgressBarState extends State<SeekProgressBar> {
),
SizedBox(
height: trackAreaHeight,
child: widget.locked
child: widget.locked || !video.isInitialized
? _inactiveTrack(trackHeight)
: loading
? Center(