Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/ex_webrtc/ice_candidate.ex
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ defmodule ExWebRTC.ICECandidate do
end

@spec from_json(%{String.t() => String.t() | non_neg_integer() | nil}) :: t()
def from_json(
%{
"candidate" => c,
"sdpMid" => mid,
"sdpMLineIndex" => mline_idx
} = json
) do
from_json(Map.put(json, "usernameFragment", nil))
end

def from_json(%{
"candidate" => c,
"sdpMid" => mid,
Expand Down