Skip to content

Commit 2838b1a

Browse files
committed
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`
1 parent 3d7235b commit 2838b1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1059
-1670
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,8 @@ script:
3939
- cd examples && golangci-lint run --build-tags quic ./... -D gochecknoinits
4040
- cd ..
4141
- rm -rf examples # Remove examples, no test coverage for them
42-
- rm -rf internal/tools # Remove tools, no test coverage for them
4342
- go test -tags quic -coverpkg=$(go list ./... | tr '\n' ',') -coverprofile=cover.out -v -race -covermode=atomic ./...
44-
- GOOS=js GOARCH=wasm go test -exec="${PWD}/test-wasm/go_js_wasm_exec" -v .
45-
- GOOS=js GOARCH=wasm go test -exec="${PWD}/test-wasm/go_js_wasm_exec" -v ./internal/ice
43+
- GOOS=js GOARCH=wasm go test -exec="./test-wasm/go_js_wasm_exec" -v .
4644
- bash <(curl -s https://codecov.io/bash)
4745
- bash .github/assert-contributors.sh
4846
- bash .github/lint-disallowed-functions-in-library.sh

errors.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ var (
1919
// ErrCertificateExpired indicates that an x509 certificate has expired.
2020
ErrCertificateExpired = errors.New("x509Cert expired")
2121

22+
// ErrNoTurnCredencials indicates that a TURN server URL was provided
23+
// without required credentials.
24+
ErrNoTurnCredencials = errors.New("turn server credentials required")
25+
26+
// ErrTurnCredencials indicates that provided TURN credentials are partial
27+
// or malformed.
28+
ErrTurnCredencials = errors.New("invalid turn server credentials")
29+
2230
// ErrExistingTrack indicates that a track already exists.
2331
ErrExistingTrack = errors.New("track already exists")
2432

ice.go

Lines changed: 0 additions & 289 deletions
This file was deleted.

ice_go.go

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,7 @@
22

33
package webrtc
44

5-
import (
6-
"github.com/pion/sdp/v2"
7-
8-
"github.com/pion/webrtc/v2/internal/ice"
9-
)
10-
11-
//go:generate go run internal/tools/gen/genaliasdocs.go -pkg "./internal/ice" -build-tags "!js" $GOFILE
12-
13-
type (
14-
15-
// ICETransport allows an application access to information about the ICE
16-
// transport over which packets are sent and received.
17-
ICETransport = ice.Transport
18-
19-
// ICEGatherer gathers local host, server reflexive and relay
20-
// candidates, as well as enabling the retrieval of local Interactive
21-
// Connectivity Establishment (ICE) parameters which can be
22-
// exchanged in signaling.
23-
ICEGatherer = ice.Gatherer
24-
)
25-
26-
var (
27-
28-
// NewICEGatherer creates a new NewICEGatherer.
29-
NewICEGatherer = ice.NewGatherer
30-
31-
// NewICETransport creates a new NewICETransport.
32-
NewICETransport = ice.NewTransport
33-
)
5+
import "github.com/pion/sdp/v2"
346

357
// NewICEGatherer creates a new NewICEGatherer.
368
// This constructor is part of the ORTC API. It is not

0 commit comments

Comments
 (0)