Can we add multiple video track in same peer connection in case of streamer / media sender ? Tried but its only accept the lastly added video track #1314
-
@paullouisageneau ` const rtc::SSRC ssrc2 = 43; I checked the SPD for offer, it show only lastly added video track and does not show first one Does libdatachannel support multiple video tracks ? if yes what could be wrong in my code ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
libdatachannel supports multiple video tracks. If only the second one appears in the offer, it would mean the first one is either destroyed before For the browser to play both videos, you must ensure a few things: payload types for the exact same codec must be the same across the entire description (so you have to use 96 for both tracks), and each independent streams must have a different cname and msid (set in |
Beta Was this translation helpful? Give feedback.
libdatachannel supports multiple video tracks. If only the second one appears in the offer, it would mean the first one is either destroyed before
setLocalDescription()
is called (because the shared_ptr is destroyed, for instance), or replaced by the second one (because it has the same mid, for instance).For the browser to play both videos, you must ensure a few things: payload types for the exact same codec must be the same across the entire description (so you have to use 96 for both tracks), and each independent streams must have a different cname and msid (set in
addSSRC()
).