我遇到一个有关冻结QuickBlox视频中的一对一用户的localCameraView的问题

时间:2019-03-29 07:19:40

标签: objective-c quickblox

我在QuickBlox视频中遇到一个与localCameraView有关的问题,每当一个用户打电话给我时,我的LocalCameraView都会先捕获一些视图,然后像冻结一样变成黑色。

@property (strong, nonatomic) IBOutlet UIView *localVideoView;
@property (strong, nonatomic) QBRTCCameraCapture *videoCapture;

QBRTCVideoFormat *videoFormat = [[QBRTCVideoFormat alloc] init];
videoFormat.frameRate = 30;
videoFormat.pixelFormat = QBRTCPixelFormat420f;
videoFormat.width = 640;
videoFormat.height = 480;


self.videoCapture = [[QBRTCCameraCapture alloc] initWithVideoFormat:videoFormat position:AVCaptureDevicePositionFront]; 


self.session.localMediaStream.videoTrack.videoCapture = self.videoCapture;

self.videoCapture.previewLayer.frame = self.localVideoView.bounds;
[self.videoCapture startSession:nil];

[self.localVideoView.layer insertSublayer:self.videoCapture.previewLayer atIndex:0];

0 个答案:

没有答案