[iframe] YouTube video not available : “Watch on YouTube” link does not work either

Steps to reproduce

When YouTube video does not allow embedding (such as the one just below), there is anyway a link to “Watch on YouTube”. Clicking on this link should redirect to YouTube so that we can finally watch the content.

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

Expected result

Clicking on this link should redirect to YouTube so that we can finally watch the content.

Actual result

Clicking on the link show the following error message in the console :

Blocked opening 'http://www.youtube.com/watch?v=wtHra9tFISY' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set.

Environment

  • Operating system: Windows 10
  • Obsidian: 0.13.23
1 Like

Anyone know the reason behind this?

I have mixed results, some embed and play in place just fine.
Others won’t.
The screen cap above is from a video I uploaded - while unlisted, it works elsewhere :thinking:

Same error with Obsidian 1.0.3
Mac Ventura 13.0.1 (Intel)

Does this work for you?

<center>
	<div
		 id="Container"
		 style="padding-bottom:56.25%;
				position:relative; 
				display:block; 
				width: 90%; 
				text-align: center;">
     <iframe
			 id="youtube" 
			 width="100%" 
			 height="100%" src="https://www.youtube-nocookie.com/embed/_yMjgrfbbOc"
			 title="TITLE HERE"
			 frameborder="0"
			 allow="accelerometer;
					autoplay;
					clipboard-write;
					encrypted-media; 
					gyroscope; 
					picture-in-picture" allowfullscreen=""
			 style=
			 "position:absolute; top:0; left: 0"></iframe>
	</div>
</center>

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