Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 409
    • Issues 409
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • funkwhalefunkwhale
  • Merge requests
  • !1284

WIP: Increase update frequency of track progress bar

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Tony Wasserka requested to merge neobrain/funkwhale:track_progress into develop Mar 28, 2021
  • Overview 14
  • Commits 1
  • Pipelines 3
  • Changes 3

(Not too) naive attempt at addressing #1381 (closed).

Currently when playing back common audio tracks (length ~3 minutes) at a monitor resolution of 1920x1080 at 60 Hz, the progress bar will jump in steps of 10 pixels. Shorter tracks will jump even further, since the update frequency is fixed to 1 second.

This MR changes the track progress bar to update at the display frequency, and less often only when it'd move forward by less than a pixel. The expression Math.min(60, 1920 / this.duration) gives us this behavior, but is hardcoded against 1080p@60Hz displays, hence updating too rarely on high end displays (4K/120Hz) and too often on phones.

Suggestions for making this resolution-independent are welcome :)

Further to the increased update frequency, player.js was rounding the track progress to 0.1% duration steps, which caused further jumpiness.

TODO:

  • Make frequency updates resolution-agnostic

This Merge Request includes:

  • Tests
  • A changelog fragment (cf https://docs.funkwhale.audio/contributing.html#changelog-management)
Edited Apr 07, 2021 by Georg Krause
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: track_progress