Skip to content
Snippets Groups Projects
Commit b29966ae authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Add comment to explain edge case

parent 0448ed0a
Branches
Tags
Loading
......@@ -23,6 +23,7 @@ class SoundLibrary extends React.Component {
this.player = this.audioEngine.createPlayer();
}
componentWillReceiveProps (newProps) {
// Stop playing sounds if the library closes without a mouseleave (e.g. by using the escape key)
if (this.player && !newProps.visible) this.player.stopAllSounds();
}
handleItemMouseEnter (soundItem) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment