Skip to content

Commit 1192362

Browse files
Finding available audio tag when calling play method and resetting and returning false if it was not successful
1 parent af8666f commit 1192362

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/sound/html5/HTML5AudioSound.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ var HTML5AudioSound = new Class({
3434
if (!BaseSound.prototype.play.call(this, markerName, config)) {
3535
return false;
3636
}
37-
// TODO implement play method
37+
if (!this.pickAudioTag()) {
38+
this.reset();
39+
return false;
40+
}
3841
this.events.dispatch(new SoundEvent(this, 'SOUND_PLAY'));
3942
return true;
4043
},

0 commit comments

Comments
 (0)