cookpete / react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
https://cookpete.github.io/react-player
MIT License
8.94k stars 1.12k forks source link

Safari progress onProgress non-linear glitch at beginning of clip in autoplay #1629

Closed jwalker-om closed 1 month ago

jwalker-om commented 1 year ago

Current Behavior

When autoplaying on Safari (initializing playing as true), the video glitches a bit at the beginning and the played progress will sometimes go backwards a split second before progressing again. I do not experience this in Chrome.

Tried on both my Mac and iPad. Sometimes there is no issue. My guess is that it's something related to the way Safari loads/buffers the video? I've been able to trigger it from a pause state (initializing playing as false, but it is far less likely)

Expected Behavior

played progress is always linear and increasing

Steps to Reproduce

Likely reproducible in Safari only

  1. See Codesandbox: https://codesandbox.io/s/react-player-safari-autoplay-glitch-2dknbt
  2. Observe progress bar - it may jump around a bit at beginning
  3. Observe console output - it's set to output the played progress in the onProgress callback. You may see that the numbers do not consistently increase, but rather jump back to a lower number before progressing again.

Environment

Loque- commented 10 months ago

We are seeing this in chrome also when we try and immediately request to play the video after onReady has fired for the first time.