Skip to content

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

Discussion options

You must be logged in to vote

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()).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Nikhil2206
Comment options

Answer selected by Nikhil2206
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants