Skip to content

Commit 0323af9

Browse files
committed
Fix edge case with pause called after seek before loaded
Fixes #1439
1 parent 3e1cb20 commit 0323af9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/howler.core.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,7 @@
917917
node._unlocked = true;
918918
if (!internal) {
919919
self._emit('play', sound._id);
920+
} else {
920921
self._loadQueue();
921922
}
922923
})
@@ -933,7 +934,6 @@
933934
self._playLock = false;
934935
setParams();
935936
self._emit('play', sound._id);
936-
self._loadQueue();
937937
}
938938

939939
// Setting rate before playing won't work in IE, so we set it again here.
@@ -1648,12 +1648,12 @@
16481648

16491649
// Seek and emit when ready.
16501650
var seekAndEmit = function() {
1651-
self._emit('seek', id);
1652-
16531651
// Restart the playback if the sound was playing.
16541652
if (playing) {
16551653
self.play(id, true);
16561654
}
1655+
1656+
self._emit('seek', id);
16571657
};
16581658

16591659
// Wait for the play lock to be unset before emitting (HTML5 Audio).

0 commit comments

Comments
 (0)