question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v2.10.1] `onProgress` callback is not firing when the video is playing

See original GitHub issue

Be sure to search for your issue before opening a new one.

Current Behavior

onProgress callback is not called when the video is playing.

Expected Behavior

onProgress callback should be called periodically with the playback information when the video is playing.

Steps to Reproduce

  1. Use version v2.10.1 of react-player (issue does not exist in v2.10.0

  2. Add a simple player as follows that plays a webm file

    <ReactPlayer
      ref={playerRef}
      width={1024}
      height={768}
      muted
      playing={true}
      url="https://example.com/video.webm"
      onDuration={onDuration}
      onProgress={onProgress}
    />
    
  3. The onProgress callback is never called

Environment

  • URL attempting to play: Any url containing a video file (I used a webm file)
  • Browser: Chrome
  • Operating system: MacOS

Other Information

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:7
  • Comments:22 (4 by maintainers)

github_iconTop GitHub Comments

17reactions
TomerRoncommented, May 14, 2022

I can also confirm the issue with "react-player": "2.10.1" and React 18 using react-scripts.

I managed to temporarily fix it by removing React.StrictMode.


Minimal reproduction: https://codesandbox.io/s/naughty-wildflower-pqvest

Expected behavior: it should log the onProgress events

Actual behavior: it does not log the onProgress events

Temporary fix: remove <StrictMode> and now it does log the onProgress events.

Looking forward to the proper fix 🙂

14reactions
mohamedanushkarcommented, Aug 10, 2022

Version 2.10.1 was released ~90 days ago (3 months ago according to the npm repo) and the PR for this issue was merged 21 days ago. Version 2.10.1 is also the latest release. Therefore, the fix for this issue has not been released yet.

When can we expect a release on the next version of react player

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not receiving expected attributes using `onProgress` callback ...
I do receive an onProgress event, but it does not have the properties of lengthComputable , total , and loaded . onProgress =...
Read more >
onSuccess and onProgress callbacks not working well with ...
The problem is that I need to detect when the entire incremental loading has completed in order to do that. and the onProgress...
Read more >
react-player | Yarn - Package Manager
A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion.
Read more >
react-player/CHANGELOG and react-player Releases (Page 7 ...
A React component for playing a variety of URLs, including file paths, ... play on mixcloud player #1467; Fix onProgress not firing in...
Read more >
React-player NPM | npm.io
ReactPlayer v2.0 changes single player imports and adds lazy loading players. ... Callback props take a function that gets fired on various player...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found