Repository: pion/webrtc
Pull request #595 (2019-04-07 09:13:06)

Update import paths
Add /v2 to import paths everywhere


Patch:
diff --git a/certificate.go b/certificate.go
index 546e8e55..ff3ab072 100644
--- a/certificate.go
+++ b/certificate.go
@@ -15,7 +15,7 @@ import (
 	"time"
 
 	"github.com/pion/dtls"
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 )
 
 // Certificate represents a x509Cert used to authenticate WebRTC communications.
diff --git a/datachannel.go b/datachannel.go
index 276c10fa..ec20627c 100644
--- a/datachannel.go
+++ b/datachannel.go
@@ -9,7 +9,7 @@ import (
 
 	"github.com/pion/datachannel"
 	"github.com/pion/logging"
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 )
 
 const dataChannelBufferSize = 16384 // Lowest common denominator among browsers
diff --git a/dtlstransport.go b/dtlstransport.go
index 6720607e..c7c4ac1e 100644
--- a/dtlstransport.go
+++ b/dtlstransport.go
@@ -15,9 +15,9 @@ import (
 
 	"github.com/pion/dtls"
 	"github.com/pion/srtp"
-	"github.com/pion/webrtc/internal/mux"
-	"github.com/pion/webrtc/internal/util"
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/internal/mux"
+	"github.com/pion/webrtc/v2/internal/util"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 )
 
 // DTLSTransport allows an application access to information about the DTLS
diff --git a/examples/data-channels-close/main.go b/examples/data-channels-close/main.go
index 51b6eb03..2844ad18 100644
--- a/examples/data-channels-close/main.go
+++ b/examples/data-channels-close/main.go
@@ -5,9 +5,9 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/pion/webrtc"
+	"github.com/pion/webrtc/v2"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 func main() {
diff --git a/examples/data-channels-create/main.go b/examples/data-channels-create/main.go
index 22ca15e2..1e647510 100644
--- a/examples/data-channels-create/main.go
+++ b/examples/data-channels-create/main.go
@@ -4,9 +4,9 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/pion/webrtc"
+	"github.com/pion/webrtc/v2"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 func main() {
diff --git a/examples/data-channels-detach-create/main.go b/examples/data-channels-detach-create/main.go
index 3146f02b..4ccfce39 100644
--- a/examples/data-channels-detach-create/main.go
+++ b/examples/data-channels-detach-create/main.go
@@ -5,9 +5,9 @@ import (
 	"io"
 	"time"
 
-	"github.com/pion/webrtc"
+	"github.com/pion/webrtc/v2"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 const messageSize = 15
diff --git a/examples/data-channels-detach/jsfiddle/main.go b/examples/data-channels-detach/jsfiddle/main.go
index d92c6990..d337e95b 100644
--- a/examples/data-channels-detach/jsfiddle/main.go
+++ b/examples/data-channels-detach/jsfiddle/main.go
@@ -8,9 +8,9 @@ import (
 	"syscall/js"
 	"time"
 
-	"github.com/pion/webrtc"
+	"github.com/pion/webrtc/v2"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 const messageSize = 15
diff --git a/examples/data-channels-detach/main.go b/examples/data-channels-detach/main.go
index 683c9b7b..090dc524 100644
--- a/examples/data-channels-detach/main.go
+++ b/examples/data-channels-detach/main.go
@@ -5,9 +5,9 @@ import (
 	"io"
 	"time"
 
-	"github.com/pion/webrtc"
+	"github.com/pion/webrtc/v2"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 const messageSize = 15
diff --git a/examples/data-channels/jsfiddle/main.go b/examples/data-channels/jsfiddle/main.go
index 1d83b231..53e3bb49 100644
--- a/examples/data-channels/jsfiddle/main.go
+++ b/examples/data-channels/jsfiddle/main.go
@@ -6,8 +6,8 @@ import (
 	"fmt"
 	"syscall/js"
 
-	"github.com/pion/webrtc"
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 func main() {
diff --git a/examples/data-channels/main.go b/examples/data-channels/main.go
index 5dbcaa39..4df80657 100644
--- a/examples/data-channels/main.go
+++ b/examples/data-channels/main.go
@@ -4,8 +4,8 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/pion/webrtc"
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 func main() {
diff --git a/examples/ortc-quic/main.go b/examples/ortc-quic/main.go
index b8ac1b69..dad48675 100644
--- a/examples/ortc-quic/main.go
+++ b/examples/ortc-quic/main.go
@@ -8,9 +8,9 @@ import (
 	"time"
 
 	"github.com/pion/quic"
-	"github.com/pion/webrtc"
+	"github.com/pion/webrtc/v2"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 const messageSize = 15
diff --git a/examples/ortc/main.go b/examples/ortc/main.go
index adbca960..bb59ffa7 100644
--- a/examples/ortc/main.go
+++ b/examples/ortc/main.go
@@ -5,9 +5,9 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/pion/webrtc"
+	"github.com/pion/webrtc/v2"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 func main() {
diff --git a/examples/pion-to-pion/answer/main.go b/examples/pion-to-pion/answer/main.go
index f3601775..556d5328 100644
--- a/examples/pion-to-pion/answer/main.go
+++ b/examples/pion-to-pion/answer/main.go
@@ -7,9 +7,9 @@ import (
 	"net/http"
 	"time"
 
-	"github.com/pion/webrtc"
+	"github.com/pion/webrtc/v2"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 func main() {
diff --git a/examples/pion-to-pion/offer/main.go b/examples/pion-to-pion/offer/main.go
index 11f05615..7879acd3 100644
--- a/examples/pion-to-pion/offer/main.go
+++ b/examples/pion-to-pion/offer/main.go
@@ -8,9 +8,9 @@ import (
 	"net/http"
 	"time"
 
-	"github.com/pion/webrtc"
+	"github.com/pion/webrtc/v2"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 func main() {
diff --git a/examples/save-to-disk/main.go b/examples/save-to-disk/main.go
index 725d1183..567f2327 100644
--- a/examples/save-to-disk/main.go
+++ b/examples/save-to-disk/main.go
@@ -6,12 +6,12 @@ import (
 	"time"
 
 	"github.com/pion/rtcp"
-	"github.com/pion/webrtc"
-	"github.com/pion/webrtc/pkg/media"
-	"github.com/pion/webrtc/pkg/media/ivfwriter"
-	"github.com/pion/webrtc/pkg/media/opuswriter"
+	"github.com/pion/webrtc/v2"
+	"github.com/pion/webrtc/v2/pkg/media"
+	"github.com/pion/webrtc/v2/pkg/media/ivfwriter"
+	"github.com/pion/webrtc/v2/pkg/media/opuswriter"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 func saveToDisk(i media.Writer, track *webrtc.Track) {
diff --git a/examples/sfu-minimal/main.go b/examples/sfu-minimal/main.go
index 6d275149..bb440d73 100644
--- a/examples/sfu-minimal/main.go
+++ b/examples/sfu-minimal/main.go
@@ -6,9 +6,9 @@ import (
 	"time"
 
 	"github.com/pion/rtcp"
-	"github.com/pion/webrtc"
+	"github.com/pion/webrtc/v2"
 
-	"github.com/pion/webrtc/examples/internal/signal"
+	"github.com/pion/webrtc/v2/examples/internal/signal"
 )
 
 var peerConnectionConfig = webrtc.Configuration{
diff --git a/iceserver.go b/iceserver.go
index 463ebdbf..fd2e186d 100644
--- a/iceserver.go
+++ b/iceserver.go
@@ -4,7 +4,7 @@ package webrtc
 
 import (
 	"github.com/pion/ice"
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 )
 
 // ICEServer describes a single STUN and TURN server that can be used by
diff --git a/icetransport.go b/icetransport.go
index 8edcce39..328cbfd3 100644
--- a/icetransport.go
+++ b/icetransport.go
@@ -9,7 +9,7 @@ import (
 
 	"github.com/pion/ice"
 	"github.com/pion/logging"
-	"github.com/pion/webrtc/internal/mux"
+	"github.com/pion/webrtc/v2/internal/mux"
 )
 
 // ICETransport allows an application access to information about the ICE
diff --git a/peerconnection.go b/peerconnection.go
index c86f4f44..739f5be3 100644
--- a/peerconnection.go
+++ b/peerconnection.go
@@ -21,8 +21,8 @@ import (
 	"github.com/pion/logging"
 	"github.com/pion/rtcp"
 	"github.com/pion/sdp/v2"
-	"github.com/pion/webrtc/internal/util"
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/internal/util"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 )
 
 // PeerConnection represents a WebRTC connection that establishes a
diff --git a/peerconnection_js.go b/peerconnection_js.go
index 8a72620b..ddbb41cc 100644
--- a/peerconnection_js.go
+++ b/peerconnection_js.go
@@ -6,7 +6,7 @@ package webrtc
 import (
 	"syscall/js"
 
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 )
 
 // PeerConnection represents a WebRTC connection that establishes a
diff --git a/pkg/media/samplebuilder/samplebuilder.go b/pkg/media/samplebuilder/samplebuilder.go
index 50302d33..fe1ec97e 100644
--- a/pkg/media/samplebuilder/samplebuilder.go
+++ b/pkg/media/samplebuilder/samplebuilder.go
@@ -2,7 +2,7 @@ package samplebuilder
 
 import (
 	"github.com/pion/rtp"
-	"github.com/pion/webrtc/pkg/media"
+	"github.com/pion/webrtc/v2/pkg/media"
 )
 
 // SampleBuilder contains all packets
diff --git a/quictransport.go b/quictransport.go
index ff9f1e83..96d4e2dc 100644
--- a/quictransport.go
+++ b/quictransport.go
@@ -16,8 +16,8 @@ import (
 	"github.com/pion/dtls"
 	"github.com/pion/logging"
 	"github.com/pion/quic"
-	"github.com/pion/webrtc/internal/mux"
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/internal/mux"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 )
 
 // QUICTransport is a specialization of QuicTransportBase focused on
diff --git a/signalingstate.go b/signalingstate.go
index ac4371f9..f958d516 100644
--- a/signalingstate.go
+++ b/signalingstate.go
@@ -3,7 +3,7 @@ package webrtc
 import (
 	"fmt"
 
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 )
 
 type stateChangeOp int
diff --git a/track.go b/track.go
index 79b8fa1c..ad3477d1 100644
--- a/track.go
+++ b/track.go
@@ -8,7 +8,7 @@ import (
 	"sync"
 
 	"github.com/pion/rtp"
-	"github.com/pion/webrtc/pkg/media"
+	"github.com/pion/webrtc/v2/pkg/media"
 )
 
 const (


Test patch:
diff --git a/datachannel_ortc_test.go b/datachannel_ortc_test.go
index c61f4d00..b3da1a31 100644
--- a/datachannel_ortc_test.go
+++ b/datachannel_ortc_test.go
@@ -7,7 +7,7 @@ import (
 	"time"
 
 	"github.com/pion/transport/test"
-	"github.com/pion/webrtc/internal/util"
+	"github.com/pion/webrtc/v2/internal/util"
 )
 
 func TestDataChannel_ORTCE2E(t *testing.T) {
diff --git a/iceserver_test.go b/iceserver_test.go
index aef9709c..bffdebaf 100644
--- a/iceserver_test.go
+++ b/iceserver_test.go
@@ -6,7 +6,7 @@ import (
 	"testing"
 
 	"github.com/pion/ice"
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/peerconnection_go_test.go b/peerconnection_go_test.go
index e2e004ee..38c84ddf 100644
--- a/peerconnection_go_test.go
+++ b/peerconnection_go_test.go
@@ -14,8 +14,8 @@ import (
 
 	"github.com/pion/ice"
 	"github.com/pion/transport/test"
-	"github.com/pion/webrtc/internal/mux"
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/internal/mux"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/peerconnection_media_test.go b/peerconnection_media_test.go
index 50b311aa..bfc3f33a 100644
--- a/peerconnection_media_test.go
+++ b/peerconnection_media_test.go
@@ -13,7 +13,7 @@ import (
 
 	"github.com/pion/rtcp"
 	"github.com/pion/transport/test"
-	"github.com/pion/webrtc/pkg/media"
+	"github.com/pion/webrtc/v2/pkg/media"
 )
 
 /*
diff --git a/peerconnection_test.go b/peerconnection_test.go
index da69b5d0..88cb1ad0 100644
--- a/peerconnection_test.go
+++ b/peerconnection_test.go
@@ -7,7 +7,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 	"github.com/stretchr/testify/assert"
 )
 
@@ -239,7 +239,7 @@ func TestPeerConnection_GetConfiguration(t *testing.T) {
 	assert.Equal(t, expected.BundlePolicy, actual.BundlePolicy)
 	assert.Equal(t, expected.RTCPMuxPolicy, actual.RTCPMuxPolicy)
 	// TODO(albrow): Uncomment this after #513 is fixed.
-	// See: https://github.com/pion/webrtc/issues/513.
+	// See: https://github.com/pion/webrtc/v2/issues/513.
 	// assert.Equal(t, len(expected.Certificates), len(actual.Certificates))
 	assert.Equal(t, expected.ICECandidatePoolSize, actual.ICECandidatePoolSize)
 }
diff --git a/pkg/media/samplebuilder/samplebuilder_test.go b/pkg/media/samplebuilder/samplebuilder_test.go
index 0352c50e..2bff04ad 100644
--- a/pkg/media/samplebuilder/samplebuilder_test.go
+++ b/pkg/media/samplebuilder/samplebuilder_test.go
@@ -4,7 +4,7 @@ import (
 	"testing"
 
 	"github.com/pion/rtp"
-	"github.com/pion/webrtc/pkg/media"
+	"github.com/pion/webrtc/v2/pkg/media"
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/quictransport_test.go b/quictransport_test.go
index 2a8a4282..10de52ce 100644
--- a/quictransport_test.go
+++ b/quictransport_test.go
@@ -9,7 +9,7 @@ import (
 
 	"github.com/pion/quic"
 	"github.com/pion/transport/test"
-	"github.com/pion/webrtc/internal/util"
+	"github.com/pion/webrtc/v2/internal/util"
 )
 
 func TestQUICTransport_E2E(t *testing.T) {
diff --git a/signalingstate_test.go b/signalingstate_test.go
index dc679a66..b831f582 100644
--- a/signalingstate_test.go
+++ b/signalingstate_test.go
@@ -3,7 +3,7 @@ package webrtc
 import (
 	"testing"
 
-	"github.com/pion/webrtc/pkg/rtcerr"
+	"github.com/pion/webrtc/v2/pkg/rtcerr"
 
 	"github.com/stretchr/testify/assert"
 )