首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用webrtc时,ReplayKit不起作用

使用webrtc时,ReplayKit不起作用
EN

Stack Overflow用户
提问于 2017-08-28 20:42:45
回答 1查看 979关注 0票数 1

我使用WebRtc创建一个点对点连接来共享视频和音频。我想使用replaykit录制屏幕和Microphone.if我开始录制后,对等连接已经建立,这意味着两个可以共享视频和音频从每个other.in在这种情况下,repalykit无法录制屏幕和麦克风和previewController是black.if我开始录制之前已建立连接replaykit作品well.if我选择只记录屏幕或不添加RTCAudioTrack,它一直在工作。

那么如何在webrtc中使用replaykit呢?

您可以开始使用apprtc-ios进行测试

EN

回答 1

Stack Overflow用户

发布于 2017-08-29 16:03:50

一旦呼叫开始,设备扬声器、麦克风和摄像头流就会添加到对等连接中,并且不能用于应用程序中的其他输出。遵循iOS 11中引入的新API。

代码语言:javascript
复制
/*! @abstract Starts screen and audio capture and continually calls the 
supplied handler with the current sampleBuffer and bufferType and passed it 
back to the application. Note that before recording actually starts, the 
user may be prompted with UI to confirm recording.
@result handler Called continually with sampleBuffers and the bufferType. 
Will be passed an optional NSError in the RPRecordingErrorDomain domain if 
there was an issue starting the capture.
*/

- (void)startCaptureWithHandler:(nullable void(^)(CMSampleBufferRef 
sampleBuffer, RPSampleBufferType bufferType, NSError * _Nullable 
error))captureHandler completionHandler:(nullable void(^)(NSError * 
_Nullable error))completionHandler API_AVAILABLE(ios(11.0), tvos(11.0));

此接口用于捕获扬声器、麦克风和视频样本缓冲区,您可以使用AVFoundation中的AVAssetWriter将其写入文件。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45919346

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档