Skip to content

v0.3.0

Compare
Choose a tag to compare
@mickel8 mickel8 released this 28 Jun 07:30
· 47 commits to master since this release

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 the RTCTrackEvent 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

New Contributors

Full Changelog: v0.2.0...v0.3.0