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?
consort commented
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
consort commented
Yea I don't think I did it was 3 am when I said that, nvm I can delete it mb
AlfieC commented
mac osx doesnt play audio either
prplz commented
Ok thanks alfie :(
prplz commented
Correct, iOS has a weird system where you must have the user press something to enable audio.