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
No related branches found
No related tags found
No related merge requests found
......@@ -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.
Finish editing this message first!
Please register or to comment