API: Avoid exposing pkg/ice

OnICEConnectionStateChange now return a ICEConnectionState instead of
ice.ConnectionState.
Resolves #422
This commit is contained in:
backkem
2019-02-20 19:57:00 +01:00
committed by Michiel De Backker
parent ad647c28d7
commit bf422e0c0a
18 changed files with 61 additions and 51 deletions

View File

@@ -7,7 +7,6 @@ import (
"github.com/pions/webrtc"
"github.com/pions/webrtc/examples/util"
"github.com/pions/webrtc/pkg/datachannel"
"github.com/pions/webrtc/pkg/ice"
)
func main() {
@@ -28,7 +27,7 @@ func main() {
// Set the handler for ICE connection state
// This will notify you when the peer has connected/disconnected
peerConnection.OnICEConnectionStateChange(func(connectionState ice.ConnectionState) {
peerConnection.OnICEConnectionStateChange(func(connectionState webrtc.ICEConnectionState) {
fmt.Printf("ICE Connection State has changed: %s\n", connectionState.String())
})