Skip to content

Commit

Permalink
stop preview playback when sound selected
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarcosfer committed Feb 9, 2022
1 parent 041a983 commit 2ed353d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/demos/onsets/src/components/FreesoundResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
</template>

<script>
import EventBus from '../core/event-bus';
export default {
emits: ['selected'],
Expand Down Expand Up @@ -55,6 +56,9 @@ export default {
},
created () {
this.setupAudioElement();
EventBus.$on('sound-selected', () => {
this.stopAudio();
})
},
methods: {
handlePlay () {
Expand Down

0 comments on commit 2ed353d

Please sign in to comment.