I’ve moved this to Anki > Card Design , because if the problem isn’t with YT, I think it could be in your iframe code or in how iframes are handled for security reasons.
It would probably be useful if you pasted that embed code –
```
in a code/preformatted-text block
```
– so folks can see exactly what you’re doing. It’s too hard to tell if things like smart quotes and obviously missing brackets are your errors or things that the forum is doing to your text.
I’ve been running into this too. It used to be (a few weeks/months ago) that I could close and reopen AnkiMobile and it would fix itself, which is annoying, but now a lot of them are having this issue. Working fine on desktop.
The second one is an embed that used to be working on AnkiMobile and now isn’t, the first one is a video I tried to embed just now and ran into this because I haven’t recently tried to review the other cards with embedded youtube videos on them on mobile. The code from the first one was just now copied from youtube’s share → embed, and should show that the code hasn’t changed on youtube’s end.
YouTube recently made changes to it’s enforcement of minimum supported browser functionality requirements when viewing videos/streams. (See full technical details here: YouTube API Services - Required Minimum Functionality | Google for Developers). The tl;dr is that YouTube needs to see some form of referrer value in the http request header before it will serve you the video player.
I don’t know how to tell what it’s sending as the origin in both cases, but I’m guessing it’s different somehow between anki desktop and AnkiMobile.
(the id and port are different after closing and reopening)
On ankiweb it’s this:
https://ankiuser.net/study
On Ankimobile, however, it’s something completely different:
ankifile://reviewer/
I’m guessing this is what Youtube is now rejecting when it wasn’t rejecting before. Why is it not http/https in ankimobile? Any chance this could/will be changed?