Detect whether RPScreenRecorder is recording

339 Views Asked by At

In my application, I use AVPlayer to play videos. However, I do not use FairPlay.

I tried to use RPScreenRecorder to detect whether screen recording is on:

[RPScreenRecorder sharedRecorder].isRecording

but that does not work.

Does anyone know how to get whether screen recording is on?

2

There are 2 best solutions below

0
On

Normally RPScreenRecorder is not compatible with AVplayer. That might be the cause of what you are going through

It is said in actual Documentation here: Here

ReplayKit is incompatible with AVPlayer content.

0
On

Get the window of your app delegate and check isCaptured:

[appDel.window.screen isCaptured] 

That will indicate if anything is "using" the screen: RPScreenRecorder, airplay, or mirroring.