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

[BUG] Scrubbing in Safari before playback doesn't work intermittently #728

Open
elynema opened this issue Nov 8, 2024 · 2 comments
Open
Assignees
Labels
bug 🐛 Something isn't working player Changes/fixes in player component

Comments

@elynema
Copy link

elynema commented Nov 8, 2024

Describe the bug
If the user selects a new section and quickly scrubs someplace fairly late in the video before beginning playback, the playhead will jump back to the beginning of the video.

If the user sits for a few seconds before scrubbing after selecting the section, the scrubbing works. Likely due to the video not being fully loaded.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://avalon-dev.dlib.indiana.edu/media_objects/fq977t794
  2. select second section
  3. Quickly click on progress bar to scrub to somewhere past the middle of the video.
  4. Wait. You’ll see the playhead jump back before starting playback.

Expected behavior
Scrubbing should work even before video is fully loaded into the player.

Screenshots
Private Zenhub Video

Desktop (please complete the following information):

  • OS: iOS
  • Browser: Safari
@Dananji Dananji added bug 🐛 Something isn't working player Changes/fixes in player component labels Nov 13, 2024
@Dananji
Copy link
Collaborator

Dananji commented Nov 13, 2024

We are intentionally calling player.load() upon page load for Safari because the player doesn't fully load automatically like in other browsers. This helps us to use scrubbing/seeking on the player progress-bar or use structured navigation and playlist markers to scrub/seek before playback starts.
This is causing the player to reset on Safari, if the user scrubs/seeks within the window where, the player is revealed and player.load() is called.

@Dananji
Copy link
Collaborator

Dananji commented Dec 6, 2024

The fix put in place for this issue could create a race condition for player dispatches for current time updates in the state. I did the following in the demo instance to see whether this happens, and I did not run into any inconsistencies.

But we should probably do these extra tests once this is brought into Avalon, since that environment could create different results.

  • Load a new section and seek immediately to a non-zero time and observe the section starts from the seeked time when it is played
  • Load a new section and seek immediately to a non-zero time and load another section right after: observe the second section has the time set to zero
  • Load a new section and seek immediately non-zero time and load another section using the structure where the start time is non-zero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working player Changes/fixes in player component
Projects
None yet
Development

No branches or pull requests

2 participants