Hello,
I always get this error, when i want to create my SDP answer. Seems
like an easy to solve problem, but i always call setRemoteDescription
before i call createAnswer. Here is the relevant code:
var sd = {
sdp : sdp,
type : 'offer'
};
pc.setRemoteDescription(new RTCSessionDescription(
sd));
pc.createAnswer(function(sessionDescription) {
pc.setLocalDescription(sessionDescription);
// Send answer to peer
sendMessage(Method.SEND_ANSWER,sessionDescription.sdp);
}, function(error) {
console.log("Could not create SDP answer! Reason: " + error);
}, {
has_audio : true,
has_video : true
});
The variable sdp stores:
v=0
o=- 4267985828 9 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
m=audio 56959 RTP/SAVPF 103 104 0 8 106 105 13 126
c=IN IP4 92.228.253.199
a=rtcp:56959 IN IP4 92.228.253.199
a=candidate:704553097 1 udp 2113937151 192.168.1.3 56958 typ host
generation 0
a=candidate:704553097 2 udp 2113937151 192.168.1.3 56958 typ host
generation 0
a=candidate:
2158047068 1 udp 1677729535 92.228.253.199 56959 typ srflx
generation 0
a=candidate:
2158047068 2 udp 1677729535 92.228.253.199 56959 typ srflx
generation 0
a=candidate:1736268921 1 tcp 1509957375 192.168.1.3 64113 typ host
generation 0
a=candidate:1736268921 2 tcp 1509957375 192.168.1.3 64113 typ host
generation 0
a=ice-ufrag:vOuOJrv+CqOjFy6c
a=ice-pwd:hThZ9i0Q1BGYJkP+Fs2hK17B
a=ice-options:google-ice
a=sendrecv
a=mid:audio
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:7ZCFcn0H8QVQu00vLtB0/
Lfr5DKkGIEOclzljhNG
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=ssrc:
3645841120 cname:xaUL8Ns3GSC9NSYw
a=ssrc:
3645841120 mslabel:5v1aOYq72fGJGWAjHIUkXsU5lKXUohBgiOH9
a=ssrc:
3645841120 label:5v1aOYq72fGJGWAjHIUkXsU5lKXUohBgiOH900
m=video 56959 RTP/SAVPF 100 101 102
c=IN IP4 92.228.253.199
a=rtcp:56959 IN IP4 92.228.253.199
a=candidate:704553097 1 udp 2113937151 192.168.1.3 56958 typ host
generation 0
a=candidate:704553097 2 udp 2113937151 192.168.1.3 56958 typ host
generation 0
a=candidate:
2158047068 1 udp 1677729535 92.228.253.199 56959 typ srflx
generation 0
a=candidate:
2158047068 2 udp 1677729535 92.228.253.199 56959 typ srflx
generation 0
a=candidate:1736268921 1 tcp 1509957375 192.168.1.3 64113 typ host
generation 0
a=candidate:1736268921 2 tcp 1509957375 192.168.1.3 64113 typ host
generation 0
a=ice-ufrag:vOuOJrv+CqOjFy6c
a=ice-pwd:hThZ9i0Q1BGYJkP+Fs2hK17B
a=ice-options:google-ice
a=sendrecv
a=mid:video
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:7ZCFcn0H8QVQu00vLtB0/
Lfr5DKkGIEOclzljhNG
a=rtpmap:100 VP8/90000
a=rtpmap:101 red/90000
a=rtpmap:102 ulpfec/90000
a=ssrc:2324717541 cname:xaUL8Ns3GSC9NSYw
a=ssrc:2324717541 mslabel:5v1aOYq72fGJGWAjHIUkXsU5lKXUohBgiOH9
a=ssrc:2324717541 label:5v1aOYq72fGJGWAjHIUkXsU5lKXUohBgiOH910
I dont know what to do.
Thanks for your help!