Skip to content

Commit 00ac212

Browse files
committed
Add MSID event if there is no track
1 parent f4a4ab4 commit 00ac212

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/ex_webrtc/rtp_transceiver.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ defmodule ExWebRTC.RTPTransceiver do
589589
[ExSDP.Attribute.MSID.new("-", id)]
590590

591591
nil ->
592-
[]
592+
[ExSDP.Attribute.MSID.new("-", sender.id)]
593593
end
594594

595595
ssrc_attrs = get_ssrc_attrs(sender, codecs)

test/ex_webrtc/rtp_transceiver_test.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ defmodule ExWebRTC.RTPTransceiverTest do
196196

197197
mline = RTPTransceiver.to_offer_mline(tr, @opts)
198198

199-
assert [] = ExSDP.get_attributes(mline, ExSDP.Attribute.MSID)
199+
assert [%ExSDP.Attribute.MSID{id: "-", app_data: tr.sender.id}] ==
200+
ExSDP.get_attributes(mline, ExSDP.Attribute.MSID)
200201

201202
assert [
202203
%ExSDP.Attribute.SSRC{id: @ssrc, attribute: "msid", value: "- #{tr.sender.id}"},

0 commit comments

Comments
 (0)