Skip to content

Commit 60693d6

Browse files
Using audioPlayDelay when checking for delay end for delayed playback
1 parent 7384d9a commit 60693d6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/sound/html5/HTML5AudioSound.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ var HTML5AudioSound = new Class({
174174
if (this.isPlaying) {
175175
// handling delayed playback
176176
if (this.startTime > 0) {
177-
if (this.startTime < time) {
178-
this.audio.currentTime += (time - this.startTime) / 1000;
177+
if (this.startTime < time - this.manager.audioPlayDelay) {
178+
this.audio.currentTime += Math.max(0, time - this.startTime) / 1000;
179179
this.startTime = 0;
180180
this.previousTime = this.audio.currentTime;
181181
this.audio.play();

0 commit comments

Comments
 (0)