Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make screenshots on chromecast?

Tags:

chromecast

I would like to make screenshots of the receiver application running of the Chromecast device. I need to have it running on the device to show the video and the application together.

Is there a way to do this ?

like image 702
JNG Avatar asked Oct 29 '13 13:10

JNG


2 Answers

Ali Naddaf's answer is technically true, however with a little work I was able to make a faithful reconstruction of the screen, to the point that it is indistinguishable from an actual screenshot.

  1. We will use code from the html2canvas project, see http://html2canvas.hertzen.com/documentation.html . It will render our screen to a canvas. In particular, copy&paste the compiled code from http://html2canvas.hertzen.com/build/html2canvas.js to the Chromecast console. (adding a tag to dom seems not to work) You can access the Chromecast console & developer tools by accessing the ip.ad.dr.ss:9222 port via Chrome.
  2. Issue the following command:

    html2canvas(document.body, {onrendered: function(canvas){document.write('');}});

    This will destructively replace the screen with the screenshot (I find this convenient but you can easily think of a more polite way if you wish)

  3. In the elements browser, you will have an img, with a base64 url specified as a src. Click on the url, chrome will open the image in a new tab. Hopefully it's the screenshot that you wanted.
  4. You might find that some pictures are missing because of e.g. same origin policy. The javascript have other privileges than accessing images from html. If this happens, work it out somehow (use https for images for example), then goto 1.
  5. You have your screenshot!
like image 170
Zsolt Szatmari Avatar answered Sep 23 '22 20:09

Zsolt Szatmari


No, that is not possible due to many reasons such as media rights and security.

like image 44
Ali Naddaf Avatar answered Sep 24 '22 20:09

Ali Naddaf