I have tried to emit my code using socket.io library but i got error mentioned below. reason: 'Invalid type in JSON write (RTCIceCandidate)' Here is my code.
var dict = [String:Any]()
dict["type"] = "canidate"
dict["label"] = candidate.sdpMLineIndex
dict["id"] = candidate.sdpMid
dict["canidate"] = candidate
print("============== printing ============")
print(dict)
socket.emit("candidate", self.viewerId, dict)
I want emit data to the server. Basically i want to send RTCIceCandidate data to the server.