Skip to content

Progress bar jumps back after seek #15

@SuhaibElramly

Description

@SuhaibElramly

Summary

When the user drags the progress bar forward and releases it jumps back to an earlier position.

Environment

  • Package: vdocipher_flutter (e.g. 2.7.9)
  • Flutter: 3.35.7
  • Platform: iOS

Steps to reproduce

  1. Play a video with the default VdoPlayer controls.
  2. Drag the progress bar forward (e.g. from 1:00 to 5:00) and release.
  3. The bar moves to the new position, then jumps back toward the previous position.

Expected behavior

The progress bar should stay at the seek position after the user releases the drag.

Cause (suggested)

After seek(target) is called, the position timer (e.g. every 500 ms) can still report the old position from native before the seek is applied. When that stale position is applied to the slider in the controls, the displayed position is overwritten and the bar jumps back.

Possible fix direction

  • Update the controller’s position optimistically to the seek target when seek() is called, and/or
  • In the controls, keep a pending seek target and ignore stale position updates until the reported position has caught up to the seek target (within a small threshold), so the progress bar does not jump backward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions