player
player copied to clipboard
Uncaught TypeError: Cannot destructure property 'paused' of 'this.$state' as it is null
Current Behavior:
I'm encountering the following error in the console:
Uncaught TypeError: Cannot destructure property 'paused' of 'this.$state' as it is null
This doesn't happen consistently.
Expected Behavior:
The player should initialize without throwing an error. this.$state should either be a valid object or checked for null before destructuring.
Steps To Reproduce:
- Integrate the Vidstack player into a project (in my case Next.js).
- Mount the player component.
- Play video and when it ends sometimes it throw this error in console.
Environment:
- Framework: React
- Meta Framework: Next.js
- Node: 20.18.3
- Device: Laptop
- OS: Windows 11 (different user devices with different os in production)
- Browser: Chrome