Skip to content

cant stop the player with react router #9

@waltershub

Description

@waltershub

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions