Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant stop the player with react router #9

Open
waltershub opened this issue Dec 11, 2017 · 0 comments
Open

cant stop the player with react router #9

waltershub opened this issue Dec 11, 2017 · 0 comments

Comments

@waltershub
Copy link

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

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

No branches or pull requests

1 participant