1
0
Fork 0
forked from External/mediamtx

webrtc: unexport WHIP primitives (#3233)

This commit is contained in:
Alessandro Ros 2024-04-13 11:08:30 +02:00 committed by GitHub
parent a6cc52f0b2
commit a18bebfa58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 169 additions and 203 deletions

View file

@ -207,8 +207,17 @@ func TestServerOptionsICEServer(t *testing.T) {
defer tr.CloseIdleConnections()
hc := &http.Client{Transport: tr}
iceServers, err := webrtc.WHIPOptionsICEServers(context.Background(), hc,
"http://myuser:mypass@localhost:8886/nonexisting/whep")
req, err := http.NewRequest(http.MethodOptions,
"http://myuser:mypass@localhost:8886/nonexisting/whep", nil)
require.NoError(t, err)
res, err := hc.Do(req)
require.NoError(t, err)
defer res.Body.Close()
require.Equal(t, http.StatusNoContent, res.StatusCode)
iceServers, err := webrtc.LinkHeaderUnmarshal(res.Header["Link"])
require.NoError(t, err)
require.Equal(t, []pwebrtc.ICEServer{{