0

I have a user requirement in which I want to take a screengrab of what is playing on a youtube video at the moment. I have read about rendering to canvas, but it seems to take dom elements, and not the current flash video position. Is this possible? I can't use browser extensions, it has to be a button on the site that does this.

Thanks in advance.

Edit: How about if I use the HTML5 renderer?

Andres C
  • 919
  • 7
  • 14

1 Answers1

2

Its not possible to do this. Getting a youtube video as a dom video element is possible using the HTML5 embed option. The problem is youtube videos reside in an iframe, and due to cross-domain security restrictions, you will not be able to access the video dom element, which is necessary to draw it to a canvas.

Community
  • 1
  • 1
levi
  • 23,693
  • 18
  • 59
  • 73
  • How about if it's on a customized youtube channel? is it still embedded in an iframe? – Andres C Jan 17 '14 at 17:09
  • The `object` element is the only alternative embed youtube provides, however, that does not support HTML5. See https://developers.google.com/youtube/player_parameters – levi Jan 17 '14 at 17:29