3

I have already seen this question WebRTC multicast (one-to-many)

But I have only two simple questions.

Q1. How to connect one to many WebRTC peer connections. Do we have to create different offers for each peer?

Explanation Q1: Teacher has to group call for their students. Will the teacher has to create the WebRTC offer for each student for a call connection?

Q2. Do we have to create the offer again if we want to switch voice call to video call or vice versa the media stream?

Explanation Q2: Can we add new Track on ongoing call?

  • 1
    1: Yes. 2: No, use`replaceTrack`. – jib Dec 13 '19 at 02:48
  • Thanks for your reply @jib . But I want to switch between voice call to video call or vice versa. Is it possible without creating new offer? – Satinderpal Singh Dec 16 '19 at 16:19
  • 1
    Use `sender.replaceTrack(null)` to temporarily turn off sending of a track without renegotiation. – jib Dec 16 '19 at 23:44
  • @jib .. It works sender.replaceTrack(null) or sender.replaceTrack(track) when I already have same kind of track in senders array. Suppose I started a call only with an audio track and want to add a video track. Then sender.replaceTrack(track) not work where sender has null track in senders array. I think in that case I need to renegotiation? – Satinderpal Singh Dec 17 '19 at 05:31
  • 1
    Right. Use `addTransceiver("video")` and `addTransceiver("audio")` to add both upfront, then replace in tracks as needed. – jib Dec 18 '19 at 04:13

0 Answers0