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

cant stop the player with react router

Open waltershub opened this issue 7 years ago • 0 comments

I am using react router and when I navigate back the audio keep playing I tried this in the stopPlaying() { ReactDOM.findDOMNode(this.state.autoplayref).dispatchEvent(new Event('pause')); } and then componentWillUnmount() { this.props.shuirimprops.stopPlaying(); }

but not working. I am doing the same thing for playing and pausing and it works fine I think the ref is alread gone by the time the async method excutes

waltershub avatar Dec 11 '17 23:12 waltershub