Adding Second Video Stream (screenshare)

Thank you all in advance.
Currently we’re using CMP2K, I’m trying to add an additional screenshare video track to the connection, but the new track is neither added to the INVITE and seems to instead mute the incoming video track (also no renegotiation is triggered on remote connection).

Alternatively, replacing the current video track works fine since no renegotiation is required.

Any help is greatly appreciated!

async function shareScreen(screenShareButton) {
  const options = { video: { cursor: 'always' }, audio: false };
  const captureStream = await navigator.mediaDevices.getDisplayMedia(options);

  if (captureStream) {
    const [deviceTrack] = captureStream.getVideoTracks();
    captureStream.local = true;
    captureStream.screenCapture = true;

    phone._locals.add(captureStream);
    phone._rtc._connection.addTrack(deviceTrack);
    phone._rtc.renegotiate();
  }
}

If we have two connections, PC1 and PC2, our local sdp’s before adding the screenshare track each have an extra m-line (mid: video-2) for the other’s incoming video track:

v=0
o=- 8855131657684271080 3 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1 video-2
a=msid-semantic: WMS oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW
m=audio 52517 UDP/TLS/RTP/SAVPF 9 0 126
c=IN IP4 10.2.9.4
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:3636633346 1 udp 2122260223 10.2.9.4 52517 typ host generation 0 network-id 2 network-cost 50
a=candidate:4033732497 1 udp 2122194687 192.168.0.104 56860 typ host generation 0 network-id 1 network-cost 10
a=candidate:2520867826 1 tcp 1518280447 10.2.9.4 9 typ host tcptype active generation 0 network-id 2 network-cost 50
a=candidate:3203277665 1 tcp 1518214911 192.168.0.104 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=ice-ufrag:Xx7E
a=ice-pwd:Wo6Q113CbYhUtDbHy2QOcXhk
a=ice-options:trickle
a=fingerprint:sha-256 A4:C0:B4:61:48:9A:4D:48:F9:67:F4:F7:F8:35:66:9D:86:45:48:38:A4:9F:5E:AA:A2:8D:A5:DC:10:6B:C7:B6
a=setup:passive
a=mid:0
a=sendrecv
a=msid:oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW d32e58b7-0b65-4a62-8655-99e27fec76c9
a=rtcp-mux
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:126 telephone-event/8000
a=ssrc:1961548966 cname:5KcWO+IzuYOkrNmo
m=video 61869 UDP/TLS/RTP/SAVPF 96 102
c=IN IP4 10.2.9.4
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:3636633346 1 udp 2122260223 10.2.9.4 61869 typ host generation 0 network-id 2 network-cost 50
a=candidate:4033732497 1 udp 2122194687 192.168.0.104 56987 typ host generation 0 network-id 1 network-cost 10
a=candidate:2520867826 1 tcp 1518280447 10.2.9.4 9 typ host tcptype active generation 0 network-id 2 network-cost 50
a=candidate:3203277665 1 tcp 1518214911 192.168.0.104 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=ice-ufrag:Xx7E
a=ice-pwd:Wo6Q113CbYhUtDbHy2QOcXhk
a=ice-options:trickle
a=fingerprint:sha-256 A4:C0:B4:61:48:9A:4D:48:F9:67:F4:F7:F8:35:66:9D:86:45:48:38:A4:9F:5E:AA:A2:8D:A5:DC:10:6B:C7:B6
a=setup:passive
a=mid:1
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=sendrecv
a=msid:oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW d3d4cdf8-d5c5-45ec-940d-233d7d0d1c0c
a=rtcp-mux
a=rtpmap:96 VP8/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=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=ssrc-group:FID 3204547133 3629794744
a=ssrc:3204547133 cname:5KcWO+IzuYOkrNmo
a=ssrc:3629794744 cname:5KcWO+IzuYOkrNmo
m=video 9 UDP/TLS/RTP/SAVPF 96 102
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Xx7E
a=ice-pwd:Wo6Q113CbYhUtDbHy2QOcXhk
a=ice-options:trickle
a=fingerprint:sha-256 A4:C0:B4:61:48:9A:4D:48:F9:67:F4:F7:F8:35:66:9D:86:45:48:38:A4:9F:5E:AA:A2:8D:A5:DC:10:6B:C7:B6
a=setup:passive
a=mid:video-2
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=recvonly
a=rtcp-mux
a=rtpmap:96 VP8/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=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f

After adding the screenshare track to PC1, the INVITE does not include the screenshare m-line:

v=0
o=- 8855131657684271080 4 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1 video-2
a=msid-semantic: WMS oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW
m=audio 52517 UDP/TLS/RTP/SAVPF 9 0 126 111 103 104 8 106 105 13 110 112 113
c=IN IP4 10.2.9.4
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:3636633346 1 udp 2122260223 10.2.9.4 52517 typ host generation 0 network-id 2 network-cost 50
a=candidate:4033732497 1 udp 2122194687 192.168.0.104 56860 typ host generation 0 network-id 1 network-cost 10
a=candidate:2520867826 1 tcp 1518280447 10.2.9.4 9 typ host tcptype active generation 0 network-id 2 network-cost 50
a=candidate:3203277665 1 tcp 1518214911 192.168.0.104 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=ice-ufrag:Xx7E
a=ice-pwd:Wo6Q113CbYhUtDbHy2QOcXhk
a=ice-options:trickle
a=fingerprint:sha-256 A4:C0:B4:61:48:9A:4D:48:F9:67:F4:F7:F8:35:66:9D:86:45:48:38:A4:9F:5E:AA:A2:8D:A5:DC:10:6B:C7:B6
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=sendrecv
a=msid:oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW d32e58b7-0b65-4a62-8655-99e27fec76c9
a=rtcp-mux
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:126 telephone-event/8000
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=ssrc:1961548966 cname:5KcWO+IzuYOkrNmo
a=ssrc:1961548966 msid:oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW d32e58b7-0b65-4a62-8655-99e27fec76c9
a=ssrc:1961548966 mslabel:oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW
a=ssrc:1961548966 label:d32e58b7-0b65-4a62-8655-99e27fec76c9
m=video 61869 UDP/TLS/RTP/SAVPF 96 102 97 98 99 100 101 121 127 120 125 107 108 109 124 119 123 118 114 115 116
c=IN IP4 10.2.9.4
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:3636633346 1 udp 2122260223 10.2.9.4 61869 typ host generation 0 network-id 2 network-cost 50
a=candidate:4033732497 1 udp 2122194687 192.168.0.104 56987 typ host generation 0 network-id 1 network-cost 10
a=candidate:2520867826 1 tcp 1518280447 10.2.9.4 9 typ host tcptype active generation 0 network-id 2 network-cost 50
a=candidate:3203277665 1 tcp 1518214911 192.168.0.104 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=ice-ufrag:Xx7E
a=ice-pwd:Wo6Q113CbYhUtDbHy2QOcXhk
a=ice-options:trickle
a=fingerprint:sha-256 A4:C0:B4:61:48:9A:4D:48:F9:67:F4:F7:F8:35:66:9D:86:45:48:38:A4:9F:5E:AA:A2:8D:A5:DC:10:6B:C7:B6
a=setup:actpass
a=mid:1
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:13 urn:3gpp:video-orientation
a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:11 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://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=sendrecv
a=msid:oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW d3d4cdf8-d5c5-45ec-940d-233d7d0d1c0c
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/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=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/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 profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP9/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=fmtp:100 profile-id=2
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:121 rtx/90000
a=fmtp:121 apt=102
a=rtpmap:127 H264/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=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f
a=rtpmap:120 rtx/90000
a=fmtp:120 apt=127
a=rtpmap:125 H264/90000
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=rtpmap:108 H264/90000
a=rtcp-fb:108 goog-remb
a=rtcp-fb:108 transport-cc
a=rtcp-fb:108 ccm fir
a=rtcp-fb:108 nack
a=rtcp-fb:108 nack pli
a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
a=rtpmap:109 rtx/90000
a=fmtp:109 apt=108
a=rtpmap:124 H264/90000
a=rtcp-fb:124 goog-remb
a=rtcp-fb:124 transport-cc
a=rtcp-fb:124 ccm fir
a=rtcp-fb:124 nack
a=rtcp-fb:124 nack pli
a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d0032
a=rtpmap:119 rtx/90000
a=fmtp:119 apt=124
a=rtpmap:123 H264/90000
a=rtcp-fb:123 goog-remb
a=rtcp-fb:123 transport-cc
a=rtcp-fb:123 ccm fir
a=rtcp-fb:123 nack
a=rtcp-fb:123 nack pli
a=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032
a=rtpmap:118 rtx/90000
a=fmtp:118 apt=123
a=rtpmap:114 red/90000
a=rtpmap:115 rtx/90000
a=fmtp:115 apt=114
a=rtpmap:116 ulpfec/90000
a=ssrc-group:FID 3204547133 3629794744
a=ssrc:3204547133 cname:5KcWO+IzuYOkrNmo
a=ssrc:3204547133 msid:oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW d3d4cdf8-d5c5-45ec-940d-233d7d0d1c0c
a=ssrc:3204547133 mslabel:oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW
a=ssrc:3204547133 label:d3d4cdf8-d5c5-45ec-940d-233d7d0d1c0c
a=ssrc:3629794744 cname:5KcWO+IzuYOkrNmo
a=ssrc:3629794744 msid:oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW d3d4cdf8-d5c5-45ec-940d-233d7d0d1c0c
a=ssrc:3629794744 mslabel:oFRCIEOhM1UyhWZhXUYanlEr4BcokNTVpmrW
a=ssrc:3629794744 label:d3d4cdf8-d5c5-45ec-940d-233d7d0d1c0c
m=video 9 UDP/TLS/RTP/SAVPF 96 102 97 98 99 100 101 121 127 120 125 107 108 109 124 119 123 118 114 115 116
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Xx7E
a=ice-pwd:Wo6Q113CbYhUtDbHy2QOcXhk
a=ice-options:trickle
a=fingerprint:sha-256 A4:C0:B4:61:48:9A:4D:48:F9:67:F4:F7:F8:35:66:9D:86:45:48:38:A4:9F:5E:AA:A2:8D:A5:DC:10:6B:C7:B6
a=setup:actpass
a=mid:video-2
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:13 urn:3gpp:video-orientation
a=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:11 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://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=sendrecv
a=msid:- d15dc072-8b9e-448f-8219-eb28162d1c38
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/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=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/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 profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP9/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=fmtp:100 profile-id=2
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:121 rtx/90000
a=fmtp:121 apt=102
a=rtpmap:127 H264/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=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f
a=rtpmap:120 rtx/90000
a=fmtp:120 apt=127
a=rtpmap:125 H264/90000
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=rtpmap:108 H264/90000
a=rtcp-fb:108 goog-remb
a=rtcp-fb:108 transport-cc
a=rtcp-fb:108 ccm fir
a=rtcp-fb:108 nack
a=rtcp-fb:108 nack pli
a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
a=rtpmap:109 rtx/90000
a=fmtp:109 apt=108
a=rtpmap:124 H264/90000
a=rtcp-fb:124 goog-remb
a=rtcp-fb:124 transport-cc
a=rtcp-fb:124 ccm fir
a=rtcp-fb:124 nack
a=rtcp-fb:124 nack pli
a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d0032
a=rtpmap:119 rtx/90000
a=fmtp:119 apt=124
a=rtpmap:123 H264/90000
a=rtcp-fb:123 goog-remb
a=rtcp-fb:123 transport-cc
a=rtcp-fb:123 ccm fir
a=rtcp-fb:123 nack
a=rtcp-fb:123 nack pli
a=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032
a=rtpmap:118 rtx/90000
a=fmtp:118 apt=123
a=rtpmap:114 red/90000
a=rtpmap:115 rtx/90000
a=fmtp:115 apt=114
a=rtpmap:116 ulpfec/90000
a=ssrc-group:FID 3370297367 646252663
a=ssrc:3370297367 cname:5KcWO+IzuYOkrNmo
a=ssrc:3370297367 msid:- d15dc072-8b9e-448f-8219-eb28162d1c38
a=ssrc:3370297367 mslabel:-
a=ssrc:3370297367 label:d15dc072-8b9e-448f-8219-eb28162d1c38
a=ssrc:646252663 cname:5KcWO+IzuYOkrNmo
a=ssrc:646252663 msid:- d15dc072-8b9e-448f-8219-eb28162d1c38
a=ssrc:646252663 mslabel:-
a=ssrc:646252663 label:d15dc072-8b9e-448f-8219-eb28162d1c38

Transceivers show the screenshare track added to video-2 sender, however video-2 receiver track is now muted:

(3) [RTCRtpTransceiver, RTCRtpTransceiver, RTCRtpTransceiver]
0: RTCRtpTransceiver {mid: "0", sender: RTCRtpSender, receiver: RTCRtpReceiver, stopped: false, direction: "sendrecv", …}
1: RTCRtpTransceiver {mid: "1", sender: RTCRtpSender, receiver: RTCRtpReceiver, stopped: false, direction: "sendrecv", …}
2: RTCRtpTransceiver
  currentDirection: "sendonly"
  direction: "sendrecv"
  mid: "video-2"
  receiver: RTCRtpReceiver
    playoutDelayHint: null
    rtcpTransport: null
    track: MediaStreamTrack
      contentHint: ""
      enabled: true
      id: "1d85dae8-028e-4046-8def-c615dc013e39"
      kind: "video"
      label: "1d85dae8-028e-4046-8def-c615dc013e39"
      muted: true
      onended: null
      onmute: null
      onunmute: null
      readyState: "live"
      __proto__: MediaStreamTrack
    transport: RTCDtlsTransport {iceTransport: RTCIceTransport, state: "connected", onstatechange: null, onerror: null}
    __proto__: RTCRtpReceiver
  sender: RTCRtpSender
    dtmf: null
    rtcpTransport: null
    track: MediaStreamTrack
      contentHint: ""
      enabled: true
      id: "99d18464-051f-4949-b1eb-604c09bf156f"
      kind: "video"
      label: "screen:69734272:0"
      muted: false
      onended: null
      onmute: null
      onunmute: null
      readyState: "live"
      __proto__: MediaStreamTrack
    transport: RTCDtlsTransport {iceTransport: RTCIceTransport, state: "connected", onstatechange: null, onerror: null}
    __proto__: RTCRtpSender
  stopped: false
  __proto__: RTCRtpTransceiver
length: 3
__proto__: Array(0)

Meanwhile PC2 remains unchanged, having never received a new INVITE.

Thanks again!

Update: instead of addTrack, adding a new transceiver for the screenshare triggered a fresh renegotiation on the remote connection (including the new m-line) and transmitted the video…

BUT…the incoming video-2 is still becoming ‘inactive’ after the renegotiation.

m=video 12146 UDP/TLS/RTP/SAVPF 96 102
a=connection:existing
a=setup:active
a=fingerprint:SHA-256 25:80:5C:B7:F0:8B:EA:C9:C1:27:EE:81:12:4E:FB:DE:FA:07:B2:F6:FA:93:68:01:93:AC:A0:A1:99:31:81:41
a=ice-ufrag:514ee2386271b6861dc09b34563f86d2
a=ice-pwd:6c85bb4f1d4ae480534d20f6321c4e26
a=rtpmap:96 VP8/90000
a=rtpmap:102 H264/90000
a=fmtp:102 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42001F
a=rtcp-mux
a=ssrc:777908636 cname:59cc8782-0bdb-4244-93c8-4fe62abad71e
a=msid:75415ac5-8652-4f0c-b96a-203a4f7088a8 e6db87a8-5f79-4d1e-a3b2-1d74b02a915c
a=rtcp-fb:* transport-cc
a=rtcp-fb:* ccm fir
a=rtcp-fb:* goog-remb
a=rtcp-fb:* nack
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=mid:video-2
a=inactive

Any thoughts why this might be? Thanks!

You need to provide the complete SIP trace and Asterisk console output, as well as state the version of Asterisk in use.