Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add option to disable seeking while scrubbing on mobile #8903

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alex-barstow
Copy link
Contributor

Description

On desktop, a user can hover over the progress bar while content plays, which makes it possible to seek to a relatively precise location without disrupting playback. On mobile there is no hovering, so in order to seek during inline playback the user can only tap a location on the progress bar (very hard to do precisely on a small screen) or scrub to try to hone in on a specific location (can be very clunky because seeks are constantly being executed). This PR adds a feature to treat scrubbing on mobile more like hovering on desktop-- while scrubbing, seeks are disabled and playback continues, only when the user finishes scrubbing is a single seek executed to the desired location.

One key use-case for this feature is thumbnail seeking integrations on mobile, where the user can scrub through different thumbnail images until they find their desired seek location.

Specific Changes proposed

This behavior is similar to the existing enableSmoothSeeking behavior in that the PlayProgressBar slider visibly updates with the scrubbing movements, but differs in a few ways:

  • Playback continues while scrubbing, no seeks are executed until touchend.
  • The seek bar's TimeTooltip component displays the target seek time while scrubbing, rather than the CurrentTimeDisplay (which continues to show the current time of the playing content).

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
    • Has no DOM changes which impact accessiblilty or trigger warnings (e.g. Chrome issues tab)
    • Has no changes to JSDoc which cause npm run docs:api to error
  • Reviewed by Two Core Contributors

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.53%. Comparing base (d2b9d5c) to head (19faaaf).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...s/control-bar/progress-control/progress-control.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8903      +/-   ##
==========================================
- Coverage   83.85%   83.53%   -0.32%     
==========================================
  Files         120      120              
  Lines        8097     8110      +13     
  Branches     1944     1949       +5     
==========================================
- Hits         6790     6775      -15     
- Misses       1307     1335      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mister-ben mister-ben added the minor This PR can be added to a minor release. It should not be added to a patch release. label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor This PR can be added to a minor release. It should not be added to a patch release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants