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:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user