Skip to content

Wistia player crashes when src changes while playing #2000

@nazar-serdiuk

Description

@nazar-serdiuk

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.

Screen.Recording.2025-10-07.at.10.39.49.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    PRs welcomeFeel free to open a PR to fix this!bugIndicates an unexpected problem or unintended behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions