Open Raonshi opened 11 months ago
Hello.
When I call the "SendTransport.createProducer()" function, it returns nil always. I don't know why.
createProducer
method does not ever returns nil
, it just cannot do that. To see that, you should start with implementing a proper errors handling. It will give you useful information for further steps.
do {
videoProducer = try sendTransport?.createProducer(for: videoTrack!, encodings: nil, codecOptions: nil, codec: nil, appData: nil)
audioProducer = try sendTransport?.createProducer(for: audioTrack!, encodings: nil, codecOptions: nil, codec: nil, appData: nil)
} catch {
print("Failed to create producer with error \(error)")
}
@fedulvtubudul
Hello. Thanks for your advice.
Actually, I solved this issue last night. I just removed every code in onProduce
event except callback
function. After that, it works well.
But, i don't know why it works well. To analyze this issue, I can share more detail information.
The answer of your comment is,
I receviced MediasoupClientErrorDomain Code=3
message. this error doesn't have any userInfo value.
I received the same error as you when i'm creating the producer
unknown: Error Domain=MediasoupClientErrorDomain Code=3 "The associated promise has been destructed prior to the associated state becoming ready." UserInfo={NSLocalizedDescription=The associated promise has been destructed prior to the associated state becoming ready.}
But no idea how to solve this~
Hello. I just have a problem about creating Producer. I'm making video chat application using MQTT and Mediasoup.
When I call the "SendTransport.createProducer()" function, it returns nil always. I don't know why.
Could you give me some advices?
Here are my sample code