Using iframe with YouTube doesn't work

Steps to reproduce

  1. insert iframe for example <iframe src=""></iframe>
  2. switch to preview mode

Expected result

Thumbnail of Video and ability to watch it.

Actual result

empty box and when you click it, it takes focus of cursor


  • Operating system: Windows
  • Obsidian version: v0.12.4

Additional information

I tried it on different vaults and the behaviour is the same.
Old Links embedded previously still work as expected, for example the one in the help vault explaining iframe.
It works with other websites. I tested it with:

Hi jedth, fellow user here.

YouTube iframes are working fine for me. Could you try pasting this embed in your page and see if it works?

  title="YouTube video player" 
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" 

(This is the code I get from going to the YouTube video, clicking “Share”, then clicking “Embed”.)

1 Like

Hey Craig :slight_smile:
hm weird like this it seems to work for me too, but before I could also just use the URL.
Any idea what might be causing this? Or is it just me not using HTML properly? :sweat_smile:

No idea. I’ve never been able to get YouTube embeds to work any other way. Glad it worked for you!