v0.3.0
Breaking changes
-
RTP packets are now returned in 4 element tuple (comparing to 3 element tuple before). A new field denotes RID i.e.
- {:ex_webrtc, input_pc, {:rtp, id, packet}} + {:ex_webrtc, input_pc, {:rtp, id, rid, packet}}
RID identifies simulcast layer. If client side offers simulcast, ExWebRTC will by default accept it. If simulcast is disabled, RID is equal to
nil
. -
all features like RTX, TWCC, Simulcast, etc. are now by default enabled. You can disable them using feature option of PeerConnection configuration options. This means you can remove RTX codec from your list of codecs:
@video_codecs [ %RTPCodecParameters{ payload_type: 96, mime_type: "video/H264", clock_rate: 90_000, - rtcp_fbs: [%ExSDP.Attribute.RTCPFeedback{pt: 96, feedback_type: :nack}] }, - %RTPCodecParameters{ - payload_type: 97, - mime_type: "video/rtx", - clock_rate: 90_000, - sdp_fmtp_line: %ExSDP.Attribute.FMTP{pt: 97, apt: 96} - } ]
-
ExWebRTC now supports MediaStreams. If you offer to send media tracks, they, by default, won't be assigned to any media stream. As a result, on the other side, in particular in a web browser,
streams
field of theRTCTrackEvent
will be an empty array. You have to either create a stream in Elixir WebRTC or in a web browser i.e.To keep this working:
pc.ontrack = event => videoPlayer.srcObject = event.streams[0];
assign tracks to media stream in Elixir WebRTC:
- {:ok, _sender} = PeerConnection.add_track(pc, MediaStreamTrack.new(:audio)) - {:ok, _sender} = PeerConnection.add_track(pc, MediaStreamTrack.new(:video)) + media_stream_id = MediaStreamTrack.generate_stream_id() + {:ok, _sender} = PeerConnection.add_track(pc, MediaStreamTrack.new(:audio, [media_stream_id])) + {:ok, _sender} = PeerConnection.add_track(pc, MediaStreamTrack.new(:video, [media_stream_id]))
What's Changed
- Add
whip_whep
example by @LVala in #109 - Fix typos by @kianmeng in #115
- Fix send_rtp for non-existing track id by @ndrean in #114
- Inbound Simulcast by @LVala in #111
- Add support for MediaStreams by @LVala in #117
- Fix simulcast issues by @LVala in #121
- Improve UX of
Configuration
by @LVala in #120 - Create a module for every codec in
ExWebRTC.RTP
by @LVala in #122 - Handle VP8.Payload.parse errors by @mickel8 in #123
New Contributors
Full Changelog: v0.2.0...v0.3.0