Skip to content

Support buffered position or progress #54

Closed

Description

@ijuniorfu

What should the engine do?

Supports disk/memory caching to display buffered time or progress on the ScrubBar

Motivating media or use case

a large/remote source

Area

Codec / container support

Host app / integration context

No response

Would you be willing to open a PR?

No

Activity

  1. added
    enhancement
    on Jun 21, 2026
  2. superuser404notfound commented on Jun 21, 2026

    @superuser404notfound
    Owner

    Shipped in 3.12.0.

    The engine now publishes how far ahead it has buffered as a new value on engine.clock, on the same axis as sourceTime, so you can draw a buffer bar on the scrub bar directly:

    player.clock.$bufferedPosition   // source-axis position buffered ahead of the playhead
    
    // e.g. buffer-bar fill fraction:
    let fill = duration > 0 ? player.bufferedPosition / duration : 0

    Per playback path:

    • Native AVPlayer (HLS / direct): end of the contiguous loadedTimeRanges span covering the playhead, folded onto the source axis.
    • Software (dav1d / libavcodec): the newest demuxed source PTS, i.e. how far ahead bytes have been fetched and demuxed from the remote source. This is the one that matters for the large / remote sources you mentioned.

    It ticks on engine.clock (the off-the-engine ~10 Hz surface), so observing it for a buffer bar won't re-render your track lists or menus.

    Release notes: https://github.com/superuser404notfound/AetherEngine/releases/tag/3.12.0

    Thanks for the request!

  3. superuser404notfound commented on Jun 21, 2026

    @superuser404notfound
    Owner

    Implemented in 3.12.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions