Audio not working on iphone but works on MacOS

I’m having an issue where sound is not playing in Anki on my iPhone. It was working fine yesterday, but today it suddenly stopped. I’ve searched the forum and tried various solutions, but none have worked. Here’s what I’ve checked so far:

  • My iPhone is not on silent mode and not muted.
  • Sync is complete on Anki iOS.
  • I verified the audio file format using MediaInfo, and it is MP3, which matches the file extension.

Since it was working just yesterday, I’m not sure what could have caused this. Has anyone encountered this issue before, or does anyone have other troubleshooting suggestions?

Thanks in advance!

I think I figured it out.

Previously, I was using:

<!-- {{vocab-audio}} -->

in my template to hide the large play button while still allowing the sound to play. This setup had been working fine until yesterday.

To fix the issue, I changed the HTML to:

{{vocab-audio}}

and used the following CSS instead:

.replay-button svg {
  display: none;
}

This successfully hid the play button while keeping the audio functional.

What’s strange is that my original setup suddenly stopped working on my iPhone yesterday, even though it had been auto-playing sound without any issues before. I’m not sure why this happened.

1 Like

Anki 25.02 was recently released and changed how it behaved when audio tags are hidden in HTML comments.

I assume your phone automatically updated AnkiMobile but you are still running 24.11 or older on your Mac.

Other people have also run into this gotcha:

1 Like

Ah that explains it. Thanks!

Thanks for posting this and finding the solution. I had the same problem all of a sudden. One added benefit, once I took out the <------> symbols, it added a play button for the audio. I suspect you might be using the same mandarin extension that I am, seeing how we had the same formatting put into our cards.

2 Likes

For my case, it was actually the opposite - I thought the play button was too large and obstructive, so I removed it by commenting it out myself to get rid of it while keeping the audio-play. That ended up dragging me into this issue. A better way to hide it would be to use CSS or in-line HTML styles, as mentioned in the solution. But since you like the button, I guess you don’t need to do anything else and that’s a happy little accident for you : )

1 Like