26 Commits

Author SHA1 Message Date
Joe Turki
740e5166c5 Update lint rules, force testify/assert for tests
Use testify's assert package instead of the standard library's testing
package.
2025-03-27 12:08:37 +02:00
Joe Turki
1a1488d290 Expose ICE candidates ToICE() method
Expose ToICE() method on ICE candidates to allow for easier conversion
to ice package ICE candidates.

Resolve https://github.com/pion/webrtc/issues/3069
2025-03-25 11:24:25 -04:00
Joe Turki
a0d7d022c0 Preserve ICE candidate Extensions
Ensure that ICE candidates are retained when parsed and stringified,
and converted to ICE.candidate.
2025-01-31 14:49:47 -06:00
Joe Turk
5edce958fd Include sdpMid and sdpMLineIndex for ICECandidates returned by OneICECandidate (#2990)
#### Description
Currently, Pion returns an empty `sdpMid` and a 0 `sdpMLineIndex`. This
PR ensures Pion returns the corresponding `sdpMid` and `sdpMLineIndex`
for ICE candidates for clients that expects it. Fixes trickle issues.

#### Changes

1. `ICECandidates`: New fields `SDPMid` and `SDPMLineIndex`.
2. `ICEGatherer`: `SetMediaStreamIdentification` and return the correct
`SDPMid` and `SDPMLineIndex`.
3. `extractICEDetails`: Return a struct instead of multiple values.
4. `extractICEDetails` refactored the media description selection to a
different function.
5. Added new tests.

#### Reference issue
Fixes https://github.com/pion/webrtc/issues/2690
Fixes https://github.com/pion/webrtc/issues/1833
2025-01-08 19:08:44 -06:00
Sean DuBois
3aab0355e0 Upgrade dtls, ice, stun and turn
New major version of all packages caused by DTLS upgrade
2024-08-12 13:45:35 -04:00
renovate[bot]
ea23dec2b9 Update module transport, srtp, ice and turn
ReplayDetector introduced a breaking change
2023-09-03 23:59:43 -04:00
Steffen Vogel
683fc837d0 Make repo REUSE compliant 2023-05-05 11:58:49 -04:00
Sean DuBois
804a12fed3 Update CI configs to v0.4.7
Update lint scripts and CI configs.
2020-09-30 09:06:34 -07:00
Sean DuBois
2155a7d703 Move candidate parsing to pion/ice
Instead of having logic in pion/webrtc and pion/sdp move all logic to
pion/ice. Users of pion/ice don't want to import these packages to use
basic pion/ice functionality.
2020-09-13 00:05:09 -07:00
Sean DuBois
f7f7f3e23c Don't use NULL for SDPMid and SDPMLineIndex
FireFox and Chrome both don't support these keys being NULL.
webrtc-pc says the following. So will be reporting upstream

```
If both candidate.sdpMid and candidate.sdpMLineIndex are null,
then this applies to all media descriptions.

```

Relates to 6d3633e589
2020-09-01 11:49:00 -07:00
JooYoung
6d3633e589 Don't use omitempty for ICECandidateInit
Always return sdpMid & sdpMLineindex value if it
is null. The W3C starts every attribute definition with
`If not null ...`
2020-08-20 20:56:35 -07:00
Jerko Steiner
2236ddeafd Add experimental support for ICE TCP
See pion/ice issue and PR:

- https://github.com/pion/ice/tree/issue-196
- https://github.com/pion/ice/pull/226
2020-07-15 15:08:37 +02:00
Sean DuBois
bb3aa9717f Move to pion/ice@v2
Removed support for trickle ice

Resolves #1274
2020-06-28 00:01:47 -07:00
Hugo Arregui
289ce70816 Fix ICECandidateInit ToJSON fix
Candidate field should always start with "candidate:" prefix
2019-08-01 18:17:44 +00:00
Sean DuBois
2228e7f61e Add custom-logger example
Demonstrate how users can user their own logger via the
SettingEngine

Resolves #726
2019-07-11 20:24:07 +01:00
Hugo Arregui
93261960b1 Basic stats
Load DC, CandidatePair and Candidate basic stats
2019-06-25 19:36:57 +00:00
Sean DuBois
be3d922fbb Add mDNS Host Candidate support
This only does parsing, does not generate them.
In the future this option will be exposed via the SettingEngine,
including the ability to opt out of mDNS completely for security/scaling
concerns

Relates to pion/webrtc#699
2019-06-21 10:13:27 -07:00
Sean DuBois
2838b1a836 Move ICE code out of internal
Users are unable to use the callbacks inside `internal/ice`.
Even though we alias things like OnSelectedCandidatePairChange
are unusable since in the package they use `ice.Candidate` instead of
`ICECandidate`
2019-06-15 01:29:08 -07:00
Adam Kiss
7756848a4c Moved ice related files to internal/ice
Moved ice related files to internal/ice. Added ice.go and
ice_go.go files containing aliases to internal/ice. Added
internal/tools/gen/genaliasdocs.go helper script for generating the
documentation for these aliases. Dropped ice
prefix from file names in internal/ice package.
2019-06-03 10:57:27 -07:00
Adam Kiss
8289a3e7cc Prepare for internal/ice package
Removed SDP dependency from ice files. Exported string to ice enum
functions. Exported ICEServer.Validate.
2019-05-26 14:09:38 +02:00
Sean DuBois
a03af11ca3 Bump ICE
Broke public API to allow for relay candidates
2019-05-24 16:02:49 -07:00
Sean DuBois
1cdfc10c84 Mass replace pions -> pion
Pions organization was renamed to pion
2019-04-04 15:32:03 -07:00
Sean DuBois
b4bc4798b9 Move ICE out of tree
Relates to #361
2019-03-25 23:31:43 -07:00
Michael MacDonald
5084ad3370 Move pkg/ice to internal/ice
Avoid exposing any non-standard API.
2019-03-01 08:07:42 -05:00
Max Hawkins
9cba54cfd0 Upgrade to pions/sdp v2
Relates to #417
2019-02-18 11:47:05 -08:00
Max Hawkins
0647ce9c26 Remove rtc prefix from filenames
Relates to #408
2019-02-17 16:22:56 -08:00