crow-misia / libmediasoup-android

libmediasoupclient for Android
Apache License 2.0
9 stars 9 forks source link

onTransportClose event is never handled #18

Open kasperdun opened 1 year ago

kasperdun commented 1 year ago

Hi, event onTransportClose have to be handled when call sendTransport.close() But when I call sendTransport.close() event is not handled

Also this is not work in your demo

sendTransport.produce(
                listener = object : Producer.Listener {
                    override fun onTransportClose(producer: Producer) {
                        Log.d(TAG) { "onTransportClose()" } // never printed
                    }
                },
                track = track,
                encodings = emptyList(),
                codecOptions = null,
                appData = null,
            )
crow-misia commented 1 year ago

If Producer is closed before Transport, it will not be notified.

Listener may not be handling it properly. Can you check if other callback methods of the Producer are called?

kasperdun commented 1 year ago

I know it and I checked, when I call sendTransport.close() producer is not closed at this moment

crow-misia commented 8 months ago

Fixed in 0.14.1. Method was not called because of an error in object type conversion.