How to Force Publish to handle embedded YouTube video iframes like the local app

I use the following code to embed YouTube videos in my Publish Vault:

<div class="youtube-video" style="width:100%;height:0; padding-bottom:56.25%;margin-bottom:20px; margin-top:20px; position:relative;"> <iframe src="YOUTUBE_EMBEDDED_VIDEO_LINK" frameborder="0" allowfullscreen="" style="position:absolute;top :0; left : 0;width : 100%;height : 100%;"></iframe> </div>

EXPECTED RESULT

The local Obsidian app handles it perfectly. I want Obsidian Publish to do the same:

  • I can play the video
  • But links such as the video title, or the YouTube logo do not trigger any action (such as opening the video in the browser).

ezgif.com-video-to-gif


CURRENT RESULT

Publish behaves differently because:

  • it lets people click on the video title or YouTube logo
  • but then blocks the links, which is useless.

Either you let people click on it and view the link, or you don’t let them click at all.

ezgif.com-video-to-gif (1)


I tried using CSS to prevent link clicking, but that just resulted in the entire iframe / video not being clickable which means you can’t actually watch the video. That’s not what I want obviously.

Any idea ?

The app already does it well. I just don’t get why Publish doesn’t behave the same.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.