Skip to content

Commit 53c8f33

Browse files
committed
Try to fix sound issue on iPhone
1 parent b7d9d60 commit 53c8f33

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

app/public/js/main.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,3 +361,14 @@ function drawEvent(data, svg_area) {
361361
$('#area svg g:lt(10)').remove();
362362
}
363363
}
364+
365+
366+
// Some hack to start Howler.js it on iPhone
367+
var unlockIOSAudioPlayback = function () {
368+
var context = Howler.ctx;
369+
var oscillator = context.createOscillator();
370+
oscillator.frequency.value = 200;
371+
oscillator.connect(context.destination);
372+
oscillator.start(0);
373+
oscillator.stop(0);
374+
};

0 commit comments

Comments
 (0)