0

Is there any way to dectect or block a html5 video element or canvas being screen recorded in web browsers. maybe through extensions? is it possible?

1
  • No, there is not.
    – VLAZ
    Commented Jul 10, 2021 at 7:36

2 Answers 2

0

Unfortunately there is no such method to detect this. But if you just want it for preventing people from copying your webpage's contents and keep it private, then you can actually employ some other methods for it. See these:

https://myprogrammingnotes.com/protect-web-page-copied-using-javascript.html

What are the ways to prevent users to take screenshot of a webpage?

2
  • Just recently I noticed something strange on udemy website, I was trying to assist my friend using Team Viewer and noticed, I could not see the video on udemy in Team Viewer ,it was just plain black video player. Anyone know how is tht possible? Commented Jul 11, 2021 at 15:20
  • @AbdulKàbéèr maybe it's just the TeamViewer scren sharing that doesn't capture the video. It could be because the video is using hardware acceleration or if it isn't - that setting seems to mess capturing of videos all the time with many tools. And definitely not in web page context, as well. Or it might be something else that's basically just plain weirdness with recordings.
    – VLAZ
    Commented Jul 12, 2021 at 4:54
0

yeah,demo is here

document.addEventListener("visibilitychange", function() {
  if(document.visibilityState == 'hidden'){
    console.log('hidden')
  } else if (document.visibilityState == 'visible') {
    console.log('visible')
  }
});

The browser provides listening events to hide protected areas when the method is called

Not the answer you're looking for? Browse other questions tagged or ask your own question.