mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 15:16:52 +08:00
API: Avoid exposing pkg/ice
OnICEConnectionStateChange now return a ICEConnectionState instead of ice.ConnectionState. Resolves #422
This commit is contained in:

committed by
Michiel De Backker

parent
ad647c28d7
commit
bf422e0c0a
@@ -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())
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user