views:

33

answers:

1

I've got this Chrome extension, and it uses jQuery to open a new Window with a YouTube video embedded in it. I do this with

$('#movie_player').get(0).getVideoEmbedCode();

This works great, but you don't get all of the video controls, like quality selection, CC, etc. Is there a way to embed the full player? I would prefer to do it via an API, like the getVideoEmbedCode() call that I'm currently using.

A: 

I couldn't find a way to do it with the API, but I found a jQuery solution that worked. I just selected the containing element's HTML and sent it as a message via Chrome's API, then injected it into my new window.

$('#watch-video').html();
sidewaysmilk