Can you embed the full YouTube player? Preferably via an API?
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();
开发者_JAVA百科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.
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();
精彩评论