0

I am working on a MS Store UWP (Universal Windows Platform) app built using only Javascript, CSS and HTML.

I need to take a screenshot of the app at any given time through code but I cant seem to find any relevant api (or method) to do so. Although, there is an api given in UWP docs regarding this (in C#) but its usage through javascript is not available. Any help will be great.

/Thanks,

Jatin

Manish Gupta
  • 1,405
  • 14
  • 32
  • Possible duplicate of [Using HTML5/Canvas/JavaScript to take in-browser screenshots](https://stackoverflow.com/questions/4912092/using-html5-canvas-javascript-to-take-in-browser-screenshots) – mkrl Nov 19 '18 at 10:23

1 Answers1

2

This question can help you: Using HTML5/Canvas/JavaScript to take in-browser screenshots.
But actually you could have spent more time on your research and not spam duplicate questions.

  • 2
    I have tried html2canvas but you would already know that it does not allow screenshots of flash, etc. elements. Hence, it is of no use to me. Also, I was looking for a much specific method for windows uwp js apps. – Jatin Mishra Nov 19 '18 at 10:56
  • 2
    By the way, Jack I thought discussing about my problems with my fellow programmers is also a part of effective research , isn't it? – Jatin Mishra Nov 19 '18 at 10:59
  • 2
    And did you even read the docs? UWP has a namespace that provides an API to capture the screen. They even have an article about it. Think you can convert it to JavaScript if you need it: [Screen capture](https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/screen-capture) – Jack Ashton Nov 19 '18 at 11:07
  • 2
    Jack, the usage of Screen.capture through JS is not available. That was the help I was looking for. – Jatin Mishra Nov 19 '18 at 11:17