screen share in react-native-webrtc – Stack Overflow

I am developing a react-native app with webrtc functionality for video calling. thank to I am able to achieve join room, leave room.

but it am still struggling on screen share on react-native-webrtc.
I have used following code

const getDisplayMedia = useCallback(async (streamId)=>{
    if(Platform.OS == 'android'){
      const stream = await mediaDevices.getDisplayMedia()
      const videoTrackSender = remotePeerConnection[streamId].getSenders()

But react-native-webrtc does not have pc.getSenders() method or pc.replaceTrack() method.

I have also tied pc.addTrack and pc.removeTrack methods but these are not implemented as yet.

is there any way to share screen in react-native using react-native-webrtc.

Read more here: Source link