admin管理员组

文章数量:1201187

BEFORE YOU TRY AND MARK THIS AS A REPEATED QUESTION I know this is possible, and all of the other questions are old. Here's why this question is different:

  • Netflix has been able to do this. Try streaming Netflix, turn subtitles on, and you can see that if you try and take a screenshot, the subtitle will appear, but the video will not.
  • Try this again with OBS. When you use a desktop/window capture, you can see the video from Netflix playing in the browser, but at the SAME time, OBS can't pick it up.
  • This Wordpress plugin (which I haven't tried out personally, so not sure if it works, but the reviews are promising)

So now that I've assured you this isn't a question with the context of 2014, are there any new ways to be able to avoid screen capture on the web? I've assumed that it's impossible for a while, but it looks like there might be an API for it somewhere, and no one hasn't asked this question in years here. It'd be useful for preventing capture in my own JS websites, so I was just wondering how I could implement this myself. Thanks.

BEFORE YOU TRY AND MARK THIS AS A REPEATED QUESTION I know this is possible, and all of the other questions are old. Here's why this question is different:

  • Netflix has been able to do this. Try streaming Netflix, turn subtitles on, and you can see that if you try and take a screenshot, the subtitle will appear, but the video will not.
  • Try this again with OBS. When you use a desktop/window capture, you can see the video from Netflix playing in the browser, but at the SAME time, OBS can't pick it up.
  • This Wordpress plugin (which I haven't tried out personally, so not sure if it works, but the reviews are promising)

So now that I've assured you this isn't a question with the context of 2014, are there any new ways to be able to avoid screen capture on the web? I've assumed that it's impossible for a while, but it looks like there might be an API for it somewhere, and no one hasn't asked this question in years here. It'd be useful for preventing capture in my own JS websites, so I was just wondering how I could implement this myself. Thanks.

Share Improve this question asked May 13, 2020 at 1:14 NeuronButterNeuronButter 8283 gold badges9 silver badges25 bronze badges 4
  • 1 I am looking at a screenshot of Netflix playing Community with closed captions. I'm using Chrome 81. imgur.com/a/2hjIHQh – Victor Wilson Commented May 13, 2020 at 1:24
  • 1 Hmm, that's weird. When I use Netflix and use Windows+Shift+S or OBS, the video plays normally, but inside the screen capture, it isn't shown. Edit: Just checked, Chrome 81 as well. – NeuronButter Commented May 13, 2020 at 4:10
  • I just used the Print Screen button. – Victor Wilson Commented May 13, 2020 at 14:17
  • reddit.com/r/ArcBrowser/comments/161qz6b/… – yu yang Jian Commented Jul 11, 2024 at 2:20
Add a comment  | 

2 Answers 2

Reset to default 18

Your initial assumption is correct, it's impossible. The Netflix example is different, because it isn't preventing a screenshot of the webpage (which is why the subtitles still get captured) but of the video stream, which is embedded in the webpage, but not actually a part of it. The video isn't captured in your example because it's protected by Encrypted Media Extensions. This also means, though, that the video isn't playable in just any browser, it's only accessible in browsers that support EME.

So, the answer to "how do you prevent screen captures on the web" is "convince every browser manufacturer to include features in their browser that allow you to control screen capturing, and then only make your website available to browsers that support that feature" (which is essentially what Netflix did for video).

You could try playing a transparent DRM-protected video on top of your content (and forward any user event to the element below it). When the user takes a screenshot, the video should produce a solid overlay on top of your actual content.

本文标签: javascriptHow can you prevent screen captures on the web 2020Stack Overflow