[BUG] On some videos, YouTube iframe shows "Not available" on PC and iPad but works fine on Android

Platform

[x] iPadOS
[x] Windows 10
[ ] Android

Obsidian Mobile version: v0.13.23


Description

When embedding the following YouTube video :

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

It is displayed as (on Windows 10 and iPad OS 15) :

image

But works perfectly fine on Android 12.

Is there any way to make it work on PC and iPad as it works on Android ?

Thanks !

This video is configured on youtube to not be embeddable.

@WhiteNoise : So why is it properly displayed on Android ?

I can’t even get the video to open on chrome in embedded format.

@WhiteNoise : I made two screenshots on mobile (Android 12). You can see that the very same iframe :

Shows perfectly fine :

I understand, but that video doesn’t even open in chrome/firefox on desktop. It’s a youtube issue.

Take this https://www.youtube.com/embed/wtHra9tFISY and put it chrome. It doesn’t open.

Indeed, the video does not open in Chrome.

However, since it opens on Android, there must be somehow a difference in how the request is made between Android and Desktop ? If it is technically possible that the video loads, could this be extended to desktop too ?

Sorry for reviving the thread, but since I was searching for an answer for this problem and I saw no answers, I want to give my 2 cents.

I find out that some videos on YouTube can’t be embedded on local places, only remote sites. I don’t know the secret of Android Obsidian, but to work on my PC, I did this:

I have a personal site, so I created a subfolder page with a simple CSS and PHP code:

 * {
            width: 100%;
            height: 100%;
            padding: 0;
            margin: 0;
        }
if( isset($_GET) &&
        isset($_GET['l']) )
        {
            $link = $_GET['l'];
            echo "<iframe
                        src=\"" . $link . "\"
                />";
        }

Now when I stumble on a YouTube video that can’t be embedded on local, I embed like this (you can write more options like width, height, frameborder, etc):

<iframe src="https://MySite.TLD/l/?l=https://www.youtube.com/embed/bwEBtjuqYSY"></iframe>

Probably there are a better and/or easier way to solve that, but for now it’s helping.