gpt4 book ai didi

ios - 使用 ReplayKit 录制屏幕上的任何应用程序

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:28:17 26 4
gpt4 key购买 nike

我正在尝试创建一个 iPhone 应用程序,它不仅可以记录应用程序的屏幕,而且如果置于后台,它会记录屏幕上的所有内容,包括其他应用程序。这就是从“控制中心”进行录音的方式。不同之处在于我想在没有用户干预的情况下立即访问视频,当然要征得用户的同意。

我已经在使用嵌入式广播上传扩展的 iOS 12 上使用 ReplayKit2 实现了代码。我还没有在网上找到任何像这样工作的示例。

我在 Bitbucket 上发布了代码:https://bitbucket.org/breelig/replaykitbroadcasttofile/src/master/

我在 SO 上发现的壁橱类似问题是:ReplayKit stops screen recording in background mode of the application or outside the app?

更新

基于@KaneCheshire 和@AndreyA 的良好回应。下面和其他随机来源,我能够开发出一个有效的解决方案。请查看上面我的 BitBucket 链接中的代码。

最佳答案

来自docs :

Apps on a user’s device can share the recording function, with each app having its own instance of RPScreenRecorder. Your app can record the audio and video inside of the app, along with user commentary through the microphone

录制屏幕的唯一其他方法是通过 Broadcast Upload Extension ,这需要用户通过控制中心启动它。

关于ios - 使用 ReplayKit 录制屏幕上的任何应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54480680/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com