Which method handle video track in iOS SDK?

We try to develop Virtual background function for iOS app (with Jitsi SDK ).
I don’t know yet how Jitsi handle camera track in their SDK
I also need to know which method handle video track in this source (for iOS) https://github.com/jitsi/jitsi-meet, for instance, add track to PeerConnection, get camera track.

We use react-native-webrtc.

I know iOS SDK is written in react native.
We check almost all source code.
But, specificly which function handle video track?
I want to know exact method name…

Our colleage found that RTCVideoTrack is used.

thank you!

You’d only need to apply effects for local tracks, so you can start here: https://github.com/react-native-webrtc/react-native-webrtc/blob/ec55e5295a78e9e74182617611722b3467623feb/ios/RCTWebRTC/WebRTCModule%2BRTCMediaStream.m#L41

1 Like

thank you so much. we will try!

In order to use Google MK kit. we are trying to install this to iOS-SDK (red arrow parts).
we can’t install MLKit to react-native-webrtc in Jitsi source via Pod

Could you please help us how to install the package?
I’d like to know how to use MKKit.

You can install it with install-local for example install-local - npm

Saghul
Thank you for your prompt answser.

MkKit is iOS library not JS library, So We have to install via Pod.
I’m afraid that we can’t use npm

We’d like to know how to install pod ‘GoogleMLKit/SegmentationSelfie’, '2.6.0’
Could you please help us.

You probably need to add it here: react-native-webrtc/react-native-webrtc.podspec at master · react-native-webrtc/react-native-webrtc · GitHub

I know.
We tried to add there, but Jitsi don’t accept.

What have you tried and what error did you get?

  1. I tired this. When I added

s.dependency ‘GoogleMLKit/SegmentationSelfie’
to react-native-webrtc/react-native-webrtc.podspec at master · react-native-webrtc/react-native-webrtc · GitHub

it’ll be installed to pod folder of 1, not 2 below image
image.png

2.so iOS code in 2 can’t understand classes of GoogleMLKit/SegmentationSelfie

I 'll send you error message soon.

I will send 4 image file.
Please check these files
1.


2.

3.

4.

Sorry, I have no time to look into this. We depend on other frameworks like WebRTC, please take a look at how we handle those.

OK!Thank you.