1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-29 18:01:07 +02:00

Test WebRTC Serve

This commit is contained in:
Alexandre Iooss
2020-10-14 18:57:37 +02:00
parent 099fb8e203
commit 177ed189ff
2 changed files with 71 additions and 3 deletions

View File

@ -2,7 +2,6 @@
package webrtc
import (
"fmt"
"log"
"math/rand"
"strings"
@ -166,7 +165,7 @@ func newPeerHandler(localSdpChan chan webrtc.SessionDescription, remoteSdp struc
<-gatherComplete
// Send answer to client
localSdpChan <- answer
localSdpChan <- *peerConnection.LocalDescription()
}
// Search for Codec PayloadType
@ -178,7 +177,8 @@ func getPayloadType(m webrtc.MediaEngine, codecType webrtc.RTPCodecType, codecNa
return codec, codec.PayloadType
}
}
panic(fmt.Sprintf("Remote peer does not support %s", codecName))
log.Printf("Remote peer does not support %s", codecName)
return nil, 0
}
// Serve WebRTC media streaming server