Hello,

This is the important sentence from the JSEP draft on this topic:

 An m= section is generated for each RtpTransceiver
   that has been added to the PeerConnection, excluding any stopped
   RtpTransceivers; this is done in the order the RtpTransceivers were
   added to the PeerConnection.

Which means these are bugs in Janus and Chrome.
Where is Chrome is “just” showing old behavior in which audio m-section used to 
come always first, before video m-sections.
But Janus is definitely not allowed to swap around m-section, no matter if they 
have mid’s set or not.

Best
  Nils Ohlmeier


> On 21Mar, 2019, at 15:58, Byron Campen <[email protected]> wrote:
> 
>     Yes, the order in which transceivers are created (ie; the order that you 
> add tracks) dictates the order of the media sections, and answers must have 
> exactly the same number of media sections in the same order as the offer.
> 
> 
> Best regards,
> 
> Byron Campen
> 
> 
> On 3/20/19 4:33 AM, shazzzzzzzz wrote:
>> Hi,
>> 
>> I created a media stream with a video track and then later added a new audio 
>> track to it.
>> 
>> Firefox 66 generates an offer as below
>> 
>> v=0
>> o=mozilla...THIS_IS_SDPARTA-66.0 6649649757650455613 0 IN IP4 0.0.0.0
>> s=-
>> t=0 0
>> a=sendrecv
>> a=fingerprint:sha-256 
>> E6:9C:12:F9:51:3E:FB:66:08:A6:E5:A7:44:3E:C4:2E:4D:5A:65:6F:9F:11:37:5C:B3:6D:70:73:78:78:93:1D
>> a=group:BUNDLE 0 1
>> a=ice-options:trickle
>> a=msid-semantic:WMS *
>> m=video 42914 UDP/TLS/RTP/SAVPF 120 121 126 97
>> c=IN IP4 192.168.144.87
>> a=candidate:0 1 UDP 2122252543 10.0.2.15 53714 typ host
>> a=sendrecv
>> a=end-of-candidates
>> a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
>> a=extmap:4 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
>> a=extmap:5 urn:ietf:params:rtp-hdrext:toffset
>> a=fmtp:126 
>> profile-level-id=42e01f;level-asymmetry-allowed=1;packetization-mode=1
>> a=fmtp:97 profile-level-id=42e01f;level-asymmetry-allowed=1
>> a=fmtp:120 max-fs=12288;max-fr=60
>> a=fmtp:121 max-fs=12288;max-fr=60
>> a=ice-pwd:885e51aa56ae2c53b752f3ff4b8aa665
>> a=ice-ufrag:b18867cf
>> a=mid:0
>> a=msid:{cb5b1692-3fc4-4398-bd15-389bbb562be4} 
>> {2a72737f-edc9-4db8-b425-7654677d2bb8}
>> a=rtcp:40059 IN IP4 192.168.144.87
>> a=rtcp-fb:120 nack
>> a=rtcp-fb:120 nack pli
>> a=rtcp-fb:120 ccm fir
>> a=rtcp-fb:120 goog-remb
>> a=rtcp-fb:121 nack
>> a=rtcp-fb:121 nack pli
>> a=rtcp-fb:121 ccm fir
>> a=rtcp-fb:121 goog-remb
>> a=rtcp-fb:126 nack
>> a=rtcp-fb:126 nack pli
>> a=rtcp-fb:126 ccm fir
>> a=rtcp-fb:126 goog-remb
>> a=rtcp-fb:97 nack
>> a=rtcp-fb:97 nack pli
>> a=rtcp-fb:97 ccm fir
>> a=rtcp-fb:97 goog-remb
>> a=rtcp-mux
>> a=rtpmap:120 VP8/90000
>> a=rtpmap:121 VP9/90000
>> a=rtpmap:126 H264/90000
>> a=rtpmap:97 H264/90000
>> a=setup:actpass
>> a=ssrc:2641968431 cname:{8ec0a58b-8dc5-4bc9-94d8-6296f47ec46d}
>> m=audio 41219 UDP/TLS/RTP/SAVPF 109 9 0 8 101
>> c=IN IP4 192.168.144.87
>> a=candidate:0 1 UDP 2122252543 10.0.2.15 53716 typ host
>> a=sendrecv
>> a=end-of-candidates
>> a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
>> a=extmap:2/recvonly urn:ietf:params:rtp-hdrext:csrc-audio-level
>> a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
>> a=fmtp:109 maxplaybackrate=48000;stereo=1;useinbandfec=1
>> a=fmtp:101 0-15
>> a=ice-pwd:885e51aa56ae2c53b752f3ff4b8aa665
>> a=ice-ufrag:b18867cf
>> a=mid:1
>> a=msid:{cb5b1692-3fc4-4398-bd15-389bbb562be4} 
>> {f9022aba-9e72-43fb-b079-8f835482c1cf}
>> a=rtcp:44757 IN IP4 192.168.144.87
>> a=rtcp-mux
>> a=rtpmap:109 opus/48000/2
>> a=rtpmap:9 G722/8000/1
>> a=rtpmap:0 PCMU/8000
>> a=rtpmap:8 PCMA/8000
>> a=rtpmap:101 telephone-event/8000
>> a=setup:actpass
>> a=ssrc:418481083 cname:{8ec0a58b-8dc5-4bc9-94d8-6296f47ec46d}
>> 
>> 
>> This is the answer generate by Janus
>> 
>> v=0
>> o=- 1553073400 1553073401 IN IP4 192.168.251.62
>> s=ect
>> t=0 0
>> a=group:BUNDLE 1 0
>> a=msid-semantic: WMS janus
>> m=audio 9 UDP/TLS/RTP/SAVPF 8
>> c=IN IP4 192.168.251.62
>> a=rtpmap:8 PCMA/8000
>> a=sendrecv
>> a=mid:1
>> a=rtcp-mux
>> a=ice-ufrag:FRNK
>> a=ice-pwd:HHKPDngakgsincsuubCf4g
>> a=ice-options:trickle
>> a=fingerprint:sha-256 
>> D2:B9:31:8F:DF:24:D8:0E:ED:D2:EF:25:9E:AF:6F:B8:34:AE:53:9C:E6:F3:8F:F2:64:15:FA:E8:7F:53:2D:38
>> a=setup:active
>> a=ssrc:91094205 cname:janus
>> a=ssrc:91094205 msid:janus janusa0
>> a=ssrc:91094205 mslabel:janus
>> a=ssrc:91094205 label:janusa0
>> a=candidate:1 1 udp 1000 192.168.251.62 38330 typ host
>> a=end-of-candidates
>> m=video 9 UDP/TLS/RTP/SAVPF 120
>> c=IN IP4 192.168.251.62
>> b=AS:1524
>> a=rtpmap:120 VP8/90000
>> a=recvonly
>> a=mid:0
>> a=rtcp-mux
>> a=ice-ufrag:FRNK
>> a=ice-pwd:HHKPDngakgsincsuubCf4g
>> a=ice-options:trickle
>> a=fingerprint:sha-256 
>> D2:B9:31:8F:DF:24:D8:0E:ED:D2:EF:25:9E:AF:6F:B8:34:AE:53:9C:E6:F3:8F:F2:64:15:FA:E8:7F:53:2D:38
>> a=setup:active
>> a=rtcp-fb:120 goog-remb
>> a=rtcp-fb:120 transport-cc
>> a=rtcp-fb:120 ccm fir
>> a=rtcp-fb:120 nack
>> a=rtcp-fb:120 nack pli
>> a=ssrc:3901434987 cname:janus
>> a=ssrc:3901434987 msid:janus janusv0
>> a=ssrc:3901434987 mslabel:janus
>> a=ssrc:3901434987 label:janusv0
>> a=candidate:1 1 udp 1000 192.168.251.62 38330 typ host
>> a=end-of-candidates
>> 
>> 
>> Setting remote description fails with an error - 
>> InvalidSessionDescriptionError: Answer and offer have different media types 
>> at m-line 0
>> 
>> Here does the order of media cause this error on Firefox? The answer 
>> generated has the 'mid' attributes assigned to the right media - mid 0 for 
>> video and mid 1 for audio. But their order is interchanged and Firefox fails 
>> to accept it.
>> 
>> I could create a mediastream with an audio track and then add video track 
>> which would work. Want to know if the order matters here as per 
>> specification.
>> 
>> Note - Chrome always generates audio with mid 0 and video with mid 1 no 
>> matter in which order the tracks were added to the media stream
>> _______________________________________________
>> dev-media mailing list
>> [email protected]
>> https://lists.mozilla.org/listinfo/dev-media
> 
> 
> _______________________________________________
> dev-media mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-media

_______________________________________________
dev-media mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-media

Reply via email to