Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

How to use the method to show localstream in videoview? - for iOS #41

Open
PrasannaYuvitime opened this issue Nov 28, 2017 · 2 comments

Comments

@PrasannaYuvitime
Copy link

PrasannaYuvitime commented Nov 28, 2017

After updating the webrtc framework for the latest one , I am not getting how to show local stream to user cause methodology is changed which has no sample on repository's "iOS" folder.

in old code...

   RTCVideoCapturer *capturer = [RTCVideoCapturer capturerWithDeviceName:cameraID];
   RTCMediaConstraints *mediaConstraints = [self defaultMediaStreamConstraints];
   RTCVideoSource *videoSource = [_factory videoSourceWithCapturer:capturer constraints:mediaConstraints];
   localVideoTrack = [_factory videoTrackWithID:@"ARDAMSv0" source:videoSource];

The RTCVideoCapturer object and RTCVideoSource object was linked here to each other.

But in new code...

RTCVideoSource *source = [_factory videoSource];
  RTCCameraVideoCapturer *capturer = [[RTCCameraVideoCapturer alloc] initWithDelegate:source];
  [_delegate appClient:self didCreateLocalCapturer:capturer];
    localVideoTrack = [_factory videoTrackWithSource:source
                                             trackId:kARDVideoTrackId];

There is no connection to each other.
So, the delegate method does what ,
[_delegate appClient:self didCreateLocalCapturer:capturer];
I am not getting it. [Help Required!]

@roxxydev
Copy link

Have you resolved this one yet? I'm facing the same problem using Swift, I could not use the video source with RTCCameraVideoCapturer but the documentation or PeerConnectionFactory videoSource says

Initialize a generic RTCVideoSource. The RTCVideoSource should be passed to a RTCVideoCapturer implementation, e.g. RTCCameraVideoCapturer, in order to produce frames.

@Ankit-Aggarwal
Copy link

I am having the same problem.
Basically, I want to intercept the capture frame rendered to apply some filters.

But i am not getting a way to connect my source and custom capturer..
or capturer to video track.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants