New update broke audio for my cards

Hello,

first of all, I admit I have little idea how these things work, so I apologize if this is a duplicate topic on the issue or something like that, but looking through the newest topics didn’t help me with my problem.

I updated today, all the audio broke for my cards in the deck I have gathered using yomitan. Is this related to the new security update? Is there any way I can fix it? It works on my other decks that I downloaded, I imagine because the audio is included with the decks there, but I’m not sure.

[I went back to the previous version but that didn’t help either]. Update: going back to 24.11 did fix it, but it’s probably not the ideal solution.
Thank you in advance for your help!

2 Likes

Sorry to hear that, I use this addon sometimes, it sounds horrible…

Yeah, the latest update seems to break many HTML tags due to DOMPurify’s heavy sanitization. The sanitization takes place when you preview or edit the card, so fortunately the other ones remain untouched.
I also had similar problems and fixed them by reverting to Anki 24.11, but I hope the next updates will fix this issue.

See my post Anki 25.02.1 removes embedded <iframe> tags and SVG attributes which also links to the relates GitHub issues.

1 Like

I did look into that topic before starting mine, but for the most part, it went over my head. Well, time to wait then.

Also somewhat separate and a minor gripe instead of an actual problem(or at least I hope so), but the numbering of new cards is also changed/broken.

If it stopped working between 24.11 and 25.02, then I suspect your issue is in your card template(s). A bug fix in 25.02 took away a workaround some template authors were using related to audio.

In your card templates, you’ll be looking for a <!-- commented-out --> field-replacement that matches the name of the audio field in your note type, like –

<!-- {{Audio}} -->

For every card type that has that, change it to:

{{Audio}}

After you fix that, your cards will now show a play button in that spot.

image

If you don’t want audio play buttons, you can turn them off for the whole app from Preferences > Review > Show play buttons. Or if you want to turn them off just for this one note type, add this on the Styling tab –

.replay-button { 
  display: none; 
}

For more detailed steps, see the fix documented here for one specific note type – AnkiMobile 25.02.1 audio not playing - #9 by kieran .


That is generally caused by importing a deck that has very high New-queue numbers. See:

2 Likes

10 posts were split to a new topic: Audio playback and rendering issue

Thank you! It seems like this was the fix for me, at least on this deck.

As for the numbering, it’s not a big deal, it might be because in my desperation I reverted back to a previous backup? I’m not sure, but I haven’t imported any cards. It doesn’t matter that much it was just a bit strange to see.

If you reverted to a backup that had a high bottom-of-queue number already, sure, that could be why.