Replaykit sometimes will be auto stop screen record !!!

I just used replaykit to achieve simple screen recording,But sometimes there may be frequent occurrences of automatic stopping of recording, i don`t why ? have anyone konw this bug ?

use Api:

func startCapture(handler captureHandler: ((CMSampleBuffer, RPSampleBufferType, Error?) -> Void)?, completionHandler: ((Error?) -> Void)? = nil)

open func stopCapture(handler: ((Error?) -> Void)? = nil)

``


The prerequisite for monitoring the automatic stop recording method is that you have already started screen recording and have not actively called to stop recording

let publisher = recorder.publisher(for: .isRecording)

        let cancelBag = Subscribers.Sink<Bool, Never>(receiveCompletion: {[weak self] complete in

           		///

        }, receiveValue: {[weak self] value in

           		///

        })

        publisher.subscribe(cancelBag)