mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Handle answers in stable state.
Don't break the stream, just ignore the SDP.
This commit is contained in:
parent
14e99aa125
commit
9a5c8b6b43
1 changed files with 12 additions and 7 deletions
|
@ -554,6 +554,10 @@ func gotAnswer(c *webClient, id string, sdp string) error {
|
||||||
if down == nil {
|
if down == nil {
|
||||||
return ErrUnknownId
|
return ErrUnknownId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if down.pc.SignalingState() == webrtc.SignalingStateStable {
|
||||||
|
log.Printf("Got answer in stable state -- this shouldn't happen")
|
||||||
|
} else {
|
||||||
err := down.pc.SetRemoteDescription(webrtc.SessionDescription{
|
err := down.pc.SetRemoteDescription(webrtc.SessionDescription{
|
||||||
Type: webrtc.SDPTypeAnswer,
|
Type: webrtc.SDPTypeAnswer,
|
||||||
SDP: sdp,
|
SDP: sdp,
|
||||||
|
@ -561,6 +565,7 @@ func gotAnswer(c *webClient, id string, sdp string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for _, t := range down.tracks {
|
for _, t := range down.tracks {
|
||||||
local := t.track.Codec()
|
local := t.track.Codec()
|
||||||
|
@ -571,7 +576,7 @@ func gotAnswer(c *webClient, id string, sdp string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = down.flushICECandidates()
|
err := down.flushICECandidates()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("ICE: %v", err)
|
log.Printf("ICE: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue