Reputation: 1
I'm creating a flashcard activity in javascript where I want the audio (a vocabulary word in mp3 format) to play once the card has finished flipping and the word's text is revealed.
This requires a one-second delay between the time the user clicks the card and the css transformation animation has finished.
I've tried using an event listener for the transitionend, as well as using SetTimeout. Both of these work great in Chrome and Firefox, but not in Safari. I'm assuming because the user's click didn't immediately proceed the audio request.
Is there a way to delay audio playback in Safari for a second or two?
Upvotes: 0
Views: 39