Open satishjkoladiya opened 1 year ago
use
do {
let producer = try sendTransport.createProducer(for: audioTrack, encodings: nil, codecOptions: nil, appData: nil)
} catch {
print(error.localizedDescription)
}
to catch the error
There are several possible reasons. As @Mahmoud-Yousef said, we need more logs to investigate this. At least print out the error thrown by createProducer(...)
.
What it can be:
SendTransportDelegate
not implemented correctly. Make sure you've set transport delegate and implemented onProduce
method. This method must talk to your media server via signaling mechanism, your server creates producer on server-side and provides you an id for created producer. onProduce
method must call it's callback closure with id provided by your media server.
let producer = try? sendTransport.createProducer(for: audioTrack, encodings: nil, codecOptions: nil, appData: nil)
this is returning nil. please help me to resolve this