问题标签 [rpscreenrecorder]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
253 浏览

avplayer - 检测 RPScreenRecorder 是否正在录制

在我的应用程序中,我AVPlayer用来播放视频。但是,我使用FairPlay.

我尝试使用RPScreenRecorder来检测屏幕录制是否开启:

但这不起作用。

有谁知道如何获取屏幕录制是否开启?

0 投票
1 回答
937 浏览

xcode - 使用 RPScreenRecorder 在 swift 3 上录制屏幕和麦克风

似乎 startRecordWithMicrophone 方法已被弃用,但他们已经实现了一个处于 beta 阶段的 startCapture 方法,我可以使用这个 beta 函数吗?使用录音机时,它不会出现在我的选项中。我被迫使用不记录麦克风的 startRecording 方法,我发现这方面的信息非常有限,请帮助。let recorder = RPScreenRecorder.shared() recorder.startRecording(handler: { (error) in

RPSceenRecorder.shared() 上的 Apple 文档 在此处输入图像描述

0 投票
1 回答
958 浏览

ios - iOS 11 - Do not allow recording of app

Apple announced system-level screen recording to be a feature of iOS 11. This is great for gaming and probably many other use cases, but not good for content apps such as Netflix, YouTube, Spotify, etc.

Will it be possible for developers to not allow system-level screen recording of their apps?

At about 15 minutes into this demonstration during WWDC 2017, we find out that your application will be notified via RPScreenRecorderDelegate in the event that a user interrupts an in-app screen recording with a system-level screen-recording.

This is good, but they do not mention being notified at all if screen-recording begins in the case that your app isn't already performing an in-app screen capture.

Earlier in the demonstration they mention that you application contains a shared instance of the RPScreenRecorder. Does anyone know if the system also uses this instance and whether its isAvailable property will be set to false in the event that a user is performing a system-level screen recording?

I would like to know if Apple has any type of support for disabling this feature in your app, or if there is some way I can check if the user is recording in order to adjust the appearance of the app so that licensed content cannot be pirated and redistributed by users.

0 投票
0 回答
1587 浏览

ios - ReplayKit RPScreenRecorder 无法记录 didStopRecordingWith RPSrecordingErrorDomain 5804

我正在尝试使用RPScreenRecorderfrom录制屏幕,ReplayKit但无法开始录制。我得到错误代码5804。我的代码:

我收到这条消息:

didStopRecordingWith: Error Domain=com.apple.ReplayKit.RPRecordingErrorDomain Code=-5804 "录制失败" UserInfo={NSLocalizedDescription=录制失败}

附加信息:我在 iOS 11 上的 iPhone 7 和 iPhone 6 上都试过这个。这是一个单独的项目,所以这里只有屏幕录制和 UI 上的切换按钮,以便在录制时移动。


编辑

这可能是一个错误。我用最新版本的 iOS 11 更新了我的 iPhone,它现在似乎可以工作了。

0 投票
1 回答
209 浏览

ios - RPScreenRecorder 录制警报文本更改

我们是否有可能在 iOS 11 中通过 RPSCreenRecorder 更改录制警报文本显示?实际上,我正在使用 StartCapture API 捕获我的应用程序屏幕内容并将视频内容推送到我的服务器。但是警报文本告诉我们:“您可以将录音保存到相机胶卷或与朋友分享。如果您想随时添加评论,请录制麦克风音频”,这与我无关。我想将该文本更改为与我相关的内容。

任何用于更改文本的 info.plist 键,例如隐私控件?

  • Apparao Mulpuri
0 投票
1 回答
3849 浏览

swift - 使用 RPScreenRecorder 保存屏幕录制开始捕获

我正在尝试使用 RPScreenRecorder.shared().startCapture 将屏幕录制保存到 Firebase。我知道如何从 AVCapture 保存视频,但不知道如何处理 CMSampleBuffer 以创建文件以保存到 firebase。请帮助我在任何地方都找不到这方面的文档,这是方法调用:

即使指向正确的方向也会有所帮助,但我不知道如何将样本缓冲区保存为可以作为视频播放的文件

0 投票
2 回答
1953 浏览

ios - ReplayKit 保存视频失败首先尝试使用麦克风

场景一:

  1. 使用音频/视频写入器输入启动 AVAssetWriter。
  2. 使用 RPScreenRecorder 在没有麦克风的情况下开始录制并处理样本缓冲区。
  3. 文件在第一次尝试时可以很好地写入照片。

场景二:

  1. 使用音频/视频写入器输入启动 AVAssetWriter。
  2. 使用 RPScreenRecorder 在启用麦克风的情况下开始录制并处理样本缓冲区。
  3. 文件写入在第一次尝试时无法写出。

    UserInfo={NSLocalizedRecoverySuggestion=再次尝试保存。,NSLocalizedDescription=无法保存,NSUnderlyingError=0x1c464f3c0 {Error Domain=NSOSStatusErrorDomain Code=-12412 "(null)"}} 2017-10-26 23:25:16.896673-0400 [2135:771655 ] 状态失败!:3 错误域=AVFoundationErrorDomain 代码=-11823“无法保存”

第二次尝试工作正常。

我究竟做错了什么?

0 投票
2 回答
942 浏览

ios - RPScreenRecorder 如何录制一个app Action Extension 的屏幕音视频?

我想用目标Action Extension录制我的应用程序的屏幕、音频和视频。

如果我将此代码放在普通应用程序中,它可以工作,但在操作扩展中则不行。

是否有另一种方法可以使用 AVCaptureSession 来实现这一目标,还是我需要使用其他方法来实现这一目标?谢谢。

0 投票
1 回答
1356 浏览

objective-c - RPScreenRecorder startCaptureWithHandler:不在样本处理程序中返回麦克风声音

我正在尝试在装有 iOS 11.4 的 iPad 上使用 RPScreenRecorder startCaptureWithHandler:completionHandler: api 直接获取音频和视频。它适用于应用程序屏幕、应用程序音频和相机,但是当我使用麦克风启用 = YES 打开麦克风时,我从未在回调中获得任何麦克风的音频样本。

我在 info.plist 中添加了麦克风隐私使用密钥,但这没有帮助。

我不确定接下来我能做些什么来尝试解决这个问题。

谢谢。

0 投票
4 回答
4924 浏览

ios - Replaykit,startCaptureWithHandler() 未在 captureHandler 中发送 Video 类型的 CMSampleBufferRef

我已经实现了一个RPScreenRecorder,它记录屏幕和麦克风音频。完成多个录制后,我停止录制并将音频与视频AVMutableComposition合并,然后合并所有视频以形成单个视频。

对于屏幕录制和获取视频和音频文件,我正在使用

用于停止录制。我调用这个函数:

这些都很直截了当。

大多数时候效果很好,我会收到视频和音频 CMSampleBuffers。但有时它startCaptureWithHandler只会发送给我音频缓冲区而不是视频缓冲区。 一旦我遇到这个问题,直到我重新启动设备并重新安装应用程序才会解决。这使得我的应用程序对用户来说非常不可靠。我认为这是一个重播工具包问题,但无法与其他开发人员发现相关问题。让我知道你们中是否有人遇到这个问题并得到了解决方案。

我检查了多次,但没有发现配置有任何问题。但无论如何,它就在这里。

startCaptureWithHandler 函数也具有非常简单的功能:

此外,当这种情况发生时,系统屏幕录像机也会损坏。单击系统记录器时,会显示此错误:

媒体服务错误

错误提示“屏幕录制已停止,原因是:由于 Mediaservices 错误导致录制失败”。

应该有两个原因:

  1. iOS Replay 套件处于测试阶段,这就是为什么它在使用后有时会出现问题。
  2. 我已经实现了任何有问题的逻辑,这会导致 replaykit 崩溃。

如果是问题没有。1,那就没问题了。如果这是问题号。2 那么我必须知道我可能错在哪里?

意见和帮助将不胜感激。