Open tyczj opened 1 month ago
Just after posting this I found out how to fix it
for anyone else coming across this issue, you cannot just pass in the whole object like this
peerConnection.setRemoteDescription(new RTCSessionDescription(sdp))
or
peerConnection.setRemoteDescription(sdp)
Instead you have to put the type and description in explicitly
peerConnection.setRemoteDescription(new RTCSessionDescription({
type: sdp.type.toLowerCase(),
sdp: sdp.description
}))
Opening this back up because I dont know if this is a "bug" or not based on the documentation for RTCSessionDescription that using this method is deprecated because setLocalDescription and setRemoteDescription accept sdp
that conform to RTCSessionDescriptionInit
.
So does that mean the SessionDescription in this library is out of date? Feel free to close again if this isnt a bug and is correct
When trying to send the Android SessionDescription object to a web client RTCSessionDescription I get an error
I also got an error saying that the type enum was incorrect and ANSWER didnt exist, I had to
toLowerCase
on the type in the web client for that error to go awayWhen sending the SessionDescription from android I convert it to json with gson like I have seen in a lot of examples
Then on the web side I just put that value into the description
peerConnection.setRemoteDescription(new RTCSessionDescription(sdp))
This is what the description data looks like
These two types dont seem compatible, what are you suppose to do?