ReplayKit

RSS for tag

Record or stream video from the screen and audio from the app and microphone using ReplayKit.

Posts under ReplayKit tag

110 Posts

Post

Replies

Boosts

Views

Activity

screen captured post false notification but I not stop recording
when my app is recording,I click recording in statusbar on the left, then it post the captured false notification below with alert, but I havent click stop button in alert; then it post the captured true notification when I click cancel button. it should not post notification when I click the stop button? it was some bug for this problem?     private func addNotificationForCaptured() {         NotificationCenter.default.addObserver(self, selector: #selector(screenCapturedDidChange), name:  UIScreen.capturedDidChangeNotification, object: nil)     }     @objc func screenCapturedDidChange(noti: Notification) {         if let screen: UIScreen = noti.object as? UIScreen {             print(screen.isCaptured)         }     }
0
0
618
Apr ’22
Developing a call recorder app for ptivate use
Hello, Is there any way to create a call recording app without distributing it to the app store? And just use it as a beta local app on my iphone only? If there is a way to do it, can you briefly explain how can i do it? Because all of the app store recording apps store my calls on their server and i dont want that, i just want to save my calls locally on my iphone. Thanks!
0
0
1.5k
Apr ’22
Do the default microphones and their parameters are same in iPhone8, X, 11, 12 and 13? (the Pro or Max are considerd)
Hi, I am doing an acoustical experiment with iPhone, but I need to know whether the microphone and its parameter are the same among different iPhones (iph8, X, 11, 12, 13, and their Pro & Max version). If the microphones and the parameters are not the same, I would do the experiment only with one of them. Looking forward to your answers.
0
0
505
Apr ’22
Scale CMSampleBuffer Size Without Exceeding the Memory Limit Of Broadcast Extension
I am developing an app that sends pixel buffers from the Broadcast Upload Extension to OpenTok. When I run my broadcast extension it hits its memory limit in seconds. I have been looking for ways to reduce the size and scale of CMSampleBuffers and ended the process by first converting them to CIImage, then scaling them, and then converting them to CVPixelBuffers for sending OpenTok Servers. Unfortunately, the extension still crashes, even though I tried to reduce the pixel buffer. My code follows: First I convert the CMSampleBuffer to CVPixelBuffer in processSampleBuffer function from Sample Handler then pass CVPixelBuffer to my function along with timestamps. Here I convert the CVPixelBuffer to cIImage and scale it using cIFilter(CILanczosScaleTransform). After that, I generate Pixel Buffer from CIImage using PixelBufferPool and cIContext and then send the new buffer to OpenTok Servers using videoCaptureConsumer. func processPixelBuffer(pixelBuffer:CVPixelBuffer, timeStamp ts:CMTime) { guard let ciImage = self.scaleFilterImage(inputImage: pixelBuffer.cmIImage, withAspectRatio: 1.0, scale: CGFloat(kVideoFrameScaleFactor)) else {return} if self.pixelBufferPool == nil || self.pixelBuffer?.size != pixelBuffer.size{ self.destroyPixelBuffers() self.updateBufferPool(newWidth: Int(ciImage.extent.size.width), newHeight: Int(ciImage.extent.size.height)) guard CVPixelBufferPoolCreatePixelBuffer(kCFAllocatorDefault, self.pixelBufferPool, &self.pixelBuffer) == kCVReturnSuccess else {return} } context?.render(ciImage, to:pixelBuffer) self.videoCaptureConsumer?.consumeImageBuffer(pixelBuffer, orientation:.up, timestamp:ts, metadata:nil) } If the pixelBufferPool is nil or there is a change in the size of the pixelBuffer I update the pool. private func updateBufferPool(newWidth: Int, newHeight: Int) { let pixelBufferAttributes: [String: Any] = [ kCVPixelBufferPixelFormatTypeKey as String: UInt(self.videoFormat), kCVPixelBufferWidthKey as String: newWidth, kCVPixelBufferHeightKey as String: newHeight, kCVPixelBufferIOSurfacePropertiesKey as String: [:] ] CVPixelBufferPoolCreate(nil,nil, pixelBufferAttributes as NSDictionary?, &pixelBufferPool) } This is the function I use to scale the cIImage: func scaleFilterImage(inputImage:CIImage, withAspectRatio aspectRatio:CGFloat, scale:CGFloat) -> CIImage? { scaleFilter?.setValue(inputImage, forKey:kCIInputImageKey) scaleFilter?.setValue(scale, forKey:kCIInputScaleKey) scaleFilter?.setValue(aspectRatio, forKey:kCIInputAspectRatioKey) return scaleFilter?.outputImage } My question is why it still keeps crashing and is there another way to reduce the CVPixelBuffer size without causing a memory limit crash? I would appreciate any help on this. Swift or Objective - C, I am open to all suggestions.
1
0
2.1k
Mar ’22
I have constant problems with my iPhone screen brightness yet every solution apple, or the internet tells me is just wrong…
So my brightness is constantly going down automatically…I have auto brightness turned off…reduce white point also turned off…I have low power mode turned off…and I have a good 78% charge of battery………..YET MY SCREEN BRIGHTNESS IS CONSTANTLY AS A DARK AS THE THE DUNGEONS AND DRAGONS BOARD GAME…what’s most infuriating though is apple is so confident it’s the auto brightness or white point…I have a an iPhone SE 2020. It’s fairly new and is is acting like a 6. Some genius help me yo why my screen brightness is constantly so low and literally can’t do anything but stop using the phone completely and wait for it to be go back up. Thank you.
0
0
1k
Mar ’22
Is it possible to create an iOS app that controls the screen of another device remotely?
I'm starting to look into MDM and device management for my iOS app. I'm also wondering if there is any way to allow someone on a macOS or another iOS device take control of another person's iOS device to show them how to use their device and perhaps even take control of their device while the person using the controlled device watches what the the person in control of the device is doing so he can follow along. Is there something like this that Apple already has? Is it possible to do this? If it is possible to do this, can it be done in a commonly distributed device that anyone can install from App Store and not require any additional maintenance or extra setup? I think the word I'm thinking of is "supervised". I saw that word in another post. Is it possible for one device to give control over to another user on a different device without the first device being "supervised".
0
0
600
Mar ’22
Is there a way to record in app generated audio using ReplayKit ?
Is there a way to record in app generated audio using ReplayKit ? I successfully import ReplayKit and I can start and stop a recording, where the audio source comes from the microphone. However the sound of interest for recording is the audio from the app itself. Is there a way to have the audio recording come from the sound generated inside the application?
0
0
503
Jan ’22
How to get iOS screen record data in runtime before broadcasting?
Hi, I want to use Apple Broadcast API as client but before I broadcast my iOS screen record, I want to make object detection on video data. I read ReplayKit design docs, the only relevant Instance Property is "serviceinfo:Information updated by the service during a broadcast." in  RPBroadcastController, But it does not also sound like it will provide me the required video data.  So do you have any Idea if it is possible to reach iOS screen record data in run time before broadcasting? Thanks a lot in advance. Best Regards Emre
0
0
982
Dec ’21
ReplayKit and iPhone X
Hi,I am trying to record the screen and microfone inside my application using ReplayKit. It records everything without problems and at the end I present the preview through this code:recorder.stopRecording { [weak self] (preview, error) in guard preview != nil else { print("Preview not available") return } preview?.previewControllerDelegate = self self?.present(preview!, animated: true, completion: nil) }The problem is here, the RPPreviewViewController obtained in the callback does not respect the safe area for iPhone X. The buttons are too close to the edges and the title is hidden below the notch.I also tryed to embed the RPPreviewViewController into another UIViewController (a simple wrapper), but it seems like the height is fixed, so if I lower the top part the bottom one goes out of the screen.Any clue of what I am doing wrong? Any help is appreciated.Thanks!
5
0
3.0k
Dec ’21
Usage of microphone for QR scan and pictures collected
Hi Developer Community, I am currently working with a developer to create an application that uses the camera to scan QR codes and take pictures to be uploaded to an AWS database. My developer mentions that our application needs to request permission to use the microphone. The app works perfectly fine without the usage of the microphone and it is my preference to not request for the usage of the microphone and not use the microphone at all? Can somebody confirm if microphone usage and permission request is mandatory for this issue? Thank you. Privacy concerned developer
0
0
685
Dec ’21
Is there a way to pause / resume the recording with ReplayKit
Hello, Im working on an app where the user will be drawing on the screen while it is recorded. But I want to be able to hide some parts when for example he changes colors or present some view. My idea was to simply pause the record when he changes the color then when he is done to resume it. Is that possible to do it, it seems that there is no pause/resume method in RPScreenRecorder Am I missing something ?
1
0
738
Dec ’21
ReplayKit and RPBroadcastActivityViewController
I'm working on a project that will use iOS (and macOS) full screen broadcasting. For this I'm doing my research into ReplayKit and working on a proof of concept app. I'm able to broadcast the screen to Mobcrush but the view of RPBroadcastActivityViewController looks like this: The obvious problem is that the view looks all wrong with all the icons missing. why? In my device I have installed Twitch, Mobcrush, and YouTube. I don't know why Twitch doesn't appear here. If I start recording the screen from Control Center then I can stream to Twitch. I'm using an iPhone 7 with iOS 15.1 Any help will be greatly appreciated.
2
0
1.2k
Dec ’21
Where is WWDC 2016 session 601 "Go Live with ReplayKit"?
I'm developing and application that will use ReplayKit's Broadcast API to stream the screen of a iOS device. For that I'll need to create the Client App and the Broadcaster App. The WWDC videos about ReplayKit mention WWDC 2016 session 601 "Go Live with ReplayKit" but I can't find it. Can someone point me to that video or to its transcript?. Also, any other resource about the Broadcast API will be appreciated. Most of the samples and documentation that I've found on the web are for just streaming of the app's own screen. Thank you.
1
0
1.1k
Dec ’21
Broadcast Extension receives broadcastFinished prematurely
I have a Broadcast Extension that's running a system wide screen capture. I can start the broadcast and receive buffers and the like.. Buffers are successfully getting to our back and and distributed to all the peers (webrtc). The problem is when I navigate from the host app to apps that play video with audio. And then try to go landscape, sometimes during the rotation, the system will send a broadcastFinished() message to my RPBroadcastSampleHandler subclass. It doesn't occur all the time, but when it does .. it looks like the rotation glitches some. Hard to explain. But I've noticed that it only sends the finished message when it glitches. I would love to get a screen grab of it occurring, but my capture is running.. A quick google/forum search has revealed not much help. Has anyone heard of such a thing?
0
0
501
Dec ’21
ReplayKit: Select window to record?
I have a simple macOS app, with two windows. I would like the user to be able recored each window using a button on the window. I can record the main window and save that to a file using ReplayKit - so far, so good. But I can only record the main window - even if I have all ReplayKit code in the second NSViewController, its the main widow thats being recorded. It is possible to tell ReplayKit what window to record somehow?
2
0
1.2k
Nov ’21
screen captured post false notification but I not stop recording
when my app is recording,I click recording in statusbar on the left, then it post the captured false notification below with alert, but I havent click stop button in alert; then it post the captured true notification when I click cancel button. it should not post notification when I click the stop button? it was some bug for this problem?     private func addNotificationForCaptured() {         NotificationCenter.default.addObserver(self, selector: #selector(screenCapturedDidChange), name:  UIScreen.capturedDidChangeNotification, object: nil)     }     @objc func screenCapturedDidChange(noti: Notification) {         if let screen: UIScreen = noti.object as? UIScreen {             print(screen.isCaptured)         }     }
Replies
0
Boosts
0
Views
618
Activity
Apr ’22
Screen sharing using replaykit
I have an audio session enabled and I'm using the screen sharing extension using ReplayKit. If screen sharing is working and you force close the app during a phone call, the screen sharing extension does not end. Is there a way?
Replies
0
Boosts
0
Views
635
Activity
Apr ’22
Developing a call recorder app for ptivate use
Hello, Is there any way to create a call recording app without distributing it to the app store? And just use it as a beta local app on my iphone only? If there is a way to do it, can you briefly explain how can i do it? Because all of the app store recording apps store my calls on their server and i dont want that, i just want to save my calls locally on my iphone. Thanks!
Replies
0
Boosts
0
Views
1.5k
Activity
Apr ’22
Do the default microphones and their parameters are same in iPhone8, X, 11, 12 and 13? (the Pro or Max are considerd)
Hi, I am doing an acoustical experiment with iPhone, but I need to know whether the microphone and its parameter are the same among different iPhones (iph8, X, 11, 12, 13, and their Pro & Max version). If the microphones and the parameters are not the same, I would do the experiment only with one of them. Looking forward to your answers.
Replies
0
Boosts
0
Views
505
Activity
Apr ’22
How to Capture image from the Main screen in the background program?
Please ask how to capture the home screen in the background program?
Replies
2
Boosts
0
Views
726
Activity
Mar ’22
Scale CMSampleBuffer Size Without Exceeding the Memory Limit Of Broadcast Extension
I am developing an app that sends pixel buffers from the Broadcast Upload Extension to OpenTok. When I run my broadcast extension it hits its memory limit in seconds. I have been looking for ways to reduce the size and scale of CMSampleBuffers and ended the process by first converting them to CIImage, then scaling them, and then converting them to CVPixelBuffers for sending OpenTok Servers. Unfortunately, the extension still crashes, even though I tried to reduce the pixel buffer. My code follows: First I convert the CMSampleBuffer to CVPixelBuffer in processSampleBuffer function from Sample Handler then pass CVPixelBuffer to my function along with timestamps. Here I convert the CVPixelBuffer to cIImage and scale it using cIFilter(CILanczosScaleTransform). After that, I generate Pixel Buffer from CIImage using PixelBufferPool and cIContext and then send the new buffer to OpenTok Servers using videoCaptureConsumer. func processPixelBuffer(pixelBuffer:CVPixelBuffer, timeStamp ts:CMTime) { guard let ciImage = self.scaleFilterImage(inputImage: pixelBuffer.cmIImage, withAspectRatio: 1.0, scale: CGFloat(kVideoFrameScaleFactor)) else {return} if self.pixelBufferPool == nil || self.pixelBuffer?.size != pixelBuffer.size{ self.destroyPixelBuffers() self.updateBufferPool(newWidth: Int(ciImage.extent.size.width), newHeight: Int(ciImage.extent.size.height)) guard CVPixelBufferPoolCreatePixelBuffer(kCFAllocatorDefault, self.pixelBufferPool, &self.pixelBuffer) == kCVReturnSuccess else {return} } context?.render(ciImage, to:pixelBuffer) self.videoCaptureConsumer?.consumeImageBuffer(pixelBuffer, orientation:.up, timestamp:ts, metadata:nil) } If the pixelBufferPool is nil or there is a change in the size of the pixelBuffer I update the pool. private func updateBufferPool(newWidth: Int, newHeight: Int) { let pixelBufferAttributes: [String: Any] = [ kCVPixelBufferPixelFormatTypeKey as String: UInt(self.videoFormat), kCVPixelBufferWidthKey as String: newWidth, kCVPixelBufferHeightKey as String: newHeight, kCVPixelBufferIOSurfacePropertiesKey as String: [:] ] CVPixelBufferPoolCreate(nil,nil, pixelBufferAttributes as NSDictionary?, &pixelBufferPool) } This is the function I use to scale the cIImage: func scaleFilterImage(inputImage:CIImage, withAspectRatio aspectRatio:CGFloat, scale:CGFloat) -> CIImage? { scaleFilter?.setValue(inputImage, forKey:kCIInputImageKey) scaleFilter?.setValue(scale, forKey:kCIInputScaleKey) scaleFilter?.setValue(aspectRatio, forKey:kCIInputAspectRatioKey) return scaleFilter?.outputImage } My question is why it still keeps crashing and is there another way to reduce the CVPixelBuffer size without causing a memory limit crash? I would appreciate any help on this. Swift or Objective - C, I am open to all suggestions.
Replies
1
Boosts
0
Views
2.1k
Activity
Mar ’22
I have constant problems with my iPhone screen brightness yet every solution apple, or the internet tells me is just wrong…
So my brightness is constantly going down automatically…I have auto brightness turned off…reduce white point also turned off…I have low power mode turned off…and I have a good 78% charge of battery………..YET MY SCREEN BRIGHTNESS IS CONSTANTLY AS A DARK AS THE THE DUNGEONS AND DRAGONS BOARD GAME…what’s most infuriating though is apple is so confident it’s the auto brightness or white point…I have a an iPhone SE 2020. It’s fairly new and is is acting like a 6. Some genius help me yo why my screen brightness is constantly so low and literally can’t do anything but stop using the phone completely and wait for it to be go back up. Thank you.
Replies
0
Boosts
0
Views
1k
Activity
Mar ’22
Is it possible to create an iOS app that controls the screen of another device remotely?
I'm starting to look into MDM and device management for my iOS app. I'm also wondering if there is any way to allow someone on a macOS or another iOS device take control of another person's iOS device to show them how to use their device and perhaps even take control of their device while the person using the controlled device watches what the the person in control of the device is doing so he can follow along. Is there something like this that Apple already has? Is it possible to do this? If it is possible to do this, can it be done in a commonly distributed device that anyone can install from App Store and not require any additional maintenance or extra setup? I think the word I'm thinking of is "supervised". I saw that word in another post. Is it possible for one device to give control over to another user on a different device without the first device being "supervised".
Replies
0
Boosts
0
Views
600
Activity
Mar ’22
Change button image of RPSystemBroadcastPickerView
I'm using replayKit's RPSystemBroadcastPickerView to add live broadcast functionality. Is it possible to change to a custom UI rather than the default UI for the button? P.S. I used Google Translate.
Replies
0
Boosts
0
Views
728
Activity
Mar ’22
Is there a way to record in app generated audio using ReplayKit ?
Is there a way to record in app generated audio using ReplayKit ? I successfully import ReplayKit and I can start and stop a recording, where the audio source comes from the microphone. However the sound of interest for recording is the audio from the app itself. Is there a way to have the audio recording come from the sound generated inside the application?
Replies
0
Boosts
0
Views
503
Activity
Jan ’22
How to get iOS screen record data in runtime before broadcasting?
Hi, I want to use Apple Broadcast API as client but before I broadcast my iOS screen record, I want to make object detection on video data. I read ReplayKit design docs, the only relevant Instance Property is "serviceinfo:Information updated by the service during a broadcast." in  RPBroadcastController, But it does not also sound like it will provide me the required video data.  So do you have any Idea if it is possible to reach iOS screen record data in run time before broadcasting? Thanks a lot in advance. Best Regards Emre
Replies
0
Boosts
0
Views
982
Activity
Dec ’21
ReplayKit and iPhone X
Hi,I am trying to record the screen and microfone inside my application using ReplayKit. It records everything without problems and at the end I present the preview through this code:recorder.stopRecording { [weak self] (preview, error) in guard preview != nil else { print("Preview not available") return } preview?.previewControllerDelegate = self self?.present(preview!, animated: true, completion: nil) }The problem is here, the RPPreviewViewController obtained in the callback does not respect the safe area for iPhone X. The buttons are too close to the edges and the title is hidden below the notch.I also tryed to embed the RPPreviewViewController into another UIViewController (a simple wrapper), but it seems like the height is fixed, so if I lower the top part the bottom one goes out of the screen.Any clue of what I am doing wrong? Any help is appreciated.Thanks!
Replies
5
Boosts
0
Views
3.0k
Activity
Dec ’21
Usage of microphone for QR scan and pictures collected
Hi Developer Community, I am currently working with a developer to create an application that uses the camera to scan QR codes and take pictures to be uploaded to an AWS database. My developer mentions that our application needs to request permission to use the microphone. The app works perfectly fine without the usage of the microphone and it is my preference to not request for the usage of the microphone and not use the microphone at all? Can somebody confirm if microphone usage and permission request is mandatory for this issue? Thank you. Privacy concerned developer
Replies
0
Boosts
0
Views
685
Activity
Dec ’21
Is there a way to pause / resume the recording with ReplayKit
Hello, Im working on an app where the user will be drawing on the screen while it is recorded. But I want to be able to hide some parts when for example he changes colors or present some view. My idea was to simply pause the record when he changes the color then when he is done to resume it. Is that possible to do it, it seems that there is no pause/resume method in RPScreenRecorder Am I missing something ?
Replies
1
Boosts
0
Views
738
Activity
Dec ’21
ReplayKit and RPBroadcastActivityViewController
I'm working on a project that will use iOS (and macOS) full screen broadcasting. For this I'm doing my research into ReplayKit and working on a proof of concept app. I'm able to broadcast the screen to Mobcrush but the view of RPBroadcastActivityViewController looks like this: The obvious problem is that the view looks all wrong with all the icons missing. why? In my device I have installed Twitch, Mobcrush, and YouTube. I don't know why Twitch doesn't appear here. If I start recording the screen from Control Center then I can stream to Twitch. I'm using an iPhone 7 with iOS 15.1 Any help will be greatly appreciated.
Replies
2
Boosts
0
Views
1.2k
Activity
Dec ’21
When using startCaptureWithHandler, iPhone APP can’t rotate.
When using ReplayKit => RPScreenRecorder => startCaptureWithHandler, iPhone APP can’t rotate.
Replies
0
Boosts
0
Views
675
Activity
Dec ’21
Where is WWDC 2016 session 601 "Go Live with ReplayKit"?
I'm developing and application that will use ReplayKit's Broadcast API to stream the screen of a iOS device. For that I'll need to create the Client App and the Broadcaster App. The WWDC videos about ReplayKit mention WWDC 2016 session 601 "Go Live with ReplayKit" but I can't find it. Can someone point me to that video or to its transcript?. Also, any other resource about the Broadcast API will be appreciated. Most of the samples and documentation that I've found on the web are for just streaming of the app's own screen. Thank you.
Replies
1
Boosts
0
Views
1.1k
Activity
Dec ’21
Broadcast Extension receives broadcastFinished prematurely
I have a Broadcast Extension that's running a system wide screen capture. I can start the broadcast and receive buffers and the like.. Buffers are successfully getting to our back and and distributed to all the peers (webrtc). The problem is when I navigate from the host app to apps that play video with audio. And then try to go landscape, sometimes during the rotation, the system will send a broadcastFinished() message to my RPBroadcastSampleHandler subclass. It doesn't occur all the time, but when it does .. it looks like the rotation glitches some. Hard to explain. But I've noticed that it only sends the finished message when it glitches. I would love to get a screen grab of it occurring, but my capture is running.. A quick google/forum search has revealed not much help. Has anyone heard of such a thing?
Replies
0
Boosts
0
Views
501
Activity
Dec ’21
ReplayKit: Select window to record?
I have a simple macOS app, with two windows. I would like the user to be able recored each window using a button on the window. I can record the main window and save that to a file using ReplayKit - so far, so good. But I can only record the main window - even if I have all ReplayKit code in the second NSViewController, its the main widow thats being recorded. It is possible to tell ReplayKit what window to record somehow?
Replies
2
Boosts
0
Views
1.2k
Activity
Nov ’21
I want to delete the RPScreenRecorder-startCapture confirmation message.
When RPScreenRecorder - startCapture is performed, the user is prompted to allow screen capture. Every time you open an app and run it, it will ask you. Is it possible not to ask after the second launch?
Replies
1
Boosts
1
Views
738
Activity
Nov ’21