0

I have a web application in which I embed a youtube video.

<object width="1152" height="648">
    <param name="allowFullScreen" value="true">
    <param name="allowscriptaccess" value="always">
    <param name="movie" value="https://www.youtube.com/embed/HOsOTaXUg7c">
    <embed src="https://www.youtube.com/embed/HOsOTaXUg7c" width="100%" height="100%">
</object>

This code works perfectly in the browser, however on the WebOS simulator, the same code results in a Video Unavailable:

enter image description here

How to I make this video work on a WebOS TV?

Lizozom
  • 2,161
  • 2
  • 21
  • 38
  • Please try with another videos and even if all those tests fail, check [this answer](https://stackoverflow.com/a/72561728/12511801) - I really don't know about WebOS, but, consider research if WebOS TV has some kind of restrictions to iframes or check therir forums/support for more info. I doubt if this is on-topic on [Issue Tracker](https://issuetracker.google.com/issues?q=status:open%20componentid:186600&s=created_time:desc) - since is not about the YouTube Data API, but, it might be worth check that forum as well. – Marco Aurelio Fernandez Reyes Mar 08 '23 at 13:24
  • See my answer below. This issue is specific to the WebOS application architecture. – Lizozom Mar 28 '23 at 14:15

1 Answers1

1

While in many cases, this issue is a result of either trying to embed a video that prevents a embedding or using the wrong youtube path, in this particular case, this behavior occurred because YouTube won’t allow embedding videos in a page with a file:// protocol, which is the case for a basic WebOS app.

Two possible solutions are:

  1. Use a WebOS hosted app
  2. Use a proxy iframe to load the video.

I created a basic example of here and it allows you to pass in a video ID and it will load it from any page.

Lizozom
  • 2,161
  • 2
  • 21
  • 38