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

AVFoundationErrorDomain Code=-11847 even when AVAssetWriter is not backgrounded
Hello, I'm finding that AVAssetWriter status is failing in the middle of recording frames obtained using RPScreenRecorder::startCapture. The failure seems to occur about a minute and half into a recording. The error code when asked from AVAssetWriter is -11847. It appears that error code is usually thrown when the app is backgrounded but in my case the app is never backgrounded. This error happens once every 2-3 runs on my iPhone 12 Pro Max. It's also reproducible on an iPhone 11. iOS version is 15.1.1. Any clues as to why this might be occurring? Thanks in advance. Note I'm using movieFragmentInterval on an mp4 file. I couldn't tell from the documentation if its only for QuickTime files or not. I'm setting up an AVAssetWriter like so. Code simplified for readability. let assetWriter = try? AVAssetWriter(outputURL: fileURL, fileType: AVFileType.mp4)! assetWriter.movieFragmentInterval = CMTimeMakeWithSeconds(60, preferredTimescale: 1000)       let preset = AVOutputSettingsAssistant(preset: .preset1280x720) var outputSettings = preset?.videoSettings outputSettings?[AVVideoScalingModeKey] = AVVideoScalingModeResizeAspect var compressionSettings = outputSettings?[AVVideoCompressionPropertiesKey] as? [String:Any] var bitRate:Float = 4.0 compressionSettings?[AVVideoAverageBitRateKey] = NSNumber(value:720.0 * 1280.0 * bitRate) outputSettings?[AVVideoCompressionPropertiesKey] = compressionSettings       videoInput = AVAssetWriterInput(mediaType: AVMediaType.video, outputSettings: outputSettings) videoInput.expectsMediaDataInRealTime = true       assetWriter.add(videoInput)       let audioOutputSettings = preset?.audioSettings       audioInput = AVAssetWriterInput(mediaType: .audio, outputSettings: audioOutputSettings) audioInput.expectsMediaDataInRealTime = true;        assetWriter.add(audioInput) assetWriter.startWriting()
2
0
2.7k
Feb ’23
iOS11 Screen Recording API
How is it possible to record your screen outside your app? (When app is on background?)I can't find a solution for this, it seems that ReplayKit records screen only when app in foreground state.I wonder how TeamViewer implemented their screen share new feature in ios11 ...Talia
7
1
10k
Jan ’23
iOS Screen Capture without user interaction?
Hello! I've implemented an iOS app that uses ReplayKit to capture the user's screen using the ReplayKit's standard screen record button (RPSystemBroadcastPickerView) and a screenshare app extension. Is there any way of starting the screen capture either without the user's explicit interaction, or where they previously gave permission but wouldn't need to a second time? I'm expecting the answer is "no" from what I've read from a security perspective, but is there any strategy I've not seen that would not need (or at least minimise) user interaction?
0
0
1.1k
Jan ’23
How do I know that Broadcast Upload Extension is working?
My iOS app is an extension to Broadcast Upload. I would like to know that this extension app is running from my container app. In the WWDC video, it was stated that you can find out by UIScreen.main.isCaptured, but you can't know which Extensions are being captured by which. One way I thought of doing this is to add a Key like isRunning to the UserDefaults This is a way to create and update this regularly. But I don't think this is a good way to do it. Is there an API or better way to know this? Thank you.
3
0
4.2k
Jan ’23
Broadcast finishing unexpectedly
Hello, I have an app that uses Zoom's Video SDK in order to broadcast the screen, and the SDK uses ReplayKit. The broadcast has been working fine for the most part. We have the app on TestFlight and the majority of testers have been able to use the app just fine, but there is one tester having an issue with the broadcast: The broadcast seems to be killed right after it starts. And there is this message: The user that has been having this issue is running the app on an iPhone 8, running iOS 15.6. I have ran tests on another iPhone 8 and other models running the same iOS version, but could not reproduce the error, so I don't think this issue is related to iPhone model or iOS version. I have searched the error message on google, and found out that many people have had this issue in different applications, thus my thinking that this issue is related to ReplayKit. Has anyone else faced this issue recently? Could this be the OS killing the app extension due to lack of memory? Any help will be appreciated, thanks!
1
0
954
Aug ’22
RPSystemBroadcastPickerView is showing all available options
Hello, I have a tester on TestFlight that has reported an issue with the BroadcastPicker on my app. I have configured the preferredExtension property and it has been working fine for almost everyone else, but to this one tester it seems like the preferedExtension property is being ignored. Whenever he opens the BroadcastPicker, it shows all available options, and not just my app. Has anyone else faced this issue? Is there any known cause for this? Does anyone know of a possible workaround? Thanks!
0
0
994
Aug ’22
using audio buffer from ReplayKit
So currently I using blackhole program to connect the output into input device. I can see that ReplayKit is able to pickup the input and get audio buffer. however, there is no data in the buffer. if there is no data, does that mean there s no audio recorded, or the audio data is store somewhere else?
0
0
790
Aug ’22
Critical bug with Discord and iOS broadcast extension
I am the developer of StreamChamp an iOS app for streaming games to Twitch, YouTube and other platforms. We got over 30000 active users and growing. Recently our users reported a bug, they can’t hear voices of people in Discord voice-chat while streaming. Basically when someone is broadcasting viewers can hear in-game sounds, streamer voice, but can’t hear voices of people streamer talking with in the voice-chat. This problem appeared in June. We tried to fix it, but bug is not on our side. The Discord and StreamChamp users experience is struggling, we should work out the solution.
1
0
2.2k
Jul ’22
broadcastFinished
Device Info: iPad Pro 3rd(iPad13,4) iPadOS:15.5 I start a broadcast server at 13:06:00, and system called 'broadcastStarted' 13:06:03 system called 'broadcastFinished' and 'broadcastError with no error message' 13:06:10 system called 'broadcastStarted' again At the same time, I didn't do anything ! WHY ? ? ?
0
0
689
Jul ’22
Process replayd killed by jetsam reason highwater
Recently I add a broadcast upload extension to my host app to implement system wide screen cast.I found the broadcast upload extension sometimes stopped for unknown reason.If I debug the broadcast upload extension process in Xcode, it stopped without stopping at a breakpoint(If the extension is killed for 50M bytes memory limit, it will stopped at a breakpoint, and Xcode will point out that it's killed for 50M bytes memory limit).For more imformation, I read the console log line by line.Finally, I found a significant line: osanalyticshelper Process replayd [26715] killed by jetsam reason highwater It looks like the ReplayKit serving process 'replayd' is killed by jetsam, and the reason is 'highwater'.So I searched the internet for more imformation.And I found a post: https://www.jianshu.com/p/30f24bb91222 After reading that,I checked the JetsamEvent report in device, and found that when the 'replayd' process was killed it occupied 100M bytes memory.Is there a 100M bytes memory limit for 'replayd' process?How can I avoid it to occupy more than 100M bytes memory? Further more, I found that this problem offen occured if the previous extension process is stopped via RPBroadcastSampleHandler's finishBroadcastWithError method.If I stop the extension via control center button, this rarely occured.
2
0
3.1k
Jul ’22
Determine the State of "ScreenSharing-Allow Notifications" CallBack Status ON or OFF
I need to get a log or information on when the user has turned off their notifications on Screen Sharing when ReplayKit is used to record a users screen. User's are not getting push notifications when they are screen sharing in the app. I want to allow users to get push notifications or at least notify to the api when ever a user turns off their push notifications.
2
0
1.1k
May ’22
How to get the sound played in the app?
In the app there is a webview which is a web game with sound and video @IBOutlet var webView: WKWebView! webView.navigationDelegate = self let url=URL(string: "https://www.crazygames.com/game/tap-tap-shots") webView.load(URLRequest(url: url!)) I use RPScreenRecorder import ReplayKit import UIKit class ViewController: UIViewController, RPPreviewViewControllerDelegate { override func viewDidLoad() { super.viewDidLoad() navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Start", style: .plain, target: self, action: #selector(startRecording)) } @objc func startRecording() { let recorder = RPScreenRecorder.shared() recorder.startRecording{ [unowned self] (error) in if let unwrappedError = error { print(unwrappedError.localizedDescription) } else { self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Stop", style: .plain, target: self, action: #selector(self.stopRecording)) } } } @objc func stopRecording() { let recorder = RPScreenRecorder.shared() recorder.stopRecording { [unowned self] (preview, error) in self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Start", style: .plain, target: self, action: #selector(self.startRecording)) if let unwrappedPreview = preview { unwrappedPreview.previewControllerDelegate = self self.present(unwrappedPreview, animated: true) } } } func previewControllerDidFinish(_ previewController: RPPreviewViewController) { dismiss(animated: true) } } Can record video, but no sound from webpage
1
0
812
May ’22
replaykit, appoint extension bundleId,start-up another app extension
my extension id : com.***.test other extension id : com.***.testabc I ues replaykit to realize screen share, when preferredExtension appoint my extension bundleId, broadcastPickerView also selected my extension, but system start-up another app extension.(when click top red status bar, it show other app name) it has that role? when other app extension id contain my extension id, system star-up long id extension?
0
0
996
May ’22
RPScreenRecorder only record the content of rootViewController
Hi, I use [RPScreenRecorder startCaptureWithHandler:completionHandler:] to record the content of view, that the view controller is presented by the rootViewController of a UINavigationController. It works normally most of the time. But sometimes, it only record the content of the rootViewController. Can you please tell me how to fix it? Thank you!
Replies
0
Boosts
0
Views
924
Activity
Feb ’23
AVFoundationErrorDomain Code=-11847 even when AVAssetWriter is not backgrounded
Hello, I'm finding that AVAssetWriter status is failing in the middle of recording frames obtained using RPScreenRecorder::startCapture. The failure seems to occur about a minute and half into a recording. The error code when asked from AVAssetWriter is -11847. It appears that error code is usually thrown when the app is backgrounded but in my case the app is never backgrounded. This error happens once every 2-3 runs on my iPhone 12 Pro Max. It's also reproducible on an iPhone 11. iOS version is 15.1.1. Any clues as to why this might be occurring? Thanks in advance. Note I'm using movieFragmentInterval on an mp4 file. I couldn't tell from the documentation if its only for QuickTime files or not. I'm setting up an AVAssetWriter like so. Code simplified for readability. let assetWriter = try? AVAssetWriter(outputURL: fileURL, fileType: AVFileType.mp4)! assetWriter.movieFragmentInterval = CMTimeMakeWithSeconds(60, preferredTimescale: 1000)       let preset = AVOutputSettingsAssistant(preset: .preset1280x720) var outputSettings = preset?.videoSettings outputSettings?[AVVideoScalingModeKey] = AVVideoScalingModeResizeAspect var compressionSettings = outputSettings?[AVVideoCompressionPropertiesKey] as? [String:Any] var bitRate:Float = 4.0 compressionSettings?[AVVideoAverageBitRateKey] = NSNumber(value:720.0 * 1280.0 * bitRate) outputSettings?[AVVideoCompressionPropertiesKey] = compressionSettings       videoInput = AVAssetWriterInput(mediaType: AVMediaType.video, outputSettings: outputSettings) videoInput.expectsMediaDataInRealTime = true       assetWriter.add(videoInput)       let audioOutputSettings = preset?.audioSettings       audioInput = AVAssetWriterInput(mediaType: .audio, outputSettings: audioOutputSettings) audioInput.expectsMediaDataInRealTime = true;        assetWriter.add(audioInput) assetWriter.startWriting()
Replies
2
Boosts
0
Views
2.7k
Activity
Feb ’23
iOS11 Screen Recording API
How is it possible to record your screen outside your app? (When app is on background?)I can't find a solution for this, it seems that ReplayKit records screen only when app in foreground state.I wonder how TeamViewer implemented their screen share new feature in ios11 ...Talia
Replies
7
Boosts
1
Views
10k
Activity
Jan ’23
iOS Screen Capture without user interaction?
Hello! I've implemented an iOS app that uses ReplayKit to capture the user's screen using the ReplayKit's standard screen record button (RPSystemBroadcastPickerView) and a screenshare app extension. Is there any way of starting the screen capture either without the user's explicit interaction, or where they previously gave permission but wouldn't need to a second time? I'm expecting the answer is "no" from what I've read from a security perspective, but is there any strategy I've not seen that would not need (or at least minimise) user interaction?
Replies
0
Boosts
0
Views
1.1k
Activity
Jan ’23
How do I know that Broadcast Upload Extension is working?
My iOS app is an extension to Broadcast Upload. I would like to know that this extension app is running from my container app. In the WWDC video, it was stated that you can find out by UIScreen.main.isCaptured, but you can't know which Extensions are being captured by which. One way I thought of doing this is to add a Key like isRunning to the UserDefaults This is a way to create and update this regularly. But I don't think this is a good way to do it. Is there an API or better way to know this? Thank you.
Replies
3
Boosts
0
Views
4.2k
Activity
Jan ’23
Disable iPhone Screen Recording
Hello. If you play a film in my app, with an iPhone, you can use "Screen Recording" and record the film. and your phone saves it in your phone. Is there anyway to disable the "Screen Recording" when someone is watching the film inside my app? Thanks so much for your time.
Replies
1
Boosts
0
Views
1.3k
Activity
Nov ’22
ReplayKit: How to fix AX Lookup problem : errorCode:1100 error:Permission denied
[AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID: xcode: 11.6 beta iOS: 13.5.1
Replies
4
Boosts
0
Views
3k
Activity
Sep ’22
Broadcast finishing unexpectedly
Hello, I have an app that uses Zoom's Video SDK in order to broadcast the screen, and the SDK uses ReplayKit. The broadcast has been working fine for the most part. We have the app on TestFlight and the majority of testers have been able to use the app just fine, but there is one tester having an issue with the broadcast: The broadcast seems to be killed right after it starts. And there is this message: The user that has been having this issue is running the app on an iPhone 8, running iOS 15.6. I have ran tests on another iPhone 8 and other models running the same iOS version, but could not reproduce the error, so I don't think this issue is related to iPhone model or iOS version. I have searched the error message on google, and found out that many people have had this issue in different applications, thus my thinking that this issue is related to ReplayKit. Has anyone else faced this issue recently? Could this be the OS killing the app extension due to lack of memory? Any help will be appreciated, thanks!
Replies
1
Boosts
0
Views
954
Activity
Aug ’22
RPSystemBroadcastPickerView is showing all available options
Hello, I have a tester on TestFlight that has reported an issue with the BroadcastPicker on my app. I have configured the preferredExtension property and it has been working fine for almost everyone else, but to this one tester it seems like the preferedExtension property is being ignored. Whenever he opens the BroadcastPicker, it shows all available options, and not just my app. Has anyone else faced this issue? Is there any known cause for this? Does anyone know of a possible workaround? Thanks!
Replies
0
Boosts
0
Views
994
Activity
Aug ’22
how do you download this on macos?
cant find a download source for this
Replies
1
Boosts
0
Views
659
Activity
Aug ’22
using audio buffer from ReplayKit
So currently I using blackhole program to connect the output into input device. I can see that ReplayKit is able to pickup the input and get audio buffer. however, there is no data in the buffer. if there is no data, does that mean there s no audio recorded, or the audio data is store somewhere else?
Replies
0
Boosts
0
Views
790
Activity
Aug ’22
Critical bug with Discord and iOS broadcast extension
I am the developer of StreamChamp an iOS app for streaming games to Twitch, YouTube and other platforms. We got over 30000 active users and growing. Recently our users reported a bug, they can’t hear voices of people in Discord voice-chat while streaming. Basically when someone is broadcasting viewers can hear in-game sounds, streamer voice, but can’t hear voices of people streamer talking with in the voice-chat. This problem appeared in June. We tried to fix it, but bug is not on our side. The Discord and StreamChamp users experience is struggling, we should work out the solution.
Replies
1
Boosts
0
Views
2.2k
Activity
Jul ’22
How to get the status of the App switcher during screen sharing with ReplayKit
I would like to execute a certain process only when an iPhone screen sharer is using the App switcher during screen sharing. Is there a way to get the status of the App switcher during screen sharing with ReplayKit? And if so, what iOS API or method should I use?
Replies
0
Boosts
0
Views
830
Activity
Jul ’22
How to get the name of app in use while screen sharing with ReplayKit
I would like to know if there is a way in iOS to get information on what app is on screen while screen sharing with ReplayKit. Does the iOS SDK provide a function to retrieve the name of the app on screen while screen sharing with ReplayKit? If yes, what class and method provide the function?
Replies
0
Boosts
0
Views
646
Activity
Jul ’22
10172794
linkText
Replies
0
Boosts
0
Views
769
Activity
Jul ’22
broadcastFinished
Device Info: iPad Pro 3rd(iPad13,4) iPadOS:15.5 I start a broadcast server at 13:06:00, and system called 'broadcastStarted' 13:06:03 system called 'broadcastFinished' and 'broadcastError with no error message' 13:06:10 system called 'broadcastStarted' again At the same time, I didn't do anything ! WHY ? ? ?
Replies
0
Boosts
0
Views
689
Activity
Jul ’22
Process replayd killed by jetsam reason highwater
Recently I add a broadcast upload extension to my host app to implement system wide screen cast.I found the broadcast upload extension sometimes stopped for unknown reason.If I debug the broadcast upload extension process in Xcode, it stopped without stopping at a breakpoint(If the extension is killed for 50M bytes memory limit, it will stopped at a breakpoint, and Xcode will point out that it's killed for 50M bytes memory limit).For more imformation, I read the console log line by line.Finally, I found a significant line: osanalyticshelper Process replayd [26715] killed by jetsam reason highwater It looks like the ReplayKit serving process 'replayd' is killed by jetsam, and the reason is 'highwater'.So I searched the internet for more imformation.And I found a post: https://www.jianshu.com/p/30f24bb91222 After reading that,I checked the JetsamEvent report in device, and found that when the 'replayd' process was killed it occupied 100M bytes memory.Is there a 100M bytes memory limit for 'replayd' process?How can I avoid it to occupy more than 100M bytes memory? Further more, I found that this problem offen occured if the previous extension process is stopped via RPBroadcastSampleHandler's finishBroadcastWithError method.If I stop the extension via control center button, this rarely occured.
Replies
2
Boosts
0
Views
3.1k
Activity
Jul ’22
Determine the State of "ScreenSharing-Allow Notifications" CallBack Status ON or OFF
I need to get a log or information on when the user has turned off their notifications on Screen Sharing when ReplayKit is used to record a users screen. User's are not getting push notifications when they are screen sharing in the app. I want to allow users to get push notifications or at least notify to the api when ever a user turns off their push notifications.
Replies
2
Boosts
0
Views
1.1k
Activity
May ’22
How to get the sound played in the app?
In the app there is a webview which is a web game with sound and video @IBOutlet var webView: WKWebView! webView.navigationDelegate = self let url=URL(string: "https://www.crazygames.com/game/tap-tap-shots") webView.load(URLRequest(url: url!)) I use RPScreenRecorder import ReplayKit import UIKit class ViewController: UIViewController, RPPreviewViewControllerDelegate { override func viewDidLoad() { super.viewDidLoad() navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Start", style: .plain, target: self, action: #selector(startRecording)) } @objc func startRecording() { let recorder = RPScreenRecorder.shared() recorder.startRecording{ [unowned self] (error) in if let unwrappedError = error { print(unwrappedError.localizedDescription) } else { self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Stop", style: .plain, target: self, action: #selector(self.stopRecording)) } } } @objc func stopRecording() { let recorder = RPScreenRecorder.shared() recorder.stopRecording { [unowned self] (preview, error) in self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Start", style: .plain, target: self, action: #selector(self.startRecording)) if let unwrappedPreview = preview { unwrappedPreview.previewControllerDelegate = self self.present(unwrappedPreview, animated: true) } } } func previewControllerDidFinish(_ previewController: RPPreviewViewController) { dismiss(animated: true) } } Can record video, but no sound from webpage
Replies
1
Boosts
0
Views
812
Activity
May ’22
replaykit, appoint extension bundleId,start-up another app extension
my extension id : com.***.test other extension id : com.***.testabc I ues replaykit to realize screen share, when preferredExtension appoint my extension bundleId, broadcastPickerView also selected my extension, but system start-up another app extension.(when click top red status bar, it show other app name) it has that role? when other app extension id contain my extension id, system star-up long id extension?
Replies
0
Boosts
0
Views
996
Activity
May ’22