iOS 11 Screen Record disable VIDEO RECORDING
Asked Answered
P

1

5

iOS 11 has new feature which enables users to record their screen, I want to disable only VIDEO recording when i am playing video in my application keeping screen record enabled.

For example. I am recording my screen and open my application start using it, but as soon as AVPlayer starts playing video it should pause the screen recording so that video in my application does not get captured in Recording while audio can be captured in the Screen Record.

Thanks!

Pessimist answered 21/9, 2017 at 6:3 Comment(0)
P
7

There is currently no way to disable the user from recording the screen. You can, however, determine when the user is recording the screen, and respond accordingly.

To be notified when the user starts or finishes recording their screen, you can listen for a UIScreenCapturedDidChange notification.

NotificationCenter.default.addObserver(self, selector: #selector(screenCaptureChanged), name: NSNotification.Name.UIScreenCapturedDidChange, object: nil)

You can also inspect the isScreenCaptured property of UIScreen to determine if the screen is currently being recorded.

UIScreen.main.isCaptured

In your case, since you can't disable the screen recording, the best solution is to show some UI that blocks the video when the screen is being recorded.

Piacular answered 22/9, 2017 at 17:54 Comment(11)
Netflix is disabling video recording , when movie is being played. Here is what they are doing. 1. Start recording screen. Open netflix, play any movie. stop recording and see what you have recorded in photos. They place loading screenshot of the movie(if movie is playing, audio is recorded with no hurdle) in the recorded video. Screenshot will remain in the recorded video as long as you are playing video. any idea how they are achieving this ??Pessimist
But when you are watching the movie with screen recording, you can still see the movie? The screenshot of the movie only appears in the recording?Piacular
Yes , you can see the movie while recording. and screenshot of the movie does not appear in the recording i.e. no movie recording only audio, but you are still watching movie.Pessimist
Is there an app that can monitor and detect the screen recording, then offer to block the view if they are recording?Collier
@SeanLee I'm not sure what you mean. Apps cannot modify the views of other apps. You can modify your views within your own app, which is the solution my answer suggests.Piacular
Uber has this hidden screen recording in their code. Apple does not inform, so it's basically a keylogger. I wonder if there is any app out there that can monitor and detect if screen is currently being recorded. At least flash the screen that it's being recorded or something of sort.Collier
@SeanLee Uber had a special entitlement from Apple. No app can monitor the screen recording status outside of its own app. iOS already has a status bar indicator to let you know when the screen is being recorded.Piacular
I understand that special entitlement. I am also aware of the status bar indicator, but does it show when any app turn on the screen recording (in this case uber)?Collier
@SeanLee Uber wasn't using the user-enabled iOS 11 screen recording available in control center, which this question is about. They were capturing the display frames directly (as far as I understand it). Apps cannot record the screens of other apps and there is no public API to do so. You should look into the concept of app sandboxing, which may answer more of your questions. If you have additional questions unrelated to this answer, you should ask a new question.Piacular
If Screen capturing is true, then I have to stop recording. Is it possible from my app? @PiacularTowel
Amazon Prime Video app, does this when you are playing video online, but when you are playing from downloads either it missed doing it or not able to do it, any idea on this part?Maximo

© 2022 - 2024 — McMap. All rights reserved.