ozntel / oz-image-in-editor-obsidian

This Obsidian plugin to view Images, Transclusions, iFrames and PDF Files within the Editor without a necessity to switch to Preview.
339 stars 13 forks source link

YouTube video preview doesn't appear in edit mode #114

Closed odebroqueville closed 2 years ago

odebroqueville commented 2 years ago

I have a note containing the following link:

![video](https://www.youtube.com/watch?v=CtR-d-gyxHg)

I thought this plugin would render a preview in edit mode. Did I misunderstand?

ozntel commented 2 years ago

This is not the correct format. Obsidian won't render it, either. If you want videos to be rendered from Youtube, you need to bring copy the iframe from Embed. In this case you need to use the following:

<iframe width="560" height="315" src="https://www.youtube.com/embed/CtR-d-gyxHg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>