Skip to content

Commit d51156f

Browse files
Added stop method implementation that calls super method and dispatches stop event
1 parent 196258b commit d51156f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/sound/html5/HTML5AudioSound.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ var HTML5AudioSound = new Class({
5353
// TODO implement resume method
5454
this.events.dispatch(new SoundEvent(this, 'SOUND_RESUME'));
5555
return true;
56+
},
57+
stop: function () {
58+
if (!BaseSound.prototype.stop.call(this)) {
59+
return false;
60+
}
61+
// \/\/\/ isPlaying = false, isPaused = false \/\/\/
62+
// TODO implement stop method
63+
this.events.dispatch(new SoundEvent(this, 'SOUND_STOP'));
64+
return true;
5665
}
5766
});
5867
module.exports = HTML5AudioSound;

0 commit comments

Comments
 (0)