Skip to content

Commit d3c034e

Browse files
Added play method implementation that calls super method and dispatches play event
1 parent b452859 commit d3c034e

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/sound/html5/HTML5AudioSound.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ var HTML5AudioSound = new Class({
2828
this.duration = this.tags[0].duration;
2929
this.totalDuration = this.tags[0].duration;
3030
BaseSound.call(this, manager, key, config);
31+
},
32+
play: function (markerName, config) {
33+
if (!BaseSound.prototype.play.call(this, markerName, config)) {
34+
return false;
35+
}
36+
// TODO implement play method
37+
this.events.dispatch(new SoundEvent(this, 'SOUND_PLAY'));
38+
return true;
3139
}
3240
});
3341
module.exports = HTML5AudioSound;

0 commit comments

Comments
 (0)