WebRTC ios can't upload localstream to the other point

156 views
Skip to first unread message

vin_...@wistronits.com

unread,
Feb 15, 2019, 10:47:00 AM2/15/19
to discuss-webrtc
below is my code, use RTCCameraVideoCapturer  to start Camera and upload the stream to another user,but another user can't see the video ,where is the problem?
            RTCVideoSource *videoSource = [_factory videoSource];
            RTCCameraVideoCapturer * capture = [[RTCCameraVideoCapturer alloc] initWithDelegate:videoSource];
            AVCaptureDeviceFormat * format = [[RTCCameraVideoCapturer supportedFormatsForDevice:device] lastObject];
            CGFloat fps = [[format videoSupportedFrameRateRanges] firstObject].maxFrameRate;
            RTCVideoTrack *videoTrack = [_factory videoTrackWithSource:videoSource trackId:@"ARDAMSv0"];
            
            [self.delegate webRTCHelper:self capturerSession:capture.captureSession];
            
            [_localStream addVideoTrack:videoTrack];
            [capture startCaptureWithDevice:device format:format fps:fps];

          //add localStream to peer Connection
            [peerConnection addStream:_localStream];




马海平

unread,
Jul 11, 2019, 1:48:28 AM7/11/19
to discuss-webrtc

I have encountered the same problem. Can you solve it here? How to solve it?


在 2019年2月15日星期五 UTC+8下午11:47:00,vin_...@wistronits.com写道:
Reply all
Reply to author
Forward
0 new messages