Hello Guys,
I am stuck with my experiments to get started with WebRTC.
I managed to pass the SDP from caller to callee via websockets. So in the callee's socket.onmessage when the message type equals "session_description", I have the following code to attach the caller's SDP to the current peerConnection object of the callee.
peerConnection.setRemoteDescription(new RTCSessionDescription(message.sdp),successCallBack,errorCallBack);
But Chrome gives and error "
Uncaught TypeError: RTCSessionDescription is not a constructor"
When i checked the webrtc docs, it says new RTCSessionDescription() constructor is deprecated.
What is the alternative solution here?
Thanks.