oslabs-beta / ReactRTC

NPM package that simplifies set-up of WebRTC as importable React components
270 stars 25 forks source link

Audio & Video both are not working together in example code of this Repo #19

Open jagannath-swarnkar opened 4 years ago

jagannath-swarnkar commented 4 years ago

I have tried the example code of this repository, but the Audio is not working then I changed the value of the constraints from {audio: false, video: true} to {audio: true, video: true} now, in this case, only Audio is working means only audio is streaming, not able to see the peers video or display.

Both audio and video tracks are adding to the rtcPeerConnection of localMediaStream in PeerConnection.jsx component in addMediaStreamTrack() but while connecting with the remote peer, only one track is working (the 0 index one from the rtcPeerConnection).

Like this, here I used controller in video tag to get track, and it is showing only audio in peers device Screenshot from 2020-04-11 12-57-21

jagannath-swarnkar commented 4 years ago

Ok, Problem solved!

thomas-cruz commented 4 years ago

@jagannath-swarnkar How did you fix it?