Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • funkwhale funkwhale
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 391
    • Issues 391
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 17
    • Merge requests 17
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhale
  • funkwhalefunkwhale
  • Merge requests
  • !1284

Closed
Created Mar 28, 2021 by Tony Wasserka@neobrainContributor1 of 3 tasks completed1/3 tasks
  • Report abuse
Report abuse

WIP: Increase update frequency of track progress bar

  • Overview 14
  • Commits 1
  • Pipelines 3
  • Changes 3

(Not too) naive attempt at addressing #1381.

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
Reviewer
Request review from
Time tracking
Source branch: track_progress