0

I have made an html document with an embedded video, it works in the IDE's browser, but not in "actual" browsers. The embedding also works in viewsync.net, the video is played inside said website.

  • I used "Code Editor" for Android.
  • I tested with Vivaldi & Opera (Android), Vivaldi & Firefox & Edge (Windows): the video player always says "Video unavailable".
  • I use embedded CSS (I doubt this is the problem, but I don't really know).
  • Changing the URL from HTTPS to HTTP doesn't affect the result.

What's the issue, am I missing a requirement for it to work?
How can I make it work?

iframe {
  width: 200pt;
  aspect-ratio: 1/1;
}
<iframe src="https://www.youtube-nocookie.com/embed/Gjdj2FoDyJo"
    title="YouTube video player"
    frameborder="0"
    allow="accelerometer; autoplay; clipboard-write; encrypted-media;
        gyroscope; picture-in-picture; web-share"
    allowfullscreen>
</iframe>
DavidBevi
  • 61
  • 10
  • Try with a video_id that can be embed, I've checked this video on my browser (Google Chrome) on the PC - just copy/pasting the url `https://www.youtube-nocookie.com/embed/Gjdj2FoDyJo` and it says - video unavailable - see [my answer](https://stackoverflow.com/a/71971657/12511801) for details – Marco Aurelio Fernandez Reyes Feb 24 '23 at 20:44
  • I may be wrong, but i think the url inside the iframe should only work inside the iframe, because when I put the video_id in the standard url format (```https://www.youtube.com/watch?v=Gjdj2FoDyJo```) it works. -- Also: ```youtube.com/embed/```+```other_video_id``` gives same error (Video unavailable), and putting the url liked by the browser into the iframe makes it produce the error "www.youtube.com refused to connect." – DavidBevi Feb 25 '23 at 18:14
  • I also don't get why the IDE's browser _can_ play the embedded video while _none_ actual browser can – DavidBevi Feb 25 '23 at 18:19

0 Answers0