prplz/baker.cat

iOS doesn't play audio

Closed this issue · 7 comments

prplz commented

Need to use a touch event to make audio play on iOS which I think isn't very cool by apple but whatever we have to deal with it anyway this is our job right?

Possible fix?
myAudio = new Audio('wtfamidoingwithmylife.mp3');
myAudio.addEventListener('ended', function() {
this.currentTime = 0;
this.play();
}, false);
myAudio.play();

Sorry on my phone so this,is just some code from memory

prplz commented

I don't think you understand the issue

Yea I don't think I did it was 3 am when I said that, nvm I can delete it mb

mac osx doesnt play audio either

prplz commented

Ok thanks alfie :(

It seems that #9 did not fix iOS unfortunately.

prplz commented

Correct, iOS has a weird system where you must have the user press something to enable audio.