mirror of
https://github.com/pion/webrtc.git
synced 2025-10-23 07:09:27 +08:00
Revert public API name changes for on event handlers
This commit is contained in:
@@ -46,7 +46,7 @@ func main() {
|
||||
|
||||
// Set a handler for when a new remote track starts, this handler creates a gstreamer pipeline
|
||||
// for the given codec
|
||||
peerConnection.OnTrack = func(track *webrtc.RTCTrack) {
|
||||
peerConnection.Ontrack = func(track *webrtc.RTCTrack) {
|
||||
codec := track.Codec
|
||||
fmt.Printf("Track has started, of type %d: %s \n", track.PayloadType, codec.Name)
|
||||
pipeline := gst.CreatePipeline(codec.Name)
|
||||
@@ -59,7 +59,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 ice.ConnectionState) {
|
||||
fmt.Printf("Connection State has changed %s \n", connectionState.String())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user