1

I want to block screenshot of this webpage by pressing window + prtsc. or screen shot black out like netflix. or screenshot should not be readable

enter image description here

Tayyeb
  • 127
  • 7

2 Answers2

1

You could try inserting the css code and see if it works for you:

@media print {
    html, body {
       display: none;  /* hide whole page */
    }
}

However, most streaming media services now make use of EME https://en.wikipedia.org/wiki/Encrypted_Media_Extensions. The media players built by these services make use of EME to invoke the underlying DRM (Digital Rights Management). Because of this Netflix can blackout the video player when you try to screenshot anything there.

WebBrowser -> HTML5/Javascript -> EME -> DRM

And yes, of course you can build your own solution using EME.

Ridwan
  • 367
  • 3
  • 11
0

Try this code to Disable PrtScr or Alt+PrntScr in All Browsers using JavaScript.

<script>
        function copyToClipboard() {
            // Create a "hidden" input
            var aux = document.createElement("input");
            // Assign it the value of the specified element
            aux.setAttribute("value", "You can no longer print.This is part of the new system security measure.");
            // Append it to the body
            document.body.appendChild(aux);
            // Highlight its content
            aux.select();
            // Copy the highlighted text
            document.execCommand("copy");
            // Remove it from the body
            document.body.removeChild(aux);
            alert("Print screen diable.");
        }
    
        $(window).keyup(function (e) {
            if (e.keyCode == 44) {
                copyToClipboard();
            }
        }); 
    
    </script>
Dhrumil shah
  • 611
  • 4
  • 23