Can I embed YouTube in a WebOS app?

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="">
    <embed src="" width="100%" height="100%">

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

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

Opening in PC Chrome browser shows the same error. Please try another video. Thank you.

This video URL type is mean for embedding, in accordance with YouTube’s embedding instructions. So you have to open it using an object or an iframe, like I showed in my code snippet.

You can see it working in this JSFiddle.

In the meanwhile, I tested it on my TV, and it doesn’t work there as well. Any idea why?

For anyone else experiencing this, this happens because YouTube won’t allow embedding videos in a page with a file:// protocol, which is the case for a basic WebOS app.

Some possible solutions are:

  1. use a hosted app
  2. use a proxy iframe to load the video. I created a basic example here and it allows you to pass in a video ID and load it from any page.