fix(sfu): Failed to load onICEConnectionStateChangeHandler
@@ -70,8 +70,8 @@ func NewPublisher(session *Session, id string, cfg WebRTCTransportConfig) (*Publ
p.Close()
}
- if handler, ok := p.onICEConnectionStateChangeHandler.Load().(func()); ok && handler != nil {
- handler()
+ if handler, ok := p.onICEConnectionStateChangeHandler.Load().(func(webrtc.ICEConnectionState)); ok && handler != nil {
+ handler(connectionState)
}
})
