Skip to content

Commit

Permalink
Move ICE code out of internal
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
Sean-Der committed Jun 15, 2019
1 parent 3d7235b commit 2838b1a
Show file tree
Hide file tree
Showing 61 changed files with 1,059 additions and 1,670 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@ script:
- cd examples && golangci-lint run --build-tags quic ./... -D gochecknoinits
- cd ..
- rm -rf examples # Remove examples, no test coverage for them
- rm -rf internal/tools # Remove tools, no test coverage for them
- go test -tags quic -coverpkg=$(go list ./... | tr '\n' ',') -coverprofile=cover.out -v -race -covermode=atomic ./...
- GOOS=js GOARCH=wasm go test -exec="${PWD}/test-wasm/go_js_wasm_exec" -v .
- GOOS=js GOARCH=wasm go test -exec="${PWD}/test-wasm/go_js_wasm_exec" -v ./internal/ice
- GOOS=js GOARCH=wasm go test -exec="./test-wasm/go_js_wasm_exec" -v .
- bash <(curl -s https://codecov.io/bash)
- bash .github/assert-contributors.sh
- bash .github/lint-disallowed-functions-in-library.sh
Expand Down
8 changes: 8 additions & 0 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ var (
// ErrCertificateExpired indicates that an x509 certificate has expired.
ErrCertificateExpired = errors.New("x509Cert expired")

// ErrNoTurnCredencials indicates that a TURN server URL was provided
// without required credentials.
ErrNoTurnCredencials = errors.New("turn server credentials required")

// ErrTurnCredencials indicates that provided TURN credentials are partial
// or malformed.
ErrTurnCredencials = errors.New("invalid turn server credentials")

// ErrExistingTrack indicates that a track already exists.
ErrExistingTrack = errors.New("track already exists")

Expand Down
289 changes: 0 additions & 289 deletions ice.go

This file was deleted.

30 changes: 1 addition & 29 deletions ice_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,7 @@

package webrtc

import (
"github.com/pion/sdp/v2"

"github.com/pion/webrtc/v2/internal/ice"
)

//go:generate go run internal/tools/gen/genaliasdocs.go -pkg "./internal/ice" -build-tags "!js" $GOFILE

type (

// ICETransport allows an application access to information about the ICE
// transport over which packets are sent and received.
ICETransport = ice.Transport

// ICEGatherer gathers local host, server reflexive and relay
// candidates, as well as enabling the retrieval of local Interactive
// Connectivity Establishment (ICE) parameters which can be
// exchanged in signaling.
ICEGatherer = ice.Gatherer
)

var (

// NewICEGatherer creates a new NewICEGatherer.
NewICEGatherer = ice.NewGatherer

// NewICETransport creates a new NewICETransport.
NewICETransport = ice.NewTransport
)
import "github.com/pion/sdp/v2"

// NewICEGatherer creates a new NewICEGatherer.
// This constructor is part of the ORTC API. It is not
Expand Down
Loading

0 comments on commit 2838b1a

Please sign in to comment.