Skip to content

Commit 6d5ea46

Browse files
committed
fix: audio cannot play after unplugging headphones on IOS
1 parent f128f9d commit 6d5ea46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/howler.core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@
521521
if (self.state === 'running' && self.ctx.state !== 'interrupted' && self._suspendTimer) {
522522
clearTimeout(self._suspendTimer);
523523
self._suspendTimer = null;
524-
} else if (self.state === 'suspended' || self.state === 'running' && self.ctx.state === 'interrupted') {
524+
} else if (self.state === 'suspended' || self.state === 'running' && (self.ctx.state === 'interrupted' || self.ctx.state === 'suspended')) {
525525
self.ctx.resume().then(function() {
526526
self.state = 'running';
527527

0 commit comments

Comments
 (0)