Please search the community before you post. Thank you.
There is no way to detect it, there are only ways to do it and to stop it from doing it.
If you want to block the user from screen recording, use this.