In accept call user not getting video only audio is there

Following is my code:

import React, {useEffect, useState, useRef} from ‘react’;
import {
Platform,
KeyboardAvoidingView,
TouchableWithoutFeedback,
Keyboard,
View,
Text,
TouchableOpacity,
} from ‘react-native’;
import TextInputContainer from ‘./components/TextInputContainer’;
import SocketIOClient from ‘socket.io-client’;
import {
mediaDevices,
RTCPeerConnection,
RTCView,
RTCIceCandidate,
RTCSessionDescription,
} from ‘react-native-webrtc’;
import CallEnd from ‘./asset/CallEnd’;
import CallAnswer from ‘./asset/CallAnswer’;
import MicOn from ‘./asset/MicOn’;
import MicOff from ‘./asset/MicOff’;
import VideoOn from ‘./asset/VideoOn’;
import VideoOff from ‘./asset/VideoOff’;
import CameraSwitch from ‘./asset/CameraSwitch’;
import IconContainer from ‘./components/IconContainer’;
import InCallManager from ‘react-native-incall-manager’;

export default function App({}) {
const [localStream, setlocalStream] = useState(null);

const [remoteStream, setRemoteStream] = useState(null);

const [type, setType] = useState(‘JOIN’);

const [callerId] = useState(
Math.floor(100000 + Math.random() * 900000).toString(),
);
const otherUserId = useRef(null);

const socket = SocketIOClient(‘http://localhost:3500’, {
transports: [‘websocket’],
query: {
callerId,
},
});

const [localMicOn, setlocalMicOn] = useState(true);

const [localWebcamOn, setlocalWebcamOn] = useState(true);

const peerConnection = useRef(
new RTCPeerConnection({
iceServers: [
{
urls: ‘stun:stun.l.google.com:19302’,
},
{
urls: ‘stun:stun1.l.google.com:19302’,
},
{
urls: ‘stun:stun4.l.google.com:19302’,
},
],
}),
);

let remoteRTCMessage = useRef(null);

useEffect(() => {
socket.on(‘newCall’, data => {
console.log(‘useEffect data___’, data);

  remoteRTCMessage.current = data.rtcMessage;
  otherUserId.current = data.callerId;
  setType('INCOMING_CALL');
});

socket.on('callAnswered', data => {
  remoteRTCMessage.current = data.rtcMessage;
  peerConnection.current.setRemoteDescription(
    new RTCSessionDescription(remoteRTCMessage.current),
  );
  setType('WEBRTC_ROOM');
});

socket.on('ICEcandidate', data => {
  let message = data.rtcMessage;

  if (peerConnection.current) {
    peerConnection?.current
      .addIceCandidate(
        new RTCIceCandidate({
          candidate: message.candidate,
          sdpMid: message.id,
          sdpMLineIndex: message.label,
        }),
      )
      .then(data => {
        console.log('useEffect  data___', data);
        console.log('SUCCESS', message);
      })
      .catch(err => {
        console.log('Error this one', message);
      });
  }
});

let isFront = false;

mediaDevices.enumerateDevices().then(sourceInfos => {
  let videoSourceId;
  for (let i = 0; i < sourceInfos.length; i++) {
    const sourceInfo = sourceInfos[i];
    if (
      sourceInfo.kind == 'videoinput' &&
      sourceInfo.facing == (isFront ? 'user' : 'environment')
    ) {
      videoSourceId = sourceInfo.deviceId;
    }
  }

  mediaDevices
    .getUserMedia({
      audio: true,
      video: {
        mandatory: {
          minWidth: 500, // Provide your own width, height and frame rate here
          minHeight: 300,
          minFrameRate: 30,
        },
        facingMode: isFront ? 'user' : 'environment',
        optional: videoSourceId ? [{sourceId: videoSourceId}] : [],
      },
    })
    .then(stream => {
      // Got stream!

      setlocalStream(stream);

      // setup stream listening
      peerConnection.current.addStream(stream);
    })
    .catch(error => {
      // Log error
    });
});

peerConnection.current.onaddstream = event => {
  console.log('useEffect onaddstream event___', event);
  setRemoteStream(event.stream);
};

// Setup ice handling
peerConnection.current.onicecandidate = event => {
  console.log('useEffect onicecandidate event___', event);
  if (event.candidate) {
    // if (event != null && event.candidate != null) {
    sendICEcandidate({
      calleeId: otherUserId.current,
      rtcMessage: {
        label: event.candidate.sdpMLineIndex,
        id: event.candidate.sdpMid,
        candidate: event.candidate.candidate,
      },
    });
  } else {
    console.log('End of candidates.');
  }
};

return () => {
  socket.off('newCall');
  socket.off('callAnswered');
  socket.off('ICEcandidate');
};

}, );

useEffect(() => {
InCallManager.start();
InCallManager.setKeepScreenOn(true);
InCallManager.setForceSpeakerphoneOn(true);

return () => {
  InCallManager.stop();
};

}, );

function sendICEcandidate(data) {
socket.emit(‘ICEcandidate’, data);
}

async function processCall() {
const sessionDescription = await peerConnection.current.createOffer();
await peerConnection.current.setLocalDescription(sessionDescription);
sendCall({
calleeId: otherUserId.current,
rtcMessage: sessionDescription,
});
}

async function processAccept() {
try {
await peerConnection.current.setRemoteDescription(
new RTCSessionDescription(remoteRTCMessage.current),
);
const sessionDescription = await peerConnection.current.createAnswer();
console.log(‘processAccept sessionDescription___’, sessionDescription);
await peerConnection.current.setLocalDescription(sessionDescription);
socket.emit(‘answerCall’, {
callerId: otherUserId.current,
rtcMessage: sessionDescription,
});
} catch (error) {
console.error(‘Error during call acceptance:’, error);
}
}

function answerCall(data) {
socket.emit(‘answerCall’, data);
}

function sendCall(data) {
socket.emit(‘call’, data);
}

const JoinScreen = () => {
return (
<KeyboardAvoidingView
behavior={Platform.OS === ‘ios’ ? ‘padding’ : ‘height’}
style={{
flex: 1,
backgroundColor: ‘#050A0E’,
justifyContent: ‘center’,
paddingHorizontal: 42,
}}>

<>
<View
style={{
padding: 35,
backgroundColor: ‘#1A1C22’,
justifyContent: ‘center’,
alignItems: ‘center’,
borderRadius: 14,
}}>
<Text
style={{
fontSize: 18,
color: ‘#D0D4DD’,
}}>
Your Caller ID

<View
style={{
flexDirection: ‘row’,
marginTop: 12,
alignItems: ‘center’,
}}>
<Text
style={{
fontSize: 32,
color: ‘#ffff’,
letterSpacing: 6,
}}>
{callerId}


        <View
          style={{
            backgroundColor: '#1A1C22',
            padding: 40,
            marginTop: 25,
            justifyContent: 'center',
            borderRadius: 14,
          }}>
          <Text
            style={{
              fontSize: 18,
              color: '#D0D4DD',
              textAlign: 'center',
            }}>
            Enter call id of another user
          </Text>
          <TextInputContainer
            placeholder={'Enter Caller ID'}
            value={otherUserId.current}
            setValue={text => {
              otherUserId.current = text;
              console.log('TEST', otherUserId.current);
            }}
            keyboardType={'number-pad'}
          />
          <TouchableOpacity
            onPress={() => {
              setType('OUTGOING_CALL');
              processCall();
            }}
            style={{
              height: 50,
              backgroundColor: '#5568FE',
              justifyContent: 'center',
              alignItems: 'center',
              borderRadius: 12,
              marginTop: 16,
            }}>
            <Text
              style={{
                fontSize: 16,
                color: '#FFFFFF',
              }}>
              Call Now
            </Text>
          </TouchableOpacity>
        </View>
      </>
    </TouchableWithoutFeedback>
  </KeyboardAvoidingView>
);

};

const OutgoingCallScreen = () => {
return (
<View
style={{
flex: 1,
justifyContent: ‘space-around’,
backgroundColor: ‘#050A0E’,
}}>
<View
style={{
padding: 35,
justifyContent: ‘center’,
alignItems: ‘center’,
borderRadius: 14,
}}>
<Text
style={{
fontSize: 16,
color: ‘#D0D4DD’,
}}>
Calling to…

      <Text
        style={{
          fontSize: 36,
          marginTop: 12,
          color: '#ffff',
          letterSpacing: 6,
        }}>
        {otherUserId.current}
      </Text>
    </View>
    <View
      style={{
        justifyContent: 'center',
        alignItems: 'center',
      }}>
      <TouchableOpacity
        onPress={() => {
          setType('JOIN');
          otherUserId.current = null;
        }}
        style={{
          backgroundColor: '#FF5D5D',
          borderRadius: 30,
          height: 60,
          aspectRatio: 1,
          justifyContent: 'center',
          alignItems: 'center',
        }}>
        <CallEnd width={50} height={12} />
      </TouchableOpacity>
    </View>
  </View>
);

};

const IncomingCallScreen = () => {
return (
<View
style={{
flex: 1,
justifyContent: ‘space-around’,
backgroundColor: ‘#050A0E’,
}}>
<View
style={{
padding: 35,
justifyContent: ‘center’,
alignItems: ‘center’,
borderRadius: 14,
}}>
<Text
style={{
fontSize: 36,
marginTop: 12,
color: ‘#ffff’,
}}>
{otherUserId.current} is calling…


<View
style={{
justifyContent: ‘center’,
alignItems: ‘center’,
}}>
<TouchableOpacity
onPress={() => {
processAccept();
setType(‘WEBRTC_ROOM’);
}}
style={{
backgroundColor: ‘green’,
borderRadius: 30,
height: 60,
aspectRatio: 1,
justifyContent: ‘center’,
alignItems: ‘center’,
}}>
<CallAnswer height={28} fill={‘#fff’} />



);
};

function switchCamera() {
localStream.getVideoTracks().forEach(track => {
track._switchCamera();
});
}

function toggleCamera() {
localWebcamOn ? setlocalWebcamOn(false) : setlocalWebcamOn(true);
localStream.getVideoTracks().forEach(track => {
localWebcamOn ? (track.enabled = false) : (track.enabled = true);
});
}

function toggleMic() {
localMicOn ? setlocalMicOn(false) : setlocalMicOn(true);
localStream.getAudioTracks().forEach(track => {
localMicOn ? (track.enabled = false) : (track.enabled = true);
});
}

function leave() {
if (peerConnection.current) {
peerConnection.current.close();
peerConnection.current = null;
}
if (localStream) {
localStream.getTracks().forEach(track => track.stop());
setlocalStream(null);
}
if (remoteStream) {
remoteStream.getTracks().forEach(track => track.stop());
setRemoteStream(null);
}
setType(‘JOIN’);
}

const WebrtcRoomScreen = () => {
return (
<View
style={{
flex: 1,
backgroundColor: ‘#050A0E’,
paddingHorizontal: 12,
paddingVertical: 12,
}}>
{localStream ? (
<RTCView
objectFit={‘cover’}
style={{flex: 1, backgroundColor: ‘#050A0E’}}
streamURL={localStream.toURL()}
/>
) : null}
{remoteStream ? (
<RTCView
objectFit={‘cover’}
style={{
flex: 1,
backgroundColor: ‘#050A0E’,
marginTop: 8,
}}
streamURL={remoteStream.toURL()}
mirror
/>
) : null}
<View
style={{
marginVertical: 12,
flexDirection: ‘row’,
justifyContent: ‘space-evenly’,
}}>
<IconContainer
backgroundColor={‘red’}
onPress={() => {
leave();
}}
Icon={() => {
return ;
}}
/>
<IconContainer
style={{
borderWidth: 1.5,
borderColor: ‘#2B3034’,
}}
backgroundColor={!localMicOn ? ‘#fff’ : ‘transparent’}
onPress={() => {
toggleMic();
}}
Icon={() => {
return localMicOn ? (

) : (

);
}}
/>
<IconContainer
style={{
borderWidth: 1.5,
borderColor: ‘#2B3034’,
}}
backgroundColor={!localWebcamOn ? ‘#fff’ : ‘transparent’}
onPress={() => {
toggleCamera();
}}
Icon={() => {
return localWebcamOn ? (

) : (

);
}}
/>
<IconContainer
style={{
borderWidth: 1.5,
borderColor: ‘#2B3034’,
}}
backgroundColor={‘transparent’}
onPress={() => {
switchCamera();
}}
Icon={() => {
return ;
}}
/>


);
};

switch (type) {
case ‘JOIN’:
return JoinScreen();
case ‘INCOMING_CALL’:
return IncomingCallScreen();
case ‘OUTGOING_CALL’:
return OutgoingCallScreen();
case ‘WEBRTC_ROOM’:
return WebrtcRoomScreen();
default:
return null;
}
}

The following logs come while sending video call request:
useEffect data___ {“callerId”: “354234”, “rtcMessage”: {“sdp”: "v=0

o=- 8840405134111863582 2 IN IP4 127.0.0.1

s=-

t=0 0

a=group:BUNDLE audio video

a=extmap-allow-mixed

a=msid-semantic: WMS 9e29ee0a-020a-4c44-87d7-53e91a6d256f

m=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 102 0 8 106 105 13 110 112 113 126

c=IN IP4 0.0.0.0

a=rtcp:9 IN IP4 0.0.0.0

a=ice-ufrag:2Zj/

a=ice-pwd:0DQVteyRcuxjvtPjK12itgrN

a=ice-options:trickle renomination

a=fingerprint:sha-256 85:F7:DE:75:84:B2:78:28:13:C3:49:79:BA:F7:B3:22:4E:99:42:00:9B:D0:E9:37:B1:62:89:1F:F9:51:1C:CF

a=setup:actpass

a=mid:audio

a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level

a=extmap:2 docs/native-code/rtp-hdrext/abs-send-time - src - Git at Google

a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01

a=sendrecv

a=rtcp-mux

a=rtpmap:111 opus/48000/2

a=rtcp-fb:111 transport-cc

a=fmtp:111 minptime=10;useinbandfec=1

a=rtpmap:63 red/48000/2

a=fmtp:63 111/111

a=rtpmap:103 ISAC/16000

a=rtpmap:104 ISAC/32000

a=rtpmap:9 G722/8000

a=rtpmap:102 ILBC/8000

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:106 CN/32000

a=rtpmap:105 CN/16000

a=rtpmap:13 CN/8000

a=rtpmap:110 telephone-event/48000

a=rtpmap:112 telephone-event/32000

a=rtpmap:113 telephone-event/16000

a=rtpmap:126 telephone-event/8000

a=ssrc:3415840709 cname:sz28i66i4VaIvObI

a=ssrc:3415840709 msid:9e29ee0a-020a-4c44-87d7-53e91a6d256f 023c8680-3492-4050-a7b4-07d056999a55

m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 35 36 100 101 125 124 127

c=IN IP4 0.0.0.0

a=rtcp:9 IN IP4 0.0.0.0

a=ice-ufrag:2Zj/

a=ice-pwd:0DQVteyRcuxjvtPjK12itgrN

a=ice-options:trickle renomination

a=fingerprint:sha-256 85:F7:DE:75:84:B2:78:28:13:C3:49:79:BA:F7:B3:22:4E:99:42:00:9B:D0:E9:37:B1:62:89:1F:F9:51:1C:CF

a=setup:actpass

a=mid:video

a=extmap:14 urn:ietf:params:rtp-hdrext:toffset

a=extmap:2 docs/native-code/rtp-hdrext/abs-send-time - src - Git at Google

a=extmap:13 urn:3gpp:video-orientation

a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01

a=extmap:5 docs/native-code/rtp-hdrext/playout-delay - src - Git at Google

a=extmap:6 docs/native-code/rtp-hdrext/video-content-type - src - Git at Google

a=extmap:7 docs/native-code/rtp-hdrext/video-timing - src - Git at Google

a=extmap:8 docs/native-code/rtp-hdrext/color-space - src - Git at Google

a=sendrecv

a=rtcp-mux

a=rtcp-rsize

a=rtpmap:96 VP8/90000

a=rtcp-fb:96 goog-remb

a=rtcp-fb:96 transport-cc

a=rtcp-fb:96 ccm fir

a=rtcp-fb:96 nack

a=rtcp-fb:96 nack pli

a=rtpmap:97 rtx/90000

a=fmtp:97 apt=96

a=rtpmap:98 VP9/90000

a=rtcp-fb:98 goog-remb

a=rtcp-fb:98 transport-cc

a=rtcp-fb:98 ccm fir

a=rtcp-fb:98 nack

a=rtcp-fb:98 nack pli

a=rtpmap:99 rtx/90000

a=fmtp:99 apt=98

a=rtpmap:35 AV1/90000

a=rtcp-fb:35 goog-remb

a=rtcp-fb:35 transport-cc

a=rtcp-fb:35 ccm fir

a=rtcp-fb:35 nack

a=rtcp-fb:35 nack pli

a=rtpmap:36 rtx/90000

a=fmtp:36 apt=35

a=rtpmap:100 H264/90000

a=rtcp-fb:100 goog-remb

a=rtcp-fb:100 transport-cc

a=rtcp-fb:100 ccm fir

a=rtcp-fb:100 nack

a=rtcp-fb:100 nack pli

a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f

a=rtpmap:101 rtx/90000

a=fmtp:101 apt=100

a=rtpmap:125 red/90000

a=rtpmap:124 rtx/90000

a=fmtp:124 apt=125

a=rtpmap:127 ulpfec/90000

a=ssrc-group:FID 2856658020 2741415569

a=ssrc:2856658020 cname:sz28i66i4VaIvObI

a=ssrc:2856658020 msid:9e29ee0a-020a-4c44-87d7-53e91a6d256f fdb857ea-c9a5-41ad-a342-6ec1b4dc989a

a=ssrc:2741415569 cname:sz28i66i4VaIvObI

a=ssrc:2741415569 msid:9e29ee0a-020a-4c44-87d7-53e91a6d256f fdb857ea-c9a5-41ad-a342-6ec1b4dc989a

", “type”: “offer”}}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:1608068774 1 udp 2122262783 2405:201:200a:11c4:381a:c9ff:fe64:cab4 32950 typ host generation 0 ufrag 2Zj/ network-id 4 network-cost 10”, “sdpMLineIndex”: 0, “sdpMid”: “audio”}, “isTrusted”: false}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:280305885 1 udp 2122194687 192.168.29.109 48396 typ host generation 0 ufrag 2Zj/ network-id 3 network-cost 10”, “sdpMLineIndex”: 0, “sdpMid”: “audio”}, “isTrusted”: false}

LOG Error this one {“candidate”: “candidate:1608068774 1 udp 2122262783 2405:201:200a:11c4:381a:c9ff:fe64:cab4 32950 typ host generation 0 ufrag 2Zj/ network-id 4 network-cost 10”, “id”: “audio”, “label”: 0}

LOG Error this one {“candidate”: “candidate:280305885 1 udp 2122194687 192.168.29.109 48396 typ host generation 0 ufrag 2Zj/ network-id 3 network-cost 10”, “id”: “audio”, “label”: 0}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:1608068774 1 udp 2122262783 2405:201:200a:11c4:381a:c9ff:fe64:cab4 33303 typ host generation 0 ufrag 2Zj/ network-id 4 network-cost 10”, “sdpMLineIndex”: 1, “sdpMid”: “video”}, “isTrusted”: false}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:280305885 1 udp 2122194687 192.168.29.109 57256 typ host generation 0 ufrag 2Zj/ network-id 3 network-cost 10”, “sdpMLineIndex”: 1, “sdpMid”: “video”}, “isTrusted”: false}

LOG Error this one {“candidate”: “candidate:1608068774 1 udp 2122262783 2405:201:200a:11c4:381a:c9ff:fe64:cab4 33303 typ host generation 0 ufrag 2Zj/ network-id 4 network-cost 10”, “id”: “video”, “label”: 1}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:842163049 1 udp 1685987071 115.246.24.52 48396 typ srflx raddr 192.168.29.109 rport 48396 generation 0 ufrag 2Zj/ network-id 3 network-cost 10”, “sdpMLineIndex”: 0, “sdpMid”: “audio”}, “isTrusted”: false}

LOG Error this one {“candidate”: “candidate:280305885 1 udp 2122194687 192.168.29.109 57256 typ host generation 0 ufrag 2Zj/ network-id 3 network-cost 10”, “id”: “video”, “label”: 1}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:4231669940 1 udp 1686055167 2405:201:200a:11c4:a88d:3639:340e:9e4 32950 typ srflx raddr 2405:201:200a:11c4:381a:c9ff:fe64:cab4 rport 32950 generation 0 ufrag 2Zj/ network-id 4 network-cost 10”, “sdpMLineIndex”: 0, “sdpMid”: “audio”}, “isTrusted”: false}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:4231669940 1 udp 1686055167 2405:201:200a:11c4:a88d:3639:340e:9e4 33303 typ srflx raddr 2405:201:200a:11c4:381a:c9ff:fe64:cab4 rport 33303 generation 0 ufrag 2Zj/ network-id 4 network-cost 10”, “sdpMLineIndex”: 1, “sdpMid”: “video”}, “isTrusted”: false}

LOG Error this one {“candidate”: “candidate:842163049 1 udp 1685987071 115.246.24.52 48396 typ srflx raddr 192.168.29.109 rport 48396 generation 0 ufrag 2Zj/ network-id 3 network-cost 10”, “id”: “audio”, “label”: 0}

LOG Error this one {“candidate”: “candidate:4231669940 1 udp 1686055167 2405:201:200a:11c4:a88d:3639:340e:9e4 32950 typ srflx raddr 2405:201:200a:11c4:381a:c9ff:fe64:cab4 rport 32950 generation 0 ufrag 2Zj/ network-id 4 network-cost 10”, “id”: “audio”, “label”: 0}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:842163049 1 udp 1685987071 115.246.24.52 57256 typ srflx raddr 192.168.29.109 rport 57256 generation 0 ufrag 2Zj/ network-id 3 network-cost 10”, “sdpMLineIndex”: 1, “sdpMid”: “video”}, “isTrusted”: false}

LOG Error this one {“candidate”: “candidate:4231669940 1 udp 1686055167 2405:201:200a:11c4:a88d:3639:340e:9e4 33303 typ srflx raddr 2405:201:200a:11c4:381a:c9ff:fe64:cab4 rport 33303 generation 0 ufrag 2Zj/ network-id 4 network-cost 10”, “id”: “video”, “label”: 1}

LOG Error this one {“candidate”: “candidate:842163049 1 udp 1685987071 115.246.24.52 57256 typ srflx raddr 192.168.29.109 rport 57256 generation 0 ufrag 2Zj/ network-id 3 network-cost 10”, “id”: “video”, “label”: 1}

The following logs come while accepting the call:
LOG useEffect onaddstream event___ {“isTrusted”: false, “stream”: {“_reactTag”: “e99672d5-2bd4-47e8-afcb-b12600827981”, “_tracks”: [[MediaStreamTrack], [MediaStreamTrack]], “active”: true, “id”: “351ea2af-a976-45b4-b458-a0d0f1c93e51”}}

LOG processAccept sessionDescription___ {“sdp”: "v=0

o=- 1759373851026754548 2 IN IP4 127.0.0.1

s=-

t=0 0

a=group:BUNDLE audio video

a=extmap-allow-mixed

a=msid-semantic: WMS f098449f-3b24-436b-acfa-fd9782ebe6bc

m=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 102 0 8 106 105 13 110 112 113 126

c=IN IP4 0.0.0.0

a=rtcp:9 IN IP4 0.0.0.0

a=ice-ufrag:xdjg

a=ice-pwd:hP9JDtK+gcRmwIfVgRI5qAGc

a=ice-options:trickle renomination

a=fingerprint:sha-256 EC:27:C2:34:54:78:60:7C:46:73:CC:81:36:4C:97:12:09:A4:72:C0:CF:86:E1:AA:A8:57:59:C9:AB:13:62:D0

a=setup:active

a=mid:audio

a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level

a=extmap:2 docs/native-code/rtp-hdrext/abs-send-time - src - Git at Google

a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01

a=sendrecv

a=rtcp-mux

a=rtpmap:111 opus/48000/2

a=rtcp-fb:111 transport-cc

a=fmtp:111 minptime=10;useinbandfec=1

a=rtpmap:63 red/48000/2

a=fmtp:63 111/111

a=rtpmap:103 ISAC/16000

a=rtpmap:104 ISAC/32000

a=rtpmap:9 G722/8000

a=rtpmap:102 ILBC/8000

a=rtpmap:0 PCMU/8000

a=rtpmap:8 PCMA/8000

a=rtpmap:106 CN/32000

a=rtpmap:105 CN/16000

a=rtpmap:13 CN/8000

a=rtpmap:110 telephone-event/48000

a=rtpmap:112 telephone-event/32000

a=rtpmap:113 telephone-event/16000

a=rtpmap:126 telephone-event/8000

a=ssrc:995167232 cname:jGgVMj2PAfTm0Wem

a=ssrc:995167232 msid:f098449f-3b24-436b-acfa-fd9782ebe6bc ff28add2-a48a-4e9a-b8fd-cbb4905bb098

m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 35 36 100 101 125 124 127

c=IN IP4 0.0.0.0

a=rtcp:9 IN IP4 0.0.0.0

a=ice-ufrag:xdjg

a=ice-pwd:hP9JDtK+gcRmwIfVgRI5qAGc

a=ice-options:trickle renomination

a=fingerprint:sha-256 EC:27:C2:34:54:78:60:7C:46:73:CC:81:36:4C:97:12:09:A4:72:C0:CF:86:E1:AA:A8:57:59:C9:AB:13:62:D0

a=setup:active

a=mid:video

a=extmap:14 urn:ietf:params:rtp-hdrext:toffset

a=extmap:2 docs/native-code/rtp-hdrext/abs-send-time - src - Git at Google

a=extmap:13 urn:3gpp:video-orientation

a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01

a=extmap:5 docs/native-code/rtp-hdrext/playout-delay - src - Git at Google

a=extmap:6 docs/native-code/rtp-hdrext/video-content-type - src - Git at Google

a=extmap:7 docs/native-code/rtp-hdrext/video-timing - src - Git at Google

a=extmap:8 docs/native-code/rtp-hdrext/color-space - src - Git at Google

a=sendrecv

a=rtcp-mux

a=rtcp-rsize

a=rtpmap:96 VP8/90000

a=rtcp-fb:96 goog-remb

a=rtcp-fb:96 transport-cc

a=rtcp-fb:96 ccm fir

a=rtcp-fb:96 nack

a=rtcp-fb:96 nack pli

a=rtpmap:97 rtx/90000

a=fmtp:97 apt=96

a=rtpmap:98 VP9/90000

a=rtcp-fb:98 goog-remb

a=rtcp-fb:98 transport-cc

a=rtcp-fb:98 ccm fir

a=rtcp-fb:98 nack

a=rtcp-fb:98 nack pli

a=rtpmap:99 rtx/90000

a=fmtp:99 apt=98

a=rtpmap:35 AV1/90000

a=rtcp-fb:35 goog-remb

a=rtcp-fb:35 transport-cc

a=rtcp-fb:35 ccm fir

a=rtcp-fb:35 nack

a=rtcp-fb:35 nack pli

a=rtpmap:36 rtx/90000

a=fmtp:36 apt=35

a=rtpmap:100 H264/90000

a=rtcp-fb:100 goog-remb

a=rtcp-fb:100 transport-cc

a=rtcp-fb:100 ccm fir

a=rtcp-fb:100 nack

a=rtcp-fb:100 nack pli

a=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f

a=rtpmap:101 rtx/90000

a=fmtp:101 apt=100

a=rtpmap:125 red/90000

a=rtpmap:124 rtx/90000

a=fmtp:124 apt=125

a=rtpmap:127 ulpfec/90000

a=ssrc-group:FID 2256228526 2138412957

a=ssrc:2256228526 cname:jGgVMj2PAfTm0Wem

a=ssrc:2256228526 msid:f098449f-3b24-436b-acfa-fd9782ebe6bc 9dc296fe-b2c9-4571-b5e0-4cb96bd9e3c3

a=ssrc:2138412957 cname:jGgVMj2PAfTm0Wem

a=ssrc:2138412957 msid:f098449f-3b24-436b-acfa-fd9782ebe6bc 9dc296fe-b2c9-4571-b5e0-4cb96bd9e3c3

", “type”: “answer”}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:2437926729 1 udp 2122262783 2405:201:200a:11c4:4d6:54ff:fe28:911 36260 typ host generation 0 ufrag xdjg network-id 4 network-cost 10”, “sdpMLineIndex”: 0, “sdpMid”: “audio”}, “isTrusted”: false}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:1353937925 1 udp 2122194687 192.168.29.10 53263 typ host generation 0 ufrag xdjg network-id 3 network-cost 10”, “sdpMLineIndex”: 0, “sdpMid”: “audio”}, “isTrusted”: false}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:842163049 1 udp 1685987071 115.246.24.52 53263 typ srflx raddr 192.168.29.10 rport 53263 generation 0 ufrag xdjg network-id 3 network-cost 10”, “sdpMLineIndex”: 0, “sdpMid”: “audio”}, “isTrusted”: false}

LOG useEffect onicecandidate event___ {“candidate”: {“candidate”: “candidate:4231669940 1 udp 1686055167 2405:201:200a:11c4:658a:bb9c:80cf:d336 36260 typ srflx raddr 2405:201:200a:11c4:4d6:54ff:fe28:911 rport 36260 generation 0 ufrag xdjg network-id 4 network-cost 10”, “sdpMLineIndex”: 0, “sdpMid”: “audio”}, “isTrusted”: false}

LOG useEffect onicecandidate event___ {“candidate”: null, “isTrusted”: false}

LOG End of candidates.

LOG useEffect onaddstream event___ {“isTrusted”: false, “stream”: {“_reactTag”: “2923c8bb-30be-4531-bc6f-8d1d819464f3”, “_tracks”: [[MediaStreamTrack], [MediaStreamTrack]], “active”: true, “id”: “f098449f-3b24-436b-acfa-fd9782ebe6bc”}}

LOG useEffect data___ undefined

LOG SUCCESS {“candidate”: “candidate:2437926729 1 udp 2122262783 2405:201:200a:11c4:4d6:54ff:fe28:911 36260 typ host generation 0 ufrag xdjg network-id 4 network-cost 10”, “id”: “audio”, “label”: 0}

LOG useEffect data___ undefined

LOG SUCCESS {“candidate”: “candidate:1353937925 1 udp 2122194687 192.168.29.10 53263 typ host generation 0 ufrag xdjg network-id 3 network-cost 10”, “id”: “audio”, “label”: 0}

LOG useEffect data___ undefined

LOG SUCCESS {“candidate”: “candidate:842163049 1 udp 1685987071 115.246.24.52 53263 typ srflx raddr 192.168.29.10 rport 53263 generation 0 ufrag xdjg network-id 3 network-cost 10”, “id”: “audio”, “label”: 0}

LOG useEffect data___ undefined

LOG SUCCESS {“candidate”: “candidate:4231669940 1 udp 1686055167 2405:201:200a:11c4:658a:bb9c:80cf:d336 36260 typ srflx raddr 2405:201:200a:11c4:4d6:54ff:fe28:911 rport 36260 generation 0 ufrag xdjg network-id 4 network-cost 10”, “id”: “audio”, “label”: 0}

Hi
That’s never a good idea just to dump the code and ask for help.
Try refactoring your question explain what you do.

  1. Create offer
  2. Gather ice candidates
  3. Send them over to the other party etc.
    In that way you will help people to find the problem and while in process you might fins the issue yourself
    Happy coding