mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
webrtc: unexport WHIP primitives (#3233)
This commit is contained in:
parent
a6cc52f0b2
commit
a18bebfa58
6 changed files with 169 additions and 203 deletions
|
|
@ -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{{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue