Offer to receive multiple video streams

Hi,

I was wondering if there’s a way to offer to receive multiple video streams from the remote. My iOS app is creating an offer, but I’m only seeing 1 “m=” line in the SDP. Is there a way to offer to receive multiple streams?

This is what I’m using when creating my offer (works well with 1 stream):

peerConnection.createOffer({offerToReceiveVideo: true})

I’ve tried adding tracks to my connection before creating the offer, but still doesn’t work:

peerConnection.addStream(new MediaStream());
peerConnection.addStream(new MediaStream());
peerConnection.createOffer({offerToReceiveVideo: true}) // ...

I’ve also tried this, but still doesn’t work:

const opts = {
  enabled: true,
  id: "id1",
  label: "label1",
  kind: "video",
  remote: true,
  readyState: "initializing",
};
const stream1 = new MediaStream()
stream1.addTrack(new MediaStreamTrack(opts))
stream1.addTrack(new MediaStreamTrack({...opts, id: 'id2', label: 'label2'}))
peerConnection.addStream(stream1)
peerConnection.createOffer({offerToReceiveVideo: true}) // ...

Example of the offer being genereated:

v=0
o=- 1643117115521988909 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE video
a=msid-semantic: WMS
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 123 125 122 124
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:iJpY
a=ice-pwd:zOrs7o8pgInr2U7S84FwER/X
a=ice-options:trickle renomination
a=fingerprint:sha-256 06:66:50:C9:B5:19:F2:7E:BC:FE:8A:8D:E6:6A:16:CC:0E:DA:76:1E:7C:97:8D:C5:62:03:C3:D2:4B:F8:FE:5E
a=setup:actpass
a=mid:video
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:13 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 urn:3gpp:video-orientation
a=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:9 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 H264/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=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640c1f
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 H264/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=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP8/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=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:127 VP9/90000
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=rtpmap:123 rtx/90000
a=fmtp:123 apt=127
a=rtpmap:125 red/90000
a=rtpmap:122 rtx/90000
a=fmtp:122 apt=125
a=rtpmap:124 ulpfec/90000

Maybe this PR will solve my problem? https://github.com/react-native-webrtc/react-native-webrtc/pull/773

Thanks for any help!