Skip to content
pubscout

smooth_video_progress

0.0.4, released 5 years ago by timcreated.it

Interpolated progress builder for video_player controllers to make progress bars smooth.

$ flutter pub add smooth_video_progress
Source repository

What it does

Provides a SmoothVideoProgress widget that interpolates video progress for video_player controllers, eliminating the choppy UX of infrequent default progress updates. It is completely unopinionated regarding UI design.

AI-written summary of version 0.0.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are using the official video_player package and want a smooth, high-framerate progress bar or slider
  • You need more accurate time displays or animations tied to video playback position

Skip it when

  • You are using an alternative video player library that is not video_player
  • You do not want a dependency on flutter_hooks

Strengths

  • Eliminates choppy video progress UI updates
  • Completely unopinionated design-wise
  • Simple and lightweight widget API

Weaknesses

  • Depends on flutter_hooks
  • Only works with the standard video_player controller

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
2

Requires video_player setup steps for your target platforms.

SmoothVideoProgress(
  controller: controller,
  builder: (context, position, duration, child) => Slider(
    onChangeStart: (_) => controller.pause(),
    onChangeEnd: (_) => controller.play(),
    onChanged: (value) =>
        controller.seekTo(Duration(milliseconds: value.toInt())),
    value: position.inMilliseconds.toDouble(),
    min: 0,
    max: duration.inMilliseconds.toDouble(),
  ),
);

Alternatives

Packages that do the same job and could replace smooth_video_progress.

Works with

Packages commonly used together with smooth_video_progress: ones it builds on, ones built on it, and its own family.