react-player icon indicating copy to clipboard operation
react-player copied to clipboard

Wistia player crashes when src changes while playing

Open nazar-serdiuk opened this issue 3 months ago • 1 comments

After updating react-player from v2.16.1 → v3.3.3, I started experiencing a crash when switching the video source while the player is already playing. This issue is also reproducible in the demo from the current repository.

Steps to reproduce:

  1. Open the demo.
  2. Click the "Play" button before opening any video.
  3. Open any Wistia video.

Actual behavior: The app crashes with the following error: TypeError: Cannot read properties of undefined (reading 'play')

Expected behavior: The player should switch to the new video source and autoplay it, without throwing an error.

I would be grateful for any guidance on how to handle this or a potential fix from your side.

https://github.com/user-attachments/assets/0b0ae9ed-a86e-4020-b558-4356ef3fb29a

nazar-serdiuk avatar Oct 07 '25 07:10 nazar-serdiuk

It's actually breaking more than this. it's breaking on autoplay too for example and in some cases I can see it breaking on normal play.

pedrosousa13 avatar Oct 23 '25 07:10 pedrosousa13