react-media-player
react-media-player copied to clipboard
setState error on unmounted component
If I add say just the AudioPlayer on my page (from the sample) then navigate away from the page and come back I am getting an error:
Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the Media component.
I hope you can reproduce. I am chopping code up a little bit trying to work on SSR so maybe I broke something :)
Sorry, I'm just now getting to this 😞 Did you ever have any luck with this?
`Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the Media component. printWarning @ warning.js:36 warning @ warning.js:60 getInternalInstanceReadyForUpdate @ ReactUpdateQueue.js:48 enqueueSetState @ ReactUpdateQueue.js:200 ReactComponent.setState @ ReactComponent.js:63 events.(anonymous function) @ Media.js:216 HTML5._this._handleTimeUpdate @ HTML5.js:80
Media.js:135 Uncaught TypeError: Cannot read property 'setVolume' of null at Object.Media._this.setVolume (Media.js:135) at Object.Player._this._handleOnReady [as onReady] (Player.js:61) at HTMLAudioElement.HTML5._this._handleCanPlay (HTML5.js:50) Media._this.setVolume @ Media.js:135 Player._this._handleOnReady @ Player.js:61 HTML5._this._handleCanPlay @ HTML5.js:50
warning.js:36 Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op. Please check the code for the Media component.`
@alukard1986 sorry about that :/ I'm currently working on a new version and trying to fix all outstanding issues. You can follow the progress here.