Skip to content

Commit 196258b

Browse files
Added resume method implementation that calls super method and dispatches resume event
1 parent 5e8d0dc commit 196258b

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
@@ -44,6 +44,15 @@ var HTML5AudioSound = new Class({
4444
// TODO implement pause method
4545
this.events.dispatch(new SoundEvent(this, 'SOUND_PAUSE'));
4646
return true;
47+
},
48+
resume: function () {
49+
if (!BaseSound.prototype.resume.call(this)) {
50+
return false;
51+
}
52+
// \/\/\/ isPlaying = true, isPaused = false \/\/\/
53+
// TODO implement resume method
54+
this.events.dispatch(new SoundEvent(this, 'SOUND_RESUME'));
55+
return true;
4756
}
4857
});
4958
module.exports = HTML5AudioSound;

0 commit comments

Comments
 (0)