-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
local video stops displaying when calling SendTransport.produce #37
Comments
おはよう〜w Are you using the latest version of the library? |
Thanks for the quick response! I'm using version This is the usual output in the console (with or without your loggin enabled):
sidenote: I don't think it matters, but I'm using my own socket.io backend for signaling. |
Does your backend return data for the produce request? Also could you share the rtpCapabilities used when loading the device? |
I've been restructuring things a little and have a short side-question if you don't mind. In your sample app. private class SendTransportHandler : NSObject, SendTransportListener {
fileprivate weak var delegate: SendTransportListener?
private var parent: RoomClient
self.sendTransportHandler = SendTransportHandler.init(parent: self)
self.sendTransportHandler!.delegate = self.sendTransportHandler! Could you explain the reasoning behind having a separate class for delegating the As for your question: rtpCapabilities are as follows:
|
I got it working now. It seems the problem was with the Socket.IO implementation. before: func request(_ event: String,
data: SocketData = [],
_ completion: @escaping (_ data: JSON) -> Void = { _ in }) {
client.emitWithAck(event, data).timingOut(after: self.TO) { data in
do {
let json = try self.data2JSON(data: data)
completion(json)
} catch {
l.error(error)
}
}
} now: func syncRequest(_ event: String,
data: SocketData = []) -> JSON? {
let semaphore: DispatchSemaphore = DispatchSemaphore.init(value: 0)
var response: JSON?
let queue: DispatchQueue = DispatchQueue.global()
queue.async {
self.client.emitWithAck(event, data).timingOut(after: self.TO) { data in
do {
let json = try self.data2JSON(data: data)
response = json
semaphore.signal()
} catch {
l.error(error)
}
}
}
_ = semaphore.wait(timeout: .now() + 10.0)
return response
} Edit: Sorry to bother you so much. It seems like this is solely Socket.IO issue, hence I'm going to close this. |
Great, glad to see you got it working. The reason I separated the Recv/Send listeners it because they share the same name (onConnect), so I couldn't use both of them in the same class.... |
ah, thanks for clearing that up! If your edit: well, ok, I just saw that
Similar problem. But maybe this could be avoided if you change the signature to edit2: func onConnect(_ transport: Transport!, dtlsParameters: String!) {
let params = JSON(parseJSON: dtlsParameters).dictionaryObject
if transport is RecvTransport {
// connect consumer transport request
}
if transport is SendTransport {
// connect producer transport request
}
} |
お疲れ様です!🙂
Thanks for creating this framework.
I've been mostly sticking to the implementation of your sample app https://github.com/ethand91/mediasoup-ios-client-sample
but when
is called, it fails silently (
test
is not printed) and theRTCEAGLVideoView
(orRTCMTLVideoView
) used to render theVideoTrack
stops showing the video input. I can confirm that the VideoView is working by not callingproduce
.Do you have any idea what I'm missing?
Best Regards,
Martin
The text was updated successfully, but these errors were encountered: