mirror of
				https://github.com/pion/webrtc.git
				synced 2025-11-01 03:04:06 +08:00 
			
		
		
		
	API: Avoid exposing pkg/ice
OnICEConnectionStateChange now return a ICEConnectionState instead of ice.ConnectionState. Resolves #422
This commit is contained in:
		 backkem
					backkem
				
			
				
					committed by
					
						 Michiel De Backker
						Michiel De Backker
					
				
			
			
				
	
			
			
			 Michiel De Backker
						Michiel De Backker
					
				
			
						parent
						
							ad647c28d7
						
					
				
				
					commit
					bf422e0c0a
				
			| @@ -7,7 +7,6 @@ import ( | ||||
| 	"github.com/pions/webrtc" | ||||
| 	"github.com/pions/webrtc/examples/util" | ||||
| 	gst "github.com/pions/webrtc/examples/util/gstreamer-src" | ||||
| 	"github.com/pions/webrtc/pkg/ice" | ||||
| ) | ||||
|  | ||||
| func main() { | ||||
| @@ -36,7 +35,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("Connection State has changed %s \n", connectionState.String()) | ||||
| 	}) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user