replaykit

iOS 12: ReplayKit is broken

怎甘沉沦 提交于 2019-12-06 04:50:00
I have been using ReplayKit for all past updates, but now with iOS 12 my recordings sometimes work, sometimes don't... but usually they don't. Most of the time when I stop the recording this is what I get: a completely black screen. This hasn't happened to me before and it is extremely frustrating. This is how I use ReplayKit to record the screen: import ReplayKit class ViewController: UIViewController, AVCaptureVideoDataOutputSampleBufferDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, RPPreviewViewControllerDelegate { func startRecording() { func start() { guard

replaykit startrecording sometimes never enters completion handler

南笙酒味 提交于 2019-12-06 04:19:53
问题 I am using replay kit to save a video of my screen during gameplay but randomly on occasion startRecordingWithMicrophoneEnabled and recorder.stopRecordingWithHandler never enters the completion handler it doesn't throw an error, it just runs and hangs indefinitely. if recorder.available && recorder.microphoneEnabled { recorder.startRecordingWithMicrophoneEnabled(true) { [unowned self] (error) in if let unwrappedError = error { print(unwrappedError.localizedDescription) } else { print("called"

How do I draw onto a CVPixelBufferRef that is planar/ycbcr/420f/yuv/NV12/not rgb?

空扰寡人 提交于 2019-12-06 04:15:10
问题 I have received a CMSampleBufferRef from a system API that contains CVPixelBufferRef s that are not RGBA (linear pixels). The buffer contains planar pixels (such as 420f aka kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange aka yCbCr aka YUV ). I would like to modify do some manipulation of this video data before sending it off to VideoToolkit to be encoded to h264 (drawing some text, overlaying a logo, rotating the image, etc), but I'd like for it to be efficient and real-time. Buuuut planar

RPScreenRecorder stopRecording block not getting called

岁酱吖の 提交于 2019-12-06 01:24:54
问题 I have searched enough but failed to get a solution. I am using ReplayKit to record the screen of my app. I have started recording the screen by calling let sharedRecorder = RPScreenRecorder.shared() sharedRecorder.startRecording() { error in if let error = error { self.showScreenRecordingAlert(message: error.localizedDescription) } } When I am pressing the stopRecord button I am calling let sharedRecorder = RPScreenRecorder.shared() sharedRecorder.stopRecording { previewViewController, error

how to prevent screen record in ios11

送分小仙女□ 提交于 2019-12-05 16:03:46
To some reasons, our APP dont't want people record screen, but in ios11 a new feature can let user record there iphone screen, so is there an API or notification indicate me user is recording now thank u very much You can detect if the screen is being recorded with: UIScreen.main.isCaptured // True if this screen is being captured (e.g. recorded, AirPlayed, mirrored, etc.) You can't prevent it using project settings, but you could use a modal or something to request the user to disable it. Not sure how that might workout with your AppStore submission. 李国立 You can use kvo observe

Where does a host app handle NSExtensionContext#completeRequest?

假如想象 提交于 2019-12-05 07:35:29
When you call completeRequest(returningItems:completionHandler:) from an extension, where does this get handled by the host app? Disclaimer: did not checked my assumptions , but may be this helps. 1) documentation states: Call the completeRequestReturningItems:completionHandler: method, which signals the host app that its original request is complete 2) here - Figure 2-3 shows that "Host"-app - is app that starts some work with extension. For example, "Host" may be the app in which user touches "Share"-button. Then this "Host"-app sends some data (which user wants to share) to extension. 3)

ReplayKit access to recording and custom preview actions

时光毁灭记忆、已成空白 提交于 2019-12-04 19:40:17
I am using the replayKit to record my game. After the recording is done, I want to upload the video to my server. 1. How do I access the recording from my app 2. The preview has "save" and "cancel" actions. How do I make my own custom actions like "share" etc? 来源: https://stackoverflow.com/questions/43206209/replaykit-access-to-recording-and-custom-preview-actions

ReplayKit's RPSystemBroadcastPickerView not showing preferredExtension

牧云@^-^@ 提交于 2019-12-04 17:02:31
问题 I am using RPSystemBroadcastPickerView to show a picker view, from which a user can select a broadcast service to record the screen. Based on documentation, preferredExtension should allow me to set which broadcast extension should the picker show. The code is super simple: let broadcastPickerView = RPSystemBroadcastPickerView(frame: CGRect(x: 0, y: 0, width: 51, height: 51)) view.addSubview(broadcastPickerView) broadcastPickerView.preferredExtension = "com.milan.nosal.broadcast-extension"

replaykit startrecording sometimes never enters completion handler

一曲冷凌霜 提交于 2019-12-04 08:38:09
I am using replay kit to save a video of my screen during gameplay but randomly on occasion startRecordingWithMicrophoneEnabled and recorder.stopRecordingWithHandler never enters the completion handler it doesn't throw an error, it just runs and hangs indefinitely. if recorder.available && recorder.microphoneEnabled { recorder.startRecordingWithMicrophoneEnabled(true) { [unowned self] (error) in if let unwrappedError = error { print(unwrappedError.localizedDescription) } else { print("called") self.manager.instructions.text = "Click to Start Game" } } } if recorder.available && recorder

RPScreenRecorder stopRecording block not getting called

雨燕双飞 提交于 2019-12-04 06:16:23
I have searched enough but failed to get a solution. I am using ReplayKit to record the screen of my app. I have started recording the screen by calling let sharedRecorder = RPScreenRecorder.shared() sharedRecorder.startRecording() { error in if let error = error { self.showScreenRecordingAlert(message: error.localizedDescription) } } When I am pressing the stopRecord button I am calling let sharedRecorder = RPScreenRecorder.shared() sharedRecorder.stopRecording { previewViewController, error in if let error = error { self.showScreenRecordingAlert(message : error.localizedDescription) return }