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

Put webrtc SDP inside Quality struct

This commit is contained in:
Alexandre Iooss
2020-10-19 21:45:23 +02:00
parent e848d92a1a
commit e1f83a32df
8 changed files with 71 additions and 85 deletions

View File

@ -11,18 +11,13 @@ import (
func TestServe(t *testing.T) {
// Init streams messaging and WebRTC server
streams := messaging.New()
remoteSdpChan := make(chan struct {
StreamID string
RemoteDescription webrtc.SessionDescription
})
localSdpChan := make(chan webrtc.SessionDescription)
cfg := Options{
Enabled: true,
MinPortUDP: 10000,
MaxPortUDP: 10005,
STUNServers: []string{"stun:stun.l.google.com:19302"},
}
go Serve(streams, remoteSdpChan, localSdpChan, &cfg)
go Serve(streams, &cfg)
// New client connection
mediaEngine := webrtc.MediaEngine{}
@ -58,12 +53,6 @@ func TestServe(t *testing.T) {
peerConnection.SetLocalDescription(offer)
<-gatherComplete
// Send offer to server
remoteSdpChan <- struct {
StreamID string
RemoteDescription webrtc.SessionDescription
}{"demo", *peerConnection.LocalDescription()}
_ = <-localSdpChan
// FIXME: Send offer to server
// FIXME: verify connection did work
}