Skip to content

Conversation

@ryanburst
Copy link
Contributor

Addresses React warnings about "Unknown event handler property" for ReactPlayer-specific event handlers (onReady, onStart, onPlay, onPause, onEnded, onLoadStart) by filtering them out before passing props to the underlying HTML video element.

The issue was that all props starting with "on" were being passed down to the underlying player component, including ReactPlayer-specific event handlers that don't exist on HTML video elements.

This fix filters out ReactPlayer-specific event handlers while preserving standard HTML video event handlers, eliminating console warnings without breaking functionality.

Added test to verify the fix works correctly.

- Filter out ReactPlayer-specific event handlers (onReady, onStart, onPlay, onPause, onEnded, onLoadStart) before passing props to underlying player component
- Prevents React warnings about "Unknown event handler property"
- Maintains full functionality while eliminating console warnings
- Added comprehensive tests to verify the fix
- Backward compatible with no breaking changes
Co-authored-by: Wesley Luyten <me@wesleyluyten.com>
Copy link
Collaborator

@luwes luwes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 👍

@luwes luwes merged commit 55cf5fe into cookpete:master Aug 25, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants